Refund PIX Transaction
Introduction
- Only
CREDITtransactions can be refunded, either partially or fully. - A single
CREDITtransaction may undergo multiple partial refunds, provided the total refund amount does not exceed the original transaction value. - Refunds can be executed within 90 days following the original
CREDITtransaction date.
How to Refund a PIX Transaction
To initiate a refund, call the Refund Transaction Endpoint endpoint. The code snippet below demonstrates how to make the request with the necessary headers and payload:
curl --request POST\
--url https://faas.sandbox.tracefinance.io/pix/api/transactions/{transactionId}/refund \
--header 'authorization: Bearer {accessToken}' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"amount": {
"value": 10000
},
"motive": "PROCESSING_ERROR",
"idempotentId": "24b2ae17-5a58-4465-acbb-45e11fdc2496",
"additionalInfo": "Client canceled the purchase",
"bankAccountId": "9008369c-8837-43c7-b5f2-0229622bd21c"
}
'Parameters:
{transactionId}refers to the ID of theCREDITtransaction that you wish to refund. (required)idempotentIdis a unique identifier to prevent duplicate refund requests. (required)additionalInfois an open field to provide context for the refund request to the banking team. (optional)bankAccountIdis the bank account designated to receive the PIX transaction. This information is required only if you have more than one bank account. (conditionally required)
Refund Types
- If the
amountfield is omitted or set asnull, a full refund is processed, changing the original transaction status toREFUNDED, and creating a newREFUNDtransaction. - If a specific
amountis specified, a partial refund is initiated. The original transaction's status becomesPARTIALLY_REFUNDED, and a newREFUNDtransaction is formed. Once the combined value of all partial refunds equals the original transaction's value, its status updates toREFUNDED.
What Happens Next
When a refund is requested for a transaction, a Debit Refund Transaction is created, triggering the following events:
- A TRANSACTION_CREATED is issued for a new
REFUNDtransaction, including theoriginalTransactionIdfor tracking purposes. - A TRANSACTION_PROCESSING is sent when the new
REFUNDtransaction is being processed. - A TRANSACTION_COMPLETED is sent once the
REFUNDtransaction is successfully processed, marking the completion of the refund operation.
After the Debit Refund Transaction is completed, the original credit transaction that was refunded will have its status updated to either REFUNDED or PARTIALLY_REFUNDED (in cases where the refunded amount was partial).
- A TRANSACTION_REFUNDED is dispatched for the original credit transaction.
Updated about 1 month ago
