Valid for integration with the "Cielo2" provider.
Learn more about this feature in the documentation.
If your merchant needs to refund a Pix transfer, it is possible to perform an operation called a refund. When a refund is accepted, a notification will be sent to the merchant.
- The shopper (payer) must request a full or partial refund of a completed Pix payment from the merchant (payee) through an appropriate communication channel;
- The merchant (payee) agrees and identifies the original Pix payment.
When can I request a Pix refund?
A Pix refund can be requested in cases such as product returns, billing errors, or product unavailability in stock.
Who requests the Pix refund through the Gateway de Pagamento?
The merchant (seller who received the Pix transaction) is responsible for requesting the refund through the Gateway de Pagamento, either on their own initiative or at the shopper's request. It is important to observe the deadlines (according to the regulations of the Banco Central do Brasil).
How to request a Pix refund?
Through the Gateway de Pagamento API.
Pix refund rules
- The refund will only be processed if there is a balance in the merchant's payment account. To maintain a balance, you must select the Free Movement Management option in the Pix account;
- The Pix transaction fee and/or creation charge will not be refunded;
- For transfers, sales, and other Pix transactions, the refund period is up to 90 days from the date of the original transaction, according to Banco Central's specifications;
- A Pix refund can be full (total transaction amount) or partial (a portion of the transaction amount).
Warning
Merchants who choose automatic transfers from the Pix account (Simplified Management) will not have a balance in their payment account. As a result, the refund cannot be successfully processed, and the response will be “Merchant has insufficient balance for refund”.
Request
Environment | Method | Endpoint |
---|---|---|
Sandbox | put | https://apisandbox.braspag.com.br/v2/sales/{PaymentId}/void |
Production | put | https://api.braspag.com.br/v2/sales/{PaymentId}/void |
Path parameters
Field | Type | Description | Required |
---|---|---|---|
PaymentId | string | Payment identifier returned by the API when creating the Pix QR Code. Length: 36 characters. | Yes |
Header parameters
Property | Description | Type | Size | Required |
---|---|---|---|---|
MerchantId | Merchant identifier in Gateway de Pagamento. | Text | 36 | Yes |
MerchantKey | Public key for dual authentication in Gateway de Pagamento. | Text | 40 | Yes |
RequestId | Request identifier, used when the merchant uses different servers for each GET/POST/PUT. | Text | 36 | No |
Response
{
"Status": 2,
"ReasonCode": 8,
"ReasonMessage": "Scheduled",
"ProviderReturnCode": "0",
"ProviderReturnMessage": "OPERACAO REALIZADA COM SUCESSO",
"Links": [
{
"Method": "GET",
"Rel": "self",
"Href": "https://apiquerysandbox.braspag.com.br/v2/sales/34fc280a-8b98-44c9-bc8f-5911bbeef952"
},
{
"Method": "PUT",
"Rel": "void",
"Href": "https://apisandbox.braspag.com.br/v2/sales/34fc280a-8b98-44c9-bc8f-5911bbeef952/void"
}
]
}
The following table lists the main parameters that may be returned by the Gateway de Pagamento in a Pix refund:
Field | Type | Description |
---|---|---|
Status | number | Transaction status. |
ReasonCode | number | Return code. |
ReasonMessage | number | Return message. |
ProviderReturnCode | number | Provider return code. |
ProviderReturnMessage | text | Provider return message. |