...
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 | 5.2 |
customer_bank | Only used when a refund is rejected. See note 6.2, item "c". | No | 40 |
customer_branch | Only used when a refund is rejected. See note 6.2, item "c". | No | 12 |
customer_account | Only used when a refund is rejected. See note 6.2, item "c". | No | 12 |
Note: A successful response for the refund request will be "Refund request received".
...
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 | Value "X". This value specifies that the data being posted is the response to a PagBrasil Pix refund request. | 1 |
order | Order number | 64 |
amount_brl | Amount in Brazilian Real | 5.2 |
amount_refunded | Amount refunded (Brazilian Real) | 5.2 |
payment_status | C = Chargeback See note "a" | 1 |
signature | HMAC-MD5 hash that authenticates the IPN. | 32 |
Notes:
a) The payment status is returned as "C" (Chargeback) when a previously authorized transaction is reversed by the wallet/bank. In addition our system will send a chargeback notification to the e-mail address you registered at the PagBrasil Dashboard.
...
d) To authenticate the legitimacy of the IPN, you may check the parameter secret and/or the parameter signature, which is a HMAC-MD5 hash based on three parameters and a key defined at the PagBrasil Dashboard, menu Account > Settings. The HMAC-MD5 source string is the concatenation of the values of the parameters order, amount_brl and payment_status and the total length for these three parameters. For example, if parameter order="1234567890", amount_brl="39.50" and payment_status="P", the parameter signature would be "3093a7dffa0c04e74e827d1b52ef514e".
...