WayaQuick — Standard API Integration
Introduction
The WayaQuick Merchant API lets you collect customer payments and send payouts (plus verify accounts and identity) in Nigeria. Authentication uses API-key headers, every endpoint returns the same response envelope, and your unique reference on each operation is its idempotency and reconciliation key.
This guide is organised into these sections:
- Payout — Verify Account & Initiate Payout (banks, name enquiry, disbursement).
- Collection — Payment Collect (hosted checkout).
- BVN Verification — KYC identity lookup.
- Webhook — Receive and verify transaction notifications.
Base URL
Whether your account operates in test or live mode is controlled by the Test / Live toggle on your merchant dashboard.
Authentication
Authentication uses API-key headers on every request:
| Header | Value |
|---|---|
Authorization | Bearer {your_api_secret_key} (WAYASECK_TEST_0x... or WAYASECK_PROD_0x...) |
X-Merchant-Id | Your Merchant ID (format MER_...) |
Content-Type | application/json |
_TEST_ / _PROD_ prefix selects the environment automatically. A missing or invalid key returns 401. Never expose your secret key in a browser or mobile app — these calls are server-to-server.Client setup
A reusable client per language that carries the auth headers on every request. Point baseUrl at production when you go live.
# Set your credentials as environment variables export WAYA_MERCHANT_ID="MER_LOfV71779980928158w7MEX" export WAYA_SECRET_KEY="WAYASECK_TEST_0x..." export WAYA_BASE="https://services.wayapay.ng/merchant-middleware" # Send both credentials on every request curl -H "Authorization: Bearer $WAYA_SECRET_KEY" \ -H "X-Merchant-Id: $WAYA_MERCHANT_ID" \ -H "Content-Type: application/json" \ $WAYA_BASE/api/v2/get-bank-list
// npm install axios // wayapay.js const axios = require('axios'); class WayaPay { constructor({ merchantId, secretKey, baseUrl = 'https://services.wayapay.ng/merchant-middleware' }) { this.client = axios.create({ baseURL: baseUrl, headers: { 'Authorization': `Bearer ${secretKey}`, 'X-Merchant-Id': merchantId, 'Content-Type': 'application/json' }, timeout: 30000 }); } } module.exports = WayaPay; // usage const waya = new WayaPay({ merchantId: process.env.WAYA_MERCHANT_ID, secretKey: process.env.WAYA_SECRET_KEY });
// build.gradle // implementation 'org.springframework.boot:spring-boot-starter-webflux' package com.yourapp.wayapay; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.web.reactive.function.client.WebClient; @Component public class WayaPayClient { private final WebClient client; public WayaPayClient( @Value("${wayapay.merchant-id}") String merchantId, @Value("${wayapay.secret-key}") String secretKey, @Value("${wayapay.base-url:https://services.wayapay.ng/merchant-middleware}") String baseUrl) { this.client = WebClient.builder() .baseUrl(baseUrl) .defaultHeader("Authorization", "Bearer " + secretKey) .defaultHeader("X-Merchant-Id", merchantId) .defaultHeader("Content-Type", "application/json") .build(); } public WebClient getClient() { return client; } }
// composer require guzzlehttp/guzzle <?php namespace App\\WayaPay; use GuzzleHttp\\Client; class WayaPay { private Client $client; public function __construct(string $merchantId, string $secretKey, string $baseUrl = 'https://services.wayapay.ng/merchant-middleware') { $this->client = new Client([ 'base_uri' => $baseUrl, 'timeout' => 30, 'headers' => [ 'Authorization' => 'Bearer ' . $secretKey, 'X-Merchant-Id' => $merchantId, 'Content-Type' => 'application/json' ] ]); } public function client(): Client { return $this->client; } }
// dotnet add package System.Net.Http.Json using System.Net.Http.Headers; using System.Net.Http.Json; public class WayaPayClient { private readonly HttpClient _http; public WayaPayClient(string merchantId, string secretKey, string baseUrl = "https://services.wayapay.ng/merchant-middleware") { _http = new HttpClient { BaseAddress = new Uri(baseUrl) }; _http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", secretKey); _http.DefaultRequestHeaders.Add("X-Merchant-Id", merchantId); _http.DefaultRequestHeaders.Accept.Add( new MediaTypeWithQualityHeaderValue("application/json")); } public HttpClient Http => _http; }
// go get github.com/go-resty/resty/v2 package wayapay import ( "time" "github.com/go-resty/resty/v2" ) type Client struct { http *resty.Client } func New(merchantID, secretKey string) *Client { c := resty.New(). SetBaseURL("https://services.wayapay.ng/merchant-middleware"). SetTimeout(30 * time.Second). SetHeader("Authorization", "Bearer "+secretKey). SetHeader("X-Merchant-Id", merchantID). SetHeader("Content-Type", "application/json") return &Client{http: c} }
// config/wayapay.php <?php return [ 'merchant_id' => env('WAYAPAY_MERCHANT_ID'), 'secret_key' => env('WAYAPAY_SECRET_KEY'), 'base_url' => env('WAYAPAY_BASE_URL', 'https://services.wayapay.ng/merchant-middleware'), ]; // app/Services/WayaPayService.php <?php namespace App\\Services; use Illuminate\\Support\\Facades\\Http; use Illuminate\\Http\\Client\\PendingRequest; class WayaPayService { public function client(): PendingRequest { return Http::baseUrl(config('wayapay.base_url')) ->timeout(30) ->withToken(config('wayapay.secret_key')) ->withHeaders(['X-Merchant-Id' => config('wayapay.merchant_id')]) ->asJson(); } }
Response Envelope
Every endpoint returns the same envelope:
{ "success": true, "code": "00", "message": "...", "data": { }, "timestamp": "..." }code "00" (and success: true) means success. data is the endpoint payload (null on errors). The code is a bank-style response code, derived from the HTTP status:
| Code | Meaning | HTTP Status |
|---|---|---|
00 | Success | 200 / 201 / 202 |
01 | Unauthorized — missing/invalid API key | 401 |
13 | Validation error — bad/missing fields | 400, 422 |
25 | Not found — account / record not resolved | 404 |
57 | Forbidden | 403 |
91 | Upstream/provider unavailable | 502, 503, 504 |
92 | System busy — try again shortly | 429 |
94 | Duplicate — reference already used | 409 |
96 | Unexpected system error | 500 (and other 5xx) |
On any error, success is false, data is null, and message describes the problem:
{
"success": false,
"code": "13",
"message": "amount: must be greater than zero",
"data": null,
"timestamp": "..."
}Payout
Verify Account & Initiate Payout. Discover banks, resolve the destination account name (and optionally verify identity), then transfer funds. Always verify the destination account before initiating a payout.
Get bank list
Returns all supported banks and their codes. Use these codes for payouts and account verification.
Example
curl -X GET \ '$WAYA_BASE/api/v2/get-bank-list' \ -H 'Authorization: Bearer $WAYA_SECRET_KEY' \ -H 'X-Merchant-Id: $WAYA_MERCHANT_ID'
async fetchBanks() { const { data } = await this.client.get('/api/v2/get-bank-list'); return data.data; // array of banks } // usage const banks = await waya.fetchBanks(); banks.forEach(b => console.log(`${b.code} - ${b.name}`));
public Mono<Map> fetchBanks() { return client.get() .uri("/api/v2/get-bank-list") .retrieve() .bodyToMono(Map.class); }
public function fetchBanks(): array { $response = $this->client->get('/api/v2/get-bank-list'); return json_decode($response->getBody()->getContents(), true); }
public async Task<JsonElement> FetchBanksAsync() { return await _http.GetFromJsonAsync<JsonElement>("/api/v2/get-bank-list"); }
func (c *Client) FetchBanks() (map[string]interface{}, error) { var result map[string]interface{} _, err := c.http.R().SetResult(&result).Get("/api/v2/get-bank-list") return result, err }
public function fetchBanks(): array { return $this->client()->get('/api/v2/get-bank-list')->throw()->json(); }
Response
{
"success": true,
"code": "00",
"message": "Bank list retrieved",
"data": [
{ "code": "044", "name": "Access Bank", "id": "1", "status": true },
{ "code": "058", "name": "GTBank", "id": "2", "status": true }
]
}Account verification (name enquiry)
Resolves an account number and returns the registered account name. Always call this before initiating a payout.
Request body
| Field | Type | Notes |
|---|---|---|
accountNumberRequired | string | 10-digit NUBAN |
enquiryTypeRequired | string | WAYA-BANK (intra) or OTHERS (inter-bank) |
bankCodeConditional | string | CBN bank code from Get bank list. Required when enquiryType is OTHERS |
{ "accountNumber": "0123456789", "bankCode": "044", "enquiryType": "OTHERS" }Example
curl -X POST \ '$WAYA_BASE/api/v2/verify-account' \ -H 'Authorization: Bearer $WAYA_SECRET_KEY' \ -H 'X-Merchant-Id: $WAYA_MERCHANT_ID' \ -H 'Content-Type: application/json' \ -d '{ "accountNumber": "0123456789", "bankCode": "044", "enquiryType": "OTHERS" }'
async verifyAccount(accountNumber, bankCode, enquiryType = 'OTHERS') { const { data } = await this.client.post('/api/v2/verify-account', { accountNumber, bankCode, enquiryType }); return data; } // usage const resolved = await waya.verifyAccount('0123456789', '044'); console.log(resolved.data.accountName); // "JOHN ADEKUNLE DOE"
public Mono<Map> verifyAccount(String accountNumber, String bankCode, String enquiryType) { return client.post() .uri("/api/v2/verify-account") .bodyValue(Map.of( "accountNumber", accountNumber, "bankCode", bankCode, "enquiryType", enquiryType )) .retrieve() .bodyToMono(Map.class); }
public function verifyAccount(string $accountNumber, string $bankCode, string $enquiryType = 'OTHERS'): array { $response = $this->client->post('/api/v2/verify-account', [ 'json' => [ 'accountNumber' => $accountNumber, 'bankCode' => $bankCode, 'enquiryType' => $enquiryType ] ]); return json_decode($response->getBody()->getContents(), true); }
public async Task<JsonElement> VerifyAccountAsync(string accountNumber, string bankCode, string enquiryType = "OTHERS") { var body = new { accountNumber, bankCode, enquiryType }; var response = await _http.PostAsJsonAsync("/api/v2/verify-account", body); response.EnsureSuccessStatusCode(); return await response.Content.ReadFromJsonAsync<JsonElement>(); }
func (c *Client) VerifyAccount(accountNumber, bankCode, enquiryType string) (map[string]interface{}, error) { body := map[string]string{ "accountNumber": accountNumber, "bankCode": bankCode, "enquiryType": enquiryType, } var result map[string]interface{} _, err := c.http.R().SetBody(body).SetResult(&result). Post("/api/v2/verify-account") return result, err }
public function verifyAccount(string $accountNumber, string $bankCode, string $enquiryType = 'OTHERS'): array { return $this->client() ->post('/api/v2/verify-account', [ 'accountNumber' => $accountNumber, 'bankCode' => $bankCode, 'enquiryType' => $enquiryType, ]) ->throw() ->json(); }
Response
{
"success": true,
"code": "00",
"message": "Account verification completed",
"data": {
"successful": true,
"responseCode": "00",
"responseMessage": "Approved",
"accountNumber": "0123456789",
"accountName": "JOHN ADEKUNLE DOE",
"bankCode": "044",
"bankName": "Access Bank",
"enquiryType": "OTHERS"
}
}Initiate payout
Transfer funds to a bank account.
Request body
| Field | Type | Notes |
|---|---|---|
amountRequired | number | Greater than 0 |
currencyRequired | string | ISO-4217, e.g. NGN |
accountNumberRequired | string | 10-digit NUBAN |
bankCodeRequired | string | CBN bank code |
referenceRequired | string | Your unique reference / idempotency key |
accountName | string | Destination account name (match the verified name) |
narration | string | Accepted, but not yet applied: the beneficiary statement shows a system narration that includes your reference |
{
"amount": 25000.00,
"currency": "NGN",
"accountNumber": "0123456789",
"bankCode": "044",
"accountName": "JOHN ADEKUNLE DOE",
"reference": "PAYOUT-20260604-001",
"narration": "Payout for order 1234"
}Example
curl -X POST \ '$WAYA_BASE/api/v2/payment-payout/initiate' \ -H 'Authorization: Bearer $WAYA_SECRET_KEY' \ -H 'X-Merchant-Id: $WAYA_MERCHANT_ID' \ -H 'Content-Type: application/json' \ -d '{ "amount": 25000.00, "currency": "NGN", "accountNumber": "0123456789", "bankCode": "044", "accountName": "JOHN ADEKUNLE DOE", "reference": "PAYOUT-20260604-001" }'
async initiatePayout({ amount, currency, accountNumber, bankCode, accountName, reference, narration }) { const { data } = await this.client.post('/api/v2/payment-payout/initiate', { amount, currency, accountNumber, bankCode, accountName, reference, narration }); return data; } // usage const payout = await waya.initiatePayout({ amount: 25000.00, currency: 'NGN', accountNumber: '0123456789', bankCode: '044', accountName: 'JOHN ADEKUNLE DOE', reference: 'PAYOUT-20260604-001' }); console.log(payout.data.payoutReference);
public Mono<Map> initiatePayout(Map<String, Object> payload) { return client.post() .uri("/api/v2/payment-payout/initiate") .bodyValue(payload) .retrieve() .bodyToMono(Map.class); }
public function initiatePayout(array $payload): array { $response = $this->client->post('/api/v2/payment-payout/initiate', [ 'json' => $payload ]); return json_decode($response->getBody()->getContents(), true); }
public async Task<JsonElement> InitiatePayoutAsync(object payload) { var response = await _http.PostAsJsonAsync("/api/v2/payment-payout/initiate", payload); response.EnsureSuccessStatusCode(); return await response.Content.ReadFromJsonAsync<JsonElement>(); }
func (c *Client) InitiatePayout(payload map[string]interface{}) (map[string]interface{}, error) { var result map[string]interface{} _, err := c.http.R().SetBody(payload).SetResult(&result). Post("/api/v2/payment-payout/initiate") return result, err }
public function initiatePayout(array $payload): array { return $this->client() ->post('/api/v2/payment-payout/initiate', $payload) ->throw() ->json(); }
Response
{
"success": true,
"code": "00",
"message": "Payout accepted for processing",
"data": {
"payoutReference": "MPO-20260604-abc123",
"merchantReference": "PAYOUT-20260604-001",
"status": "PROCESSING",
"message": "Payout accepted for processing"
}
}payoutReference before treating the money as delivered.| HTTP / code | When | Money moved? | What to do |
|---|---|---|---|
201 / 00 | Payout accepted | Yes, in progress | Track it with the status endpoint |
202 / 00 (data.status = PENDING) | The bank's outcome isn't confirmed yet | Unknown | Don't resend. Query the status |
401 / 01 | Missing/invalid API key | No | Fix the credentials |
403 / 57 | Merchant account inactive | No | Contact support |
409 / 94 | Insufficient wallet balance | No | Fund the wallet, then send it again |
422 / 13, message starting with a field name | Request validation failed | No | Fix the request |
422 / 13, any other message | Payout rejected | Query the status to be sure | Query the status |
500 / 502 / 503 / 504, timeout, dropped connection | Outcome unknown | Unknown | Don't resend. Query the status |
GET /api/v2/payment-payout/status/{reference} with your reference. A payout can return 404 for a short time right after initiation; wait at least 2 minutes before treating a 404 as "not accepted".Check payout status
Returns the latest status of a payout by the reference you sent at initiation.
data.status is the transaction's lifecycle status:
Request body
| data.status | Meaning |
|---|---|
PENDING | Submitted; terminal outcome not yet recorded (reconciling). |
SUCCESS | Completed successfully. |
REVERSED | Failed/reversed — the merchant wallet was re-credited. |
Example Response
{
"success": true,
"code": "00",
"message": "Payout status retrieved",
"data": {
"transactionReference": "PAYOUT-20260604-001",
"status": "SUCCESS",
"amount": "500.00",
"destinationAccountNumber": "0123456789",
"destinationAccountName": "JOHN DOE",
"destinationBankName": "GTBank",
"narration": "TRF FM ... REF:PAYOUT-20260604-001",
"createdAt": "2026-06-04T10:00:32"
}
}The top-level success is the API envelope flag; data.status is the actual payout status — don't confuse the two.
curl -X GET \ '$WAYA_BASE/api/v2/payment-payout/status/PAYOUT-20260604-001' \ -H 'Authorization: Bearer $WAYA_SECRET_KEY' \ -H 'X-Merchant-Id: $WAYA_MERCHANT_ID'
| HTTP | WHEN |
|---|---|
200 | Status returned |
401 | Missing/invalid API key. |
404 | No payout with that reference for this merchant |
502 | Status temporarily unavailable — try again shortly |
Polling: query every 30 seconds for the first 10 minutes, then every 5 minutes, until the status is SUCCESS or REVERSED. Stop after 24 hours and contact support with the reference for any payout still PENDING.
Collection
Payment Collect. Start collecting real-life payments from your customers. This starts a payment collection and returns a checkout URL you redirect your customer to.
Payment collect (initiate)
Starts a payment collection and returns a transaction ID and checkout URL you redirect your customer to.
Request body
| Field | Type | Notes |
|---|---|---|
transactionIdRequired | string | Your unique reference. Never reused: a repeat returns 409 |
amountRequired | string | Quoted string, at least "1.00", max 2 decimal places (e.g. "1500.00") |
currencyRequired | string | e.g. NGN |
firstNameRequired | string | Customer first name, 2–100 characters |
lastNameRequired | string | Customer last name, 2–100 characters |
emailRequired | string | Customer email (not format-checked) |
phoneRequired | string | Customer phone (not format-checked) |
description | string | Shown under the payment fields on the checkout page; cut to 100 characters |
meta | object | Arbitrary metadata; send a normal JSON object |
merchantId is taken from X-Merchant-Id automatically — do not send it in the body.{
"firstName": "John",
"lastName": "Doe",
"description": "Order #1234",
"transactionId": "TXN-V2-20260604-01",
"currency": "NGN",
"email": "john@example.com",
"amount": "1500.00",
"phone": "08012345678",
"meta": { "orderId": "1234" }
}Example
curl -X POST \ '$WAYA_BASE/api/v2/payment-collect/initiate' \ -H 'Authorization: Bearer $WAYA_SECRET_KEY' \ -H 'X-Merchant-Id: $WAYA_MERCHANT_ID' \ -H 'Content-Type: application/json' \ -d '{ "firstName": "John", "lastName": "Doe", "transactionId": "TXN-V2-20260604-01", "currency": "NGN", "email": "john@example.com", "amount": "1500.00", "phone": "08012345678", "meta": { "orderId": "1234" } }'
async initiatePayment(payload) { const { data } = await this.client.post('/api/v2/payment-collect/initiate', payload); return data; } // usage const res = await waya.initiatePayment({ firstName: 'John', lastName: 'Doe', description: 'Order #1234', transactionId: 'TXN-V2-20260604-01', currency: 'NGN', email: 'john@example.com', amount: '1500.00', phone: '08012345678', meta: { orderId: '1234' } }); console.log(res.data.checkOutUrl); // redirect the customer here
public Mono<Map> initiatePayment(Map<String, Object> payload) { return client.post() .uri("/api/v2/payment-collect/initiate") .bodyValue(payload) .retrieve() .bodyToMono(Map.class); }
public function initiatePayment(array $payload): array { $response = $this->client->post('/api/v2/payment-collect/initiate', [ 'json' => $payload ]); return json_decode($response->getBody()->getContents(), true); }
public async Task<JsonElement> InitiatePaymentAsync(object payload) { var response = await _http.PostAsJsonAsync("/api/v2/payment-collect/initiate", payload); response.EnsureSuccessStatusCode(); return await response.Content.ReadFromJsonAsync<JsonElement>(); }
func (c *Client) InitiatePayment(payload map[string]interface{}) (map[string]interface{}, error) { var result map[string]interface{} _, err := c.http.R().SetBody(payload).SetResult(&result). Post("/api/v2/payment-collect/initiate") return result, err }
public function initiatePayment(array $payload): array { return $this->client() ->post('/api/v2/payment-collect/initiate', $payload) ->throw() ->json(); }
Response
Redirect the customer to checkOutUrl to complete payment:
{
"success": true,
"code": "00",
"message": "Payment initiated successfully",
"data": {
"uniqueId": "TXN-V2-20260604-01",
"transactionId": "178056425312256824",
"email": "john@example.com",
"amount": "1500.00",
"checkOutUrl": "https://pay.wayaquick.com/?_tranId=178056425312256824",
"merchantId": "MER_LOfV71779980928158w7MEX",
"expiresAt": "2026-06-04T09:40:00Z"
}
}| HTTP / code | When | What to do |
|---|---|---|
201 / 00 | Collection created | Redirect the customer to checkOutUrl |
409 / 94 | transactionId already used by your merchant account | Start a new collection with a new transactionId |
422 / 13 | A required field is missing or invalid; message names the field | Fix the request |
502 / 91 | Payment gateway unavailable, or no checkout URL returned | Start a new collection with a new transactionId |
A transactionId is checked per merchant account and environment, and is never released. If initiation times out or fails, use a new transactionId: the customer never saw the lost checkout URL, so it can't be paid.
expiresAt (in the initiate and status responses) is the moment the link stops accepting payment, in UTC (ISO-8601 with Z). After it, new payment attempts on the link are rejected. Before sending a customer back to an existing checkOutUrl, check its status: only reopen it while the status is PENDING and expiresAt hasn't passed.Bank transfers must be for the exact amount. A transfer for a different amount fails and is returned to the sender.
Confirming a collection
Use the deposit webhook and the status query together:
- On receiving a webhook, don't credit from the webhook alone. Call
GET /api/v2/payment-collect/status/{refNo}with the webhook'sOrderId, and credit only when the status isSUCCESSFUL, using theamountPaidshown there. - If no webhook arrives, poll the status endpoint every 30 seconds until the collection reaches a final status.
- Credit each
refNoonce, even if both the webhook and polling confirm it.
Check Collection (deposit) status
Returns the current state of a deposit by its refNo. Use this for reconciliation alongside the deposit webhook + email — the webhook is the primary signal; this endpoint is the pull/safety-net path.
Response
{
"success": true,
"code": "00",
"message": "Transaction status retrieved",
"data": {
"refNo": "1779662251460508970",
"tranId": "aff8a062-4aa8-413b-9d2d-834b2e1dff82",
"merchantId": "MER_BdVFq…",
"amount": "1500.00",
"customerEmail": "john@example.com",
"amountPaid": "1500.00",
"fee": "22.50",
"currencyCode": "NGN",
"status": "SUCCESSFUL",
"settlementStatus": "PENDING",
"channel": "CARD",
"processedBy": "ISW",
"description": "Order #4523",
"environment": "LIVE",
"tranDate": "2026-06-08T10:37:40.348493",
"expiresAt": "2026-06-08T09:47:40Z"
}
}amount is the expected amount; amountPaid is what was actually received. Use status + amountPaid as authoritative.
data.status values
| Status | Terminal | Meaning |
|---|---|---|
INITIATED / PENDING / PROCESSING / APPROVED | no | In flight — keep polling; don't refund or retry |
SUCCESSFUL | yes | Funds confirmed — fulfil (use refNo for idempotency) |
REFUNDED | yes | Previously-successful transaction refunded |
FAILED / DECLINED / REJECTED / ABANDONED / EXPIRED / CANCELLED / CUSTOMER_ERROR / FRAUD_ERROR | yes | Customer not debited — no fulfilment |
TIMEOUT / ERROR / SYSTEM_ERROR / BANK_ERROR | yes | Outcome unknown — reconcile, don't refund unilaterally |
curl -X GET \ '$WAYA_BASE/api/v2/payment-collect/status/1779662251460508970' \ -H 'Authorization: Bearer $WAYA_SECRET_KEY' \ -H 'X-Merchant-Id: $WAYA_MERCHANT_ID'
| HTTP | When |
|---|---|
200 | Status returned |
401 | Missing/invalid API key |
404 | No transaction with that reference for this merchant |
BVN Verification
Verify a customer's Bank Verification Number (KYC). Verification takes two steps: submitting the BVN sends an OTP to the phone number registered against it, and the holder's record is only returned once that OTP is sent back. A BVN can't be looked up from the number alone.
Step 1 — initiate
Request body
| Field | Type | Notes |
|---|---|---|
bvnRequired | string | Exactly 11 digits |
{ "bvn": "22222222222" } // exactly 11 digitsExample
curl -X POST "$WAYA_BASE/api/v2/identity-verification/bvn/initiate" \ -H "Authorization: Bearer $WAYA_SECRET_KEY" \ -H "X-Merchant-Id: $WAYA_MERCHANT_ID" \ -H 'Content-Type: application/json' \ -d '{ "bvn": "22222222222" }'
async initiateBvn(bvn) { const { data } = await this.client.post('/api/v2/identity-verification/bvn/initiate', { bvn }); return data; } // usage const started = await waya.initiateBvn('22222222222'); // keep the reference on your server, never in a URL or browser storage console.log(started.data.reference, started.data.phoneNumber);
public Mono<Map> initiateBvn(String bvn) { return client.post() .uri("/api/v2/identity-verification/bvn/initiate") .bodyValue(Map.of("bvn", bvn)) .retrieve() .bodyToMono(Map.class); }
public function initiateBvn(string $bvn): array { $response = $this->client->post('/api/v2/identity-verification/bvn/initiate', [ 'json' => ['bvn' => $bvn] ]); return json_decode($response->getBody()->getContents(), true); }
public async Task<JsonElement> InitiateBvnAsync(string bvn) { var response = await _http.PostAsJsonAsync("/api/v2/identity-verification/bvn/initiate", new { bvn }); response.EnsureSuccessStatusCode(); return await response.Content.ReadFromJsonAsync<JsonElement>(); }
func (c *Client) InitiateBvn(bvn string) (map[string]interface{}, error) { var result map[string]interface{} _, err := c.http.R(). SetBody(map[string]string{"bvn": bvn}). SetResult(&result). Post("/api/v2/identity-verification/bvn/initiate") return result, err }
public function initiateBvn(string $bvn): array { return $this->client() ->post('/api/v2/identity-verification/bvn/initiate', ['bvn' => $bvn]) ->throw() ->json(); }
Response
A reference and the masked phone number the OTP went to. No BVN details.
{
"success": true,
"code": "00",
"message": "A verification code has been sent to the phone number registered against this BVN",
"data": {
"reference": "9f1c4e2a-3b77-4d58-9a21-6c0f8e5b7d44",
"phoneNumber": "234****0000",
"expiresAt": "2026-10-13T14:32:10.482"
}
}Step 2 — complete
Request body
| Field | Type | Notes |
|---|---|---|
referenceRequired | string | The reference returned by step 1 |
otpRequired | string | The code sent to the BVN's registered phone |
{ "reference": "9f1c4e2a-3b77-4d58-9a21-6c0f8e5b7d44", "otp": "123456" }Example
curl -X POST "$WAYA_BASE/api/v2/identity-verification/bvn/complete" \ -H "Authorization: Bearer $WAYA_SECRET_KEY" \ -H "X-Merchant-Id: $WAYA_MERCHANT_ID" \ -H 'Content-Type: application/json' \ -d '{ "reference": "<reference from step 1>", "otp": "123456" }'
async completeBvn(reference, otp) { const { data } = await this.client.post('/api/v2/identity-verification/bvn/complete', { reference, otp }); return data; } // usage const id = await waya.completeBvn(reference, '123456'); console.log(id.data.firstName, id.data.lastName); // don't log or cache the full record
public Mono<Map> completeBvn(String reference, String otp) { return client.post() .uri("/api/v2/identity-verification/bvn/complete") .bodyValue(Map.of("reference", reference, "otp", otp)) .retrieve() .bodyToMono(Map.class); }
public function completeBvn(string $reference, string $otp): array { $response = $this->client->post('/api/v2/identity-verification/bvn/complete', [ 'json' => ['reference' => $reference, 'otp' => $otp] ]); return json_decode($response->getBody()->getContents(), true); }
public async Task<JsonElement> CompleteBvnAsync(string reference, string otp) { var response = await _http.PostAsJsonAsync("/api/v2/identity-verification/bvn/complete", new { reference, otp }); response.EnsureSuccessStatusCode(); return await response.Content.ReadFromJsonAsync<JsonElement>(); }
func (c *Client) CompleteBvn(reference, otp string) (map[string]interface{}, error) { var result map[string]interface{} _, err := c.http.R(). SetBody(map[string]string{"reference": reference, "otp": otp}). SetResult(&result). Post("/api/v2/identity-verification/bvn/complete") return result, err }
public function completeBvn(string $reference, string $otp): array { return $this->client() ->post('/api/v2/identity-verification/bvn/complete', [ 'reference' => $reference, 'otp' => $otp, ]) ->throw() ->json(); }
Response
Key fields; the full record adds demographics, enrollment bank and a base64 portrait — fields the provider doesn't return are omitted.
{
"success": true,
"code": "00",
"message": "BVN verification completed",
"data": {
"bvn": "22222222222",
"firstName": "Test",
"lastName": "User",
"dateOfBirth": "01-Jan-1990",
"phoneNumber1": "2340000000000",
"gender": "Male",
"nationality": "Nigeria",
"watchListed": "SANDBOX"
}
}Test mode
Test vs live is decided by your merchant account's mode, not by a request field.
| Merchant mode | BVN sent | Result |
|---|---|---|
| Test | 22222222222 | No SMS sent, OTP is always 123456, a sandbox record returned |
| Test | any other | 400 — use the test BVN |
| Live | 22222222222 | 400 — the test BVN can't be used in live mode |
| Live | any other | Real lookup, real OTP to the BVN's phone (billable) |
The sandbox record is easy to spot: firstName: "Test", lastName: "User", watchListed: "SANDBOX".
Errors
| HTTP | When |
|---|---|
400 | BVN not 11 digits; wrong BVN for your mode; OTP couldn't be sent; unknown or expired reference; wrong OTP (message says how many attempts remain) |
403 | Too many wrong OTPs — the reference is locked; start again |
422 | No phone number is registered against the BVN, so no OTP can be sent. Not retryable |
Integration notes
- References expire after 10 minutes or 5 wrong OTPs. To resend a code, call initiate again — don't keep retrying complete.
- Complete is safe to retry with the same reference and OTP until it expires. Initiate is not: each call makes a new reference, may send another SMS, and in live mode may be billed.
- Keep the reference on your server — never in a URL or browser storage.
- Don't log or cache the step 2 response. It's full identity data including a photo. Log the reference instead.
Transaction Webhook
WayaQuick calls your server when a payment succeeds or fails, so you can mark orders paid and trigger fulfilment in real time instead of polling.
You're integrating with this if you want to:
- Mark an order paid in your own system without waiting for the customer to be redirected back.
- Trigger fulfilment (release goods, send tickets, activate a subscription, etc.) the moment funds settle.
- Keep your own records in step with WayaQuick without checking each payment by hand.
If you're polling GET /api/v2/payment-collect/status/{refNo} instead, you can use this webhook to remove the polling and react in real time. Keep the status endpoint as your safety net for reconciliation.
Set up
- Log in to your WayaQuick dashboard.
- Open Settings → WayaQuick Settings → API Keys.
- Set the Webhook URL to a publicly reachable HTTPS endpoint, e.g.
https://api.your-shop.com/waya/webhook. - On the same tab, note your secret keys. You have one for TEST and one for PRODUCTION; both are needed for signature verification.
- (Optional) Test the URL by initiating a small payment in TEST mode and confirming you receive the call.
The request
WayaQuick sends a single HTTP request whenever a transaction's state changes to SUCCESSFUL or FAILED:
# WayaQuick -> your server, on SUCCESSFUL / FAILED POST <your webhook URL> Content-Type: application/json X-Waya-Timestamp: 1780980000123 X-Waya-Signature: 5sLnE7s+r0qN…= X-Waya-Signature-Algorithm: HmacSHA256
Body
{
"OrderId": "1779662251460508970",
"Amount": 1500.00,
"Description": "Order #4523",
"Fee": 22.50,
"Currency": "NGN",
"Status": "SUCCESSFUL",
"TranTime": "2026-06-07T14:30:12",
"TransactionDate": "2026-06-07 14:30:12",
"productName": "CARD",
"businessName": "Your Shop Ltd",
"customer": {
"name": "John Doe",
"email": "john@example.com",
"phoneNumber": "08012345678",
"customerId": "CUS_…"
},
"merchantId": "MER_…",
"branchCategory": null,
"recurrentPayment": false
}Field reference
OrderId, Amount, …) while newer fields use camelCase (customer, merchantId, …). Honour the casing exactly, or map per field. Null fields are omitted from the JSON; treat absent fields as null, not as missing.| Field | Type | Always | Description |
|---|---|---|---|
OrderId | string | yes | The transaction reference (refNo). Use this as your idempotency key. |
Amount | decimal | yes | Amount the customer was charged. |
Description | string | yes | The description supplied at checkout. |
Fee | decimal | yes | Processing fee deducted. Net to merchant = Amount minus Fee. |
Currency | string | yes | ISO currency code. Always NGN today. |
Status | string | yes | One of SUCCESSFUL, FAILED. |
TranTime | string | yes | Transaction time on the gateway. ISO-8601 local. |
TransactionDate | string | yes | Same instant, formatted "yyyy-MM-dd HH:mm:ss". |
productName | string | yes | Channel: CARD, WALLET, USSD, BANK, PAYATTITUDE. |
businessName | string | yes | Your business name as registered on WayaQuick. |
customer | object | yes | { name, email, phoneNumber, customerId }. |
merchantId | string | yes | Your merchant ID. Same value for every webhook to your account. |
branchCategory | string | null | optional | The branch tag if you've configured one. |
recurrentPayment | boolean | yes | true for charges driven by a subscription / saved card. |
Verifying the signature
Verify every webhook before acting on it. Without verification anyone who learns your webhook URL can post fake "payment received" events.
The signature is:
Base64( HMAC-SHA256( "<X-Waya-Timestamp>" + "." + "<raw request body>", merchant_secret ) )
merchant_secret is your merchantSecretTestKey for a TEST transaction, or your merchantProductionSecretKey for a PRODUCTION one. Most merchants keep one verifier per environment and route by which key validates.
express.json() does), the recomputed HMAC will not match. Capture the raw request body (express.raw(), Flask request.get_data(), PHP php://input) before any JSON parsing.const crypto = require('crypto'); function verifyWayaSignature(rawBody, headers, secret) { const ts = headers['x-waya-timestamp']; const sig = headers['x-waya-signature']; if (!ts || !sig) return false; const signedPayload = `${ts}.${rawBody}`; const expected = crypto .createHmac('sha256', secret) .update(signedPayload) .digest('base64'); // constant-time compare return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(sig)); }
import hmac, hashlib, base64 def verify_waya_signature(raw_body: bytes, headers, secret: str) -> bool: ts = headers.get("X-Waya-Timestamp") sig = headers.get("X-Waya-Signature") if not ts or not sig: return False signed_payload = f"{ts}.{raw_body.decode('utf-8')}".encode() expected = base64.b64encode( hmac.new(secret.encode(), signed_payload, hashlib.sha256).digest() ).decode() return hmac.compare_digest(expected, sig)
function verifyWayaSignature(string $rawBody, array $headers, string $secret): bool { $ts = $headers['X-Waya-Timestamp'] ?? null; $sig = $headers['X-Waya-Signature'] ?? null; if (!$ts || !$sig) return false; $expected = base64_encode( hash_hmac('sha256', $ts . '.' . $rawBody, $secret, true) ); return hash_equals($expected, $sig); } // Grab the raw body before any JSON parsing $raw = file_get_contents('php://input');
import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.util.Base64; public static boolean verifyWayaSignature(String rawBody, String ts, String sig, String secret) throws Exception { if (ts == null || sig == null) return false; Mac mac = Mac.getInstance("HmacSHA256"); mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), "HmacSHA256")); String expected = Base64.getEncoder().encodeToString( mac.doFinal((ts + "." + rawBody).getBytes(StandardCharsets.UTF_8))); return MessageDigest.isEqual( expected.getBytes(StandardCharsets.UTF_8), sig.getBytes(StandardCharsets.UTF_8)); }
Defending against replay
The timestamp is part of what's signed, so an attacker can't forge a fresh timestamp against an old signature, but they can replay the same captured tuple. Reject anything outside a tolerance window, e.g. 5 minutes:
now_ms = int(time.time() * 1000) if abs(now_ms - int(ts)) > 5 * 60 * 1000: return reject("stale or future-dated webhook")
Status values & semantics
| Status | What it means | What you should do |
|---|---|---|
SUCCESSFUL | Customer paid the exact amount requested. Funds queued for settlement. | Fulfil the order. Check OrderId for idempotency. |
FAILED | Card declined, customer abandoned, or upstream rejected. Funds never moved. | No fulfilment. Optionally retry the customer journey. |
SUCCESSFUL webhook for a mismatched amount, so there is nothing to hold or reconcile on your side.Idempotency & retries
- The same
OrderIdmay be sent more than once (for example, a re-emitted SUCCESSFUL). Always upsert keyed byOrderId; never blindly insert. - Delivery is fire-and-forget today: a non-2xx response or downtime is not retried. Reconcile periodically with
GET /api/v2/payment-collect/status/{OrderId}. - Respond with HTTP 200 within about 10 seconds. Only the status code is read; the body is ignored.
- Don't do heavy work in the request thread. Acknowledge fast, then queue the actual fulfilment.
End-to-end example
A successful card payment of ₦1,500:
POST /waya/webhook HTTP/1.1 Host: api.your-shop.com Content-Type: application/json X-Waya-Timestamp: 1780980012345 X-Waya-Signature: q1H7M3+UvIa6jL1ZbZ+ezTLm4eOpZP1pVgF1V0n+8AA= X-Waya-Signature-Algorithm: HmacSHA256 {"OrderId":"1779662251460508970","Amount":1500.00,"Description":"Order #4523","Fee":15.00,"Currency":"NGN","Status":"SUCCESSFUL","TranTime":"2026-06-07T14:30:12","TransactionDate":"2026-06-07 14:30:12","productName":"CARD","businessName":"Your Shop Ltd","customer":{"name":"John Doe","email":"john@example.com","phoneNumber":"08012345678","customerId":"CUS_abc"},"merchantId":"MER_xyz","recurrentPayment":false}
Testing
- Switch your dashboard to Test mode and use your test keys.
- The cards on the Test Card Information page return fixed outcomes (success, decline, 3DS required).
- The webhook payload is identical to live except productName may indicate test channels and the URL is your test webhook URL (configure separately in the dashboard if you want).
If you don't see the webhook arrive:
- Confirm your URL is publicly reachable (we won't hit localhost). Use a tunnel (ngrok, cloudflared) for local dev.
- Confirm your URL accepts a self-signed-cert-free HTTPS chain. We won't follow redirects.
- Check the dashboard's webhook activity log for the response code we saw from your endpoint.
Common pitfalls
| Symptom | Cause | Fix |
|---|---|---|
| Signature never matches | Framework re-serialised the JSON before the HMAC | Compute the HMAC against the raw request bytes |
| Matches in TEST but not LIVE | Same secret used for both | Test secret for TEST, production secret for LIVE |
| Some characters differ | Non-ASCII body decoded as Latin-1 | Decode as UTF-8 end to end |
| Duplicate orders | Insert on every webhook | Upsert keyed by OrderId |
| Stopped receiving after an outage | Endpoint 5xx'd; no retry | Reconcile via the collection status endpoint |
| No signature header | Merchant has no production secret configured | Contact support; do not act on unsigned webhooks |
Changelog
| Version | Date | Notes |
|---|---|---|
| 1.0 | 2026-06-07 | Initial spec. HMAC-SHA256 signature, env-specific secrets, fire-and-forget delivery. PARTIAL status supported for virtual-account flows. |
| 1.1 | 2026-10-26 | PARTIAL status removed. Payments must match the requested amount; a smaller or larger payment is rejected and, if funds came through, reversed to the customer automatically. |