1. Get Started - Account Setup

This section specifies how to setup the VPay LIVE and SANDBOX accounts required for the Javascript payment dropin integration. All examples are made with reference to the SANDBOX environment.

A. Register your live merchant account at https://www.vpay.africa and then sign in. Your live account will be used to receive real payments once you are done with the integration.

B. To create a sandbox environment, visit your Settings menu, select the API tab and first "Enable Web Payments" on your account then click on the “Create A Developer Sandbox“ button. Thereafter, you may access your sandbox dashboard, copy your public/private keys and setup your web hook by signing into https://sandbox.vpay.africa (sign in with the same login credentials from the registration in #1A above).

NOTE: If your account has previously been used to accept payments as a retail, agency banking or API business, please add a new business to your profile, then follow the steps in (#1B) above to designate the new account for web payments. This action will help you retain the pricing for your old account type. Web payments pricing will then be applied to your new account - both accounts will remain under your single user profile.

C. After sign in to live or sandbox account, copy out your public key from the Settings -> API page. Use your public key for front-end communications. The private key is to be used when you are validating back-end API (web hook) payloads.

Remember, your SANDBOX public/private keys are different from your LIVE keys.

D. Provide a web hook endpoint URL in your Settings page if you would like to be notified of customer transaction status when a success or failure occurs. Your web hook is expected to return a response with http status code 200 once the transaction data payload is received. The success JSON payload is sent to the web hook in the format below:

Bank Transfer (EFT)

{
    "reference": "Smooth-Test-5cb7311e-efc2-e2dd-9e94-fvvb4a76932b",
    "session_id": "100089040525101154000562534883",
    "amount": 100,
    "fee": 1.17,
    "account_number": "4600577000",
    "originator_account_number": "",
    "originator_account_name": "Emeka Ajibade",
    "originator_bank": "",
    "timestamp": "2023-06-07T09:26:30.214Z",
    "email": "gomadachris@gmail.com",
    "transactionref": "vpayuserd9e34cff027a11877416861824430"
}

Card

{
    "reference": "Smooth-Test-5cb7311e-1b93-665f-9e94-5d704a76932b",
    "session_id": "Card-VPay-168612998852",
    "amount": 90,
    "fee": 1.17,
    "originator_account_name": "Card Payment By ****7030 (gomadachris@gmail.com)",
    "timestamp": "2023-06-07T09:26:30.214Z",
    "email": "gomadachris@gmail.com",
    "transactionref": "vpayuser64804cff027a1187741686129919"
}

Failure notifications are ONLY sent for card transactions using the same payload format above.

Last updated