Refund Checkout
Refund a checkout session.
Path parameters
id
The ID of the checkout session to refund
Headers
Authorization
Bearer authentication of the form Bearer <token>, where token is your auth token.
Idempotency-Key
Idempotency key to prevent duplicate refund creation
Request
This endpoint expects an object.
amount
The amount to refund in cents. If not provided, the full amount will be refunded.
metadata
Used to record additional details about the refund, often used to reconcile data with an external system.
Response
This endpoint returns an object.
id
The ID of the checkout session
refundId
The ID of the refund
message
The message from the refund
status
The status of the refund
Allowed values: