Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.usebila.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

View and filter all debits and credits across your accounts for reconciliation and reporting.

Endpoints

EndpointMethodDescription
/bila/transactionsGETList all transactions
/bila/transactions/{id}GETGet a single transaction by ID

Transaction Object

{
  "id": "txn-001",
  "type": "credit",
  "amount": 1000.00,
  "currency": "ZMW",
  "status": "successful",
  "description": "Mobile money collection",
  "reference": "order-12345",
  "accountId": "acc-001",
  "balanceBefore": 5000.00,
  "balanceAfter": 6000.00,
  "createdAt": "2024-01-15T10:30:00Z"
}

Transaction Types

TypeDescription
creditMoney received (collections, deposits)
debitMoney sent (transfers, fees)

Filtering Transactions

You can filter transactions using query parameters:
ParameterTypeDescription
pagenumberPage number (default: 1)
perPagenumberItems per page (default: 50, max: 100)
typestringFilter by type: credit or debit
accountIdstringFilter by account ID
startDatestringFilter from date (ISO 8601)
endDatestringFilter to date (ISO 8601)

Example: Get Recent Credits

curl -X GET "https://api.usebila.com/api/v1/bila/transactions?type=credit&perPage=20" \
  -H "x-api-key: sk_test_your_api_key"

Example: Get Transactions for Date Range

curl -X GET "https://api.usebila.com/api/v1/bila/transactions?startDate=2024-01-01&endDate=2024-01-31" \
  -H "x-api-key: sk_test_your_api_key"

Paginated Response

{
  "status": true,
  "message": "Transactions retrieved successfully",
  "data": {
    "data": [
      // Transaction objects
    ],
    "meta": {
      "total": 150,
      "page": 1,
      "perPage": 50,
      "totalPages": 3
    }
  }
}

Use Cases

Fetch transactions for the previous day to reconcile with your internal records.
Use date filters to generate monthly or weekly transaction statements.
List recent transactions to monitor account activity in real-time.
API Reference
Explore the complete API reference