OasisPay Docs

Build with OasisPay

Create checkout payments, issue virtual accounts, sell Bills services, verify signed webhooks, and test safely before going live.

Quick Start

Use your secret key in the `Authorization` header. For every create request, send an `Idempotency-Key` so safe retries do not create duplicates.

cURL
curl https://api.oasispayhq.com/api/v1/payments \
  -H "Authorization: Bearer osk_test_xxx" \
  -H "Idempotency-Key: order_1001" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": { "amount": 5000, "currency": "NGN" },
    "customer": { "email": "[email protected]" },
    "paymentMethod": "hosted_checkout",
    "callbackUrl": "https://merchant.example.com/payment/callback"
  }'

Authentication

Authenticate server-side API calls with a secret key. Public keys identify your business in client-side contexts, but they must not authorize money movement.

Test secret keys

osk_test_xxx

Live secret keys

osk_live_xxx

Public test keys

opk_test_xxx

Public live keys

opk_live_xxx

Authorization: Bearer osk_test_xxx
Content-Type: application/json
Idempotency-Key: unique-operation-id

API Reference

Integration flow

Persistent / Static Account

Use this when you want to issue a reusable bank account for a customer and reconcile transfer credits by account or payment reference.

Create endpoint

POST /api/v1/virtual-accounts/reserved

Available providers

GET /api/v1/virtual-accounts/api/providers

Request
await fetch("https://api.oasispayhq.com/api/v1/virtual-accounts/reserved", {
  method: "POST",
  headers: {
    Authorization: "Bearer osk_live_xxx",
    "Content-Type": "application/json",
    "Idempotency-Key": "customer_account_1001"
  },
  body: JSON.stringify({
    provider: "nomba",
    customer: {
      email: "[email protected]",
      firstName: "John",
      lastName: "Doe",
      phone: "+2348012345678"
    },
    preferredAccountName: "JOHN DOE"
  })
});
Response
{
  "id": "va_xxx",
  "reference": "va_xxx",
  "type": "reserved",
  "status": "ACTIVE",
  "accountName": "Nomba/John Doe",
  "accountNumber": "1234567890",
  "bankName": "Nombank MFB",
  "provider": "nomba",
  "providerReference": "provider_reference"
}

Important

  • Reserved accounts are persistent and reusable for a customer.
  • In live mode, the providers endpoint lists providers currently available to your business. Omit provider to use your business's current new-account routing, or choose a listed provider explicitly. During a Nomba rollout, new Paga account requests return a conflict rather than being silently rerouted. Individual Business remains on Paga dynamic accounts.
  • Customer BVN or NIN is not requested or required for persistent Nomba accounts.
  • Existing accounts never migrate between providers. Collection charges can differ by provider, and withdrawals of a collection must use the same source provider.
  • When supplied, customer.phone must be a valid Nigerian number. E.164 format such as +2348012345678 is recommended; common local formats are normalized by OasisPay.
  • Use webhooks to confirm credits before fulfilling value.

Storefront Payment Options

OasisPay uses the Storefront payment option selected by an administrator for new orders. A Paga transfer order returns a temporary bank account; a hosted Checkout order returns an authorization URL. An order request is public and does not use a merchant secret key. Persist its Idempotency-Key so a retry returns the same order and payment instructions.

Create a Storefront order
POST /api/v1/public/storefronts/{slug}/orders
Idempotency-Key: customer-cart-1001
Content-Type: application/json

{
  "items": [{ "productId": "product_xxx", "quantity": 1 }],
  "customerName": "Francis Samuel",
  "customerEmail": "[email protected]",
  "customerPhone": "+2348012345678",
  "deliveryMethod": "pickup"
}
Paga transfer response
{
  "order": {
    "reference": "ord_xxx",
    "status": "pending_payment",
    "total": 5000,
    "currency": "NGN",
    "checkoutFeeAmount": 75,
    "reservationExpiresAt": "2026-11-05T13:00:00.000Z"
  },
  "accessToken": "order_access_token",
  "paymentMethod": "bank_transfer",
  "virtualAccountDetails": {
    "accountNumber": "1234567890",
    "accountName": "EXAMPLE STORE",
    "bankName": "Paga Bank",
    "expiresAt": "2026-11-05T13:00:00.000Z"
  },
  "paymentStatus": "pending"
}
Hosted Checkout response
{
  "order": {
    "reference": "ord_xxx",
    "status": "pending_payment",
    "total": 5000,
    "currency": "NGN",
    "reservationExpiresAt": "2026-11-05T13:00:00.000Z"
  },
  "accessToken": "order_access_token",
  "paymentMethod": "checkout",
  "authorizationUrl": "https://collect.paga.com/...",
  "paymentStatus": "pending"
}

