POST /v1/payments/{paymentId}/refund.
What can be refunded
The eligibility rules are enforced server-side and surfaced in the payment detail response underrefundEligibility.
| Condition | Effect |
|---|---|
Payment is PAID | Refundable. |
Payment is PARTIAL_REFUND | Refundable up to the remaining amount. |
Payment is EXPIRED, CANCELLED, REFUNDED, CHARGEBACK, or MED_FROZEN | Not refundable. |
| Payment is anticipated | Refunds are blocked until the anticipation is settled (REFUND_BLOCKED_BY_ANTICIPATION). |
| Payment was processed via a non-refundable provider | REFUND_NOT_SUPPORTED. |
| Insufficient available balance to cover the refund | INSUFFICIENT_BALANCE_FOR_REFUND. |
400 with one of the
codes above.
Issue a refund
Currently only full refunds are supported. Send noamount to refund the
full remaining balance, or send the exact remaining refundable amount.
Refund lifecycle
A refund can be in one of these statuses:| Status | Meaning |
|---|---|
PROCESSING | The refund was accepted and is being executed at the underlying network. |
COMPLETED | The refund cleared and the payment moved to REFUNDED (or PARTIAL_REFUND if there is remaining balance). |
FAILED | The refund could not be executed. The funds are returned to your balance and you can retry. |
PAYMENT_REFUNDED and PAYMENT_REFUND_FAILED webhook events to
react to status changes.
Idempotency
SendingPOST /v1/payments/{paymentId}/refund requires an
X-Idempotency-Key header. Reusing the same key with the same body returns
the original response. Reusing the key with a different body returns
409 IDEMPOTENCY_PAYLOAD_MISMATCH.
While a refund is being processed for a given payment, additional refund
requests fail with 409 REFUND_IN_PROGRESS until the current refund settles.
Listing refunds for a payment
Common error codes
| Code | Meaning |
|---|---|
INVALID_STATUS | The payment is not in a refundable status. |
PARTIAL_REFUND_NOT_SUPPORTED | Only full refunds are supported. Either omit amount or send the full remaining refundable amount. |
ALREADY_REFUNDED | A previous refund has already returned the full balance. |
REFUND_IN_PROGRESS | A refund is currently in flight against this payment. Retry once it settles. |
REFUND_NOT_SUPPORTED | This payment was processed via a method or route that doesn’t support refunds via API. |
INSUFFICIENT_BALANCE_FOR_REFUND | Your available balance is too low to cover the refund. |
PSP_REFUND_FAILED | The underlying network rejected the refund. The funds remain on your balance and you can retry. |
REFUND_BLOCKED_BY_ANTICIPATION | The payment was anticipated; refunds are blocked until anticipation settles. |

