Refund a payment
Last updated: August 14, 2024
Use a refund to return a payment to a customer. Refunds can be made in the Dashboard or by using this API endpoint.
There are two types of refunds you might need to process:
- Full refund. A full refund returns the total amount of the payment to the customer — it can only be performed once.
- Partial refund. A partial refund returns a sum less than the captured amount. A payment can be refunded multiple times, but cannot exceed the original payment amount.
Tip
Refunds are always processed in the same currency as the captured payment.
Note
You cannot cancel a refund after it has been processed.
To process a refund successfully, you must provide the payment ID of the captured payment. You can find the ID:
- In the response of the payment request
- In the webhook notification
The requests are the same for partial and full refunds. Any refunds for less than the original captured amount will be considered partial refunds.
Use the endpoint below to request a refund.
Information
If required by the card scheme, we will trigger a refund authorization before processing your refund.
For the full API specification, see the API reference.
Information
The Payments API supports idempotency. You can safely retry API requests without the risk of duplicate requests.
post
https://api.checkout.com/payments/{id}/refunds
1{2"reference": "ORD-5023-4E89",3"metadata": {4"coupon_code": "NY2018",5"partner_id": 1239896}7}
A successful refund request returns a 202 Refund accepted
response. However, if there was a problem with your request, you'll receive an error response.
Information
Refunds are asynchronous requests, which means they happen behind the scenes. The API response does not confirm whether or not the refund was successful. Create a webhook so you are notified.
1{2"action_id": "act_y3oqhf46pyzuxjbcn2giaqnb44",3"reference": "ORD-5023-4E89",4"_links": {5"payment": {6"href": "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44"7}8}9}
Information
If unsuccessful, you may also receive a 403 Refund not allowed
or 404 Payment not found
error.
If the card scheme requires it, we will automatically trigger a refund authorization on your behalf before processing your refund.
Information
Refund authorizations only apply to card payments.
Information
If a refund authorization is requested, you can find the Retrieval Reference Number (RRN) using the get payment actions call.
If the refund authorization is declined, you will receive a 422 response, like the one below.
1{2"request_id": "f5feff3f-d2ef-4c82-b4d0-ff443731581f",3"error_type": "processing_error",4"error_codes": ["refund_authorization_declined"]5}
If you want to know the reason for the decline, you can either subscribe to refund webhook notifications, use our get payment actions endpoint, or view it in your Dashboard account.
Information
To test a declined refund authorization, request a refund with the amount
set to 3738
.
If your refund request was unsuccessful, the checklist below may help you identify the problem:
- Is the refund amount higher than the original payment?
- Has the payment already been refunded?
- Did you send the authorization ID instead of the payment ID?