Build on Kuyabe.#
REST, JSON, idempotent, and rate-limited. Generate a key from your developer dashboard and start sending requests in 30 seconds.
Base URL
https://kuyabedatasub.jrverify.com.ng/api/v1
Authentication#
Every request must be both bearer-authenticated and HMAC-signed:
- Bearer token — your public key goes in the
Authorizationheader. - HMAC signature — a per-request SHA-256 signature computed from your secret. Details in Signing requests.
Authorization: Bearer kds_yourKeyHere.checksum
X-Kuyabe-Timestamp: 1791235236
X-Kuyabe-Signature: 9541eb44a435dd9b0d846a127bf3f6d02ede8878fd49eebb5dc9b8396175715c
Test keys use the kdt_ prefix and hit the sandbox. Live keys use kds_.
Each key consists of a public key (kds_… or kdt_…) and a secret (kds_sk_…). Both are displayed once when you create the key. If you lose the secret, you can reveal it from the dashboard after a password check — but if you suspect it has been exposed, rotate the key.
Signing requests#
Requests are authenticated with a per-request HMAC-SHA256 signature. Two headers are required in addition to the bearer token:
| Header | Value |
|---|---|
| X-Kuyabe-Timestamp | Unix time in seconds. Must be within ±300s of server time. |
| X-Kuyabe-Signature | Lowercase hex HMAC-SHA256 of the canonical string. No sha256= prefix. |
Canonical string
Four fields, joined by a single . character:
timestamp . METHOD . path . body
timestamp— the same value sent inX-Kuyabe-Timestamp.METHOD— uppercase HTTP verb (GET,POST).path— the full URL path, including the/api/v1prefix, excluding the query string and any trailing slash. ForGET https://kuyabedatasub.jrverify.com.ng/api/v1/data/plans?network=MTN, the signed path is/api/v1/data/plans.body— the raw JSON body bytes you will send. Empty string forGET. The separator dot before an empty body is still part of the string.
The signature is:
signature = hex( HMAC_SHA256( canonical_string, secret ) )
Examples
PHP
$timestamp = (string) time();
$method = 'POST';
$path = '/api/v1/nin/slip';
$body = json_encode([
'variant' => 'premium',
'nin' => '12345678901',
], JSON_UNESCAPED_SLASHES);
$canonical = $timestamp . '.' . $method . '.' . $path . '.' . $body;
$signature = hash_hmac('sha256', $canonical, $secret); // plain hex
$headers = [
'Authorization: Bearer ' . $publicKey,
'X-Kuyabe-Timestamp: ' . $timestamp,
'X-Kuyabe-Signature: ' . $signature,
'Content-Type: application/json',
];
Python
import hmac, hashlib, json, time, requests
public_key = "kds_..."
secret = "kds_sk_..."
timestamp = str(int(time.time()))
method = "POST"
path = "/api/v1/nin/slip"
body = json.dumps({"variant": "premium", "nin": "12345678901"},
separators=(",", ":"))
canonical = f"{timestamp}.{method}.{path}.{body}"
signature = hmac.new(secret.encode(), canonical.encode(), hashlib.sha256).hexdigest()
r = requests.post(
"http://localhost" + path,
data=body,
headers={
"Authorization": f"Bearer {public_key}",
"X-Kuyabe-Timestamp": timestamp,
"X-Kuyabe-Signature": signature,
"Content-Type": "application/json",
},
)
Node.js
const crypto = require('crypto');
const timestamp = Math.floor(Date.now() / 1000).toString();
const method = 'POST';
const path = '/api/v1/nin/slip';
const body = JSON.stringify({ variant: 'premium', nin: '12345678901' });
const canonical = `${timestamp}.${method}.${path}.${body}`;
const signature = crypto.createHmac('sha256', secret).update(canonical).digest('hex');
await fetch('http://localhost' + path, {
method,
headers: {
'Authorization': `Bearer ${publicKey}`,
'X-Kuyabe-Timestamp': timestamp,
'X-Kuyabe-Signature': signature,
'Content-Type': 'application/json',
},
body,
});
curl
TS=$(date +%s)
METHOD=GET
PATH_=/api/v1/balance
BODY=
CANONICAL="$TS.$METHOD.$PATH_.$BODY"
SIG=$(printf '%s' "$CANONICAL" \
| openssl dgst -sha256 -hmac "$KUYABE_SECRET" -hex \
| awk '{print $2}')
curl "http://localhost$PATH_" \
-H "Authorization: Bearer $KUYABE_PUBLIC_KEY" \
-H "X-Kuyabe-Timestamp: $TS" \
-H "X-Kuyabe-Signature: $SIG"
Common pitfalls
- Wrong path. Sign the path including the
/api/v1prefix, not just/nin/slip. - Query string. Do not include
?network=MTNin the canonical path — sign/data/plans. - Body whitespace. Sign the exact bytes you send. If your JSON encoder inserts spaces, sign the spaced version.
- Hex, not base64. The signature is lowercase hex, and there is no
sha256=prefix. - Clock skew. Timestamps older than 300 seconds are rejected. Keep the client clock synced (NTP).
- Trailing dot. For
GETrequests the canonical string still ends with a.because the body field is empty.
Wallet#
All endpoints require a signed request — see Signing requests. Examples below omit the two signature headers for brevity.
| Method | Path | Description |
|---|---|---|
| GET | /balance | Wallet balance, locked funds, available amount |
| GET | /wallet/funding-options | Virtual account details + funding hints |
curl https://kuyabedatasub.jrverify.com.ng/api/v1/balance \
-H "Authorization: Bearer kds_yourKeyHere.checksum" \
-H "X-Kuyabe-Timestamp: $TS" \
-H "X-Kuyabe-Signature: $SIG"
# Response
{
"status": true,
"data": {
"balance_kobo": 1245000,
"locked_kobo": 0,
"available_kobo": 1245000,
"currency": "NGN",
"formatted": "₦12,450.00"
}
}
Data#
Add the signature headers as shown in the Signing requests section. $TS is the current Unix timestamp; $SIG is the HMAC-SHA256 of "$TS.METHOD.path.body".
| Method | Path | Description |
|---|---|---|
| GET | /networks | Supported networks |
| GET | /data/plans?network=MTN | Active data plans & prices |
| POST | /data/purchase | Buy a data bundle |
Buy data
curl -X POST https://kuyabedatasub.jrverify.com.ng/api/v1/data/purchase \
-H "Authorization: Bearer kds_yourKeyHere.checksum" \
-H "X-Kuyabe-Timestamp: $TS" \
-H "X-Kuyabe-Signature: $SIG" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 8bf3c2a1-...-d94f" \
-d '{
"network_id": 1,
"data_plan_id": 42,
"phone": "08031234567"
}'
Airtime#
Add the signature headers as shown in the Signing requests section. $TS is the current Unix timestamp; $SIG is the HMAC-SHA256 of "$TS.METHOD.path.body".
| Method | Path | Description |
|---|---|---|
| POST | /airtime/purchase | Buy airtime |
curl -X POST https://kuyabedatasub.jrverify.com.ng/api/v1/airtime/purchase \
-H "Authorization: Bearer kds_yourKeyHere.checksum" \
-H "X-Kuyabe-Timestamp: $TS" \
-H "X-Kuyabe-Signature: $SIG" \
-H "Content-Type: application/json" \
-d '{
"network_id": 1,
"phone": "08031234567",
"amount": 500
}'
Recharge PINs#
Add the signature headers as shown in the Signing requests section. $TS is the current Unix timestamp; $SIG is the HMAC-SHA256 of "$TS.METHOD.path.body".
| Method | Path | Description |
|---|---|---|
| GET | /pins/products | Available PIN denominations by network |
| POST | /pins/purchase | Buy one or more PINs |
| GET | /pins | List purchased PINs |
E-PINs#
Add the signature headers as shown in the Signing requests section. $TS is the current Unix timestamp; $SIG is the HMAC-SHA256 of "$TS.METHOD.path.body".
| Method | Path | Description |
|---|---|---|
| GET | /epins/products | Available E-PIN products |
| POST | /epins/purchase | Buy E-PINs |
| GET | /epins | List purchased E-PINs |
Exam PINs#
Add the signature headers as shown in the Signing requests section. $TS is the current Unix timestamp; $SIG is the HMAC-SHA256 of "$TS.METHOD.path.body".
| Method | Path | Description |
|---|---|---|
| GET | /exams | Available exam types (WAEC, NECO, NABTEB, NBAIS, JAMB) |
| POST | /exams/purchase | Buy exam PINs |
| GET | /exams/pins | List purchased exam PINs |
NIN Services#
Add the signature headers as shown in the Signing requests section. $TS is the current Unix timestamp; $SIG is the HMAC-SHA256 of "$TS.METHOD.path.body".
| Method | Path | Description |
|---|---|---|
| POST | /nin/slip | NIN verification slip |
| POST | /nin/phone | NIN lookup by phone number |
| POST | /nin/demography | NIN search by name / DOB / gender |
| POST | /nin/validate | NIN validation |
| POST | /nin/delink | NIN delinking |
| POST | /nin/ipe | Instant IPE |
| POST | /nin/personalize | NIN personalization |
| GET | /requests/:reference | Poll async request status |
Request a NIN slip
curl -X POST https://kuyabedatasub.jrverify.com.ng/api/v1/nin/slip \
-H "Authorization: Bearer kds_yourKeyHere.checksum" \
-H "X-Kuyabe-Timestamp: $TS" \
-H "X-Kuyabe-Signature: $SIG" \
-H "Content-Type: application/json" \
-d '{
"variant": "premium",
"nin": "12345678901"
}'
variant accepts premium, standard, regular, or vnin.
BVN Services#
Add the signature headers as shown in the Signing requests section. $TS is the current Unix timestamp; $SIG is the HMAC-SHA256 of "$TS.METHOD.path.body".
| Method | Path | Description |
|---|---|---|
| POST | /bvn/verify | Generate a BVN verification slip |
| POST | /bvn/retrieve | Submit a BVN retrieval request |
| POST | /bvn/update | Submit a BVN detail-change request |
Virtual Accounts#
Add the signature headers as shown in the Signing requests section. $TS is the current Unix timestamp; $SIG is the HMAC-SHA256 of "$TS.METHOD.path.body".
| Method | Path | Description |
|---|---|---|
| GET | /virtual-accounts | List your virtual account(s) |
| POST | /virtual-accounts/create | Provision a new virtual account |
Virtual Cards#
Add the signature headers as shown in the Signing requests section. $TS is the current Unix timestamp; $SIG is the HMAC-SHA256 of "$TS.METHOD.path.body".
| Method | Path | Description |
|---|---|---|
| GET | /cards | List your issued virtual cards |
| POST | /cards/issue | Issue a new USD virtual card |
| GET | /cards/:ref | Card details |
| POST | /cards/:ref/fund | Fund a card from your wallet |
| POST | /cards/:ref/terminate | Terminate a card |
Transfers#
Add the signature headers as shown in the Signing requests section. $TS is the current Unix timestamp; $SIG is the HMAC-SHA256 of "$TS.METHOD.path.body".
| Method | Path | Description |
|---|---|---|
| POST | /transfers/resolve | Look up a recipient |
| POST | /transfers/send | Send money (internal or external) |
Transactions#
Add the signature headers as shown in the Signing requests section. $TS is the current Unix timestamp; $SIG is the HMAC-SHA256 of "$TS.METHOD.path.body".
| Method | Path | Description |
|---|---|---|
| GET | /transactions | Paginated transaction history |
| GET | /transactions/:reference | Single transaction detail |
Response Shapes#
Every response — success or error — is JSON.
Success
{
"status": true,
"message": "Transaction successful",
"reference": "KDS-20260101-ABCD1234",
"data": { ... }
}
Error
{
"status": false,
"message": "NIN must be exactly 11 digits.",
"code": "VALIDATION_ERROR"
}
Error responses are flat: message and code sit at the top level of the object, alongside status.
Error Codes#
| Code | Meaning |
|---|---|
| MISSING_AUTH | No Authorization header, or it isn't a valid Bearer value |
| INVALID_KEY | Public key doesn't match a stored key, or the key is revoked/expired |
| MISSING_SIGNATURE | X-Kuyabe-Timestamp or X-Kuyabe-Signature header absent |
| INVALID_SIGNATURE | Signature doesn't match, or the timestamp is more than 300s out of sync |
| IP_NOT_ALLOWED | Caller's IP is not on the key's allow-list |
| KEY_MISCONFIG | Server-side key storage issue; regenerate the key |
| UNAUTHORIZED | Generic auth failure (reserved; the specific codes above are more common) |
| VALIDATION_ERROR | Request body failed validation |
| NOT_FOUND | Resource does not exist |
| PURCHASE_ERROR | Purchase could not be completed |
| INSUFFICIENT_FUNDS | Wallet balance too low |
| UNSUPPORTED_NETWORK | Network isn't served by our provider |
| PROVIDER_ERROR | Upstream provider returned an error |
| NIN_ERROR | NIN service failed (validation or upstream) |
| BVN_ERROR | BVN service failed (validation or upstream) |
| CARD_ERROR | Virtual card operation failed |
| DVA_ERROR | Virtual account provisioning failed |
| TRANSFER_ERROR | Transfer execution failed |
| PENDING | Request accepted; poll /requests/:reference |
| RATE_LIMITED | Too many requests |
| INTERNAL_ERROR | Something went wrong on our end |
Idempotency#
Send an Idempotency-Key header with any POST. If the same key is retried within 24 hours, the original response is returned instead of double-charging the wallet. Use a fresh UUID per logical operation — for example, hash of (phone, plan, amount) — so a genuine retry lands on the cached response, but a new purchase does not.
Webhooks#
Async operations (NIN slip, IPE, BVN retrieval, external transfers, card issuance) are confirmed via webhook. Provide a URL and we'll POST a JSON payload to it, signing every payload with HMAC-SHA256 using your webhook secret.
POST https://yourapp.com/webhooks/kuyabe
X-Kuyabe-Signature: sha256=abc123...
Content-Type: application/json
{
"event": "request.completed",
"data": {
"reference": "KDS-20260101-NIN00001",
"status": "SUCCESS",
"service": "nin_slip",
"slip_url": "https://yoursite/uploads/nin_docs/nin_premium_slip_42_ab12cd34.jpg"
}
}
sha256=<hex> prefix. Request signatures — the ones you send to Kuyabe — do not. See Signing requests for the latter.
Rate Limits#
- Test keys — 60 requests / minute
- Live keys — 120 requests / minute
- Write operations (POST) count against the same bucket as reads
- Exceeding the limit returns
429 RATE_LIMITEDwith aRetry-Afterheader
Support#
Email support@kuyabe.com or chat us on WhatsApp. For enterprise volume or custom endpoints, ask about our Distributor tier.