Check GET /api/v1/public/storefronts/{slug}/orders/{reference}with X-Storefront-Order-Token: accessToken for the order status. For a transfer order, display the account number, name, bank, exact order.total, and virtualAccountDetails.expiresAt to the buyer. For a Checkout order, open authorizationUrl. Fulfil only after OasisPay marks the order paid; a transfer receipt or browser return is not payment proof.

Storefront Checkout and Storefront Dynamic Account each have an admin-editable merchant rate. Storefront Checkout and Storefront Dynamic Account each have their own configured rate. General Checkout, reserved Virtual Account, and merchant-issued Paga Dynamic Virtual Account API rates are independently editable. The API dynamic rate initially copies the active Storefront Dynamic Account rate, then remains separate. Statutory stamp duty applies only if configured. Merchant-specific pricing and the payment-channel fee payer setting can change the amount. The selected option and fee quote are captured when the order is created, so a later switch affects new orders. Temporary Storefront accounts expire with the payment window and are excluded from the persistent-account allocation.

Bills API

Sell available airtime, data, electricity, TV, education, and insurance products through OasisPay. Request Bills access in your Business Dashboard first. Once approved, use a server-side secret key with bills:read for catalogue, validation, balance, history, and status calls, and bills:write to purchase. Test and live keys use separate Bills balances and transactions.

Start with GET /api/v1/bills/products. Only products currently enabled and supported for purchase appear there. Use each returned category, serviceId, minimum, and maximum amount; fetch current plans with GET /api/v1/bills/products/:serviceId/variations?category=:category. Do not rely on a saved product list or price. Amounts sent to OasisPay are NGN decimals, not kobo.

Catalogue and rates

GET /bills/products · GET /bills/products/:serviceId/variations?category=... · GET /bills/merchant-rates

Customer checks

POST /bills/validate · GET /bills/insurance/options/:option?parentCode=...

Purchase and recovery

POST /bills/pay · GET /bills/transactions/:reference · GET /bills/transactions/by-idempotency-key · POST /bills/transactions/:reference/requery

Balance and records

GET /bills/balance · GET /bills/balance/history · GET /bills/transactions?status=... · GET /bills/history?view=consolidated

All routes above are under https://api.oasispayhq.com/api/v1. API keys cannot move funds from the Main Wallet into Bills Balance, request Bills access, or change low-balance alerts; those actions require an authenticated Business Dashboard session.

Moving money from Main Wallet to Bills Balance costs a fixed ₦50 per live transfer. For example, a ₦4,000 Bills credit debits ₦4,050 from Main Wallet. A signed-in dashboard client with payments.createmust first request GET /bills/balance/transfer-quote?amount=4000, show its amount, fundingFee, and totalDebit, then send that totalDebit as expectedTotalDebit in POST /bills/balance/transfers with the same amount, a withdrawal passcode, and an Idempotency-Key. Clients missing the confirmed total must refresh or update before transferring. A retry with the same key returns the recorded transfer and its original fee.

Fetch currently available products
curl https://api.oasispayhq.com/api/v1/bills/products \
  -H "Authorization: Bearer osk_test_xxx"

Airtime

category: airtime · phone and amount. No customer validation call.

Data

category: data · phone, billersCode, variationCode, and current plan amount. Glo Best Value and Smile Direct appear when in the live catalogue. For Smile, validate smileEmail first and use the selected AccountId as billersCode.

Electricity

