Refund a payment
Use a refund to return a payment to a customer. Refunds can be made in the Hub 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.
Refunds are always processed in the same currency as the captured payment.
You cannot cancel a refund after it has been processed.
Overview
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.
The request
Use the details below to set up your request.
Endpoints
Live
Sandbox
Header and path parameters
Header | Value |
---|---|
|
|
|
|
Path | Value |
---|---|
| The ID of the captured payment, embedded within the payment response (prefixed by |
Body parameters
Field name | Description |
---|---|
amount Integer Optional | The amount to refund. If not specified, the full payment amount will be refunded. |
| A reference you can later use to identify this refund request. |
| A set of key/value pairs that you can attach to the refund request. It can be useful for storing additional information in a structured format. |
Request example
{
"reference": "ORD-5023-4E89",
"metadata": {
"coupon_code": "NY2018",
"partner_id": 123989
}
}
The response
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.
Response examples
{
"action_id": "act_y3oqhf46pyzuxjbcn2giaqnb44",
"reference": "ORD-5023-4E89",
"_links": {
"payment": {
"href": "https://api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44"
}
}
}
{
"request_id": "0HL80RJLS76I7",
"error_type": "request_invalid",
"error_codes": [
"payment_source_required"
]
}
Additional error responses:
403 Refund not allowed
404 Payment not found
Troubleshooting
Let's take a look at what might have happened — this checklist might help to 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?
Can we help?
Thanks for using Checkout.com. If you need any help or support, then message our support team at [email protected].
Updated 5 months ago