TypeScript / Node.js
npm install @tabsamoapps/bilaimport { Bila } from '@tabsamoapps/bila';
const bila = new Bila(process.env.BILA_SECRET_KEY!);
const charge = await bila.charges.create({
amount: 10000,
currency: 'USD',
rail: 'auto',
identifier: '+252611234567',
description: 'Order #1234',
});
if (charge.status === 'requires_action') {
// Wait for the webhook, or redirect the payer:
const url = charge.requires_action_payload?.redirect_to;
if (url) res.redirect(url);
}Python
pip install bilafrom bila import Bila
bila = Bila(api_key="sk_live_...")
charge = bila.charges.create(
amount=10000,
currency="USD",
rail="auto",
identifier="+252611234567",
description="Order #1234",
)
if charge["status"] == "requires_action":
redirect_url = charge["requires_action_payload"]["redirect_to"]
# send the payer to redirect_urlPer-request options (Node)
await bila.charges.create({...}, {
idempotencyKey: '<your-uuid>', // automatic if omitted
bilaVersion: '2026-05-17', // override the SDK default
requestId: 'req_<your-trace-id>',
});Webhook signature verification
// Node
import { verifyWebhookSignature } from '@tabsamoapps/bila';
const ok = verifyWebhookSignature(rawBody, req.headers['bila-signature'], secret);
# Python
from bila import verify_webhook_signature
ok = verify_webhook_signature(raw_body, request.headers["Bila-Signature"], secret)OpenAPI
The raw spec is at /api/openapi.yaml. Generate clients for Go, PHP, Ruby, Java, etc. with your tool of choice.