category: electricity-bill · validate the meter with billersCode and type (prepaid/postpaid); purchase with billersCode and matching meterType.

TV

category: tv-subscription · validate smartcard/decoder where supported; purchase with billersCode and variationCode. DStv/GOtv also require subscriptionType: change or renew; renew uses the verified renewal amount.

Education

category: education · use a current variationCode. JAMB also requires billersCode and validation with type set to the selected variation code.

Insurance

category: insurance · use a current variationCode and the matching insurance details. Retrieve selectable option codes from /bills/insurance/options/:option.

Every POST /bills/pay request also needs amount and phone. For a fixed-price plan, send its current catalogue amount exactly. The optional quantity is limited to one. For insurance, send an insurance object matching the product: motor cover uses kind: "third-party-motor" with insuredName, engineCapacity, chassisNumber, plateNumber, vehicleMake, vehicleColor, vehicleModel, yearOfMake, state, lga, and email; personal accident uses kind: "personal-accident" with fullName, address, dob (YYYY-MM-DD), nextKinName, nextKinPhone, and businessOccupation. Use current option codes from the insurance-options endpoint for selectable fields.

For products that support customer checks, call POST /bills/validate before purchase with category, serviceId, and the relevant billersCode, smileEmail, or type. Its response is a plain object containing valid, customerName, and applicable amount limits—not a data wrapper. Do not submit a purchase when validation fails.

Smile Direct needs both the customer's email and a specific account. Validate with smileEmail, let the customer select an accountId from the returned accounts, then send that ID as billersCode and the same smileEmail in the purchase. OasisPay verifies the email and selected account again before reserving any Bills Balance. Plan counts change, so always use the current variations response rather than a fixed list.

Smile email and account validation
curl https://api.oasispayhq.com/api/v1/bills/validate \
  -H "Authorization: Bearer osk_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{"category":"data","serviceId":"smile-direct","smileEmail":"[email protected]"}'

# Response includes: {"valid":true,"accounts":[{"accountId":"1234567890","friendlyName":"Customer"}]}
# Use the selected accountId as billersCode, with the same smileEmail, in POST /bills/pay.
Validate an electricity meter
curl https://api.oasispayhq.com/api/v1/bills/validate \
  -H "Authorization: Bearer osk_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{"category":"electricity-bill","serviceId":"ikeja-electric","billersCode":"12345678901","type":"prepaid"}'

Each purchase needs an Idempotency-Key of 8–255 characters. Persist that key with your customer order before sending it. Retrying the same body with the same key returns the original transaction; changing the body with that key returns 409. Bills purchases spend only Bills Balance, subject to product and account limits.

Buy airtime
curl https://api.oasispayhq.com/api/v1/bills/pay \
  -H "Authorization: Bearer osk_test_xxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: merchant-order-1001" \
  -d '{"category":"airtime","serviceId":"mtn","amount":100,"phone":"08012345678"}'
Purchase response · illustrative
{
  "data": {
    "reference": "bill_xxx",
    "status": "pending",
    "commissionStatus": "pending_reconciliation",
    "category": "airtime",
    "serviceId": "mtn",
    "amount": 100,
    "merchantCommission": 0,
    "receipt": null
  }
}

An HTTP success or pending status is not proof of delivery. If a response is lost, look up the original order using GET /bills/transactions/by-idempotency-key with the same header; if you have its reference, use GET /bills/transactions/:reference. An unresolved transaction can be checked with POST /bills/transactions/:reference/requery. Do not create a replacement purchase while the first outcome is unknown. Fulfil only after the transaction is delivered and use its receipt for tokens or service details.

Recover an uncertain purchase
curl https://api.oasispayhq.com/api/v1/bills/transactions/by-idempotency-key \
  -H "Authorization: Bearer osk_test_xxx" \
  -H "Idempotency-Key: merchant-order-1001"

GET /bills/history?view=consolidated shows one row per purchase alongside funding movements. Filter with type (all, purchase, funding, commission, or reversal), status, fromDate,toDate, or search; paginate withlimit (1–100) and the returned nextCursor. Dates use YYYY-MM-DD in the Lagos calendar. The response includes summary totals for consolidated history.

