Reembolsos
POST /payments/transactions/:id/refunds → 201
Seção intitulada “POST /payments/transactions/:id/refunds → 201”Cria um reembolso PIX. Requer scope CREATE_REFUND e o header Idempotency-Key (ausente → 400).
id = ID da sub-transação.
Body:
| Campo | Tipo | Obrigatório | Regras |
|---|---|---|---|
amountCents | int | não | positivo; se omitido = reembolso total do disponível |
reason | string | não | máx 500 |
Resposta (201):
{ "refundId": "uuid", "status": "PROCESSING", "amountCents": 10000 }status inicial PROCESSING; o desfecho final (COMPLETED/FAILED) chega via webhook transaction.refunded.
GET /payments/transactions/:id/refunds → 200
Seção intitulada “GET /payments/transactions/:id/refunds → 200”Requer scope CREATE_REFUND. Lista os reembolsos de uma sub-transação (escopo da empresa da chave). Retorna array de objetos de reembolso.
GET /refunds/:id → 200
Seção intitulada “GET /refunds/:id → 200”Requer scope CREATE_REFUND. Retorna um reembolso pelo seu ID. Não encontrado / de outra empresa → 404.
Objeto de reembolso (refundResponseSchema):
{ "id": "uuid", "subTransactionId": "uuid", "status": "COMPLETED", "amount": 10000, "currency": "BRL", "reason": "string | null", "providerRefundId": "string | null", "pixReturnE2eId": "string | null", "requestedAt": "ISO | null", "completedAt": "ISO | null", "failedReason": "string | null"}status ∈ REQUESTED | PROCESSING | COMPLETED | FAILED | CANCELED. amount em centavos.