Skip to content
Loading keys…

API Reference Overview

Base URL, response envelope, conventions and the full resource list.

The Wajub API is a REST API: one base URL, JSON bodies, standard HTTP status codes, and a single Authorization header carrying your API key. There is no separate sandbox host and no version segment in the path.

Built-in playground

Set your API keys in the top bar, then use Test this endpoint on any resource page to send a real request from the documentation.

Base URL

Every request goes to the same host, over HTTPS:

https://api.wajub.com

The environment is decided by the prefix of the key you send, not by the URL. A key starting with sk_test., pk_test. or rk_test. reads and writes the sandbox database; a key starting with sk., pk. or rk. reads and writes live data. Same host, same paths, same payloads.

Your first call

GET / costs nothing, touches no resource, and answers the two questions worth asking first: is this key valid, and which environment does it open.

curl https://api.wajub.com/ \
-H "Authorization: $WAJUB_API_KEY"

The response names your team and the environment the key belongs to:

Response · 200 OK
{
"status": "OK",
"code": 200,
"message": "Hello from Wajub",
"business": "Acme Retail",
"env": "sandbox"
}

Response envelope

Every response carries the same three fields, then the payload.

statusstringoptional
HTTP reason phrase: OK, Created, Not Found, Unprocessable Content.
codeintegeroptional
The HTTP status code, repeated in the body.
messagestringoptional
One human-readable sentence. Safe to log, never to branch on.

A single resource is returned under a key named after it. A payment comes back under transaction, not payment, because the underlying record is a transaction:

Single resource · 200 OK
{
"status": "OK",
"code": 200,
"message": "Payment retrieved",
"transaction": {
"id": "trx_01JXXXXXXXXXXXXX",
"reference": "trx.PVrU8x2kQ1",
"amount": 25000,
"currency": "XAF",
"status": "succeeded"
}
}

Lists return an items array and a meta object:

List · 200 OK
{
"status": "OK",
"code": 200,
"message": "Payments retrieved",
"items": [
],
"meta": {
"current_page": 1,
"last_page": 3,
"per_page": 25,
"total": 68
}
}

Here is the key to read for each resource. GET /events is the one list that does not use items:

ResourceSingleList
Paymentstransactionitems
Refundsrefunditems
Transferstransferitems
Customerscustomeritems
Beneficiariesbeneficiaryitems
Payment linkslinkitems
Invoicesinvoiceitems
Accountsaccountitems
Webhook endpointsendpointitems
Eventseventevents
Balancebalancen/a

Every response carries a request ID

X-Request-Id is returned on every response, success or failure. Log it, and quote it to support when something goes wrong. You can also send your own (up to 64 characters) and Wajub will echo it back rather than generate one, which makes your logs and ours line up.

Response headers
X-Request-Id: 9f1c0f2a-3f5e-4f1b-9a1e-2c8d6b0e7a41
X-Wajub-Version: 2026-09-01
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 117

Conventions

TopicWhat it covers
AuthenticationPublic, private and restricted keys, scopes, IP rules
ErrorsStatus codes and the errors object
Failure Reasonsfailure_reason on failed payments, transfers, refunds
Paginationper_page, page and cursor
Rate limitsThe five limiters and the X-RateLimit-* headers
IdempotencyReplaying a creation without charging twice
VersioningDate-based versions and what has changed

Resources

ResourceKey endpoints
PaymentsPOST /payments, GET /payments/{id}
ProvidersGET /providers
RefundsPOST /refunds, GET /refunds/{id}
TransfersPOST /transfers, GET /transfers/{id}
CustomersPOST /customers, GET /customers/{id}
SubaccountsPOST /accounts
BalanceGET /balance
EventsGET /events, POST /events/{id}/resend
BeneficiariesPOST /beneficiaries
Webhook EndpointsPOST /webhooks
Payment LinksPOST /links
InvoicesPOST /invoices
DisputesGET /disputes

Three add-ons sit outside the core resources and are documented separately: Identity, Tax and Shield.

Try it now

GET /balance needs a private key, so it is also a good check that your server-side key works:

What did you think of this content?