GET /bills/merchant-rates shows maximum merchant rates, not guaranteed earnings. Commission may still be pending when a purchase is delivered; confirmed commission is credited to Bills Balance for future purchases. Subscribe to signed bill.successful, bill.commission.confirmed, bill.failed, and bill.reversed webhooks, and verify their signatures as described below.

Payout API Access

OasisPay uses one API base URL and one API key system. Payouts are permission-gated, so a merchant can use payments, virtual accounts, checkout, and webhooks without automatically being allowed to move money out through the API.

When available, Paga and Nomba are separate sources of funds. Use GET /api/v1/payouts/api/sources with a live key, the payouts:read scope and an allowed IP to inspect each source balance. Pass sourceProvider as pagaor nomba when creating a payout. OasisPay does not send Nomba collections through Paga, or Paga collections through Nomba. Provider availability and charges can differ.

Payout notice

Withdrawals are processed through the same collection source that received the funds. Funds from one collection source cannot be withdrawn through another.

A reserved virtual account (va_...) receives collections; it is not a payout beneficiary. To make a Nomba-powered API payout, first save a verified Nomba beneficiary with POST /api/v1/beneficiaries, then use its returned id as beneficiaryId with sourceProvider: "nomba". Newly generated IDs are UUIDs; always use the exact saved ID, not an illustrative ben_... placeholder. Nomba supports single, non-settlement API payouts when its payout controls are enabled for your business.

For a new destination, call GET /api/v1/beneficiaries/banks?sourceProvider=nombaand use its bank id as bankCode in POST /api/v1/beneficiaries/resolve-account with sourceProvider: "nomba" and the 10-digit accountNumber. The lookup returns the verified accountName; show it for confirmation before any payout. These calls require the beneficiaries:createscope. Bank codes are provider-specific. Nomba bank IDs are its bank codes; do not substitute a Paga bank ID.

Create the beneficiary using the bank code and account number; OasisPay independently resolves the bank and verified owner name. Do not send a claimed account name or treat a matching phone number as proof of bank ownership. Nomba beneficiary creation requires a live secret key with beneficiaries:create, approved Payout API access, and an allowed payout IP. Creating or reading a beneficiary does not move money.

Create verified Nomba beneficiary (illustrative)
const response = await fetch("https://api.oasispayhq.com/api/v1/beneficiaries", {
  method: "POST",
  headers: {
    Authorization: "Bearer osk_live_xxx",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    sourceProvider: "nomba",
    bankCode: "<id from the Nomba banks list>",
    accountNumber: "0123456789",
    currency: "NGN"
  })
});
if (!response.ok) throw new Error("Beneficiary creation failed");
const beneficiary = await response.json();
// Keep the returned id and confirm the verified name, bank, and account.

For an existing saved beneficiary, use GET /api/v1/beneficiaries?sourceProvider=nomba to find your IDs, or copy the ID from Business Dashboard → Beneficiaries. The API list returns data and nextCursor; pass that cursor on the next request to continue through saved beneficiaries (default 25, maximum 100 per page). Use GET /api/v1/beneficiaries/{id}?sourceProvider=nombato confirm one ID belongs to your business and read its verified account name, bank, and account number before payout. These reads require a live, payout-approved key with payouts:readand an allowed IP. Missing, disabled, unverified, wrong-provider, and other merchants' IDs return 404 rather than exposing their records.

Confirm a saved Nomba beneficiary (illustrative)
const response = await fetch(
  "https://api.oasispayhq.com/api/v1/beneficiaries/<saved-beneficiary-id>?sourceProvider=nomba",
  { headers: { Authorization: "Bearer osk_live_xxx" } }
);
if (!response.ok) throw new Error("Beneficiary not available to this business");
const beneficiary = await response.json();
// Confirm beneficiary.status === "VERIFIED" and review the returned destination.
Nomba payout request
await fetch("https://api.oasispayhq.com/api/v1/payouts", {
  method: "POST",
  headers: {
    Authorization: "Bearer osk_live_xxx",
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID()
  },
  body: JSON.stringify({
    amount: 15000,
    currency: "NGN",
    sourceProvider: "nomba",
    beneficiaryId: "<saved-nomba-beneficiary-id>",
    narration: "Vendor settlement for order 1001"
  })
});

