Build payments into your product
One REST API to collect by mobile money and card, pay out to wallets and banks, check accounts and follow every settlement. The same payments show up in your dashboard.
curl https://api.usebila.com/api/v1/bila/collections/mobile-money \ -H "x-api-key: $BILA_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "amount": 300, "reference": "order-2041", "phone": "0971234567", "operator": "airtel", "country": "zm", "walletId": "your-wallet-id", "bearer": "customer" }'Collect, pay out and check
Every request goes to api.usebila.com/api/v1/bila with your secret key. Amounts are in kwacha.
- POST/collections/mobile-money
- POST/collections/card
- GET/collections/status/:reference
- POST/transfers/mobile-money
- POST/transfers/bank-account
- GET/transfers/status/:reference
- POST/resolve/mobile-money
- POST/resolve/bank-account
- GET/banks
- GET/accounts/:id/balance
- GET/transactions
- GET/settlements
Know the moment money moves
Choose the events you want. Each one arrives signed with your secret, with its type and delivery ID in the headers, and every delivery shows in your dashboard.
- Now
- 1 min
- 5 min
- 30 min
- 2 h
- 6 h
- 24 h
- collection.completed
- collection.failed
- payment.completed
- transfer.completed
- transfer.failed
- settlement.completed
- order.paid
- delivery.in_transit
- delivery.delivered
- invoice.sent
- invoice.paid
- invoice.overdue
import crypto from "node:crypto";// Bila signs every event with your webhook secret.export function isFromBila(req, rawBody) { const timestamp = req.headers["x-bila-timestamp"]; const expected = "sha256=" + crypto .createHmac("sha256", process.env.BILA_WEBHOOK_SECRET) .update(`${timestamp}.${rawBody}`) .digest("hex"); return crypto.timingSafeEqual( Buffer.from(expected), Buffer.from(req.headers["x-bila-signature"]), );}Plugs into what you already use
A WooCommerce plugin for WordPress shops, and libraries in six languages for everything you build yourself.
From sandbox to live in three steps
Try everything with no real money first, then switch to live keys when you're ready.
- 1.0
sk_test_Test in the sandbox
Turn on the sandbox from your dashboard and use your test key. No real money moves.
- 2.0
x-bila-signatureHandle your webhooks
Add your endpoint, check the signature, and watch deliveries in the dashboard.
- 3.0
sk_live_Switch to live
Create a live key, list your servers' IP addresses, and start taking payments.