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.
Get your API keys
Log in to the Bila Console and navigate to Settings → API Keys.| Key type | Prefix | Environment |
|---|
| Test | sk_test_ | Sandbox |
| Live | sk_live_ | Production |
Never expose API keys in client-side code or public repositories.
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"
{
"status": true,
"message": "Accounts retrieved successfully",
"data": { "data": [...], "meta": { "total": 1, "page": 1, "perPage": 50 } }
}
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"
}'
Send a payout
Initiate a bank account transfer: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