Create a charge
/v1/checkout/sessionsInitializes a charge by creating a checkout session. The response includes a hosted payment URL the customer can be redirected to, plus a session key you can use to poll status or correlate with a webhook.
Amounts are in kobo — the smallest unit of NGN. NGN 5,000.00 is 500000.
Body parameters
amountintegerrequiredAmount in kobo. Minimum 100 (NGN 1.00).
referencestringrequiredYour unique reference for this charge. Used to verify and dedupe.
currencystringoptionalThree-letter ISO currency code. Defaults to NGN.
Allowed: 'NGN'
customer_emailstringoptionalCustomer email — pre-filled on the hosted page and attached to the resulting transaction.
customer_namestringoptionalCustomer name — pre-filled on the hosted page.
payment_methodsarray<'card' | 'bank_transfer' | 'ussd'>optionalPayment methods to enable on the hosted page. Defaults to all methods enabled on the merchant account.
callback_urlstringoptionalWhere to redirect the customer after a successful payment. Defaults to the URL configured in dashboard settings.
cancel_urlstringoptionalWhere to redirect the customer if they abandon the checkout.
expires_in_minutesintegeroptionalHow long this session is valid. Between 5 and 1440 (24 hours). Defaults to 30 minutes.
metadataobjectoptionalArbitrary key/value pairs (max 20 keys, values up to 500 chars).
Response
201session_keystringTagPay-assigned session key (prefixed `cs_`). Use it to poll status or correlate webhooks.
payment_urlstringHosted page URL to redirect the customer to.
referencestringThe reference you supplied. Use this with the verify endpoint after payment.
amountintegerAmount in kobo.
statusenum<'open' | 'completed' | 'expired' | 'cancelled'>Session status. Always `open` at creation.
expires_atstringISO-8601 timestamp after which this session can no longer be paid.
Errors
INVALID_AMOUNT400Amount must be a positive integer in kobo.VALIDATION_ERROR400One or more body fields failed validation.UNAUTHORIZED401API key missing or invalid.