Reembolsar transação
curl --request POST \
--url https://gateway.staging.azentech.dev/api/transactions/reimbursement \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"transaction_id": "10000000-0000-4000-8000-000000000001",
"amount": 25.9
}
'import requests
url = "https://gateway.staging.azentech.dev/api/transactions/reimbursement"
payload = {
"transaction_id": "10000000-0000-4000-8000-000000000001",
"amount": 25.9
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({transaction_id: '10000000-0000-4000-8000-000000000001', amount: 25.9})
};
fetch('https://gateway.staging.azentech.dev/api/transactions/reimbursement', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "Reimbursement processed successfully",
"transaction": {
"id": "10000000-0000-4000-8000-000000000001",
"merchant_id": "20000000-0000-4000-8000-000000000001",
"user_id": "30000000-0000-4000-8000-000000000001",
"processor_id": "40000000-0000-4000-8000-000000000001",
"merchant_transaction_id": "50000000-0000-4000-8000-000000000001",
"transaction_type": "pix",
"first_name": "Cliente",
"last_name": "Exemplo",
"email": "cliente@example.com",
"updated_at": "2026-10-23T14:30:00+00:00",
"created_at": "2026-10-23T14:30:00+00:00",
"events": [
{
"id": "60000000-0000-4000-8000-000000000001",
"success": true,
"status": "success",
"event_type": "auth",
"amount": "125.90",
"ip_address": "192.0.2.10",
"processor_code": null,
"processor_message": null,
"processor_transaction_id": "sandbox-event-1001",
"batch_id": null,
"qrcode": "00020101021226850014br.gov.bcb.pix2563example.invalid/pix/1001",
"qrcode_image": "",
"pix_key_type": null,
"pix_key_value": null,
"pix_message": "Deposito para: CONTA DEMO",
"updated_at": "2026-10-23T14:30:00+00:00",
"created_at": "2026-10-23T14:30:00+00:00"
},
{
"id": "60000000-0000-4000-8000-000000000003",
"success": true,
"status": "success",
"event_type": "capture",
"amount": "125.90",
"ip_address": "192.0.2.10",
"processor_code": null,
"processor_message": null,
"processor_transaction_id": "sandbox-event-1001",
"batch_id": null,
"qrcode": null,
"qrcode_image": "",
"pix_key_type": null,
"pix_key_value": null,
"pix_message": "Deposito para: CONTA DEMO",
"updated_at": "2026-10-23T14:30:30+00:00",
"created_at": "2026-10-23T14:30:30+00:00"
}
],
"document_number": "12345678909",
"status": "success",
"flow_type": "cashin",
"error": null,
"e2e_id": null,
"source": "player",
"tag": "demo"
},
"reimbursement_event": {
"id": "60000000-0000-4000-8000-000000000002",
"success": false,
"status": "declined",
"event_status": "created",
"wallet_recovery_status": null,
"event_type": "reimbursement",
"amount": "25.90",
"processor_transaction_id": "sandbox-event-1001",
"updated_at": "2026-10-23T14:31:00+00:00",
"created_at": "2026-10-23T14:31:00+00:00",
"transaction": {
"id": "10000000-0000-4000-8000-000000000001",
"merchant_id": "20000000-0000-4000-8000-000000000001",
"user_id": "30000000-0000-4000-8000-000000000001",
"processor_id": "40000000-0000-4000-8000-000000000001",
"merchant_transaction_id": "50000000-0000-4000-8000-000000000001",
"transaction_type": "pix",
"first_name": "Cliente",
"last_name": "Exemplo",
"email": "cliente@example.com",
"updated_at": "2026-10-23T14:30:00+00:00",
"created_at": "2026-10-23T14:30:00+00:00",
"document_number": "12345678909",
"status": "success",
"flow_type": "cashin",
"error": null,
"e2e_id": null,
"source": "player",
"tag": "demo",
"meta": null,
"transaction_repay_id": null,
"responsable": null,
"observation": null,
"is_repaid": false,
"is_biometrics_pix": false
},
"pix_key_type": null,
"pix_key_value": null,
"pix_message": null
}
}Transações
Reembolsar transação
Solicita o reembolso total ou parcial de uma cobrança capturada.
POST
/
api
/
transactions
/
reimbursement
Reembolsar transação
curl --request POST \
--url https://gateway.staging.azentech.dev/api/transactions/reimbursement \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"transaction_id": "10000000-0000-4000-8000-000000000001",
"amount": 25.9
}
'import requests
url = "https://gateway.staging.azentech.dev/api/transactions/reimbursement"
payload = {
"transaction_id": "10000000-0000-4000-8000-000000000001",
"amount": 25.9
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({transaction_id: '10000000-0000-4000-8000-000000000001', amount: 25.9})
};
fetch('https://gateway.staging.azentech.dev/api/transactions/reimbursement', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "Reimbursement processed successfully",
"transaction": {
"id": "10000000-0000-4000-8000-000000000001",
"merchant_id": "20000000-0000-4000-8000-000000000001",
"user_id": "30000000-0000-4000-8000-000000000001",
"processor_id": "40000000-0000-4000-8000-000000000001",
"merchant_transaction_id": "50000000-0000-4000-8000-000000000001",
"transaction_type": "pix",
"first_name": "Cliente",
"last_name": "Exemplo",
"email": "cliente@example.com",
"updated_at": "2026-10-23T14:30:00+00:00",
"created_at": "2026-10-23T14:30:00+00:00",
"events": [
{
"id": "60000000-0000-4000-8000-000000000001",
"success": true,
"status": "success",
"event_type": "auth",
"amount": "125.90",
"ip_address": "192.0.2.10",
"processor_code": null,
"processor_message": null,
"processor_transaction_id": "sandbox-event-1001",
"batch_id": null,
"qrcode": "00020101021226850014br.gov.bcb.pix2563example.invalid/pix/1001",
"qrcode_image": "",
"pix_key_type": null,
"pix_key_value": null,
"pix_message": "Deposito para: CONTA DEMO",
"updated_at": "2026-10-23T14:30:00+00:00",
"created_at": "2026-10-23T14:30:00+00:00"
},
{
"id": "60000000-0000-4000-8000-000000000003",
"success": true,
"status": "success",
"event_type": "capture",
"amount": "125.90",
"ip_address": "192.0.2.10",
"processor_code": null,
"processor_message": null,
"processor_transaction_id": "sandbox-event-1001",
"batch_id": null,
"qrcode": null,
"qrcode_image": "",
"pix_key_type": null,
"pix_key_value": null,
"pix_message": "Deposito para: CONTA DEMO",
"updated_at": "2026-10-23T14:30:30+00:00",
"created_at": "2026-10-23T14:30:30+00:00"
}
],
"document_number": "12345678909",
"status": "success",
"flow_type": "cashin",
"error": null,
"e2e_id": null,
"source": "player",
"tag": "demo"
},
"reimbursement_event": {
"id": "60000000-0000-4000-8000-000000000002",
"success": false,
"status": "declined",
"event_status": "created",
"wallet_recovery_status": null,
"event_type": "reimbursement",
"amount": "25.90",
"processor_transaction_id": "sandbox-event-1001",
"updated_at": "2026-10-23T14:31:00+00:00",
"created_at": "2026-10-23T14:31:00+00:00",
"transaction": {
"id": "10000000-0000-4000-8000-000000000001",
"merchant_id": "20000000-0000-4000-8000-000000000001",
"user_id": "30000000-0000-4000-8000-000000000001",
"processor_id": "40000000-0000-4000-8000-000000000001",
"merchant_transaction_id": "50000000-0000-4000-8000-000000000001",
"transaction_type": "pix",
"first_name": "Cliente",
"last_name": "Exemplo",
"email": "cliente@example.com",
"updated_at": "2026-10-23T14:30:00+00:00",
"created_at": "2026-10-23T14:30:00+00:00",
"document_number": "12345678909",
"status": "success",
"flow_type": "cashin",
"error": null,
"e2e_id": null,
"source": "player",
"tag": "demo",
"meta": null,
"transaction_repay_id": null,
"responsable": null,
"observation": null,
"is_repaid": false,
"is_biometrics_pix": false
},
"pix_key_type": null,
"pix_key_value": null,
"pix_message": null
}
}Comportamento observado
- Envie pelo menos um identificador para selecionar a transação pretendida.
- O Gateway atual não rejeita um corpo sem identificadores. Nesse caso, a consulta fica limitada apenas ao estabelecimento e seleciona o primeiro resultado. Não dependa desse comportamento.
- Quando mais de um identificador é enviado, todos precisam corresponder à mesma transação.
- Reembolsos pendentes e falhas sem recuperação durável continuam consumindo o valor capturado disponível.
Os exemplos usam identificadores e credenciais sintéticos. Os resultados do processador dependem do credenciamento e da configuração do estabelecimento.
Authorizations
Token de acesso fornecido para o estabelecimento.
Body
application/json