Integration Guide
A systematic guide to initiating a payout
This guide provides you with step-by-step instructions on how to integrate the Transactions (Payout) endpoint into your applications.
- Get the Bank List
- Verify Beneficiary Details
- Check Account Balance
- Create a Transaction
- Verify Payout Status
Step 1: Get the Bank List
To retrieve the list of available banks and their bank codes, send a request to the endpoint linked:
cURL SAMPLE REQUEST
curl --location 'https://api.sandbox.waza.co/payouts/v1/ng/banks' \
--header 'x-waza-key: YOUR_WAZA_KEY'
Successful Response
If the request is successful, you will receive a response similar to this:
{
"data": [
{
"bank_code": "090365",
"bank_name": "CORESTEP MICROFINANCE BANK"
},
{
"bank_code": "110005",
"bank_name": "3LINE CARD MANAGEMENT LIMITED"
},
{
"bank_code": "120001",
"bank_name": "9 PAYMENT SOLUTIONS BANK"
},
{
"bank_code": "090270",
"bank_name": "AB MICROFINANCE BANK"
},
...banks
]
}
Step 2: Verify Beneficiary Details
To verify the name of the beneficiary, send a request to the linked endpoint providing the required query parameters.
cURL SAMPLE REQUEST
curl --location 'https://api.sandbox.waza.co/payouts/v1/ng/accounts/lookup?account_number=0000000003&bank_code=090365' \
--header 'x-waza-key: YOUR_WAZA_KEY'
Successful Response
If the request is successful, you will receive the following response:
{
"data": {
"account_name": "Chinara Orji",
"account_number": "0000000003",
"bank_code": "090365",
"bank_name": "CORESTEP MICROFINANCE BANK"
}
}
Step 3: Check Account Balance
It is important to verify the available balance on your account or wallet before initiating a payout request. Send a request to the linked endpoint providing just your x-waza-key
in the header .
cURL SAMPLE REQUEST
curl --location 'https://api.sandbox.waza.co/payouts/v1/balances' \
--header 'x-waza-key: YOUR_WAZA_KEY'
Successful Response
If the request is successful, you will receive the following response:
{
"data": [
{
"id": "1fbc064f-5fd6-488f-869f-18f879cd4073",
"currency": "NGN",
"country": "NG",
"amount": 89987999314,
"timestamp": "2023-08-29T18:02:29.426Z",
"metadata": {}
}
]
}
Step 4: Create a Transaction
Once you have confirmed that your account balance is sufficient for the transaction, send a request to the linked endpoint providing the required body params .
cURL SAMPLE REQUEST
curl --location 'https://api.sandbox.waza.co/payouts/v1/transactions' \
--header 'Content-Type: application/json' \
--header 'x-waza-key: YOUR_WAZA_KEY' \
--data '{
"amount": 1200000,
"currency": "NGN",
"country": "NG",
"beneficiary": {
"type": "BANK_ACCOUNT",
"account_name": "James Blunt 2",
"account_number": "123400001",
"bank_code": "000014",
"bank_name": "Access Bank"
},
"metadata": {
"invoiceId": "Payment from APP"
},
"customer_reference": "kjbijjnjnoijn",
"description": "Purpose of payment",
"sender": {
"name": "Emmanuel Igbodudu",
"country": "US",
"send_currency": "USD",
"send_amount": 500,
"dob": "2000-01-23",
"address": "Optional"
}
}'
Successful Response
If the request is successful, you will receive the following response:
{
"data": {
"id": "waza_trf_LHg8_1689553108124",
"amount": 18000,
"currency": "NGN",
"country": "NG",
"beneficiary": {
"type": "BANK_ACCOUNT",
"account_name": "Frank Sani",
"account_number": "123400001",
"bank_code": "090365",
"bank_name": "CORESTEP MICROFINANCE BANK"
},
"state": "PENDING",
"created_date": "2023-07-17T00:18:28.124Z",
"completion_date": "2023-07-17T00:18:28.125Z",
"customer_reference": "1234ab",
"metadata": {
"reason": "Payment from APP"
},
"balance_before": 1880000,
"balance_after": 1862000
}
}
Step 5: Verify Payout Status
After the transaction has been initiated, verify the status amongst other details by sending a request to the linked endpoint providing the transaction id
as a query params .
cURL SAMPLE REQUEST
curl --location 'https://api.sandbox.waza.co/payouts/v1/transactions/wz_trsf_qYvR_1690198508263' \
--header 'x-waza-key: YOUR_WAZA_KEY'
Successful Response
If the request is successful, you will receive the following response (Take note of the "state
": "COMPLETED
" field returned in the response):
{
"data": {
"id": "wz_trsf_qYvR_1690198508263",
"amount": 590000,
"currency": "NGN",
"country": "NG",
"beneficiary": {
"type": "BANK_ACCOUNT",
"account_name": "Test Account",
"account_number": "123400001",
"bank_code": "000014",
"bank_name": "Test Bank"
},
"state": "COMPLETED",
"created_date": "2023-07-24T11:35:08.264Z",
"completion_date": "2023-07-24T11:35:15.391Z",
"customer_reference": null,
"metadata": {
"invoiceId": "Payment from APP"
},
"balance_before": 10190000,
"balance_after": 9600000,
"sender": {
"dob": "2000-01-23",
"name": "Emmanuel Igbodudu",
"address": "Optional",
"country": "US",
"send_amount": 500,
"send_currency": "USD"
},
"response_code": "OO",
"response_description": "Transfer Completed successfully",
"company_id": "af0bbbfe-ff06-434c-bdba-bc962c627546"
}
}
Updated about 1 year ago