IbejuPaySelf-Service Portal
Reference

Merchant API v1

ConventionDetail
Base URLhttps://ibejupay.com/api/v1
AuthAuthorization: Bearer sk_test_… or sk_live_… on every request. The key's mode scopes all reads and writes.
Success envelope{"status": true, "message": "…", "data": …} (+ meta on lists)
Error envelope{"status": false, "code": "…", "message": "…"} with a matching HTTP status
AmountsIntegers in kobo. Allowed per charge: 10,0001,000,000,000.
Rate limit120 requests/minute per merchant → HTTP 429 rate_limited
TracingEvery response carries X-Request-Id. Quote it to support.

POST /transactions/initialize

Create a transaction and get the hosted-checkout authorization_url.

ParameterTypeRequiredNotes
amountintegeryesKobo. ₦5,000.00 = 500000. Integers only — floats are rejected.
emailstringyesCustomer email (receipt + record).
referencestringyes1–80 chars of A–Z a–z 0–9 - . _ =. Unique per transaction, per mode.
currencystringnoOnly NGN (default).
callback_urlstringnoAbsolute http(s) URL the customer returns to after payment. Falls back to your profile default.
customer_namestringno≤160 chars. Pre-fills the checkout.
customer_phonestringnoNigerian number; normalised to 234… and used for the SMS receipt.
descriptionstringno≤200 chars, shown on the checkout and receipts.
metadataobjectnoYour JSON (≤4 KB encoded); echoed back on verify/webhooks, never shown to the customer.

Returns 200 with authorization_url, access_code, reference, amount, mode, expires_at (the checkout stays payable for 30 minutes). Re-posting an identical open reference replays the same data; a completed or amount-changed reference returns 409 duplicate_reference.

GET /transactions/verify/{reference}

The state of one transaction (the transaction object). Fulfil only when data.status === "success" and data.amount is what you expected. Unknown references (or references belonging to the other mode) return 404 transaction_not_found.

GET /transactions

Query paramTypeNotes
statusstringpending | awaiting_transfer | success | failed | expired
from / todateYYYY-MM-DD, on created_at.
pageintegerDefault 1.
per_pageintegerDefault 50, max 100.
Response — 200
{
  "status": true,
  "message": "Transactions retrieved",
  "data": [ { …transaction… }, { …transaction… } ],
  "meta": { "page": 1, "per_page": 50, "total": 132, "total_pages": 3 }
}

POST /transactions/{reference}/requery

Force a fresh sweep of the bank confirmation for a transaction that is awaiting_transfer, then return its current state. Useful in a support tool ("customer says they've paid"). Settlement is idempotent — a requery can never double-settle.

GET /merchant

Your merchant profile as the platform sees it: merchant_code, business_name, status, live_enabled, the key's mode, your webhook URL, your effective fee schedule (percent, flat_kobo, cap_kobo) and lifetime live totals. Handy as a smoke test and for dashboards.

GET /webhooks

Your 50 most recent webhook deliveries — event, status (pending | delivered | failed), attempt count, last HTTP status and error. Debug your endpoint without asking support.

POST /webhooks/test

Queues a signed ping event to your webhook URL. Requires a webhook URL on your profile (422 no_webhook_url otherwise).

The transaction object

Transaction
{
  "reference": "order-8021",          // your unique reference
  "amount": 500000,                   // kobo
  "currency": "NGN",
  "status": "success",                // pending | awaiting_transfer | success | failed | expired
  "gateway_ref": "IBGW-…",            // IbejuPay's bank-session reference (null until a bank is picked)
  "channel": "fidelity",              // fidelity | access | test | null
  "fee": 7500,                        // kobo — your agreed fee for this charge
  "net_amount": 492500,               // kobo — amount minus fee (what settles to you)
  "paid_amount": 500000,              // kobo — what actually landed (null until paid)
  "mode": "live",                     // live | test
  "description": "Order #8021",
  "customer": { "name": "…", "email": "…", "phone": "234…" },
  "metadata": { … },                  // echoed back exactly as you sent it
  "merchant_code": "IBM-9F3C2A1B",
  "created_at": "2026-07-30T12:35:22+01:00",
  "paid_at": "2026-07-30T12:38:41+01:00",   // null until paid
  "expires_at": "2026-07-30T13:05:22+01:00"
}
statusMeaning
pendingInitialized; the customer has not opened/committed the checkout yet.
awaiting_transferA virtual account was issued; waiting for the bank transfer.
successPaid and confirmed. The only state to fulfil on.
failedThe payment could not be completed.
expiredThe checkout window (30 min) lapsed without payment.

Webhook payload

Deliveries are POSTs with these headers:

Headers
Content-Type: application/json
User-Agent: IbejuPay-Webhook/1.0
X-IbejuPay-Event: charge.success
X-IbejuPay-Signature: <hex HMAC-SHA512 of the raw body, keyed with your whsec_… secret>

The body is {event, event_id, created_at, data} where data is the transaction object (for charge.success) or a simple message (for ping). Verify the signature over the raw body, respond 2xx fast, and de-duplicate by event_id — full details in the guide.

Error codes

HTTPcodeMeaning
401authorization_requiredMissing/malformed Authorization header.
401invalid_keyThe key does not exist.
401key_revokedThe key was revoked — use a current one.
403merchant_not_activeLive key used before the account was approved.
403live_not_enabledAccount approved but live payments not yet enabled.
403merchant_suspended / merchant_closedAccount suspended/closed — contact the gateway team.
404transaction_not_foundUnknown reference for this merchant + mode.
409duplicate_referenceReference already completed or reused with different values.
422invalid_amount / amount_too_small / amount_too_largeAmount not an integer in kobo, or outside the allowed range.
422invalid_email / invalid_phone / invalid_reference / invalid_currencyA field failed validation (the message says which).
422invalid_callback_url / invalid_metadata / metadata_too_largeCallback/metadata constraints violated.
422invalid_status / invalid_dateBad list filters.
422no_webhook_urlWebhook test without a configured endpoint.
429rate_limitedOver 120 requests/minute.
429too_many_attemptsToo many failed authentications from your IP.
500server_errorOur fault. Retry, and quote the X-Request-Id to support.
503service_unavailableThe merchant API is temporarily switched off.

Questions? info@ibejulekki.lg.gov.ng