curl --request POST \
--url https://api.cashful.africa/api/canary/checkout/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchantId": "<string>",
"currency": "<string>",
"metadata": {
"orderId": "ORD-12345",
"source": "web"
}
}
'{
"id": "checkout_sess_123",
"merchantId": "merchant_456",
"paymentIntentId": "pi_123456789",
"customerId": "customer_789",
"sessionUrl": "https://pay.cashful.africa/?entityType=checkout&entityId=checkout_sess_123",
"successUrl": "https://example.com/success",
"cancelUrl": "https://example.com/cancel",
"lineItems": [
{
"productId": "product_001",
"quantity": 2,
"amount": 5000,
"currency": "ZAR"
},
{
"productId": "product_002",
"quantity": 1,
"amount": 3000,
"currency": "ZAR"
}
],
"totalAmount": 13000,
"currency": "ZAR",
"mode": "payment",
"status": "open",
"expiresAt": "2025-01-17T10:30:00.000Z",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}Creates a hosted payment page for e-commerce purchases or customer balance funding
curl --request POST \
--url https://api.cashful.africa/api/canary/checkout/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchantId": "<string>",
"currency": "<string>",
"metadata": {
"orderId": "ORD-12345",
"source": "web"
}
}
'{
"id": "checkout_sess_123",
"merchantId": "merchant_456",
"paymentIntentId": "pi_123456789",
"customerId": "customer_789",
"sessionUrl": "https://pay.cashful.africa/?entityType=checkout&entityId=checkout_sess_123",
"successUrl": "https://example.com/success",
"cancelUrl": "https://example.com/cancel",
"lineItems": [
{
"productId": "product_001",
"quantity": 2,
"amount": 5000,
"currency": "ZAR"
},
{
"productId": "product_002",
"quantity": 1,
"amount": 3000,
"currency": "ZAR"
}
],
"totalAmount": 13000,
"currency": "ZAR",
"mode": "payment",
"status": "open",
"expiresAt": "2025-01-17T10:30:00.000Z",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Checkout session details
The ID of the merchant for the checkout session.
The three-letter ISO 4217 currency code
Optional custom metadata
{ "orderId": "ORD-12345", "source": "web" }The unique identifier of the customer
The unique identifier of the product
The URL to redirect to on successful payment
The URL to redirect to on cancel
Array of line items for the checkout
Show child attributes
The total amount in the smallest currency unit
The checkout mode (e.g., 'payment')
Configuration for the hosted checkout page
Show child attributes
Checkout session created successfully
Unique identifier
{ "orderId": "ORD-12345" }Show child attributes
Configuration for the hosted checkout page
Show child attributes