How automatic TrxID verification works, step by step

What actually happens between the customer pressing "Send Money" and your order turning paid — and why nobody has to check it by hand.

AIO ePay team · · 2 min read

Every bKash, Nagad, Rocket or Upay payment ends with two messages: one on the customer's phone ("Send Money successful, TrxID 9KD7A1B2C3") and one on yours ("You have received Tk 500.00 … TrxID 9KD7A1B2C3"). The TrxID is the same in both. That single shared code is what makes automatic verification possible.

The four moments

1. The payment is created. Your website asks the gateway for a payment of, say, ৳500 for order 1001. The customer goes to the checkout page.

2. The customer pays and types the TrxID. They choose bKash, see your number (drawn as a picture), send the money from their own app and copy the TrxID from their confirmation SMS into the box. The payment is now processing.

3. Your phone forwards the SMS. On the Android phone with your bKash SIM, the Pay Sync app sees the "You have received" message and sends it to your server — signed, so nobody else can post fake messages to it.

4. The server matches. It reads the provider, amount, sender, balance and TrxID from the SMS and looks for a payment that fits:

  • the same TrxID, ignoring upper and lower case;
  • an amount that covers what is due;
  • an SMS that is not older than the payment;
  • the number that received it belongs to the method the customer chose;
  • the SMS has not paid anything else before.

If all of that is true, the payment is completed. Your website receives a signed webhook and the customer is sent back to your thank-you page.

What if the SMS is late?

Mobile networks are not perfect. If the SMS arrives two minutes after the customer typed the TrxID, nothing breaks: the payment simply waits, and the checkout page keeps checking. The moment the SMS arrives, it completes. If the phone was offline, the app sends its queue when the internet returns.

What if the customer typed it wrong?

They get a few tries. A wrong TrxID never matches anything, so it can't pay the wrong order.

Why this is safer than screenshots

A screenshot can be edited. A TrxID typed by the customer has to match a message that really arrived on your phone, from the provider's sender, with a balance that adds up. That is a much harder thing to fake — and the fake-SMS shield covers the rest.

Read next

See it confirm a real payment

Tell us about your shop or website. We will show you a live payment going from the customer's phone to a paid order.