narration is an optional business payout remark. After trimming, it must be at most 100 characters, single-line, and contain no control characters. OasisPay stores and returns the remark, and sends it to the selected payout provider as Paga remarks or Nomba narration. The receiving bank may show different text. Omit it to preserve the existing request behavior. Dashboard withdrawals use their own optional Description field with the same 100-character limit and provider remark forwarding. Reusing an Idempotency-Key with different narration returns a conflict and leaves the original payout and remark unchanged.

NGN payout amounts are in naira, not kobo. The merchant debit is amount + feeAmount + stampDutyAmount. Stamp duty is separate from the payout fee; VAT on OasisPay's payout fee is already included in feeAmount and is not another merchant debit. The returned outputVatAmount is the VAT component of that fee, while vatAmount records provider VAT as an OasisPay cost. Check the returned charge snapshot because provider fees and admin-configured rules may change.

Illustrative NGN payout charge snapshot (selected fields)
{
  "amount": 10000,
  "currency": "NGN",
  "sourceProvider": "paga",
  "narration": "Creator commission payout",
  "feeAmount": 100,
  "stampDutyAmount": 50,
  "totalDebit": 10150,
  "outputVatAmount": 6.98,
  "status": "PROCESSING"
}

Under the current NGN payout rule, a separate ₦50 stamp charge applies at ₦10,000 and above; no stamp charge applies below ₦10,000. A Nomba payout follows its own payout fee rule, with the same separately configured stamp threshold and charge. The successful receipt shows Stamp Duty and its explanatory note only when a stamp charge actually applies.

A payout may be PENDING, PROCESSING, COMPLIANCE_REVIEW, PROVIDER_REVIEW, SUCCESSFUL, FAILED, or REVERSED. Keep an uncertain payout reserved. After a timeout, look it up with the original idempotency key or its ID/reference; do not create a replacement with a new key. Use signed payout.successful and payout.failed events alongside authenticated status reads. The failed event also covers a reversed payout. Only treat returned funds as safely available when the latest resolution.releaseSafe and resolution.ledgerReturnConfirmed are both true. When Nomba confirms a definitive failure and refund, the separately charged stamp duty is returned to the merchant; any later provider deduction is handled by OasisPay internally.

How to request access

Open the Business Dashboard, go to Developers, then API Keys, and submit a payout API use case. OasisPay reviews KYC, risk, intended use, beneficiaries, and limits before enabling access.

What stays separate

Dashboard withdrawals are not the same as Payout API access. Merchants can still use the normal withdrawal flow if their business is approved, live mode is enabled, and withdrawal checks pass.

Required controls
KYC approved
Payout API enabled by OasisPay
Developer Security IP whitelist configured
Live secret key
Scope: payouts:create
Request IP must match whitelist
Verified beneficiary
Sufficient balance
Daily and single-transfer limits
Idempotency-Key header
Access not enabled response
{
  "statusCode": 403,
  "message": "Payout API is not enabled for this business. Request access in the developer portal.",
  "requestId": "req_xxx"
}
IP whitelist response
{
  "statusCode": 403,
  "code": "PAYOUT_IP_WHITELIST_REQUIRED",
  "message": "Payout API requires IP whitelisting.",
  "requestId": "req_xxx"
}

{
  "statusCode": 403,
  "code": "PAYOUT_IP_NOT_ALLOWED",
  "message": "IP address not authorized for payout API.",
  "requestId": "req_xxx"
}

Subscriptions

Subscriptions let SaaS and recurring-revenue merchants create plans, enroll customers, generate invoices, and prepare renewals without using a separate API product. Checkout and virtual accounts remain the default payment flows.

Use a secret key with `subscriptions:read` and `subscriptions:write`. Test and live subscription records are isolated. Every plan, subscription, and invoice creation request must include a unique `Idempotency-Key` header.

