Skip to main content

Refunding payments

Requesting a refund of a charge to the user's wallet#

The refund request must be generated with the transaction_id or reference_id through the endpoint v1/payments/refund, indicating the amount to be refunded in the body of the request. In the example below, we are requesting a refund of BRL 3.00 to the user's wallet.

Information

The transaction_id field is generated when creating the payment.

curl --location 'https://api.picpay.com/v1/payments/refund' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'x-Idempotency-Key: {{idempotency_key}}' \
--header 'Content-Type: application/json' \
--data '{
"value": 3,
"transaction_id": "daef8a44-b408-4df1-b726-c579723f1116",
"reference_id": "f997bbef-8e17-4e59-b1a9-de1fe1dedd51"
}'

If the request is successfully processed, it will return an HTTP 200 code.

How will the refund be made?#

The balance will be returned to the same source of funds:

  • If the transaction was made by credit card, it will be reversed on the card;
  • If the transaction was made from the balance, the balance will return to the customer's wallet;
  • If the transaction is mixed (Balance + Card), part will return as balance in the wallet and part will be reversed on the card;

Error messages#

We do not report error codes in the refund process. We only inform whether the transaction was refunded or not. Example:

{
"message": "Transaction could not be refund"
}