This guide will show you how you can create refunds with the PayPro API.
Refunds are a way for a merchant to pay its customers back. You can refund the entire amount of a transaction or a portion of it.
The customer will also be notified of the refund and if you have Debtorprocess enabled you will be able to sent them new payment links.
Creating a refund
There are two ways to create a refund. You can refund an order through the Dashboard or you can create a refund with the PayPro API.
A payment can only be refunded once and can not have a larger amount than the original payment. You also need sufficient balance in your PayPro account to create a refund.
If you want to refund a single payment (not a subscription) you can use the following code:
When you want to refund a specific installment of a recurring payment you can use the following code:
When refunds are being issued the system will sent postbacks of the
Termijnstatus type. There are three statuses that the payment will go through:
wachten_op_terugbetalenRequest for refund received and waiting to be processed.
terugbetalenThe payment is getting refunded.
terugbetaaldThe payment has been refunded.
By checking for these postbacks you will be notified about the statuses of refunds and can act accordingly.
You can check the Postback Guide to see how you can handle these postback.
Would you like additional support or do you have questions? Contact us.