Developers

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.

POST/collections/mobile-moneycURL
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"
}'
01One API for all of itCollections, transfers, account checks, balances and settlements, all with the same x-api-key header.
02Signed webhooksAn event the moment money moves, signed with your secret and retried if your server is down.
03Test before you go liveTest keys and a sandbox with no real money. Switch to live keys when you're ready.

Collect, pay out and check

Every request goes to api.usebila.com/api/v1/bila with your secret key. Amounts are in kwacha.

Collections
  • POST/collections/mobile-money
  • POST/collections/card
  • GET/collections/status/:reference
Transfers
  • POST/transfers/mobile-money
  • POST/transfers/bank-account
  • GET/transfers/status/:reference
Verification
  • POST/resolve/mobile-money
  • POST/resolve/bank-account
  • GET/banks
Money
  • 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.

If your server is down, we try again
  1. Now
  2. 1 min
  3. 5 min
  4. 30 min
  5. 2 h
  6. 6 h
  7. 24 h
Payments
  • collection.completed
  • collection.failed
  • payment.completed
Payouts
  • transfer.completed
  • transfer.failed
  • settlement.completed
Store
  • order.paid
  • delivery.in_transit
  • delivery.delivered
Invoices
  • invoice.sent
  • invoice.paid
  • invoice.overdue
POSTyour-server.com/webhooks/bilaNode.js
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"]),
);
}

From sandbox to live in three steps

Try everything with no real money first, then switch to live keys when you're ready.

  1. 1.0sk_test_

    Test in the sandbox

    Turn on the sandbox from your dashboard and use your test key. No real money moves.

  2. 2.0x-bila-signature

    Handle your webhooks

    Add your endpoint, check the signature, and watch deliveries in the dashboard.

  3. 3.0sk_live_

    Switch to live

    Create a live key, list your servers' IP addresses, and start taking payments.

Start building today