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

statusWhen to fulfil
pendingNo — waiting for payment
verifyingNo — TrxID in, SMS not matched yet
confirmedMoney received — fulfil, then POST /confirm
verifiedFinal — order confirmed by you
failedNo — amount mismatch or bad TrxID
expiredNo — 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.