Refund Checkout

Refund a checkout session.

Path parameters

idstringRequired
The ID of the checkout session to refund

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

Idempotency-KeystringOptional
Idempotency key to prevent duplicate refund creation

Request

This endpoint expects an object.
amountintegerOptional
The amount to refund in cents. If not provided, the full amount will be refunded.
metadatamap from strings to anyOptional
Used to record additional details about the refund, often used to reconcile data with an external system.

Response

This endpoint returns an object.
idstring
The ID of the checkout session
refundIdstring
The ID of the refund
messagestring
The message from the refund
statusenum
The status of the refund
Allowed values:

Errors