From 3493880a1567b57971bca51dce7012000917af30 Mon Sep 17 00:00:00 2001 From: Abhishek Prajapati <81859210+appu-46@users.noreply.github.com> Date: Sun, 19 Jul 2026 16:08:08 +0530 Subject: [PATCH 1/2] Update merchant_regex for HDFC UPI rules This will allow the app to parse merchant for transactions done my HDFC UPI Credit Card. --- backend/internal/catalog/content/rules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/internal/catalog/content/rules.json b/backend/internal/catalog/content/rules.json index 24edbb2..7468091 100644 --- a/backend/internal/catalog/content/rules.json +++ b/backend/internal/catalog/content/rules.json @@ -56,7 +56,7 @@ "sender_emails": ["alerts@hdfcbank.bank.in", "alerts@hdfcbank.net"], "subject_contains": "UPI txn", "amount_regex": "Rs\\.\\s*([\\d,]+(?:\\.\\d+)?)", - "merchant_regex": "VPA \\S+\\s+(?:\\(([^)]*)\\)|(.*?))\\s+on\\s", + "merchant_regex": "(?:to\s+\S+\s+(.+?)\s+on\s+\d{2}-\d{2}-\d{2}|Paid to\s*([^.@<]+)|VPA\s+\S+\s+(?:\(([^)]*)\)|(.*?))\s+on\b)", "currency_regex": "", "source": { "type": "UPI", "label": "HDFC UPI", "bank": "HDFC" } }, From be62d0f87c5a023233ca052327491aa3b8dc2ee1 Mon Sep 17 00:00:00 2001 From: Abhishek Prajapati <81859210+appu-46@users.noreply.github.com> Date: Sun, 19 Jul 2026 16:13:48 +0530 Subject: [PATCH 2/2] Test email to verify updated HDFC rule --- ...fc-upi-rupay_diagnostic-sample.rule.fixture | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/data/rule-emails/bank_hdfc-upi-rupay_diagnostic-sample.rule.fixture diff --git a/tests/data/rule-emails/bank_hdfc-upi-rupay_diagnostic-sample.rule.fixture b/tests/data/rule-emails/bank_hdfc-upi-rupay_diagnostic-sample.rule.fixture new file mode 100644 index 0000000..10d974b --- /dev/null +++ b/tests/data/rule-emails/bank_hdfc-upi-rupay_diagnostic-sample.rule.fixture @@ -0,0 +1,18 @@ +--- +rule: "HDFC UPI" +sender: "alerts@hdfcbank.net" +subject: "❗ You have done a UPI txn. Check details!" +expected: + amount: "40.00" + merchant: "Redacted Merchant" + currency: "" +--- +Dear Customer,

+Rs.40.00 has been debited from your HDFC Bank RuPay Credit Card XX0000 +to redacted@upi Redacted Merchant on 19-01-26. +Your UPI transaction reference number is REDACTED.

+ +If you did not authorize this transaction, please report it immediately by calling REDACTED Or SMS BLOCK CC XXXX to REDACTED.

+ +Warm Regards,
+HDFC Bank \ No newline at end of file