Refund a payment
Refunds a captured payment, fully or partially via amount.
A merchant account can carry a maximum number of refunds per day. Once it is reached, this endpoint answers 400 VALIDATION_ERROR with details.reason = "DAILY_REFUND_LIMIT_REACHED" (plus details.limit and details.used) until the next UTC day. Contact us to raise or lift the limit.
If the payment provider declines the refund, the endpoint answers 400 VALIDATION_ERROR with details.reason = "REFUND_DECLINED_BY_PSP" and the provider's message in details.pspMessage. No money moved; the attempt is recorded and shows as failed on the payment's refund list. In sandbox, trigger this case with test card 4000000000005126.
Authorization
ApiKey Merchant API key for authentication
In: header
Path Parameters
Resource ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/payments/string/refund" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "amount": 1, "currency": "str", "status": "created", "capture_mode": "automatic", "authorized_amount": 0, "captured_amount": 0, "refunded_amount": 0, "disputed_amount": 0, "used_method_family": "string", "used_method_type": "string", "payment_method": { "type": "string", "token": "string" }, "dcc": { "currency": "str", "amount": 0 }, "reference": "string", "description": "string", "customer": { "reference": "string", "email": "string" }, "metadata": { "property1": null, "property2": null }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}