Refund a Checkout Session
This endpoint allows you to issue a refund for a specific checkout session using its unique identifier.Endpoint
- Endpoint:
POST /v1/checkouts/{checkoutId}/refund - Description: Issue a refund for a specific checkout session.
- Path Parameters:
checkoutId(string, required): The unique identifier of the checkout session to refund.
- Request Body:
- Response:
Parameters
checkoutId(string, required): The unique identifier of the checkout session to refund.amount(integer, required): The amount to refund in the smallest currency unit (e.g., cents for USD).currency(string, required): The currency code (e.g., “usd”).reason(string, optional): The reason for the refund (e.g., “customer_request”, “fraudulent”).
Example Request
Example Response
Notes
- Ensure that the checkout session exists and is eligible for a refund before issuing the request.
- The response includes the updated status of the checkout session after the refund is processed.
Errors
404 Not Found: The specified checkout session does not exist.400 Bad Request: Invalid request parameters or refund amount exceeds the original payment.401 Unauthorized: Invalid or missing API key.
See Also
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
UUID
Maximum length:
1000Path Parameters
Body
application/json
Response
201 - application/json
Checkout refunded
Example:
"refund_cs_123456789"
Example:
"cs_ci_123456789"
Available options:
pending, processing, completed, failed Example:
"XOF"