Skip to main content

Refund a payment

Find out how to refund a payment using the Payments API.

Refunds return money to customers. A customer that returns a purchase needs a refund. You can refund the full amount, part of the amount, or make several partial refunds, as long as their total doesn't exceed the full original payment amount.

You can only refund a payment after it has already been captured.

If you want to use the Dojo for Business app for a refund, see Refunding online checkout transactions.

Refund using the Payments API

To return a payment to your customer, use the endpoint below:

POST /payment-intents/{paymentIntentId}/refunds

In your request, include:

  • paymentIntentId: identifies the payment being refunded.

  • amount: the refund amount.

  • idempotencyKey: header parameter to recognize subsequent retries of the same request. Must be unique for each new refund for the payment intent.

For the full API specification, see the API reference.

Request example

The next example below shows how you would refund 10.00 GBP.

manage-payments/curl/refund.sh
loading...

Response example

If your request is successful, the response will return information about the refund.

{
"message": "refund for the order 3443",
"refundId": "rfnd_g8mCx87TykeQ6BOXqxZ9NQ"
}

Cancel a refund

Once created, the refund can't be canceled. As an option, you can create a new payment intent instead of the one that was refunded.