Developer API
Developer API

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:

  1. Bearer token — your public key goes in the Authorization header.
  2. 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.

Keep the secret server-side. Never embed it in client-side JavaScript, mobile apps, or public repositories.

Signing requests#

Requests are authenticated with a per-request HMAC-SHA256 signature. Two headers are required in addition to the bearer token:

HeaderValue
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 in X-Kuyabe-Timestamp.
  • METHOD — uppercase HTTP verb (GET, POST).
  • path — the full URL path, including the /api/v1 prefix, excluding the query string and any trailing slash. For GET 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 for GET. 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/v1 prefix, not just /nin/slip.
  • Query string. Do not include ?network=MTN in 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 GET requests 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.

MethodPathDescription
GET/balanceWallet balance, locked funds, available amount
GET/wallet/funding-optionsVirtual 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".

MethodPathDescription
GET/networksSupported networks
GET/data/plans?network=MTNActive data plans & prices
POST/data/purchaseBuy 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".

MethodPathDescription
POST/airtime/purchaseBuy 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".

MethodPathDescription
GET/pins/productsAvailable PIN denominations by network
POST/pins/purchaseBuy one or more PINs
GET/pinsList 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".

MethodPathDescription
GET/epins/productsAvailable E-PIN products
POST/epins/purchaseBuy E-PINs
GET/epinsList 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".

MethodPathDescription
GET/examsAvailable exam types (WAEC, NECO, NABTEB, NBAIS, JAMB)
POST/exams/purchaseBuy exam PINs
GET/exams/pinsList 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".

MethodPathDescription
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/:referencePoll 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".

MethodPathDescription
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".

MethodPathDescription
GET/virtual-accountsList your virtual account(s)
POST/virtual-accounts/createProvision 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".

MethodPathDescription
GET/cardsList your issued virtual cards
POST/cards/issueIssue a new USD virtual card
GET/cards/:refCard details
POST/cards/:ref/fundFund a card from your wallet
POST/cards/:ref/terminateTerminate 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".

MethodPathDescription
POST/transfers/resolveLook up a recipient
POST/transfers/sendSend 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".

MethodPathDescription
GET/transactionsPaginated transaction history
GET/transactions/:referenceSingle 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#

CodeMeaning
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_NETWORKNetwork 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"
  }
}
Two different signatures. Webhook signatures — the ones Kuyabe sends to you — use the 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_LIMITED with a Retry-After header

Support#

Email support@kuyabe.com or chat us on WhatsApp. For enterprise volume or custom endpoints, ask about our Distributor tier.