Your QR will appear hereEnter receiving details to begin
VietQR NAPAS 247
BK
Receiving bank—
Account number
—
Displayed name—
Amount—
Payment note—
Before transferring, check the bank, recipient and amount in your banking app. A QR code does not confirm successful payment.
Private by designQR codes are generated on-device
Quick and simpleNo login required
Easy to shareDownload a sharp PNG image
DEVELOPER INTEGRATION
Add VietQR to any website with two HTML tags
Use the same QR engine as this page. Paste one JavaScript URL and a container div; the widget checks required fields and shows clear errors automatically.
No backend requiredAutomatic validationEnglish / Vietnamese
<script> + <div>vietnam-bank.com/embed.v1.js
01 / QUICK START
Copy, edit and embed
Paste this HTML
Copy the script tag once into your page, then copy the div into the section where the QR should appear.
Replace the sample receiving account
Change the BIN and account number to details you have verified. Only these two fields are required.
Publish your page
The widget verifies the BIN through our public bank API, then builds the QR on the visitor's device. Missing or invalid fields display an error, never a misleading QR.
Demo data only: 970436 and 1234567890 are sample values. Replace them with a verified receiving bank and account before going live.
Add amount, note and presentation options
Optional attributes may be omitted entirely. If supplied, they must be valid. For instance, omitting amount means the payer enters the amount; setting data-amount="0" produces an error.
Embed JavaScript reads the data-* attributes on each .vietnam-bank_com element.
Attribute
Required?
What it does
data-bank-bin
Required
Six-digit bank BIN that must exist in the bank directory.
data-account
Required
Account number: 1–19 ASCII letters or digits; leading zeros are preserved.
data-amount
Optional
Positive whole VND amount, at most 13 digits; leave it out to allow any amount.
data-purpose
Optional
Payment note: up to 25 ASCII characters after Vietnamese accent removal.
data-holder
Optional
Display-only recipient name, up to 80 characters. It does not verify ownership or appear in the VietQR payload.
data-lang
Optional
Interface language: en (default) or vi.
data-size
Optional
QR width from 160 to 600 pixels; default 256.
data-download
Optional
Show the download button: true (default) or false.
03 / FOR DEVELOPERS
Update a QR without reloading the page
For shopping carts or order pages, change the data-* attributes directly, or use the JavaScript API. Each widget updates independently.
JavaScript · Update an existing widget
// Inside an async checkout handler, after embed.v1.js has loaded:
async function updateCheckoutQR() {
const widget = document.querySelector('#payment-qr');
widget.setAttribute('data-amount', '250000'); // auto-refresh
// Or update several fields through the JavaScript API:
return window.VietnamBankQR.update(widget, {
amount: '250000', purpose: 'ORDER 456'
});
}
The old QR is cleared immediately while changed data is being checked. Call VietnamBankQR.update() with amount and purpose, or use setAttribute().
Public JavaScript API
mount(element), update(element, data), generate(data), download(element), destroy(element) and refresh(root).
generate() builds a local payload without checking the bank directory; mount() and update() verify the BIN through the API before displaying a QR.
Private QR generation
Only the 6-digit BIN is requested from vietnam-bank.com to look up the bank. Account number, amount, note and displayed name are not sent to our API by this widget.
Works without CSS dependencies: Widget styles live in Shadow DOM, so the embedding site does not need Bootstrap or our CSS. If the site uses a Content Security Policy, allow vietnam-bank.com for script-src and connect-src.
04 / BEFORE YOU PUBLISH
Frequently asked questions
Can I show more than one QR?
Yes. Include embed.v1.js once and add as many div.vietnam-bank_com elements as needed. Each widget uses its own bank, account, amount and error messages.
What happens if a required value is missing?
The widget shows which field is missing or invalid, and does not display a scannable QR until the problem is resolved.
Does the QR confirm the recipient or a completed payment?
No. Displayed recipient names are labels only. The payer must verify the recipient inside the banking app, and a QR is not proof that a transfer succeeded.
Can I use it on WordPress or another website builder?
Yes, if your website or platform allows custom script tags and HTML divs. Some hosted builders block third-party JavaScript or require an allowlist.
How to generate a VietQR payment code
Choose the receiving bank and enter its account number.
Optionally enter an amount, recipient display name and payment note.
Generate a VietQR code in your browser, then download the PNG or copy the QR payload.
Before paying, check the bank and recipient in your banking app. A generated code is not proof of payment.