Create a checkout session
/v1/checkout/sessionsReturns a session_key and a payment_url you redirect the customer to. The session inherits the mode (test/live) of the secret key used to create it. Sessions expire after expires_in_minutes (default 30) — once expired they cannot accept payment.
Body parameters
amountintegerrequiredAmount to charge, in kobo. NGN 5,000 = 500000. Must be at least the platform minimum.
referencestringrequiredYour unique reference for this payment. Echoed back on every related webhook. Max 100 characters.
currencystringoptionalISO 4217 currency code. Defaults to NGN.
customer_emailstringoptionalEmail to pre-fill on the checkout page.
customer_namestringoptionalCustomer name to pre-fill on the checkout page.
callback_urlstringoptionalURL the customer is redirected to after a successful payment.
cancel_urlstringoptionalURL the customer is redirected to if they cancel.
payment_methodsarray<enum<'card' | 'bank_transfer' | 'ussd'>>optionalMethods the customer may choose on the hosted page. Defaults to every method enabled on your account. Requested methods that aren't enabled for your account are silently dropped; the request fails only if nothing is left.
expires_in_minutesintegeroptionalOverride the default session lifetime. Must be between 5 and 1440. Defaults to the platform default (30 minutes).
metadataobjectoptionalArbitrary key/value pairs echoed back on the session and the underlying transaction.
Response
201session_keystringSession identifier, prefixed with `cs_`. Use this to poll status or build the payment URL.
payment_urlstringHosted checkout URL to redirect the customer to.
sessionobjectThe created session object.
idstringInternal session ID (UUID).
merchant_idstringMerchant the session belongs to.
session_keystringSession identifier, prefixed with `cs_`.
amountintegerAmount in kobo.
currencystringCurrency code.
referencestringMerchant reference.
customer_emailstring | nullPre-filled customer email.
customer_namestring | nullPre-filled customer name.
callback_urlstring | nullPost-payment redirect URL.
cancel_urlstring | nullCancellation redirect URL.
payment_methodsarray<string>Resolved payment methods after intersecting with what your account allows.
is_testboolean`true` when the session was minted with a test secret key.
statusenum<'open' | 'completed' | 'expired' | 'cancelled'>Lifecycle state. `open` for a freshly-minted session.
expires_atstringISO-8601 expiry timestamp.
completed_atstring | nullISO-8601 timestamp the session completed, or `null`.
transaction_idstring | nullLinked transaction ID, populated once the customer picks a method.
metadataobject | nullEchoed metadata.
created_atstringISO-8601 creation timestamp.
updated_atstringISO-8601 timestamp of last mutation.
Errors
BAD_REQUEST400Amount is below the platform minimum, no requested payment methods are enabled for this merchant, or another field failed validation.UNAUTHORIZED401API key missing or invalid.