Create a refund
Refunds a payment that has already succeeded. The amount is always
required. To refund the full payment, set amount to the payment’s
remaining refundable amount. The refund uses the same currency as the
original payment; currency is not accepted on the refund request.
New Refunds are accepted only when the original Payment uses one of the
supported payment currencies.
A new Refund against a Payment in another currency
returns 422 currency_not_supported with param=payment_id and is
not created. Existing Refunds in other currencies remain readable;
an exact idempotent retry returns the original creation response.
If refunds are not enabled for your account in the API key’s mode, a new
Refund returns 403 refunds_not_enabled and is not created. Contact
support to enable refunds.
A payment can be refunded multiple times as long as the accumulated refunded amount does not exceed the original.
In Live, a 201 response normally contains the Refund in PENDING:
ecomm submits it after responding, and only once the card clearing of
the original Payment has completed, usually within hours of the
Payment’s success. If that clearing does not happen, the customer was
not charged: the Refund becomes FAILED with failure.code
not_permitted and is never submitted. If the clearing has not
completed 48 hours after the Payment succeeded, ecomm reviews the
Refund; it stays PENDING and is still submitted, or failed, when the
clearing ends. See
When ecomm submits a Live Refund.
In Sandbox, the create call submits the Refund before responding. A
201 response therefore contains the Refund in PROCESSING, or
already in terminal FAILED when submission was definitively rejected.
Monitor a PENDING or PROCESSING Refund via subsequent
GET /v1/payments/{id} calls. It transitions to SUCCEEDED when
confirmed or FAILED when it cannot be completed.
An uncertain provider Refund submission is not automatically resubmitted, including after a timeout or temporary provider error. Once its provider identity is known, status reads can be retried. Do not create a replacement Refund with a new key while the original outcome is unresolved.
Every refund is recorded with a mandatory reason and is linked to the
original payment via payment_id.
Idempotency
Use the Idempotency-Key header to safely retry refund requests. The
idempotency contract uses the Refund’s effective request identity: a
retry with equivalent payment_id, amount, merchant_reference, and
reason returns the original response, while a retry with the same key
but a different identity is rejected
with 409 and error.code: "idempotency_key_reused". Pick a
deterministic key tied to the Refund operation and preserve its
effective identity on retries.
Authorizations
Headers
A unique key to ensure one effective operation is processed only once.
If the same key and an equivalent operation-specific effective request
identity have already completed successfully, the original response is
returned. A different identity returns 409 idempotency_key_reused.
Non-2xx responses are not cached, so callers may retry after errors. No
fixed retention period is promised by this contract.
For one-shot requests, such as creating a payment from a checkout button, a random UUIDv4 is fine. For requests tied to a specific business operation, such as refunding an order, a deterministic key is preferred so retries collapse correctly across processes.
255Body
Response
Refund created. Inspect the returned status: continue retrieval
through the parent Payment for PENDING or PROCESSING, or handle
the nested failure when the Refund is already FAILED.
A refund against a payment.