Bank Notification Parser (Vietnam) API
Parse balance-change SMS and app notifications of Vietnamese banks: amount +/−, balance, time, masked account, transfer content and your order code.
Send the text of a "biến động số dư" SMS, push or e-mail notification from a Vietnamese bank (Vietcombank, VietinBank, BIDV, Agribank, Techcombank, MB, ACB, VPBank, TPBank, Sacombank…) and get the bank, direction (in / out), amount, balance after the transaction, time (ISO, Vietnam time), the account masked to its last 4 digits, the transfer content (nội dung chuyển khoản) as written and normalised (upper case, no accents, like banks send it) and the bank reference (FT…, Ref). The parser works on keywords and number formats rather than one fixed template per bank, so unknown or changed templates still give partial results with a confidence and warnings.
Extract your order code from the content with prefix (e.g. DH finds DH1234, "DH 1234", "DH-1234") or a pattern (regular expression, up to 100 characters). Send orders ([{"code": "DH1234", "amount": 500000}]) to match the payment: by code first, then by a unique amount, with status matched / underpaid / overpaid and the difference. Batch up to 100 messages with messages; the unmatched orders are listed.
This is the core of a self-hosted "auto-confirm bank transfer" flow (SMS forwarded from an Android phone, a mail hook, a bank notification webhook). Nothing is stored or logged; the account number is masked in the answer.
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
text | body|query | string | yes | The notification text (max 2,000 characters). Or messages: array of up to 100 texts. | |
prefix | body|query | string | no | Order code prefix to extract from the content, e.g. DH (letters / digits, max 12). | |
pattern | body|query | string | no | Regular expression for the order code instead of prefix (max 100 characters, no nested quantifiers). | |
bank | body|query | string | no | Bank when the text does not name it (VietQR code VCB, ICB, BIDV, MB…, name or BIN). | |
orders | body | array | no | Expected payments [{"code", "amount", "id"?}] (max 1,000) to match against. | |
expected_amount | body|query | number | no | Single expected amount (without orders): status matched / underpaid / overpaid. |
Example
curl -X POST "https://apibox.io.vn/v1/vn-bank-notify" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"MBBank: TK 07xxx123|GD: +350,000VND 10/11/26 09:15 |SD: 2,350,000VND|ND: DH777 chuyen khoan","prefix":"DH"}'const res = await fetch('https://apibox.io.vn/v1/vn-bank-notify', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"text": "MBBank: TK 07xxx123|GD: +350,000VND 10/11/26 09:15 |SD: 2,350,000VND|ND: DH777 chuyen khoan",
"prefix": "DH"
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/vn-bank-notify",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"text": "MBBank: TK 07xxx123|GD: +350,000VND 10/11/26 09:15 |SD: 2,350,000VND|ND: DH777 chuyen khoan", "prefix": "DH"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/vn-bank-notify');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"text":"MBBank: TK 07xxx123|GD: +350,000VND 10/11/26 09:15 |SD: 2,350,000VND|ND: DH777 chuyen khoan","prefix":"DH"}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"bank": {
"code": "MB",
"bin": "970422",
"short_name": "MBBank",
"name": "Ngân hàng TMCP Quân đội"
},
"direction": "in",
"amount": 350000,
"signed_amount": 350000,
"currency": "VND",
"amount_text": "GD: +350,000VND",
"balance": 2350000,
"account_masked": "****7123",
"account_last4": "7123",
"time": "2026-11-10T09:15:00+07:00",
"time_text": "10/11/26 09:15",
"content": "DH777 chuyen khoan",
"content_normalized": "DH777 CHUYEN KHOAN",
"reference": null,
"order_code": "DH777",
"confidence": 1,
"warnings": []
}
Use cases
- Confirm bank-transfer orders automatically from forwarded SMS
- Feed balance notifications into accounting without a paid gateway
- Match incoming transfers to invoices by order code and amount
- Normalise transfer contents that banks truncate or strip of accents
FAQ
Which banks are supported?
The parser reads the common keywords (TK, GD, PS, SD, ND, Ref…) used by all major Vietnamese banks, and recognises the bank from its name in the text or from the bank parameter. Templates that change still parse partially, with warnings.
Is my data stored?
No. Messages are parsed in memory for the request only, and the account number is returned masked (last 4 digits).
How are orders matched?
By the order code found in the content (separators and accents ignored), otherwise by a unique expected amount. The status tells whether the amount is exact, too low or too high.
Related APIs
JSON Validator
Check JSON syntax with exact line and column of errors, and validate data against a JSON Schema (draft 4, 7, 2019-09 or 2020-12).
{ }JSON Formatter
Pretty print JSON with 0-8 spaces or tabs, minify it, or sort object keys recursively. Syntax errors are reported with line and column.
CSVCSV to JSON
Convert CSV into an array of JSON objects using the header row, with delimiter auto-detection, number and boolean typing, and row-level errors.