VIRTUAL ACCOUNTS
Get Customer Accounts
List all virtual accounts belonging to a customer across all currencies and providers.
GET /v1/customer/:customer_id/accounts
Use this endpoint to
- Show a customer all the accounts they currently hold
- Check the status and total inflow of each account
- Confirm that an account has become
activeafter provisioning
Request
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_id |
string | Yes | Customer uuid from Enroll Customer |
Code Samples
const response = await fetch(
"https://sandbox.hitchpay.ng/v1/customer/CUSTOMER_UUID/accounts",
{ headers: { Authorization: "Bearer YOUR_ACCESS_TOKEN" } }
);
const data = await response.json();
console.log(data);<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://sandbox.hitchpay.ng/v1/customer/CUSTOMER_UUID/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_ACCESS_TOKEN"
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;import requests
url = "https://sandbox.hitchpay.ng/v1/customer/CUSTOMER_UUID/accounts"
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
response = requests.get(url, headers=headers)
print(response.json())Response
{
"status": "success",
"message": "Accounts retrieved successfully",
"data": [
{
"tracking_id": "EXTACCT…",
"account_number": "1234567890",
"account_name": "John Doe",
"bank_name": "Safe Haven MFB",
"bank_code": "090286",
"provider": "safehaven",
"currency": "NGN",
"status": "active",
"total_inflow": 125000.00,
"date_created": "1782947655"
}
]
}Fields
| Field | Type | Description |
|---|---|---|
tracking_id |
string | Our identifier for this account |
account_number |
string | null | Account number |
account_name |
string | Name on the account |
bank_name / bank_code |
string | Issuing bank details |
provider |
string | safehaven, dotbank, 9psb |
currency |
string | Account currency |
status |
string | active or pending |
total_inflow |
number | Total amount received into this account to date |
date_created |
string | Unix timestamp |
Errors
| Code | Meaning |
|---|---|
UNAUTHORIZED |
Business not found or inactive |
NOT_FOUND |
Customer not found |
Questions? Email [email protected]. Also on GitBook.