Developers
Guides and reference for the LBPay API: collections, payouts, payment links, and sandbox behavior in XAF.
Send your secret key as a Bearer token. Test keys start with sk_test_. Live keys start with sk_live_.
Header
Authorization: Bearer sk_test_...
LBPay to LBPay is an internal ledger move. The sender’s wallet balance drops and the recipient’s wallet balance rises. No Mobile Money rail is involved. The recipient can withdraw later.
POST /api/wallet/transfer
POST /api/wallet/transfer
{ "to": "@handle", "amount": 5000, "pin": "1234", "note": "Lunch" }Withdrawals and “send to MTN / Orange” are payouts: money leaves LBPay to a Cameroon MTN or Orange number (237 + 9 digits). Minimum withdrawal is 1,000 XAF.
POST /api/wallet/disburse
POST /api/wallet/disburse
{ "amount": 10000, "phone": "670112233", "network": "mtn", "pin": "1234" }Deposits collect from MTN, Orange, or card and credit the wallet the moment the network confirms. See pricing for every fee.
POST /api/v1/payments collects XAF. Use method mobile_money, mtn, orange, card, or wallet.
cURL
curl https://lbpay.loopingbinary.com/api/v1/payments \
-H "Authorization: Bearer sk_test_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"currency": "XAF",
"customer": { "phone": "670112233" },
"method": "mobile_money"
}'GET /api/v1/payments/:id returns the current status of any collection on your account by its LBPay transaction ID (TXN_...) or gateway reference. If a live payment is still pending, LBPay automatically re-verifies with the mobile money network before returning.
GET /api/v1/payments/:id
curl https://lbpay.loopingbinary.com/api/v1/payments/TXN_t60oaw75ox \ -H "Authorization: Bearer sk_live_YOUR_SECRET"
You can also list recent collections with GET /api/v1/payments?limit=20, or check a payout with GET /api/v1/payouts/:id.
Register an HTTPS URL in the Developer Portal (/developers/webhooks) or via POST /api/v1/webhooks. LBPay sends a signed POST request whenever a collection or API payout settles:
payment.succeeded — a collection (API payment, payment link, or QR checkout) succeeded and credited your wallet.payment.failed — a collection failed, expired, or was cancelled.payout.succeeded / payout.failed — an API disbursement completed or failed.Webhook JSON payload
{
"id": "evt_TXN_t60oaw75ox_payment_succeeded",
"object": "event",
"type": "payment.succeeded",
"createdAt": "2026-11-25T11:30:00.000Z",
"environment": "live",
"data": {
"id": "TXN_t60oaw75ox",
"object": "payment",
"amount": 100,
"fee": 2,
"net": 100,
"currency": "XAF",
"status": "success",
"method": "mtn",
"reference": "MT12345678AB",
"rail": "payunit",
"environment": "live",
"description": "Collection",
"linkSlug": null,
"customer": { "phone": "670112233" },
"createdAt": "2026-11-25T11:29:10.000Z"
}
}Every request includes X-LBPay-Event, X-LBPay-Event-Id, X-LBPay-Timestamp, and X-LBPay-Signature (t=...,v1=...) signed with your endpoint’s whsec_... secret using HMAC-SHA256 over ${timestamp}.${rawBody}:
Verify signature (Node.js)
import crypto from "node:crypto";
function verifyLbpayWebhook(rawBody, sigHeader, secret) {
const parts = Object.fromEntries(sigHeader.split(",").map((p) => p.split("=")));
const expected = crypto
.createHmac("sha256", secret)
.update(`${parts.t}.${rawBody}`)
.digest("hex");
return crypto.timingSafeEqual(Buffer.from(parts.v1 || ""), Buffer.from(expected));
}POST /api/v1/payments/:id/resend or use the Resend tool in /developers/webhooks. Webhook delivery requires no extra personal or business KYC once your Developer Portal access is approved.POST /api/v1/payouts sends XAF to a Cameroon phone on MTN or Orange. The merchant wallet is debited, plus the 2.5% withdrawal fee.
cURL
curl https://lbpay.loopingbinary.com/api/v1/payouts \
-H "Authorization: Bearer sk_test_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"phone": "670112233",
"network": "mtn"
}'POST /api/v1/payment-links creates a hosted checkout URL. Business role required.
cURL
curl https://lbpay.loopingbinary.com/api/v1/payment-links \
-H "Authorization: Bearer sk_test_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"title": "Studio session",
"amount": 15000
}'GET /api/v1/balance returns available XAF for the authenticated merchant.
GET /api/v1/balance
curl https://lbpay.loopingbinary.com/api/v1/balance \ -H "Authorization: Bearer sk_test_YOUR_SECRET"
Test keys never move live money. Use the amount to drive the rail result:
| Amount rule | Status |
|---|---|
| ending in 00 | SUCCESS |
| ending in 13 | FAILED |
| ending in 77 | PENDING |
Official libraries are planned. Until then, call the HTTP API directly.
npm i @lbpay/node · pip install lbpay · Flutter / React Native
LBPay is a product of Looping Binary, built in Cameroon. Mobile Money payments run on the MTN Mobile Money and Orange Money networks through our payment processing partner. LBPay is not a bank. MTN and Orange are trademarks of their respective owners.