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.

1

Get your API keys

Log in to the Bila Console and navigate to Settings → API Keys.
Key typePrefixEnvironment
Testsk_test_Sandbox
Livesk_live_Production
Never expose API keys in client-side code or public repositories.
2

Fetch your accounts

Confirm your key works by listing your accounts:
curl -X GET "https://api.usebila.com/api/v1/bila/accounts" \
  -H "x-api-key: sk_test_your_api_key_here"
Response
{
  "status": true,
  "message": "Accounts retrieved successfully",
  "data": { "data": [...], "meta": { "total": 1, "page": 1, "perPage": 50 } }
}
3

Collect a payment

Trigger a USSD push to collect from a mobile money wallet:
curl -X POST "https://api.usebila.com/api/v1/bila/collections/mobile-money" \
  -H "x-api-key: sk_test_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 100,
    "reference": "order-12345",
    "phone": "0977123456",
    "operator": "airtel",
    "country": "zm",
    "walletId": "your-wallet-id",
    "customerName": "John Doe",
    "narration": "Payment for Order #12345"
  }'
4

Send a payout

Initiate a bank account transfer:
cURL
curl -X POST "https://api.usebila.com/api/v1/bila/transfers/bank-account" \
  -H "x-api-key: sk_test_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "your-account-id",
    "amount": 500,
    "reference": "payout-12345",
    "accountNumber": "1234567890",
    "bankId": "bank-id",
    "country": "zm",
    "narration": "Salary payment"
  }'

Next Steps