API reference
Checkout sessions
The simplest integration: send the customer to our hosted checkout.
Create a session from your server, then redirect the customer to checkout_url. They choose MoMo or card on our page; you never handle wallet PINs or card numbers.
POST /v1/checkout/sessions
curl https://api.brightsecuretech.com/v1/checkout/sessions \
-H "Authorization: Bearer $BST_SECRET_KEY" \
-H "Idempotency-Key: order-10482" \
-H "Content-Type: application/json" \
-d '{
"amount_minor": 12000,
"currency": "GHS",
"description": "Jollof and chicken x2",
"merchant_reference": "ORDER-10482",
"customer_email": "ama@example.com",
"success_url": "https://yourshop.com/orders/10482/paid",
"cancel_url": "https://yourshop.com/cart"
}'Response · 201
{
"id": "cs_live_Q2h8rX0p...",
"checkout_url": "https://brightsecuretech.com/checkout/cs_live_Q2h8rX0p..."
}Sessions expire
A session is open for 1 hour and allows up to 10 payment attempts. Create a new one if it expires.