Payments API

Hosted checkout

TakaPay already ships the wallet picker and TrxID form. You only redirect the customer and wait for verified.

Redirect

URL
http://localhost:3000/pay/{payment_id}

Steps on that page: choose bKash / Rocket / Nagad (official logos) → Send Money copy-number → paste TrxID. Sandbox invoices also show Simulate Send Money — see Sandbox demo.

Public invoice (no JWT)

GET/api/payments/public/:id

Used by the checkout page. Includes merchant wallet numbers from Settings / payment methods.

response (excerpt)
{
  "id": "987a15a8-...",
  "amount": 1490,
  "status": "pending",
  "sandbox": false,
  "merchantName": "TakaPay",
  "numbers": {
    "bkash": "01700000001",
    "nagad": "01800000002",
    "rocket": "01900000003"
  }
}

Customer verify (no JWT)

POST/api/payments/public/:id/verify

request
{ "trxId": "BKH8X2K1M", "provider": "bkash" }