Skip to content
Paybob

SMS automation

SMS filter

Teach Paybob to recognise and read each payment method's SMS.

An SMS filter tells Paybob how to recognise one payment method's SMS and read the details from it. You need one filter for each kind of payment SMS you receive, such as bKash Personal or Nagad Agent.

Create a filter

Go to Automation → SMS Filter and click New Filter.

FieldWhat to enter
Payment Method (Label)A name for you, such as Bkash Personal.
Sender IDThe ID that links this filter to its gateway, such as bkash-personal. Use the sender ID of the gateway you're verifying. Lowercase letters, numbers and hyphens. It can't be changed later.
SMS SendersThe sender names or numbers the SMS come from, exactly as your phone shows them, such as bKash or 16247. Press Enter after each one. Letter case doesn't matter.
TypePersonal, Agent or Merchant, or leave empty for a generic format.
CurrencyThe currency the account receives amounts in. An SMS can only pay a payment in this currency.
SMS PatternsHow to read the message (see below).

Several filters can share a Sender ID, for example when one provider sends payments in two different formats, as long as they have the same type and currency.

SMS patterns

A pattern describes the message with placeholders where the values go. Paybob reads the values into these placeholders:

PlaceholderValueRequired
{amount}The amount receivedYes
{transaction_id}The provider's transaction IDYes
{from}The sender's phone numberNo
{balance}Your account balance after the payment. Needed for balance verificationNo
{reference}A reference the sender enteredNo
{datetime}The date and time in the SMSNo

You can also use your own placeholders, such as {fee}, to skip over text that changes from message to message. Placeholder names use lowercase letters, numbers and underscores.

Each pattern is either Short or Full.

A short pattern has one box per value. In each box, write the value's placeholder with the words around it in the SMS, so Paybob knows where to find it:

BoxExample
Amountreceived tk {amount}
Transaction IDtrxid {transaction_id}
Fromfrom {from}
Balancebalance tk {balance}

The boxes can be in any order and the SMS can have other text between them, so short patterns keep working when a provider adds a fee line or changes the wording slightly. A box with only a placeholder, such as {amount} on its own, is refused: it could capture any number in the message.

Use Extra text for anything else the SMS must contain, such as fee tk {fee} or a fixed phrase.

Full patterns

A full pattern is the whole SMS as one template:

Text
you have received tk {amount} from {from}. balance tk {balance}. trxid {transaction_id}

Click the placeholder chips under the box to insert them. Full patterns are stricter: the text around the placeholders must match closely, although Paybob tolerates extra sentences that providers add.

How matching works

  • Matching ignores letter case and extra spaces.
  • Every pattern in a filter must match the SMS. The values they capture are combined, and together they must include {amount} and {transaction_id}.
  • If filters for the same sender could read a message in different ways, the filter whose patterns match the most text wins. If two match equally well, the SMS is rejected rather than guessed.
  • Messages that need genuinely different patterns, such as two kinds of bank transfer, need separate filters.

Test your filter

Paste a real SMS into Create SMS on the SMS Data page with Entry Type set to Automatic. The preview shows exactly what Paybob reads from it, before you save anything.

Managing filters

The list shows each filter's Sender ID, its senders, Type, Currency and Status. Filter by type or status.

  • Edit changes a filter, including its Status. An Inactive filter is ignored: SMS that only match it aren't processed.
  • Delete removes the filter. SMS already stored keep their values but show "Unknown / Deleted Filter".

Keyword filter

Automation → Keyword Filter is a list of keywords sent to connected devices, alongside the senders from your active SMS filters. It applies to the whole installation.

Click New Keyword, enter a keyword such as bkash, and choose Active or Inactive. Keywords are stored in lowercase, each one only once, and only active keywords are sent to devices.

Permissions

SMS filters and the keyword filter each have their own view, create, update and delete permissions. See Staff and roles.