Developers

PayBangla API v1

Sandbox invoice, payment-status, transaction and balance APIs. Live collections and payout creation are disabled pending official provider approval.

POST/v1/invoicesCreate an invoice and checkout session
GET/v1/invoices/{id}Look up invoice status
GET/v1/payments/{id}Verify a payment
POST/v1/payoutsSubmit a payout request
GET/v1/payouts/{id}Look up payout status
GET/v1/balanceSettlement balances
GET/v1/transactionsTransaction history

Webhook signatures

Use Authorization: Bearer pb_test_… and an Idempotency-Key header for invoice creation. Amount is BDT with at most two decimal places. The fee is deducted from the merchant settlement; total charged equals amount. Payments use the invoice ID until a verified provider reference exists. Invoice expiry is ten minutes.

Base path: /v1 (also /api/public/v1). POST /v1/payouts returns live_payouts_disabled. Request-limit activation is currently blocked pending approval of the custom database limiter.

Each event carries a PayBangla-Signature header with a timestamp and HMAC-SHA256 of timestamp.body. Reject events older than 5 minutes.

Header format: t=unix_seconds,v1=hex_hmac. Reject timestamps more than five minutes in either direction, persist the event ID to reject duplicates, and only acknowledge after durable processing. Provider-specific inbound adapters remain disabled; this signing format applies only to PayBangla merchant deliveries.

{
  "id": "evt_…",
  "type": "invoice.paid",
  "data": { "invoice": "inv_…", "amount": 1500.00, "currency": "BDT", "reference": "order_1042" }
}