Refund Checkout Transaction

Refunds a successful checkout transaction, in full or in part, to the instrument the buyer paid with.

Use it for one-time checkouts and for subscription billing cycles. Get the transaction ID from succeededTransactionId on
the checkout. For a billing cycle, read the cycle's checkoutId from List Subscription Payments, then read that checkout
with Get Checkout, or use Refund Subscription Payment, which finds the transaction for you.

Permission: Merchant Approver.

Rules

  • The transaction must be SUCCEEDED and belong to the checkout in the path.
  • Only one refund can be in progress per checkout. Wait until the previous refund is COMPLETED or FAILED before you send another.
  • The total refunded can never exceed the original charge.
  • Some checkouts accept only a refund of the full charge, and some cannot be refunded through the API.
  • Send idempotencyKey so you can retry safely: a repeat returns the refund the first request created. Without a key, if the request timed out, call List Checkout Refunds before you retry.

What happens: the refund is created in PENDING and processed asynchronously. It moves to PROCESSING,
then COMPLETED or FAILED (see errorReason). Each change sends the refund-status-changed webhook event
(/reference/refund-status-changed). The checkout gets hasRefunds: true. A refund of a checkout created for a
subscription is typed SUBSCRIPTION, carries the subscriptionId and, for a billing cycle, the subscriptionPaymentId,
and the cycle gets hasRefunds: true. Refunding a cycle does not cancel the subscription.

Errors

  • 400 VALIDATION_ERROR: details.amount carries one of INVALID_TRANSACTION_STATUS (the transaction did not succeed),
    CANNOT_REFUND_MORE_THAN_ORIGINAL_AMOUNT (constraints.remainingAmount is what is left, in minor units),
    CANNOT_PARTIALLY_REFUND (send the full amount) or REFUND_NOT_SUPPORTED (this checkout cannot be refunded through the API).
  • 404 NOT_FOUND: the checkout or the transaction does not exist, or the transaction belongs to another checkout.
  • 409 VALIDATION_ERROR: a refund is already in progress for this checkout; the amount rounds to zero in the currency;
    the total would exceed the charge; this checkout cannot be refunded with this operation; or the idempotencyKey
    was already used with a different amount or transaction.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The checkout ID (S-…).

string
required

The ID of the SUCCEEDED transaction to refund (ST-…): succeededTransactionId on the checkout.

Body Params
number
required

The amount to refund in the currency of the transaction

string
required

The reason for the refund

string

Your own unique id for this refund. A request repeated with the same key on the same checkout returns the refund the first one created instead of refunding again. Reusing a key on that checkout for a different amount or transaction is refused.

Observation: required from 2027-01-18T00:00:00Z. From that instant a refund without this key is refused with a 400, so start sending it now.

Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json