Account & Fleet API

Monitor your B2B partner fleet account, check balances, and retrieve transaction history.

Overview

The Account API provides programmatic read-only access to your central partner fleet account. This allows you to build custom dashboards, automate financial reconciliation, and monitor your activity with CashPay in real-time.

Ask AI

Have a question about this API? Ask our AI assistant for a quick answer based on the documentation.

Get Balance

GET/api/v1/b2b/account/balance

Retrieves the real-time balance of your fleet account for all supported currencies.

cURL
curl -X GET 'https://api.cashpay-all.com/api/v1/b2b/account/balance' \
-H 'Authorization: Bearer <YOUR_API_KEY>'

Success Response

JSON
{
  "success": true,
  "balances": {
    "USD": 98550.75,
    "EUR": 12030.00,
    "CDF": 58750000.00
  }
}

List Transactions

GET/api/v1/b2b/account/transactions

Fetches the most recent transactions associated with your fleet account.

You can use query parameters like ?limit=100 to control the number of results.

cURL
curl -X GET 'https://api.cashpay-all.com/api/v1/b2b/account/transactions?limit=2' \
-H 'Authorization: Bearer <YOUR_API_KEY>'

Example Response

JSON
{
  "success": true,
  "transactions": [
    {
      "reference": "SETTLE-DIRECT-XYZ",
      "type": "PAYMENT",
      "amount": 120.50,
      "currency": "USD",
      "description": "Settlement for e-commerce Order #XYZ",
      "date": "2024-05-22T09:00:00.000Z",
      "status": "Completed"
    },
    {
      "reference": "JIT-FABC123",
      "type": "B2B_JIT_FUNDING",
      "amount": -15.75,
      "currency": "USD",
      "description": "JIT Funding for Card Purchase at AMAZON.COM",
      "date": "2024-05-22T08:45:10.000Z",
      "status": "Completed"
    }
  ]
}