Payments API
Authentication
TakaPay REST API uses API Key for authentication — no login required. Each store has its own API key, and it identifies which store a request is for.
API Key
Go to Admin → Webhooks, pick the store in the navbar, and copy that store’s API key. Send it on every request via the X-Api-Key header — payments you create with it always belong to that store. If you run multiple stores, use each store’s own key.
X-Api-Key: YOUR_STORE_API_KEYcurl https://pay.brainicsoft.com/api/v1/payments \
-H "X-Api-Key: YOUR_STORE_API_KEY"Security tips
- Never expose the API key in frontend JS or mobile apps.
- Always call from your server backend.
- Rotate it anytime from Admin → Webhooks — this only invalidates the old key for that one store, not your others.
Base URL
https://pay.brainicsoft.com/api/v1All REST endpoints below are relative to this base.
Public endpoints (no key needed)
These are used by the hosted checkout page — your customers open them in the browser.
GET /payments/public/:id— load checkout page dataPOST /payments/public/:id/verify— customer submits TrxID
Inbound SMS webhook (TakaPay Android app)
The TakaPay Android app reads bKash / Nagad / Rocket receipts and forwards them here. Auth uses a separate X-Webhook-Secret header (view/regenerate in Admin → Webhooks).
POST/api/webhooks/takapay
{
"app": "TakaPay",
"provider": "bkash",
"kind": "received",
"trxId": "BKH8X2K1M",
"amount": 1490,
"counterparty": "01711111111",
"receivedAt": "2026-08-19T15:00:00.000Z"
}