/v1/checkout/sessions
Bearer
Idempotent
Create a browser pay link
Headers
-
Idempotency-Keyrequired string -
Required for money-moving and session/mandate creates; replays must use the same body.
Body parameters
-
amount_modeoptional string -
fixed(default) requiresamountat create time.openlets the customer enter the amount on the hosted pay page.openis not available while the merchant is in Testing mode (usefixedat or below the country testing max, or Go Live). See testing mode.One of
fixedopen -
amountoptional string -
Required when
amount_modeisfixed(or omitted). Omit foropen. In Testing mode, fixed amounts must be at or below the country testing max. -
currencyrequired string -
merchant_referencerequired string -
payment_railoptional string, nullable -
mobile_moneylocks the session to mobile money;mobileis then required at create unless pre-filled later on the hosted page. When the key is omitted, the session storesnulland the customer chooses the rail on/pay/{id}(portal pay links send explicit JSONnull).cardis accepted only when MojoPay has enabled card checkout for your merchant; otherwise it is rejected with400invalid_parameter.bank_transferis accepted only when bank transfer checkout is enabled for your merchant; the hosted page issues a dynamic virtual account.One of
mobile_moneycardbank_transfer -
mobileoptional string -
Required when
payment_railismobile_moneyat create time. Omit when the customer will enter wallet details on the hosted page. -
provideroptional string -
Mobile money provider code when required for the chosen rail (metadata mobile_providers).
-
success_urlrequired string (uri) -
cancel_urlrequired string (uri) -
descriptionoptional string
Webhook events
checkout_session.processing
checkout_session.succeeded
checkout_session.failed
{
"amount_mode": "fixed",
"currency": "GHS",
"amount": "1.00",
"merchant_reference": "KLCTMXOAIS",
"success_url": "https://merchant.example.com/pay/return?ref=KLCTMXOAIS",
"cancel_url": "https://merchant.example.com/pay/cancel?ref=KLCTMXOAIS"
}
{
"amount_mode": "fixed",
"currency": "GHS",
"amount": "1.00",
"merchant_reference": "KLCTMXOAIS",
"description": "Goods payment",
"success_url": "https://merchant.example.com/pay/return?ref=KLCTMXOAIS",
"cancel_url": "https://merchant.example.com/pay/cancel?ref=KLCTMXOAIS",
"mobile": "233555515326",
"payment_rail": "mobile_money",
"provider": "MTN"
}
{
"amount_mode": "fixed",
"currency": "GHS",
"amount": "2.56",
"merchant_reference": "SLUG-RANDOMTOKEN",
"description": "Pay link",
"success_url": "https://merchant.example.com/pay/ok",
"cancel_url": "https://merchant.example.com/pay/cancel",
"payment_rail": null,
"mobile": null,
"provider": null
}
{
"amount_mode": "open",
"currency": "GHS",
"merchant_reference": "DONATION-2026-001",
"description": "Pay what you want",
"success_url": "https://merchant.example.com/pay/return",
"cancel_url": "https://merchant.example.com/pay/cancel"
}
{
"amount_mode": "fixed",
"currency": "GHS",
"amount": "1.00",
"merchant_reference": "ORD-BT-LINK-001",
"description": "Invoice bank transfer",
"success_url": "https://merchant.example.com/pay/return",
"cancel_url": "https://merchant.example.com/pay/cancel",
"payment_rail": "bank_transfer"
}
curl -X POST "https://omni.mojo-pay.com/v1/checkout/sessions" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"amount_mode": "fixed",
"currency": "GHS",
"amount": "1.00",
"merchant_reference": "KLCTMXOAIS",
"success_url": "https://merchant.example.com/pay/return?ref=KLCTMXOAIS",
"cancel_url": "https://merchant.example.com/pay/cancel?ref=KLCTMXOAIS"
}'
{
"id": "CS_4NQP81ABCDEF",
"object": "checkout_session",
"status": "processing",
"url": "https://checkout.example.com/pay/CS_4NQP81ABCDEF",
"expires_at": "2026-04-15T11:00:00Z"
}