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..."
}
FieldRequiredNotes
amount_minoryesInteger pesewas, 100 to 100000000.
currencynoGHS (default).
descriptionnoUp to 200 characters. Shown to the customer.
merchant_referencenoYour order ID. Returned in webhooks.
customer_email / customer_phone / customer_namenoPre-fill the checkout.
success_url / cancel_urlnohttps:// only. Where the customer goes afterwards.

Sessions expire

A session is open for 1 hour and allows up to 10 payment attempts. Create a new one if it expires.