...
Your POST must be sent to https://sandbox.pagbrasil.com/api/order/refund setting the content-type of the request header and body as "x-www-form-urlencoded".
Please note that this URL shall only be used for integration and testing procedures. Once the Payment Service Agreement is signed, you will receive the production environment's URL when you request your account to go live.
Request parameters:
Field | Description | Required |
---|
Length | |||
---|---|---|---|
secret | Secret phrase as defined in the PagBrasil Dashboard | Yes | 128 |
pbtoken | Token assigned to your merchant account. | Yes | 32 |
order | Order number | Yes | 64 |
amount_refunded | Amount requested to be refunded (Brazilian Real) | Yes |
7.2 | |||
suspicious | Value "1" indicates that you are refunding the order because you suspect that it is a fraudulent order. That feeds our PagShield fraud prevention service database. Otherwise, set this parameter as "0" (or blank). | No | 1 |
customer_bank | Customer's bank number (número do banco). See note "b" | No | 3 |
customer_branch | Branch number (agência). | No | 12 |
customer_account | Account number (conta corrente). Must include the hyphen and the verification digit; for example: "12345678-0". | No | 12 |
Notes:
a) A successful response for the refund request will be "Refund request received".
Anchor | ||||
---|---|---|---|---|
|
6.2. Receiving the refund confirmation
You need to login to the PagBrasil Dashboard and specify the URL you want PagBrasil to notify you when the refund is processed.
PagBrasil's POST:
Field | Description |
---|
Length | ||
---|---|---|
secret | Secret phrase as defined in the PagBrasil Dashboard | 128 |
payment_method | C = Credit card |
X = PagBrasil Pix | 1 | |
order | Order number | 64 |
amount_brl | Amount in Brazilian Real |
7.2 | |
amount_refunded | Amount refunded (Brazilian Real) |
7.2 | ||
payment_status | C = Chargeback See note "a" | 1 |
signature | HMAC-MD5 hash that authenticates the IPN. See note "d" | 32 |
Notes:
Anchor | ||||
---|---|---|---|---|
|
...
Anchor | ||||
---|---|---|---|---|
|
...
Anchor | ||||
---|---|---|---|---|
|
customer_bank = Customer's bank number (número do banco). Please find the bank numbers here (column "Número CódigoCOD COMPENSAÇÃO").
customer_branch = Branch number (agência).
customer_account = Account number (conta corrente). Must include the hyphen and the verification digit; for example: "12345-6".
...
IMPORTANT: The bank account holder must be the customer, and not a third-party. The fee for this type of refund is the same as that applied for a boleto bancário refund. Please refer to your proposal or contract for further details.
...
Anchor | ||||
---|---|---|---|---|
|
...