Refund a captured payment
Refunds a successfully captured payment. Provide an amount for a partial refund, or omit it to refund the entire remaining refundable balance; cumulative refunds cannot exceed the captured amount.
Authorization
basic Basic HTTP authentication
In: header
Path Parameters
Payment id
Header Parameters
Optional client-supplied retry key (≤255 chars; UUID v4 recommended). Don't use sensitive data — emails, PANs, or other personal identifiers. Identical requests retried with the same key return the original response. Mismatched bodies return 422; in-flight duplicates return 409. Keys are scoped per merchant + endpoint and expire after 24 hours. On 5xx, retry with the same key: a retry cannot create a duplicate charge. The exception is a 500 that says the operation was accepted: do not retry it; poll the payment.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/payments/string/refund" \ -H "Content-Type: application/json" \ -d '{}'{ "refundId": "01928e3e-7b6c-7c8e-9b3a-5b9f8b9b9b9b", "paymentId": "01928e1c-2a4d-7c8e-8b1a-1234567890ab", "status": "SUCCEEDED", "amount": 500, "remainingRefundableAmount": 6500, "cardNumber": "555555xxxxxxxx4444"}{ "statusCode": 400, "message": "Some fields are invalid, please check the errors", "fieldErrors": { "amount": [ "amount must not be less than 1", "amount must be an integer number" ], "cardNumber": [ "cardNumber must be 12-19 digits with no spaces or separators" ] }}{ "statusCode": 401, "error": "Unauthorized", "message": "Invalid credentials"}{ "statusCode": 404, "error": "Not Found", "message": "Payment not found: 01928e1c-2a4d-7c8e-8b1a-1234567890ab"}Retrieve a payment GET
Returns the authenticated merchant's payment with status, amount totals, payment-method details, and transaction and refund history. Payments owned by another merchant are not returned.
Reissue a hosted checkout link POST
Returns a new link for a hosted checkout that can still be paid and has not expired, and revokes the previous link at once: PENDING, REQUIRES_ACTION (a verification to resume), or DECLINED with a retry left (an issuer decline under the attempt limit). Use it when the link was lost (it is shown only once) or may have leaked; a payment already in progress on the old page (a wallet confirmation, for example) can still complete. The expiry does not change. Not idempotent: every call issues a new link, and an Idempotency-Key header is ignored.