Skip to Content
API Reference

API Reference

The routes below are the current Merchant API source of truth from mainApi.

Base Paths

API areaBase pathAuthentication
Merchant API/api/v1Bearer secret key, optional AES encryption, product access gates.
Server-to-server payments/api/v1/s2sBearer secret key, optional AES encryption, product access gates.
Signature helper/api/hmac_signatureBearer secret key.
Webhook signature test/api/hmac_signature_testTest webhook guard and HMAC signature middleware.

Payments and Transactions

MethodPathPurpose
POST/api/v1/transaction/initializeCreate a hosted checkout transaction.
POST/api/v1/transaction/stripe/initializeCreate a Stripe-backed checkout transaction.
POST/api/v1/transaction_feeCalculate a collection fee.
GET/api/v1/transaction/verify/{reference}Verify a transaction by merchant reference.
GET/api/v1List transactions.
GET/api/v1/transaction/{id}Fetch a transaction by internal ID.
GET/api/v1/transaction-reference/{reference}Fetch a transaction by merchant reference.
GET/api/v1/resend_transaction_webhook/{reference}Resend a transaction webhook. Throttled.
POST/api/v1/fund-test-accountFund a test virtual account. Test usage only.

Initialize Transaction Body

FieldRequiredValidation
amountYesNumeric, minimum 100.
currencyYes3-character currency code.
referenceYesString, 3 to 100 characters. Must be unique per business/domain.
customer_codeNoExisting customer code.
emailNoCustomer email.
first_nameNoString, max 100.
last_nameNoString, max 100.
phoneNoString, 6 to 20 characters.
redirectUrlNoHTTPS URL, max 2048 characters.
logoUrlNoURL string, max 2048 characters.
titleNoString, max 191.
descriptionNoString, max 500.
bvn, ninNo11 digits when supplied.
dobNoYYYY-MM-DD.
tokenizeNoBoolean.
bank_sweep_code, payer_id, payer_type, internalHeaderNoOptional metadata fields used by approved flows.

Successful response:

{ "success": true, "message": "Transaction Initialized Successfully", "data": { "authorization_url": "https://checkout.cashonrails.com/pay/<access_code>", "qr_code": "data:image/png;base64,...", "access_code": "<access_code>", "transactionRef": "COR-...", "reference": "merchant-reference" } }

Customers

MethodPathPurpose
POST/api/v1/customerCreate a customer.
GET/api/v1/customerList customers. Supports limit and page.
GET/api/v1/customer/{email_or_code}Fetch a customer by email or customer code.
PUT/api/v1/customer/{code}Update a customer.

Create customer body: email, first_name, last_name, and phone are required. Optional fields are address, bvn, nin, dob, rc_number, company_name, incorporation_date, and metadata.

Reserved Accounts

MethodPathPurpose
GET/api/v1/get_reserved_account_providersList reserved account providers.
POST/api/v1/reserved_virtual_accountCreate a reserved virtual account for a customer.
GET/api/v1/list_reserved_accountsList reserved accounts. Supports limit and page.
GET/api/v1/reserved_account/{id}Fetch reserved account details.
GET/api/v1/reserved_account/{id}/transactions/{offset?}Fetch reserved account transactions.

Create reserved account body:

{ "customer_code": "CUS_...", "provider": "optional-provider-code", "otp": "123456" }

Payouts and Wallets

MethodPathPurpose
GET/api/v1/bank_list/{currency?}List payout banks/providers. Defaults to NGN.
POST/api/v1/account_nameValidate recipient account name.
POST/api/v1/payout_feeCalculate payout fee.
POST/api/v1/bank_transferInitiate a payout. Requires payout product access.
GET/api/v1/fetch_all_transfersList payouts.
GET/api/v1/fetch_all_transfers/{status}List payouts by status.
GET/api/v1/fetch_transfer_details/{reference}Fetch payout details by reference.
GET/api/v1/wallet_balance/{currency?}Fetch wallet balance. Defaults to NGN.
GET/api/v1/resend_payout_webhook/{reference}Resend a payout webhook. Throttled.

Payout creation body:

FieldRequiredValidation
account_nameYesString, max 191.
bank_codeYesString, max 20.
amountYesNumeric. Runtime rejects values below 1.
currencyYesString, max 10.
sender_nameYesString, max 191.
narrationYesString, max 255.
referenceYesString, 3 to 100 characters.
account_numberRequired unless currency is USDTString, 5 to 20 characters.
addressRequired when currency is USDTString, max 128.
typeOptionalFor ZAR, accepted values are EFT and RTC when supplied. For KES, accepted values are B2C and B2B when supplied.

Payout headers:

Authorization: Bearer <secret_key> Content-Type: application/json X-Signature: <base64-rsa-sha256-signature> Idempotency-Key: <stable-unique-key>

If no RSA public key is configured for the business, the current implementation does not enforce X-Signature. Production integrations should still configure RSA and sign payout bodies.

Server-to-Server Payment Routes

MethodPathProduct gate
POST/api/v1/s2s/card/initializecard
GET/api/v1/s2s/banktransfer/listdynamic_account
POST/api/v1/s2s/banktransfer/initializedynamic_account
POST/api/v1/s2s/moniepoint/initializedynamic_account
GET/api/v1/s2s/paywithussd/listussd
POST/api/v1/s2s/paywithussd/initializeussd
POST/api/v1/s2s/paywithphone/initializepay_with_phone
POST/api/v1/s2s/paywitheft/initializepay_with_eft
POST/api/v1/s2s/paywithmomo/initializepay_with_momo
POST/api/v1/s2s/paywithmomo/otppay_with_momo
GET/api/v1/s2s/paywithmomo/{currency}pay_with_momo
GET/api/v1/s2s/paywithmomo-listpay_with_momo
POST/api/v1/s2s/paywithcrypto/initializepay_with_crypto
GET/api/v1/s2s/paywithcrypto/listpay_with_crypto
POST/api/v1/s2s/paywithbank/initializepay_with_bank
GET/api/v1/s2s/paywithbank/listpay_with_bank
GET/api/v1/s2s/transaction/verify/{reference}Authenticated verification.
GET/api/v1/s2s/transaction/cancel/{reference}Authenticated cancellation.
POST/api/v1/s2s/test/encryptionEncryption utility.
POST/api/v1/s2s/test/decryptionDecryption utility.

Public Checkout Utility Routes

These routes are exposed without Merchant API bearer authentication:

MethodPathPurpose
GET/api/v1/fetch-checkout/{identifier}Fetch checkout information by identifier.
GET/api/v1/get-checkout-status/{identifier}Get checkout status.
GET/api/v1/cancel-checkout/{transactionRef}Cancel checkout by transaction reference.

Unresolved Discrepancies

  • Some older endpoint pages may still contain provider-specific sample payloads that require confirmation against sandbox provider behaviour.
  • The encryption middleware encrypts all successful 200 responses for enrolled businesses; this differs from older examples that described opt-in response encryption headers.
  • Payout validation currently returns HTTP 401 for some malformed request bodies. Treat this as current behaviour, but it is a candidate for future normalization to HTTP 422.
Last updated on