Payments API
Payment status
Poll from your backend after checkout. When status is confirmed the money has arrived — fulfil the order, then POST /payments/:id/confirm to flip it to verified.
GET/api/payments/:id
Auth: Bearer JWT
curl
curl https://pay.brainicsoft.com/api/payments/987a15a8-c5d6-4e0d-94c6-523f8db581ee \
-H "Authorization: Bearer $TOKEN"GET/api/payments
Query: ?provider=bkash&status=pending&q=2041
status values
| status | When to fulfil |
|---|---|
| pending | No — waiting for payment |
| verifying | No — TrxID in, SMS not matched yet |
| confirmed | Money received — fulfil, then POST /confirm |
| verified | Final — order confirmed by you |
| failed | No — amount mismatch or bad TrxID |
| expired | No — link timed out |
Confirm the order
Once you read confirmed and have fulfilled the order, call confirm (API-key auth) to finalise it:
POST/api/v1/payments/:id/confirm
curl
curl -X POST https://pay.brainicsoft.com/api/v1/payments/987a15a8-c5d6-4e0d-94c6-523f8db581ee/confirm \
-H "X-Api-Key: $STORE_API_KEY"Idempotent — a second call on an already verified payment returns it unchanged.