This route is used to refund payments that are on PAID or PARTIALLY_REFUNDED status.
Provide the PAYMENT ID via the PATH parameter
The route is designed to refund one PAYMENT per request. Once executed, a new PAYOUT with the same bank information as the original payment will be generated.
Partial Refund -> When creating a Partial Refund, it is possible to refund only part of the original payment amount. In the request body, you need to specify the amount to be refunded, along with the precision (number of decimal places). For example, you would provide the amount as a numerical value and indicate the precision as 2.
Total Refund -> When creating a "total refund," the amount is the same as the original payment, and no additional information is required beyond the PAYMENT ID via the PATH parameter
When the full value of the payment is refunded, be it either through a total refund or through subsequent partial refunds covering the remaining value, the payment will be set as finished on REFUNDED status, blocking any further action on it.
For a history of each refund made for the payment, specifying the value and creation date of each, you can use the refund history route down below.
You can search for the PAYOUT (refund requested through this route, which can be partial or total) using the find route by adding either the externalId or the beneficiary's document to the request, as per the List Payouts instructions.