Create a Checkout Session
This endpoint allows you to create a new checkout session for processing payments.Endpoint
- Endpoint:
POST /v1/checkouts - Description: Create a new checkout session.
- Request Body:
- Response:
Parameters
amount(integer, required): The total amount for the checkout session in the smallest currency unit (e.g., cents for USD).currency(string, required): The currency code (e.g., “usd”).payment_method(string, required): The payment method type (e.g., “card”).success_url(string, required): The URL to redirect to upon successful payment.cancel_url(string, required): The URL to redirect to if the payment is canceled.
Example Request
Example Response
Notes
- Ensure that all required parameters are included in the request body.
- The response includes the unique identifier of the newly created checkout session along with its details.
Errors
400 Bad Request: Missing or invalid request parameters.401 Unauthorized: Invalid or missing API key.500 Internal Server Error: An error occurred on the server while processing the request.
See Also
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
UUID
Maximum length:
1000Body
application/json
Required range:
x >= 100Example:
5000
Available options:
XOF Example:
"XOF"
Example:
"+22507987654"
Maximum length:
200TTL session en secondes (défaut: 1800)
Required range:
300 <= x <= 86400Response
Session already exist
Example:
"cs_ci_123456789"
Available options:
created, pending, processing, completed, failed, expired, cancelled Example:
"created"
Example:
5000
Example:
"XOF"
Example:
"+22507987654"
Example:
"ORDER_123"
Example:
25