currency.amount Dr. from A/c maskedlast_four on date. AvlBal:skip. Ref:upi_ref -Bank of Baroda
Rs.80.00 Dr. from A/c XX123456 on 12-11-2024. AvlBal:Rs1234.56cx. Ref:52211012345 -Bank of Baroda
Quick answer
A Bank of Baroda UPI credit SMS looks like this: “Rs.500.00 Cr. to redacted@ybl A/c XX789012 on 15-11-2024. AvlBal:Rs5678.90. Ref:987654321 -Bank of Baroda” It is a credit (money received) alert. The parts that change in each message are the amount, the last digits of the account or card, the date, the merchant or payee and a reference number; everything else is fixed text, so it can be matched with the regex below.
currency.amount Cr. to merchantName A/c maskedlast_four on date. AvlBal:skip. Ref:upi_ref -Bank of Baroda
Rs.500.00 Cr. to redacted@ybl A/c XX789012 on 15-11-2024. AvlBal:Rs5678.90. Ref:987654321 -Bank of Baroda
| Field | Extracted value |
|---|---|
| currency | Rs |
| amount | 500.00 |
| merchantName | redacted@ybl |
| masked | XX78 |
| last_four | 9012 |
| date | 15-11-2024 |
| skip | Rs5678.90 |
| upi_ref | 987654321 |
^\s*(?<currency>[A-Z]{2,4})\s*\.\s*(?<amount>[\d,]+(?:\.\d{1,2})?)\s* Cr\. to \s*(?<merchantName>[\s\S]+?)\s* A/c \s*(?<masked>[\s\S]+?)\s*\s*(?<last_four>\d{4})\s* on \s*(?<date>(?:\d{2}-[A-Z]{3}-\d{2,4}|\d{2}[A-Z]{3}\d{4}|[\dA-Z\-/ :T]{4,32}))\s*\. AvlBal:\s*(?<skip>[\s\S]+?)\s*\. Ref:\s*(?<upi_ref>[A-Za-z0-9\-]{4,32})\s* -Bank of Baroda/api/templates/bob-upi-credit-v1{
"id": "bob-upi-credit-v1",
"name": "BOB_UPI_CREDIT_V1",
"bank": {
"code": "BOB",
"name": "Bank of Baroda",
"slug": "bank-of-baroda"
},
"category": "UPI",
"payment_mode": "UPI",
"direction": "credit",
"keywords": [
"Cr. to",
"Bank of Baroda"
],
"template": "{currency}.{amount} Cr. to {merchantName} A/c {masked}{last_four} on {date}. AvlBal:{skip}. Ref:{upi_ref} -Bank of Baroda",
"regex": "^\\s*(?<currency>[A-Z]{2,4})\\s*\\.\\s*(?<amount>[\\d,]+(?:\\.\\d{1,2})?)\\s* Cr\\. to \\s*(?<merchantName>[\\s\\S]+?)\\s* A/c \\s*(?<masked>[\\s\\S]+?)\\s*\\s*(?<last_four>\\d{4})\\s* on \\s*(?<date>(?:\\d{2}-[A-Z]{3}-\\d{2,4}|\\d{2}[A-Z]{3}\\d{4}|[\\dA-Z\\-/ :T]{4,32}))\\s*\\. AvlBal:\\s*(?<skip>[\\s\\S]+?)\\s*\\. Ref:\\s*(?<upi_ref>[A-Za-z0-9\\-]{4,32})\\s* -Bank of Baroda",
"regex_flags": "i",
"sample": "Rs.500.00 Cr. to redacted@ybl A/c XX789012 on 15-11-2024. AvlBal:Rs5678.90. Ref:987654321 -Bank of Baroda",
"verified": true,
"source": "pennywise"
}currency.amount Dr. from A/c maskedlast_four on date. AvlBal:skip. Ref:upi_ref -Bank of Baroda
Rs.80.00 Dr. from A/c XX123456 on 12-11-2024. AvlBal:Rs1234.56cx. Ref:52211012345 -Bank of Baroda
Rs.500.00 Cr. to redacted@ybl A/c XX789012 on 15-11-2024. AvlBal:Rs5678.90. Ref:987654321 -Bank of Baroda — the parts that change are the amount, the last digits of the account or card, the date, the merchant or payee and a reference number.
First check that the message contains “Cr. to”, “Bank of Baroda”. Then match it with this case-insensitive regular expression: ^\s*(?<currency>[A-Z]{2,4})\s*\.\s*(?<amount>[\d,]+(?:\.\d{1,2})?)\s* Cr\. to \s*(?<merchantName>[\s\S]+?)\s* A/c \s*(?<masked>[\s\S]+?)\s*\s*(?<last_four>\d{4})\s* on \s*(?<date>(?:\d{2}-[A-Z]{3}-\d{2,4}|\d{2}[A-Z]{3}\d{4}|[\dA-Z\-/ :T]{4,32}))\s*\. AvlBal:\s*(?<skip>[\s\S]+?)\s*\. Ref:\s*(?<upi_ref>[A-Za-z0-9\-]{4,32})\s* -Bank of Baroda. The named groups give you the amount, the last digits of the account or card, the date, the merchant or payee and a reference number.
Yes. The template is checked automatically against a real, redacted message on every build, and the build fails if it stops matching.
Yes. Bank of Baroda sends 2 different UPI formats catalogued here; banks often keep older wordings alive alongside new ones, so a parser should try all of them.