API reference
Everything a secret key can reach, plus the two public checkout routes. Generated from the API contract, so a field name here is the field name the server sends.
All of it is also one file your tools can read: see OpenAPI to import the API into Postman or generate a client.
#Base URL
https://api.paymonetra.com/v1An older path still answers so nothing already built breaks. It is not the one to build against.
#Getting started
#Customer accounts
/customer_accountsIssues a permanent bank account number in your customer’s own name.GET/customer_accounts/{reference}One account by your own reference, with what it has received.GET/customer_accountsYour accounts, filterable by status and paged.#Money
#Payments
/paymentsOpens a checkout session and returns the URL to send your customer to.GET/payments/{reference}One session, scoped to your own merchant and mode.POST/payments/cryptoNames a coin amount rather than a naira price, and settles to you in naira.#Transfers
/banksThe bank codes to send with. Use these, not your own list.POST/transfers/resolveWho an account number belongs to, before you pay it.POST/transfersMoney out of your balance to a Nigerian bank account.GET/transfers/{reference}One by your reference or ours, or the list newest first.#Refunds
/refundsMoney back to the account that paid, never anywhere else.GET/refunds/{reference}One by your reference or ours, or the list newest first.GET/disputesThe open ones, the settled ones, and what they are holding.POST/disputes/{reference}/refundPays the payer out of what the dispute already holds.#Webhooks
/webhookThe URL and signing secret for your key’s mode, so a plugin can set itself up.POST/webhookSaves the URL we post events to, for your key’s mode. An empty URL stops deliveries.#Identity
/identity/bvnThe name, date of birth, gender and phone on a BVN.POST/identity/ninThe name, date of birth, gender and phone on a NIN.#Test mode
/customer_accounts/{reference}/simulate_paymentMoney arriving into one customer’s account, and the webhook that follows. Test keys only.POST/customer_accounts/{reference}/simulate_cryptoUSDT arriving at a customer’s address, and the webhook that follows. Test keys only.POST/sandbox/payThe same, for your collection account rather than a customer’s. Test keys only.#Checkout
/checkout/{reference}What the payer’s browser polls. Public, guarded by the reference being random.POST/checkout/{reference}/detailsName and email for an anonymous session, which then shows an account.#Card issuing
21 more routes on this same base URL, for issuing virtual cards to your own users. Available on request, and they answer 403 card_api_not_enabled until card issuing is switched on for your business. Every card route.
#Bill payments
/bills/servicesList bill services.GET/bills/airtime/networksList airtime networks.GET/bills/data/plansList data plans.GET/bills/cable/plansList cable TV plans.GET/bills/electricity/billersList electricity billers.GET/bills/exam/billersList exam pin billers.GET/bills/international/countriesList countries for international airtime.GET/bills/international/operatorsList operators for international airtime.POST/bills/international/quoteQuote international airtime.POST/bills/verifyCheck an account name.POST/bills/airtimeBuy airtime.POST/bills/dataBuy data.POST/bills/cablePay for cable TV.POST/bills/electricityPay for electricity.POST/bills/examBuy exam pins.POST/bills/internationalBuy international airtime.GET/billsList bills.GET/bills/{reference}Get a bill.#The error shape
A developer reads an error to find out what to change, so it names the field where there is one. There is no success flag: the HTTP status is the answer.
{
"error": {
"type": "invalid_request",
"message": "customer_reference is required. It is your own id for this customer and we hand it back on every payment.",
"field": "customer_reference"
}
}type is one of unauthorized, account_inactive, not_verified, invalid_request, not_found, conflict, provider_error, not_test_mode, validation.
not_test_mode is returned 403 by the sandbox routes when a live key is used. It is the one guard between simulated money and real money, so it refuses loudly rather than doing nothing.
Every code, and what to show a person: errors.
#Rate limits
The app's API throttles on the IP because there the thing being abused is a password guess. Here the caller is a server that legitimately makes every request from one address, so an IP limit would be a limit on the merchant's whole business.
POST /customer_accounts | 300 an hour |
GET anything | 600 an hour |
Account creation is tightest because it reaches our bank partner, who rate limit by IP across all of us, so one merchant's loop is everybody's outage. 300 an hour is a merchant onboarding five users a minute all day.