Transaction Verification

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:

SyncPay BD ensures each transaction is verified only once. Duplicate attempts are automatically rejected.

Verification Flow

1

Customer Pays

Customer sends money from bKash/Nagad/Rocket/Upay to your merchant number and obtains a Transaction ID.

2

Server Calls API

Send a POST request containing trx_id, amount, and provider to the SyncPay BD API.

3

SyncPay Checks SMS Log

Our Android forwarder agent matches real SMS data against your payment invoice parameters.

4

Returns Response

Confirm the order when verified: true. Prompt the customer when false.

API Endpoint

POST/verify

Request Body

ParameterTypeDescription
trx_idstringMFS Transaction ID (e.g. 8J1B2C3K4L)required
amountnumberExpected payment amount (BDT)required
providerstringbKash | Nagad | Rocket | Upayrequired
tolerancenumberAmount tolerance in BDT (default: 0)optional
invoice_idstringSyncPay 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

CodeDescription
TRX_NOT_FOUNDTransaction ID not found in telephony database
AMOUNT_MISMATCHReceived amount does not match expected amount
PROVIDER_MISMATCHPayment provider mismatch
ALREADY_USEDThis transaction ID has already been verified
EXPIREDTransaction 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.

In the event of network timeouts, requests can safely be retried — verified transactions return the cached verification response.