VantPay API Documentation
API Docs
API Docs
    VantPay API Reference
    VantPayAPI reference
    /
    Sandbox
    Loading…

    Getting started

    VantPay Merchant API

    Open virtual accounts for your customers, take payments by transfer, card or USSD, hold balances in customer wallets, get notified when money lands, and pay out to any Nigerian bank account.

    Every request and response is JSON over HTTPS. Every code sample on this page uses the sandbox base URL below.

    Base URL

    EnvironmentBase URL
    Sandboxhttps://merchantapi-dev.vantpay.io

    Response envelope

    Every response carries the same four fields. code "00" means success; anything else is a failure code you can branch on. Read isSuccessful and code in the body, not only the HTTP status.

    List endpoints put a page inside data: currentPage, pageSize, totalRecords, totalPages and the rows in data.

    Success
    Paged list

    Getting started

    Authentication

    VantPay gives you a Client ID and Client Secret at onboarding. Exchange them for an access token with Authenticate, then send the token on every call:

    Authorization: Bearer <access_token>

    Tokens are short lived. Cache one and refresh it about a minute before expires_in runs out, instead of requesting a new token for each call. Five failed attempts in fifteen minutes lock the Client ID for fifteen minutes.

    Machine tokens

    Endpoints marked Machine token only accept a token from your Client ID and Secret. A token issued to a dashboard user is refused there with 403, so server to server integrations should always use the client credentials token.

    Keep the Client Secret on your server. It is never sent in a request; it only signs requests and gets tokens.

    Getting started

    Signing requests

    Endpoints marked Signed move money or handle card data, so they also prove the body came from you. Send three headers with the bearer token:

    HeaderValue
    X-TimestampCurrent time as Unix seconds, UTC. Must be within 300 seconds of server time.
    X-Signature-Version2
    X-SignatureLowercase hex HMAC SHA256 of the string to sign, keyed with your Client Secret.

    The string to sign is the method, path, timestamp and raw body joined by new lines:

    METHOD\npath\nX-Timestamp\nrawBody

    Rules that matter

    Sign the exact bytes you send. Serialise the body once, sign that string and send that same string; pretty printing or reordering keys afterwards breaks the signature.

    Each signed request is accepted once. On a retry, sign again with a fresh timestamp and keep the same business reference.

    Failures return 401 with code 26 and a message such as Invalid request signature or Request timestamp outside the allowed window.

    Getting started

    Errors

    Business and validation failures return HTTP 400 with isSuccessful: false and a code. Each endpoint lists the codes it can return; these are the common ones.

    HTTPMeaning
    400Business or validation failure. Read code and message.
    401Token missing or expired, or the signature is wrong.
    403A dashboard user token was sent to a machine token endpoint.
    404Wallet (63), card (66) or card charge (69) not found.
    406Code 20. Unexpected error; safe to retry with the same Idempotency-Key.
    409Idempotency-Key reused with a different body, or still in progress.
    429Rate limit reached. Wait for the number of seconds in Retry-After.

    Common codes

    CodeMeaning
    00Success
    20Server error, try again
    21Temporary failure, retry
    26Invalid request; the message names the field
    60Wallet feature not enabled for your merchant
    61Wallet not active
    62Insufficient wallet balance
    63Wallet not found
    64, 65Wallet or card limit reached
    66 to 70Card not found, not active, linked elsewhere, charge not found, declined
    400 Bad Request

    Getting started

    Retries and limits

    Creating a virtual account and storing a card take an Idempotency-Key header. A retry with the same key does not act twice. The same key with a different body returns 409.

    Payouts, wallet withdrawals, wallet transfers and card charges use your own reference in the body as the idempotency key, so they need no header. Reuse the same reference on every retry of the same action, so a network timeout can never cause a double payment.

    Rate limits

    LaneLimit per minute
    Authenticate10 per IP
    Money movement (payouts, withdrawals, transfers, charges)30
    Wallet reads120
    Hosted checkout (payer side)30 per IP
    Everything else300
    409 Conflict
    Loading the API reference…
    Generated from VantPay_Merchant_API.openapi.json. Update that file and this page updates with it.