Wallet Balance
The Wallet Balance endpoint allows you to check the balance of your wallet for a specific currency. This is useful for ensuring you have sufficient funds before initiating a transfer.
Endpoint
GET https://api.cashonrails.com/api/v1/wallet_balance/{currency}
Request Headers
| Header | Type | Description |
|---|---|---|
| Authorization | string | Bearer token with your secret key |
Parameters
| Parameter | Type | Description |
|---|---|---|
| currency | string | The currency code (e.g., NGN, USD) |
Sample Request
GET https://api.cashonrails.com/api/v1/wallet_balance/NGNSample cURL Request
curl -X GET https://api.cashonrails.com/api/v1/wallet_balance/NGN \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_SECRET_KEY"Sample Response
{
"success": true,
"status": "00",
"data": {
"balance": "100000",
"pending": "100"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates if the request was successful |
| status | string | Status code of the request |
| data | object | Contains the wallet balance details |
| balance | string | The balance amount in the wallet |
| pending | string | The amount pending in the wallet |
Last updated on