The initial invoice includes `checkoutUrl` and, for hosted checkout, `authorizationUrl`. Send `callbackUrl` as a top-level absolute HTTPS browser-return URL. It is part of the `POST /subscriptions` idempotent request, so adding, removing, or changing it with the same key conflicts; a callback-less pending invoice payment can separately bind one URL once. A new subscription remains `pending_activation` and is excluded from active subscribers, MRR, and ARR until the initial invoice is finalized and its start date arrives. Treat `subscription.payment.success` as final payment proof. A previously delivered signed `subscription.created` event is immutable and is not replaced; recover its current checkout details with `POST /subscriptions/invoices/:id/payment`. Renewal invoices are prepared automatically and normally require customer payment.

Plans

Weekly, monthly, quarterly, or yearly pricing records that customers subscribe to.

Subscriptions

Customer enrollment records with current period, next billing date, and preferred payment method.

Invoices

Pending or paid billing records that can later be settled through checkout or virtual account payment flows.

Create a subscription plan
await fetch("https://api.oasispayhq.com/api/v1/subscriptions/plans", {
  method: "POST",
  headers: {
    Authorization: "Bearer osk_test_xxx",
    "Content-Type": "application/json",
    "Idempotency-Key": "plan_starter_2026_001"
  },
  body: JSON.stringify({
    name: "Starter",
    amount: 5000,
    currency: "NGN",
    interval: "weekly",
    description: "Starter weekly SaaS plan"
  })
});
Create a customer subscription
await fetch("https://api.oasispayhq.com/api/v1/subscriptions", {
  method: "POST",
  headers: {
    Authorization: "Bearer osk_test_xxx",
    "Content-Type": "application/json",
    "Idempotency-Key": "subscription_customer_1001"
  },
  body: JSON.stringify({
    planId: "subplan_xxx",
    paymentMethod: "customer_choice",
    callbackUrl: "https://merchant.example.com/subscriptions/return",
    customer: {
      email: "[email protected]",
      firstName: "Francis",
      lastName: "Samuel",
      phone: "08012345678"
    }
  })
});
Recover or create invoice checkout
await fetch("https://api.oasispayhq.com/api/v1/subscriptions/invoices/invoice_xxx/payment", {
  method: "POST",
  headers: {
    Authorization: "Bearer osk_test_xxx",
    "Content-Type": "application/json",
    "Idempotency-Key": "subscription_invoice_xxx_payment_001"
  },
  body: JSON.stringify({
    callbackUrl: "https://merchant.example.com/subscriptions/return"
  })
});

// callbackUrl must be an absolute HTTPS browser-return URL.
// Reuse the Idempotency-Key only with this exact invoice ID and request body.
// Confirm payment only from the signed subscription.payment.success webhook.

Payment And Virtual Account Examples

Send Nigerian customer phone numbers in E.164 format, such as `+2348012345678`. OasisPay also accepts common local formats and normalizes them before contacting the payment provider.

For live virtual accounts, call GET /api/v1/virtual-accounts/api/providersto see your available providers and their configured charges. Each provider exposes fees.virtualAccount for reserved accounts and fees.dynamicAccount for temporary accounts. Nomba Dynamic has a separately configurable rate, initially set to the same rate as Nomba Static. Pass provider: "paga" or provider: "nomba" when creating a new reserved account or virtual-account payment, or omit it to use your business's current routing. For businesses enrolled in Nomba new-account routing, an explicit Paga request for a new account returns a conflict rather than silently changing provider. Individual Business remains on Paga dynamic accounts. Existing accounts stay with their original provider, and payouts must use the source that collected the funds.

Customer BVN or NIN is not requested or required to create a Nomba virtual account.

On your own website, create an amount-bound Dynamic Account by calling POST /api/v1/payments with paymentMethod: "virtual_account". Show the returned virtualAccountDetails to your customer. This is independent of the Storefront payment option selected by an administrator. Use a live API key for payable bank details; test keys return synthetic payments. Confirm a successful payment by signed webhook or status lookup before fulfilling an order.

