Skip to main content
POST

Authorizations

x-api-key
string
header
required

Your secret key. sk_test_… on the sandbox, sk_live_… on live. Server-side only. Copy it from Settings → Developers in the merchant dashboard. Authorization: Bearer with the same value is also accepted.

Body

application/json

The body of an initialise request.

amount
string
required

What you are collecting, as a decimal string in major units. "100.00" is one hundred naira. Never kobo and never a formatted value. When the customer bears the fee it is added on top, so this is the amount you expect to receive.

Pattern: ^\d+(\.\d{1,2})?$
Example:

"100.00"

currency
string
default:NGN

ISO 4217 currency code. NGN is the supported currency.

email
string<email>

The customer's email, used on receipts. Required for pay with transfer, so send it whenever you have it.

customerName
string

Shown on the hosted checkout page.

callbackUrl
string<uri>

Where the browser returns after checkout, with status, reference, amount and currency as query parameters. Use an HTTPS URL on your own domain. The callback is a signal only, so confirm with verify before you fulfil.

description
string

Free text shown on checkout, such as "Order 12345".

metadata
object

Any JSON object. Stored with the payment and returned on verify. Use it to carry your own order or customer ID.

distribution
object

Allocates part of this payment to services you configured in the merchant dashboard. Each key is a service key and each value is an absolute amount in the same major unit as amount (a number with up to two decimal places).

The total of all values must not exceed amount. You may allocate less than the whole, and often will. Each service's allocation is divided among its sub-accounts by its split shares, and everything you do not allocate settles to your primary settlement account.

Every key must be a service that exists in this environment and is enabled and has at least one split. Anything else is rejected with INVALID_SPLIT_AMOUNT and no payment is created. Compute the map on your server. Never take allocation amounts from the browser.

Example:
merchantBearsCost
boolean

Overrides, for this payment only, who pays the fee. When true the customer pays exactly amount and the fee is deducted from what you receive. When false the fee is added to what the customer pays. Omit it to use your payment settings.

Response

Transaction created. The payment is pending until the customer pays.

status
enum<string>
required
Available options:
success
data
object
required

The pending payment and the session the customer pays through.