ZepaLink API Documentation

Everything you need to integrate our payment solutions into your applications.

Introduction

Welcome to ZepaLink's API Documentation Page. Our API enables you to integrate our payment solutions directly into your applications, providing seamless Payment collection and KYC verification capabilities.

Base URL

https://old-api.zepalink.com/v1

Authentication

All API requests must include your API token in the Authorization header using Bearer token authentication.

Example Request Header

Authorization: Bearer your_api_token_here

Response Codes

HTTP Status Codes

200 Successful request (OK)
201 Resource created successfully(Created)
202 Request accepted for processing (Accepted)
400 Bad request (Invalid parameters)
401 Unauthorized request (Invalid/No provided API token)
402 Payment required (Insufficient balance)
403 Forbidden request (Insufficient permissions)
404 Not found (Resource not found)
422 Validation error (Invalid parameters)
424 Failed dependency (A required resource failed to process)
429 Too many requests (Rate limit exceeded)
500 Internal server error (This shouldn't happen so please report as soon as you encounter any instance of this)
502 Bad gateway (This shouldn't happen so please report as soon as you encounter any instance of this)
503 Service unavailable (Maintenance ongoing / Overloaded / Down etc.) You can fail the transaction or retry later
504 Gateway timeout (This shouldn't happen so please report as soon as you encounter any instance of this)

Bank Accounts

GET https://old-api.zepalink.com/v1/merchant/bank-accounts

HEADERS:

Content-Type
application/json
Accept
application/json

Retrieve available bank accounts for Reference-Based payments.

Try It Out

Responses

{
                                        "message": "Bank accounts retrieved!",
                                        "data": [
                                            {
                                                "accountNumber": "01234xxxxx",
                                                "accountName": "John Doe",
                                                "bankName": "MoniePoint",
                                                //information to show to your customers
                                                "information": "Payment is allowed to this account from any bank. Provide the reference starting with TRF|2MPT if you are paying from MoniePoint, Provide the Session ID if you are paying from other banks."
                                            },
                                            {
                                                "accountNumber": "22222234",
                                                "accountName": "John Doe",
                                                "bankName": "Access Bank",
                                                //information to show to your customers
                                                "information": "Payment is allowed to this account from any bank. Provide the reference starting with NXG if you are paying from Access Bank, Provide the Session ID if you are paying from other banks."
                                            },
                                            {
                                                "accountNumber": "0123232323",
                                                "accountName": "John Doe",
                                                "bankName": "GTBank",
                                                //information to show to your customers
                                                "information": "Don't pay to GTBank if you don't know how to get the Reference Number that starts with M."
                                            }
                                        ]
                                    }

Code Examples

curl -X GET 'https://old-api.zepalink.com/v1/merchant/bank-accounts' \
                                        -H 'Authorization: Bearer your_api_token' \
                                        -H 'Content-Type: application/json' \
                                        -H 'Accept: application/json'

Banks

GET https://old-api.zepalink.com/v1/banks

HEADERS:

Content-Type
application/json
Accept
application/json

Retrieve a list of all active banks supported by the platform.

Try It Out

Responses

{
                                        "message": "Banks retrieved successfully",
                                        "data": [
                                            {
                                                "code": "120001",
                                                "name": "9mobile 9Payment Service Bank"
                                            },
                                            {
                                                "code": "404",
                                                "name": "Abbey Mortgage Bank"
                                            },
                                            {
                                                "code": "51204",
                                                "name": "Above Only MFB"
                                            },
                                            {
                                                "code": "51312",
                                                "name": "Abulesoro MFB"
                                            },
                                            {
                                                "code": "044",
                                                "name": "Access Bank"
                                            },
                                            {
                                                "code": "063",
                                                "name": "Access Bank (Diamond)"
                                            },
                                            {
                                                "code": "602",
                                                "name": "Accion Microfinance Bank"
                                            },
                                            {
                                                "code": "50315",
                                                "name": "Aella MFB"
                                            },
                                            {
                                                "code": "90077",
                                                "name": "AG Mortgage Bank"
                                            },
                                            {
                                                "code": "50036",
                                                "name": "Ahmadu Bello University Microfinance Bank"
                                            },
                                            {
                                                "code": "120004",
                                                "name": "Airtel Smartcash PSB"
                                            },
                                            {
                                                "code": "51336",
                                                "name": "AKU Microfinance Bank"
                                            },
                                            {
                                                "code": "090561",
                                                "name": "Akuchukwu Microfinance Bank Limited"
                                            },
                                            {
                                                "code": "035A",
                                                "name": "ALAT by WEMA"
                                            },
                                            {
                                                "code": "000304",
                                                "name": "Alternative bank"
                                            },
                                            {
                                                "code": "090629",
                                                "name": "Amegy Microfinance Bank"
                                            },
                                            {
                                                "code": "50926",
                                                "name": "Amju Unique MFB"
                                            },
                                            {
                                                "code": "50083",
                                                "name": "Aramoko MFB"
                                            },
                                            {
                                                "code": "401",
                                                "name": "ASO Savings and Loans"
                                            },
                                            {
                                                "code": "50092",
                                                "name": "Assets Microfinance Bank"
                                            },
                                            {
                                                "code": "MFB50094",
                                                "name": "Astrapolaris MFB LTD"
                                            },
                                            {
                                                "code": "090478",
                                                "name": "AVUENEGBE MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "51351",
                                                "name": "AWACASH MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "51337",
                                                "name": "AZTEC MICROFINANCE BANK LIMITED"
                                            },
                                            {
                                                "code": "51229",
                                                "name": "Bainescredit MFB"
                                            },
                                            {
                                                "code": "50117",
                                                "name": "Banc Corp Microfinance Bank"
                                            },
                                            {
                                                "code": "51341",
                                                "name": "BANKLY MFB"
                                            },
                                            {
                                                "code": "MFB50992",
                                                "name": "Baobab Microfinance Bank"
                                            },
                                            {
                                                "code": "51100",
                                                "name": "BellBank Microfinance Bank"
                                            },
                                            {
                                                "code": "51267",
                                                "name": "Benysta Microfinance Bank Limited"
                                            },
                                            {
                                                "code": "50123",
                                                "name": "Beststar Microfinance Bank"
                                            },
                                            {
                                                "code": "50725",
                                                "name": "BOLD MFB"
                                            },
                                            {
                                                "code": "650",
                                                "name": "Bosak Microfinance Bank"
                                            },
                                            {
                                                "code": "50931",
                                                "name": "Bowen Microfinance Bank"
                                            },
                                            {
                                                "code": "FC40163",
                                                "name": "Branch International Finance Company Limited"
                                            },
                                            {
                                                "code": "50645",
                                                "name": "BuyPower MFB"
                                            },
                                            {
                                                "code": "565",
                                                "name": "Carbon"
                                            },
                                            {
                                                "code": "51353",
                                                "name": "Cashbridge Microfinance Bank Limited"
                                            },
                                            {
                                                "code": "865",
                                                "name": "CASHCONNECT MFB"
                                            },
                                            {
                                                "code": "50823",
                                                "name": "CEMCS Microfinance Bank"
                                            },
                                            {
                                                "code": "50171",
                                                "name": "Chanelle Microfinance Bank Limited"
                                            },
                                            {
                                                "code": "312",
                                                "name": "Chikum Microfinance bank"
                                            },
                                            {
                                                "code": "023",
                                                "name": "Citibank Nigeria"
                                            },
                                            {
                                                "code": "070027",
                                                "name": "CITYCODE MORTAGE BANK"
                                            },
                                            {
                                                "code": "50910",
                                                "name": "Consumer Microfinance Bank"
                                            },
                                            {
                                                "code": "50204",
                                                "name": "Corestep MFB"
                                            },
                                            {
                                                "code": "559",
                                                "name": "Coronation Merchant Bank"
                                            },
                                            {
                                                "code": "FC40128",
                                                "name": "County Finance Limited"
                                            },
                                            {
                                                "code": "51297",
                                                "name": "Crescent MFB"
                                            },
                                            {
                                                "code": "090560",
                                                "name": "Crust Microfinance Bank"
                                            },
                                            {
                                                "code": "MFB50216",
                                                "name": "CRUTECH MICROFINANCE BANK LTD"
                                            },
                                            {
                                                "code": "51334",
                                                "name": "Davenport MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "50162",
                                                "name": "Dot Microfinance Bank"
                                            },
                                            {
                                                "code": "50922",
                                                "name": "EBSU Microfinance Bank"
                                            },
                                            {
                                                "code": "050",
                                                "name": "Ecobank Nigeria"
                                            },
                                            {
                                                "code": "50263",
                                                "name": "Ekimogun MFB"
                                            },
                                            {
                                                "code": "098",
                                                "name": "Ekondo Microfinance Bank"
                                            },
                                            {
                                                "code": "090678",
                                                "name": "EXCEL FINANCE BANK"
                                            },
                                            {
                                                "code": "50126",
                                                "name": "Eyowo"
                                            },
                                            {
                                                "code": "51318",
                                                "name": "Fairmoney Microfinance Bank"
                                            },
                                            {
                                                "code": "50298",
                                                "name": "Fedeth MFB"
                                            },
                                            {
                                                "code": "070",
                                                "name": "Fidelity Bank"
                                            },
                                            {
                                                "code": "51314",
                                                "name": "Firmus MFB"
                                            },
                                            {
                                                "code": "011",
                                                "name": "First Bank of Nigeria"
                                            },
                                            {
                                                "code": "214",
                                                "name": "First City Monument Bank"
                                            },
                                            {
                                                "code": "090164",
                                                "name": "FIRST ROYAL MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "51333",
                                                "name": "FIRSTMIDAS MFB"
                                            },
                                            {
                                                "code": "413",
                                                "name": "FirstTrust Mortgage Bank Nigeria"
                                            },
                                            {
                                                "code": "501",
                                                "name": "FSDH Merchant Bank Limited"
                                            },
                                            {
                                                "code": "832",
                                                "name": "FUTMINNA MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "MFB51093",
                                                "name": "Garun Mallam MFB"
                                            },
                                            {
                                                "code": "812",
                                                "name": "Gateway Mortgage Bank LTD"
                                            },
                                            {
                                                "code": "00103",
                                                "name": "Globus Bank"
                                            },
                                            {
                                                "code": "090574",
                                                "name": "Goldman MFB"
                                            },
                                            {
                                                "code": "100022",
                                                "name": "GoMoney"
                                            },
                                            {
                                                "code": "090664",
                                                "name": "GOOD SHEPHERD MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "562",
                                                "name": "Greenwich Merchant Bank"
                                            },
                                            {
                                                "code": "51276",
                                                "name": "GROOMING MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "50368",
                                                "name": "GTI MFB"
                                            },
                                            {
                                                "code": "058",
                                                "name": "Guaranty Trust Bank"
                                            },
                                            {
                                                "code": "51251",
                                                "name": "Hackman Microfinance Bank"
                                            },
                                            {
                                                "code": "50383",
                                                "name": "Hasal Microfinance Bank"
                                            },
                                            {
                                                "code": "120002",
                                                "name": "HopePSB"
                                            },
                                            {
                                                "code": "51211",
                                                "name": "IBANK Microfinance Bank"
                                            },
                                            {
                                                "code": "51244",
                                                "name": "Ibile Microfinance Bank"
                                            },
                                            {
                                                "code": "50439",
                                                "name": "Ikoyi Osun MFB"
                                            },
                                            {
                                                "code": "50442",
                                                "name": "Ilaro Poly Microfinance Bank"
                                            },
                                            {
                                                "code": "50453",
                                                "name": "Imowo MFB"
                                            },
                                            {
                                                "code": "415",
                                                "name": "IMPERIAL HOMES MORTAGE BANK"
                                            },
                                            {
                                                "code": "50457",
                                                "name": "Infinity MFB"
                                            },
                                            {
                                                "code": "070016",
                                                "name": "Infinity trust  Mortgage Bank"
                                            },
                                            {
                                                "code": "090701",
                                                "name": "ISUA MFB"
                                            },
                                            {
                                                "code": "301",
                                                "name": "Jaiz Bank"
                                            },
                                            {
                                                "code": "50502",
                                                "name": "Kadpoly MFB"
                                            },
                                            {
                                                "code": "51308",
                                                "name": "KANOPOLY MFB"
                                            },
                                            {
                                                "code": "082",
                                                "name": "Keystone Bank"
                                            },
                                            {
                                                "code": "899",
                                                "name": "Kolomoni MFB"
                                            },
                                            {
                                                "code": "100025",
                                                "name": "KONGAPAY (Kongapay Technologies Limited)(formerly Zinternet)"
                                            },
                                            {
                                                "code": "50200",
                                                "name": "Kredi Money MFB LTD"
                                            },
                                            {
                                                "code": "50211",
                                                "name": "Kuda Bank"
                                            },
                                            {
                                                "code": "90052",
                                                "name": "Lagos Building Investment Company Plc."
                                            },
                                            {
                                                "code": "50549",
                                                "name": "Links MFB"
                                            },
                                            {
                                                "code": "031",
                                                "name": "Living Trust Mortgage Bank"
                                            },
                                            {
                                                "code": "50491",
                                                "name": "LOMA MFB"
                                            },
                                            {
                                                "code": "303",
                                                "name": "Lotus Bank"
                                            },
                                            {
                                                "code": "090171",
                                                "name": "MAINSTREET MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "50563",
                                                "name": "Mayfair MFB"
                                            },
                                            {
                                                "code": "50304",
                                                "name": "Mint MFB"
                                            },
                                            {
                                                "code": "946",
                                                "name": "Money Master PSB"
                                            },
                                            {
                                                "code": "50515",
                                                "name": "Moniepoint MFB"
                                            },
                                            {
                                                "code": "120003",
                                                "name": "MTN Momo PSB"
                                            },
                                            {
                                                "code": "090190",
                                                "name": "MUTUAL BENEFITS MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "090679",
                                                "name": "NDCC MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "51361",
                                                "name": "NET MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "51142",
                                                "name": "Nigerian Navy Microfinance Bank Limited"
                                            },
                                            {
                                                "code": "50072",
                                                "name": "Nombank MFB"
                                            },
                                            {
                                                "code": "561",
                                                "name": "NOVA BANK"
                                            },
                                            {
                                                "code": "50629",
                                                "name": "NPF MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "51261",
                                                "name": "NSUK MICROFINANACE BANK"
                                            },
                                            {
                                                "code": "50697",
                                                "name": "OLUCHUKWU MICROFINANCE BANK LTD"
                                            },
                                            {
                                                "code": "999992",
                                                "name": "OPay Digital Services Limited (OPay)"
                                            },
                                            {
                                                "code": "107",
                                                "name": "Optimus Bank Limited"
                                            },
                                            {
                                                "code": "100002",
                                                "name": "Paga"
                                            },
                                            {
                                                "code": "999991",
                                                "name": "PalmPay"
                                            },
                                            {
                                                "code": "104",
                                                "name": "Parallex Bank"
                                            },
                                            {
                                                "code": "311",
                                                "name": "Parkway - ReadyCash"
                                            },
                                            {
                                                "code": "090680",
                                                "name": "PATHFINDER MICROFINANCE BANK LIMITED"
                                            },
                                            {
                                                "code": "100039",
                                                "name": "Paystack-Titan"
                                            },
                                            {
                                                "code": "50743",
                                                "name": "Peace Microfinance Bank"
                                            },
                                            {
                                                "code": "51226",
                                                "name": "PECANTRUST MICROFINANCE BANK LIMITED"
                                            },
                                            {
                                                "code": "51146",
                                                "name": "Personal Trust MFB"
                                            },
                                            {
                                                "code": "50746",
                                                "name": "Petra Mircofinance Bank Plc"
                                            },
                                            {
                                                "code": "050021",
                                                "name": "PFI FINANCE COMPANY LIMITED"
                                            },
                                            {
                                                "code": "268",
                                                "name": "Platinum Mortgage Bank"
                                            },
                                            {
                                                "code": "00716",
                                                "name": "Pocket App"
                                            },
                                            {
                                                "code": "076",
                                                "name": "Polaris Bank"
                                            },
                                            {
                                                "code": "50864",
                                                "name": "Polyunwana MFB"
                                            },
                                            {
                                                "code": "105",
                                                "name": "PremiumTrust Bank"
                                            },
                                            {
                                                "code": "50739",
                                                "name": "Prospa Capital Microfinance Bank"
                                            },
                                            {
                                                "code": "050023",
                                                "name": "PROSPERIS FINANCE LIMITED"
                                            },
                                            {
                                                "code": "101",
                                                "name": "Providus Bank"
                                            },
                                            {
                                                "code": "51293",
                                                "name": "QuickFund MFB"
                                            },
                                            {
                                                "code": "502",
                                                "name": "Rand Merchant Bank"
                                            },
                                            {
                                                "code": "090496",
                                                "name": "RANDALPHA MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "90067",
                                                "name": "Refuge Mortgage Bank"
                                            },
                                            {
                                                "code": "50761",
                                                "name": "REHOBOTH MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "50994",
                                                "name": "Rephidim Microfinance Bank"
                                            },
                                            {
                                                "code": "51286",
                                                "name": "Rigo Microfinance Bank Limited"
                                            },
                                            {
                                                "code": "50767",
                                                "name": "ROCKSHIELD MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "125",
                                                "name": "Rubies MFB"
                                            },
                                            {
                                                "code": "51113",
                                                "name": "Safe Haven MFB"
                                            },
                                            {
                                                "code": "951113",
                                                "name": "Safe Haven Microfinance Bank Limited"
                                            },
                                            {
                                                "code": "40165",
                                                "name": "SAGE GREY FINANCE LIMITED"
                                            },
                                            {
                                                "code": "50582",
                                                "name": "Shield MFB"
                                            },
                                            {
                                                "code": "106",
                                                "name": "Signature Bank Ltd"
                                            },
                                            {
                                                "code": "51062",
                                                "name": "Solid Allianze MFB"
                                            },
                                            {
                                                "code": "50800",
                                                "name": "Solid Rock MFB"
                                            },
                                            {
                                                "code": "51310",
                                                "name": "Sparkle Microfinance Bank"
                                            },
                                            {
                                                "code": "221",
                                                "name": "Stanbic IBTC Bank"
                                            },
                                            {
                                                "code": "068",
                                                "name": "Standard Chartered Bank"
                                            },
                                            {
                                                "code": "090162",
                                                "name": "STANFORD MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "50809",
                                                "name": "STATESIDE MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "070022",
                                                "name": "STB Mortgage Bank"
                                            },
                                            {
                                                "code": "51253",
                                                "name": "Stellas MFB"
                                            },
                                            {
                                                "code": "232",
                                                "name": "Sterling Bank"
                                            },
                                            {
                                                "code": "100",
                                                "name": "Suntrust Bank"
                                            },
                                            {
                                                "code": "50968",
                                                "name": "Supreme MFB"
                                            },
                                            {
                                                "code": "302",
                                                "name": "TAJ Bank"
                                            },
                                            {
                                                "code": "51269",
                                                "name": "Tangerine Money"
                                            },
                                            {
                                                "code": "51403",
                                                "name": "TENN"
                                            },
                                            {
                                                "code": "102",
                                                "name": "Titan Bank"
                                            },
                                            {
                                                "code": "090708",
                                                "name": "TransPay MFB"
                                            },
                                            {
                                                "code": "50840",
                                                "name": "U&C Microfinance Bank Ltd (U AND C MFB)"
                                            },
                                            {
                                                "code": "090706",
                                                "name": "UCEE MFB"
                                            },
                                            {
                                                "code": "51322",
                                                "name": "Uhuru MFB"
                                            },
                                            {
                                                "code": "50870",
                                                "name": "Unaab Microfinance Bank Limited"
                                            },
                                            {
                                                "code": "50871",
                                                "name": "Unical MFB"
                                            },
                                            {
                                                "code": "51316",
                                                "name": "Unilag Microfinance Bank"
                                            },
                                            {
                                                "code": "50875",
                                                "name": "UNIMAID MICROFINANCE BANK"
                                            },
                                            {
                                                "code": "032",
                                                "name": "Union Bank of Nigeria"
                                            },
                                            {
                                                "code": "033",
                                                "name": "United Bank For Africa"
                                            },
                                            {
                                                "code": "215",
                                                "name": "Unity Bank"
                                            },
                                            {
                                                "code": "50894",
                                                "name": "Uzondu Microfinance Bank Awka Anambra State"
                                            },
                                            {
                                                "code": "050020",
                                                "name": "Vale Finance Limited"
                                            },
                                            {
                                                "code": "566",
                                                "name": "VFD Microfinance Bank Limited"
                                            },
                                            {
                                                "code": "51355",
                                                "name": "Waya Microfinance Bank"
                                            },
                                            {
                                                "code": "035",
                                                "name": "Wema Bank"
                                            },
                                            {
                                                "code": "100040",
                                                "name": "Xpress Wallet"
                                            },
                                            {
                                                "code": "594",
                                                "name": "Yes MFB"
                                            },
                                            {
                                                "code": "057",
                                                "name": "Zenith Bank"
                                            }
                                        ]
                                    }

Code Examples

curl -X GET 'https://old-api.zepalink.com/v1/banks' \
                                        -H 'Content-Type: application/json' \
                                        -H 'Accept: application/json'

Bank Account Lookup

POST https://old-api.zepalink.com/v1/bank/account-lookup

HEADERS:

Content-Type
application/json
Accept
application/json

Verify and retrieve account details for a given bank account number.

Request Parameters

Parameter
Type
Required
Description
bankCode
string
Yes
Bank code (e.g., "044" for Access Bank)
accountNumber
string
Yes
10-digit account number to verify

Try It Out

Responses

{"message": "Account lookup successful!", "data": {"accountName": "John Doe"}}

Code Examples

curl -X POST 'https://old-api.zepalink.com/v1/bank/account-lookup' \
                                        -H 'Content-Type: application/json' \
                                        -H 'Accept: application/json' \
                                        -d '{
                                            "bankCode": "044",
                                            "accountNumber": "1234567890"
                                        }'

Submit Payment Information

Implementation Guide

Step 1: Create a Payment Information Form(or say Wallet Funding Form or Payment Verification Form)

Build a form with these fields:

  • Bank Account Selection (Fetch options from GET /merchant/bank-accounts)
  • Payment Reference/Session ID (From customer's bank transaction receipt to be provided by the customer)

Step 2: Handle Customer Data

Auto-populate the customerEmail field with the authenticated customer's email - do not expose this as an input field.

Step 3: Submit & Process

When the form is submitted:

  1. Send data to POST /payments endpoint
  2. We'll verify the payment details and notify you via webhook as to whether the payment was received or not

See a live implementation on our wallet funding page

POST https://old-api.zepalink.com/v1/payments

HEADERS:

Content-Type
application/json
Accept
application/json

Submit payment record.

Request Parameters

Parameter
Type
Required
Description
service
string
Yes
Type of payment to be made. Possible values:
reference_based_payment
customerEmail
string
Yes
Customer's email address
accountNumberPaidTo
string
Yes
10-digit account number of the merchant
paymentReference
string
Yes
Session ID/Reference from the bank where the customer made payment from

Try It Out

Responses

{"message": "Payment received!", "data": {"paymentReference": "202401051234567890123456789012", "transactionId": "ZepaLink|2024010512345678903456732323", "currency": "NGN", "amountPaid": 1000, "fee": 4.50, "paymentDate": "2024-01-05 12:34:56"}}

Code Examples

curl -X POST 'https://old-api.zepalink.com/v1/payments' \
                                        -H 'Authorization: Bearer your_api_token' \
                                        -H 'Content-Type: application/json' \
                                        -H 'Accept: application/json' \
                                        -d '{
                                            "service": "reference_based_payment",
                                            "customerEmail": "[email protected]",
                                            "accountNumberPaidTo": "0123456789",
                                            "paymentReference": "202401051234567890123456789012"
                                        }'

Webhook Integration

Introduction

Webhooks allow you to receive real-time notifications when certain events occur in your ZepaLink account. We'll send HTTP POST requests to your specified endpoint whenever these events happen.

Configuration

To start receiving webhooks, you need to configure your webhook settings in your dashboard:

1

Generate API Token

Go to your dashboard and navigate to the API Tokens section.

2

Set Webhook URL

Enter the URL where you want to receive webhook notifications. This should be a functioning and accessible HTTPS POST endpoint.

2

Get Secret Key

A secret key will be automatically generated. Store this securely - you'll need it to verify webhook signatures.

When generating your API token, you'll need to provide your webhook URL. A secret key will be automatically generated and displayed alongside your API token. Make sure to copy both the API token and secret key immediately, as you won't be able to view them again after leaving or refreshing the page.

Security

Signature Verification

Verify the webhook signature to ensure the payload hasn't been tampered with or sent by an intruder/illegal source:

// PHP Example
                                        $payload = file_get_contents('php://input');
                                        $signature = $_SERVER['x-zepalink-signature'];
                                        $secret = 'your_secret_key';

                                        $computedSignature = hash_hmac('sha256', $payload, $secret);

                                        // Use hash_equals to prevent timing attacks
                                        if (hash_equals($signature, $computedSignature)) {
                                            // Webhook is from ZepaLink
                                            //continue your logic
                                            http_response_code(200);
                                        } else {
                                            // Webhook is not from ZepaLink
                                            http_response_code(400);
                                        }

Event Types

Event Description
payment.failed Payment was unsuccessful or rejected by the system
payment.successful Payment has been successfully received and verified

Sample Webhook Payloads

Here are examples of webhook payloads for different payment statuses:

{"event": "payment.successful", "eventTime": "2024-03-02T23:00:00Z", "feedback": "Payment received on 2024-03-02T22:58:00Z", "customer": {"email": "[email protected]", "name": "Mr. Lagbaja"}, "transaction": {"currency": "NGN", "amountPaid": 1000, "fee": 4.50, "paymentReference": "100004240217184347127425350535", "transactionId": "202402180035013922869591", "paymentDate": "2024-03-02T22:58:00Z", "service": "reference_based_payment"}, "paymentSourceDetails": {"bankName": "GTBank", "accountName": "Mr. Lagbaja", "accountNumber": "0123456789", "narration": "Payment for goods"}, "paymentDestinationDetails": {"bankName": "Moniepoint MFB", "accountName": "ILE ISE AJIBADE LTD", "accountNumber": "8000xxxx13"}, "meta": {"ipAddress": "345.xx.x.x"}}

Best Practices

Important Security Considerations

  • Always verify the request IP against our IP
  • Use hash_equals() for signature comparison to prevent timing attacks
  • Store your secret key securely in environment variables
  • Return 2xx Quickly

    Return a 2xx HTTP status code as quickly as possible. Process the webhook asynchronously if needed.

  • Verify Signatures

    Always verify the webhook signature before processing the payload.

  • Avoid multiple crediting of funds

    Check if payment reference is not already a successful transaction before proceeding with funding.

Testing Webhooks

For testing webhooks locally, we recommend using:

  • webhook.site - A simple tool to inspect and debug webhook payloads
  • ngrok - Create secure tunnels to expose your local server

These tools allow you to receive and inspect webhook events in real-time during development.

KYC Verification/Payment

POST https://old-api.zepalink.com/v1/payments

HEADERS:

Content-Type
application/json
Accept
application/json

Verify your customer's identity using BVN, NIN or BVN + Bank Account match.

Request Parameters

Parameter
Service
Required
Description
service
string
Yes
'kyc_verification'
type
string
Yes
Either 'nin' or 'bvn' or 'nin_and_bank_account_match' or 'bvn_and_bank_account_match'
idNumber
string
Yes
BVN or NIN
dateOfBirth
string
Yes
Date of birth (YYYY-MM-DD)
bankCode
string
Required if type is nin_and_bank_account_match or bvn_and_bank_account_match
bank code(e.g 057 for Zenith Bank)
bankAccountNumber
string
Required if type is nin_and_bank_account_match or bvn_and_bank_account_match
10 digit bank account number
paymentReference
string
Yes
Unique reference for the payment

Try It Out

Responses

{"message": "Kyc Verified!", "data": {"title": "MR", "name": "John Doe", "idNumber": "383xxxxxx88", "dateOfBirth": "1997-07-01", "gender": "MALE", "placeOfBirth": "AGEGE LAGOS", "countryOfBirth": "NIGERIA", "maritalStatus": "SINGLE", "occupation": "STUDENT", "address": "123, Lagos, Nigeria", "phoneNumber": "2348060000000", "email": "[email protected]", "image": "https://example.com/image.jpg"}}

Code Examples

curl -X POST 'https://old-api.zepalink.com/v1/payments' \
                                        -H 'Authorization: Bearer your_api_token' \
                                        -H 'Content-Type: application/json' \
                                        -H 'Accept: application/json' \
                                        -d '{
                                            "idNumber": "12345678901",
                                            "service": "kyc_verification",
                                            "type": "BVN",
                                            "dateOfBirth": "1990-01-01",
                                            "paymentReference": "20240105123456789012345623232"
                                        }'

Wallet

GET https://old-api.zepalink.com/v1/wallet

HEADERS:

Content-Type
application/json
Accept
application/json

View your wallet.

Try It Out

Responses

{"message": "Wallet fetched!", "data": {"currency": "NGN", "balance": 10000.00}}

Feedback

We value your feedback! Please let us know how we can improve our documentation.