Create Dynamic Account Payment
await fetch("https://api.oasispayhq.com/api/v1/payments", {
  method: "POST",
  headers: {
    Authorization: "Bearer osk_live_xxx",
    "Content-Type": "application/json",
    "Idempotency-Key": "order_1001"
  },
  body: JSON.stringify({
    amount: { amount: 5000, currency: "NGN" },
    customer: {
      email: "[email protected]",
      firstName: "Francis",
      lastName: "Samuel",
      phone: "+2348012345678"
    },
    paymentMethod: "virtual_account",
    metadata: { orderId: "ORD-1001" }
  })
});
Create Checkout Payment
await fetch("https://api.oasispayhq.com/api/v1/payments", {
  method: "POST",
  headers: {
    Authorization: "Bearer osk_test_xxx",
    "Content-Type": "application/json",
    "Idempotency-Key": "checkout_1001"
  },
  body: JSON.stringify({
    amount: { amount: 5000, currency: "NGN" },
    customer: {
      email: "[email protected]",
      firstName: "Francis",
      lastName: "Samuel",
      phone: "+2348012345678"
    },
    paymentMethod: "hosted_checkout",
    callbackUrl: "https://merchant.example.com/payment/callback",
    metadata: { orderId: "ORD-1001" }
  })
});
Create Nomba Reserved Virtual Account
await fetch("https://api.oasispayhq.com/api/v1/virtual-accounts/reserved", {
  method: "POST",
  headers: {
    Authorization: "Bearer osk_live_xxx",
    "Content-Type": "application/json",
    "Idempotency-Key": "customer_account_1001"
  },
  body: JSON.stringify({
    provider: "nomba",
    customer: {
      email: "[email protected]",
      firstName: "Francis",
      lastName: "Samuel",
      phone: "+2348012345678"
    },
    preferredAccountName: "FRANCIS SAMUEL"
  })
});
Alternative: issue a Dynamic Account directly
await fetch("https://api.oasispayhq.com/api/v1/virtual-accounts/dynamic", {
  method: "POST",
  headers: {
    Authorization: "Bearer osk_test_xxx",
    "Content-Type": "application/json",
    "Idempotency-Key": "va_1001"
  },
  body: JSON.stringify({
    amount: 5000,
    currency: "NGN",
    customer: { email: "[email protected]" }
  })
});
Verify Payment
const response = await fetch("https://api.oasispayhq.com/api/v1/payments/osp_xxx", {
  headers: {
    Authorization: "Bearer osk_test_xxx"
  }
});

const payment = await response.json();

Webhooks

OasisPay sends `X-OasisPay-Signature`, `X-OasisPay-Timestamp`, and `X-OasisPay-Event`. Verify `HMAC_SHA256(timestamp + "." + rawBody, webhookSecret)`.

The following is an illustrative OasisPay-signed virtual_account.credit delivery for a successful Nomba reserved account credit. It is not a captured customer webhook. The body's event and the X-OasisPay-Event header both carry virtual_account.credit. Headers and field names are shown without a real signature, secret, or customer data.

Illustrative reserved-account credit headers
Content-Type: application/json
User-Agent: OasisPay-Webhooks/1.0
X-OasisPay-Event: virtual_account.credit
X-OasisPay-Timestamp: <unix-seconds>
X-OasisPay-Signature: <redacted-hex-hmac>
X-OasisPay-Idempotency-Key: <stable-event-key>
X-OasisPay-Delivery-Id: <delivery-id>
Illustrative Nomba reserved-account credit JSON
{
  "event": "virtual_account.credit",
  "accountNumber": "1234567890",
  "accountName": "EXAMPLE BUSINESS",
  "bankName": "EXAMPLE BANK",
  "virtualAccountReference": "va_example",
  "amount": 4950,
  "grossAmount": 5000,
  "feeAmount": 50,
  "providerFee": 20,
  "platformFee": 0,
  "vatAmount": 1.5,
  "stampDutyAmount": 0,
  "marginAmount": 28.5,
  "currency": "NGN",
  "paymentReference": null,
  "transactionReference": "nomba_collection_example"
}

