UPDATE: currency amount debited from HDFC Bank maskedlast_four on date. Info: UPI-upi_ref-merchantName-skip. Avl bal:currency2 balance
Quick answer
An HDFC Bank UPI debit SMS follows this pattern: “Txn {currency}.{amount} On HDFC Bank Card {last_four} At {merchantName} by UPI {upi_ref} On {date} Not You? Call {support}/SMS BLOCK CC {last_four_digits} to {blockupi}” It is a debit (money spent or sent) 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.
Template
Txn currency.amount On HDFC Bank Card last_four At merchantName by UPI upi_ref On date Not You? Call support/SMS BLOCK CC last_four_digits to blockupi
Sample SMS
No public sample for this format yet. It comes from a production parser, so it has matched real messages — but there is no redacted copy to show.
Compiled regex
^Txn \s*(?<currency>[A-Z]{2,4})\s*\.\s*(?<amount>[\d,]+(?:\.\d{1,2})?)\s* On HDFC Bank Card \s*(?<last_four>\d{4})\s* At \s*(?<merchantName>[\s\S]+?)\s* by UPI \s*(?<upi_ref>[A-Za-z0-9\-]{4,32})\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* Not You\? Call \s*(?<support>[\s\S]+?)\s*/SMS BLOCK CC \s*(?<last_four_digits>[\s\S]+?)\s* to \s*(?<blockupi>[\s\S]+)\s*JSON/api/templates/hdfc-upi-v2
{
"id": "hdfc-upi-v2",
"name": "HDFC_UPI_V2",
"bank": {
"code": "HDFC",
"name": "HDFC Bank",
"slug": "hdfc-bank"
},
"category": "UPI",
"payment_mode": "UPI",
"direction": "debit",
"keywords": [
"hdfc",
"card",
"txn"
],
"template": "Txn {currency}.{amount} On HDFC Bank Card {last_four} At {merchantName} by UPI {upi_ref} On {date} Not You? Call {support}/SMS BLOCK CC {last_four_digits} to {blockupi}",
"regex": "^Txn \\s*(?<currency>[A-Z]{2,4})\\s*\\.\\s*(?<amount>[\\d,]+(?:\\.\\d{1,2})?)\\s* On HDFC Bank Card \\s*(?<last_four>\\d{4})\\s* At \\s*(?<merchantName>[\\s\\S]+?)\\s* by UPI \\s*(?<upi_ref>[A-Za-z0-9\\-]{4,32})\\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* Not You\\? Call \\s*(?<support>[\\s\\S]+?)\\s*/SMS BLOCK CC \\s*(?<last_four_digits>[\\s\\S]+?)\\s* to \\s*(?<blockupi>[\\s\\S]+)\\s*",
"regex_flags": "i",
"sample": null,
"verified": false,
"source": "iris"
}Other HDFC UPI formats
Amt Sent currency.amount From HDFC Bank A/C *last_fourTo merchantName On date Ref upi_ref Not You? Call support/SMS BLOCK UPI to blockupi
Sent currency.amount From HDFC Bank A/C maskedlast_four To merchantName On date Ref upi_ref Not You? Call support/SMS BLOCK UPI to blockupi
Frequently asked questions
What does an HDFC Bank UPI debit SMS look like?
It follows the pattern “Txn {currency}.{amount} On HDFC Bank Card {last_four} At {merchantName} by UPI {upi_ref} On {date} Not You? Call {support}/SMS BLOCK CC {last_four_digits} to {blockupi}”, where the placeholders in braces are the amount, the last digits of the account or card, the date, the merchant or payee and a reference number.
How do I parse an HDFC Bank UPI SMS?
First check that the message contains “hdfc”, “card”, “txn”. Then match it with this case-insensitive regular expression: ^Txn \s*(?<currency>[A-Z]{2,4})\s*\.\s*(?<amount>[\d,]+(?:\.\d{1,2})?)\s* On HDFC Bank Card \s*(?<last_four>\d{4})\s* At \s*(?<merchantName>[\s\S]+?)\s* by UPI \s*(?<upi_ref>[A-Za-z0-9\-]{4,32})\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* Not You\? Call \s*(?<support>[\s\S]+?)\s*/SMS BLOCK CC \s*(?<last_four_digits>[\s\S]+?)\s* to \s*(?<blockupi>[\s\S]+)\s*. 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.
Is this HDFC Bank SMS format verified?
It comes from a production SMS parser and matches real messages, but there is no public redacted sample to show yet.
Does HDFC Bank use more than one UPI SMS format?
Yes. HDFC Bank sends 4 different UPI formats catalogued here; banks often keep older wordings alive alongside new ones, so a parser should try all of them.