Developers

Build payments into your product.

Guides and reference for the LBPay API: collections, payouts, payment links, and sandbox behavior in XAF.

On this page

Authentication

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_...
Apply from Profile. Sandbox and live keys appear in the Developer Portal after approval. Live payouts also need verified developer KYC.

Wallet transfer vs disbursement

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 disbursements. Cash leaves LBPay through PayUnit (POST /api/gateway/deposit then /api/gateway/deposit/confirm on https://gateway.payunit.net, account number 237 + 9-digit MSISDN). Deposit is 1.5%. Withdrawal is 2.5%. Minimum withdrawal is 1,000 XAF. PayUnit must enable the deposit/disbursement product on the merchant account; a PayUnit wallet balance alone is not enough.

POST /api/wallet/disburse

POST /api/wallet/disburse
{ "amount": 10000, "phone": "670112233", "network": "mtn", "pin": "1234" }

Deposits collect from MTN, Orange, or card via PayUnit initialize + makepayment, then credit the wallet when the rail reports success.

Create a payment

POST /api/v1/payments collects XAF. Use method mobile_money, mtn, orange, card, or wallet.

cURL

curl https://lbpay.cm/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"
  }'

Create a payout

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.cm/api/v1/payouts \
  -H "Authorization: Bearer sk_test_YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 10000,
    "phone": "670112233",
    "network": "mtn"
  }'

Balance

GET /api/v1/balance returns available XAF for the authenticated merchant.

GET /api/v1/balance

curl https://lbpay.cm/api/v1/balance \
  -H "Authorization: Bearer sk_test_YOUR_SECRET"

Sandbox amounts

Test keys never move live money. Use the amount to drive the rail result:

Amount ruleStatus
ending in 00SUCCESS
ending in 13FAILED
ending in 77PENDING

Account security

  • Signup sends a 6-digit email OTP (Nodemailer / SMTP).
  • After OTP, the user sets a 4-digit PIN.
  • Login is email + password, then PIN.
  • Sends, withdrawals, and deposits require the PIN on a confirmation sheet.
  • Mobile: the session lasts; returning to the app after it was inactive asks for the PIN again.
  • Web: no PIN lock overlay. Idle for about 18 minutes signs the user out.

Roles

  • Personal: wallet. Verify your account from Profile when you want business benefits.
  • Business: merchant console. Available after your account is verified.
  • Developer: apply from Profile. Portal, sandbox keys, and live keys unlock after approval.
  • Admin: platform operators. Entering /admin asks for an email OTP. That operator session lasts about 8 hours.

SDKs

Official libraries are planned. Until then, call the HTTP API directly.

npm i @lbpay/node · pip install lbpay · Flutter / React Native

Stored balances, cross-network transfers, custody, savings, lending, and merchant settlement can trigger licensing, KYC/AML, and safeguarding requirements. Confirm what can be offered directly versus through a licensed partner before enabling live money movement.

Get API keys