All amount fields are decimal naira, not kobo: grossAmount is what the customer transferred, amount is the net credit to your OasisPay balance, and feeAmount is the collection fee. The provider, platform, VAT, stamp-duty, and margin fields are accounting breakdowns; do not deduct them from amount again. accountNumber identifies the credited reserved account; virtualAccountReference identifies its OasisPay issuance; transactionReference identifies this particular transfer. paymentReference can be null for a reserved account not bound to one payment.

Save transactionReference and process each successful transfer once. Retries and replays of the same transfer retain that reference, although delivery headers may differ. Verify the signature over the exact raw body before processing, return a 2xx response promptly, and use the merchant dashboard's Recent Attempts and replay tools or its Pay-ins transaction view to recover a missed delivery. Never credit a customer solely from an account number, browser return, or unsigned message.

payment.successpayment.failedvirtual_account.credittransaction.createdsettlement.completedpayout.successfulpayout.failedbill.successfulbill.commission.confirmedbill.failedbill.reversedsubscription.createdsubscription.renewedsubscription.expiredsubscription.payment.successsubscription.payment.failed
Node.js Verification
import crypto from "crypto";

function verifyWebhook(rawBody, headers, secret) {
  const timestamp = headers["x-oasispay-timestamp"];
  const signature = headers["x-oasispay-signature"];
  const expected = crypto
    .createHmac("sha256", secret)
    .update(timestamp + "." + rawBody)
    .digest("hex");

  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

Webhook Delivery Behind Cloudflare

If your webhook endpoint is behind Cloudflare and OasisPay shows HTTP 403 in Recent Attempts, your Cloudflare rules may be blocking OasisPay server-to-server delivery even though the payment succeeded.

OasisPay source IPs

167.233.33.130

2a01:4f8:1c18:4c3b::1

Recommended action

Skip WAF, custom rules, rate limiting, bot fight mode, and security checks only for the exact webhook hostname, path, method, and OasisPay IPs.

Best permanent option

Create a DNS-only webhook subdomain, such as `webhook.merchantdomain.com`, that points directly to your server instead of being proxied by Cloudflare. Then use a dedicated endpoint like `https://webhook.merchantdomain.com/your-oasispay-webhook-path`.

Cloudflare Custom Rule
(ip.src eq 167.233.33.130 or ip.src eq 2a01:4f8:1c18:4c3b::1)
and http.host eq "merchantdomain.com"
and http.request.uri.path eq "/your-oasispay-webhook-path"
and http.request.method eq "POST"

Verify delivery

Use webhook test or replay, confirm HTTP 200 in Recent Attempts, and check Cloudflare Security Events for OasisPay IPs.

Avoid unsafe bypasses

Do not disable Cloudflare globally, bypass every POST request, whitelist all IPs, or credit users from email receipts alone.

Errors

Every API error includes a `requestId`. Use it when checking API logs or contacting support.

{
  "statusCode": 401,
  "message": "Invalid API key.",
  "requestId": "req_xxx",
  "path": "/api/v1/payments",
  "timestamp": "2026-06-03T12:00:00.000Z"
}

Testing

Use osk_test_ keys for sandbox requests.

Use unique idempotency keys for POST retries.

Send test webhooks from the merchant webhook page.

Headers:
Authorization: Bearer osk_test_xxx
Idempotency-Key: your_unique_operation_id

SDKs And Language Examples

JavaScript
await client.payments.create({
  amount: { amount: 5000, currency: "NGN" },
  customer: { email: "[email protected]" },
  paymentMethod: "hosted_checkout"
});
PHP
$client->payments->create([
  "amount" => ["amount" => 5000, "currency" => "NGN"],
  "customer" => ["email" => "[email protected]"],
  "paymentMethod" => "hosted_checkout"
]);
Python
client.payments.create(
  amount={"amount": 5000, "currency": "NGN"},
  customer={"email": "[email protected]"},
  payment_method="hosted_checkout"
)
Laravel
OasisPay::payments()->create([
  "amount" => ["amount" => 5000, "currency" => "NGN"],
  "customer" => ["email" => "[email protected]"],
  "paymentMethod" => "hosted_checkout"
]);
OasisPay — Payment Tools for African Businesses