Merchant API v1
| Convention | Detail |
|---|---|
| Base URL | https://ibejupay.com/api/v1 |
| Auth | Authorization: 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 |
| Amounts | Integers in kobo. Allowed per charge: 10,000–1,000,000,000. |
| Rate limit | 120 requests/minute per merchant → HTTP 429 rate_limited |
| Tracing | Every response carries X-Request-Id. Quote it to support. |
POST /transactions/initialize
Create a transaction and get the hosted-checkout authorization_url.
| Parameter | Type | Required | Notes |
|---|---|---|---|
amount | integer | yes | Kobo. ₦5,000.00 = 500000. Integers only — floats are rejected. |
email | string | yes | Customer email (receipt + record). |
reference | string | yes | 1–80 chars of A–Z a–z 0–9 - . _ =. Unique per transaction, per mode. |
currency | string | no | Only NGN (default). |
callback_url | string | no | Absolute http(s) URL the customer returns to after payment. Falls back to your profile default. |
customer_name | string | no | ≤160 chars. Pre-fills the checkout. |
customer_phone | string | no | Nigerian number; normalised to 234… and used for the SMS receipt. |
description | string | no | ≤200 chars, shown on the checkout and receipts. |
metadata | object | no | Your 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 param | Type | Notes |
|---|---|---|
status | string | pending | awaiting_transfer | success | failed | expired |
from / to | date | YYYY-MM-DD, on created_at. |
page | integer | Default 1. |
per_page | integer | Default 50, max 100. |
{
"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
{
"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"
}| status | Meaning |
|---|---|
pending | Initialized; the customer has not opened/committed the checkout yet. |
awaiting_transfer | A virtual account was issued; waiting for the bank transfer. |
success | Paid and confirmed. The only state to fulfil on. |
failed | The payment could not be completed. |
expired | The checkout window (30 min) lapsed without payment. |
Webhook payload
Deliveries are POSTs with these 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
| HTTP | code | Meaning |
|---|---|---|
| 401 | authorization_required | Missing/malformed Authorization header. |
| 401 | invalid_key | The key does not exist. |
| 401 | key_revoked | The key was revoked — use a current one. |
| 403 | merchant_not_active | Live key used before the account was approved. |
| 403 | live_not_enabled | Account approved but live payments not yet enabled. |
| 403 | merchant_suspended / merchant_closed | Account suspended/closed — contact the gateway team. |
| 404 | transaction_not_found | Unknown reference for this merchant + mode. |
| 409 | duplicate_reference | Reference already completed or reused with different values. |
| 422 | invalid_amount / amount_too_small / amount_too_large | Amount not an integer in kobo, or outside the allowed range. |
| 422 | invalid_email / invalid_phone / invalid_reference / invalid_currency | A field failed validation (the message says which). |
| 422 | invalid_callback_url / invalid_metadata / metadata_too_large | Callback/metadata constraints violated. |
| 422 | invalid_status / invalid_date | Bad list filters. |
| 422 | no_webhook_url | Webhook test without a configured endpoint. |
| 429 | rate_limited | Over 120 requests/minute. |
| 429 | too_many_attempts | Too many failed authentications from your IP. |
| 500 | server_error | Our fault. Retry, and quote the X-Request-Id to support. |
| 503 | service_unavailable | The merchant API is temporarily switched off. |
Questions? info@ibejulekki.lg.gov.ng
