Transaction Verification API
Backend-side advanced payment verification — directly verify customer MFS transactions from your backend server. Protected against double-spending, manipulated screenshots, and forged transactions.
Why Backend Verification?
Displaying transaction IDs on the frontend is not secure. Without backend verification:
- Fraudulent transaction IDs can be used to bypass checkout
- Manipulated or fake screenshots can be submitted
- The same transaction ID could be reused across multiple orders
Verification Flow
Customer Pays
Customer sends money from bKash/Nagad/Rocket/Upay to your merchant number and obtains a Transaction ID.
Server Calls API
Send a POST request containing trx_id, amount, and provider to the SyncPay BD API.
SyncPay Checks SMS Log
Our Android forwarder agent matches real SMS data against your payment invoice parameters.
Returns Response
Confirm the order when verified: true. Prompt the customer when false.
API Endpoint
Request Body
| Parameter | Type | Description | |
|---|---|---|---|
| trx_id | string | MFS Transaction ID (e.g. 8J1B2C3K4L) | required |
| amount | number | Expected payment amount (BDT) | required |
| provider | string | bKash | Nagad | Rocket | Upay | required |
| tolerance | number | Amount tolerance in BDT (default: 0) | optional |
| invoice_id | string | SyncPay invoice ID (if applicable) | optional |
POST /v1/verify Authorization: Bearer pf_live_xxx Content-Type: application/json { "trx_id": "8J1B2C3K4L", "amount": 1500, "provider": "bKash", "tolerance": 5 }
Verified Response
200 — verified: true{
"success": true,
"verified": true,
"trx_id": "8J1B2C3K4L",
"amount": 1500,
"provider": "bKash",
"sender": "01XXXXXXXXX",
"verified_at": "2024-01-15T12:01:43Z"
}Failed Response
200 — verified: false{
"success": true,
"verified": false,
"error": "Transaction not found",
"code": "TRX_NOT_FOUND"
}Error Codes
| Code | Description |
|---|---|
| TRX_NOT_FOUND | Transaction ID not found in telephony database |
| AMOUNT_MISMATCH | Received amount does not match expected amount |
| PROVIDER_MISMATCH | Payment provider mismatch |
| ALREADY_USED | This transaction ID has already been verified |
| EXPIRED | Transaction is older than the allowed 24-hour window |
Idempotency
Each trx_id can be verified only once. Attempting to verify the same trx_id again will result in an ALREADY_USED error, preventing double-spending.