Refunds

Create a refund

Creates a refund. Refund allows you to return a payment that has previously been created as long as there have been no incremental payments or payment attempts, including unsuccessful payment attempts. You can refund the full amount or a partial amount.

post/payment-intents/{paymentIntentId}/refunds

Request

Path parameters

paymentIntentIdstring nullable required

The unique identifier of the payment intent.

Headers

versionstring date required

The API version with format yyyy-mm-dd. The current version is 2026-02-27.

idempotencyKeystring nullable required

An idempotency key is used to recognize subsequent retries of the same request. How you generate the idempotency key is up to you. The key must be unique for each new refund processed on the payment intent.

Request body

amountinteger required

The refund amount.

previousTransactionIdstring nullable

The unique identifier for the previous transaction.

refundReasonstring nullable

The reason for the refund.

notesstring nullable

A description for the refund, if applicable.

Example request

{
  "amount": 1000,
  "refundReason": "Demo refund"
}

Response

OK

paymentIntentIdstring nullable

The unique identifier of the payment intent.

refundIdstring nullable

A unique identifier for the refund. It will be used to reference this refund in all operations. It is recommended to use a UUID.

refundReasonstring nullable

The reason for the refund.

notesstring nullable

A description for the refund, if applicable.

Example response

{
  "paymentIntentId": "pi_sandbox_RBMHTJ4fIkmSppDILZVCGw",
  "refundId": "rfnd_127usj",
  "refundReason": "Demo refund",
  "notes": null
}

Changes

No recorded changes to this operation across all 1 revision of this API.