VietQR Documentation

website·Indexed 34 days ago

https://www.vietqr.io/

API and integration guides for VietQR, featuring tools for generating payment QR codes, account number lookup APIs, bank list APIs, and payment link creation. Includes integration instructions for platforms like WooCommerce, Haravan, and Sapo, as well as support for bank app deeplinks.

Tokens
3K
Snippets
17
Records
26
Agent score
71%

What's inside VietQR

  1. Integrate VietQR payment into Haravan

    To integrate VietQR into a Haravan store, you must first create a payment method in the Haravan admin panel. The name of this payment method must contain the word 'vietqr' (case-insensitive) for the integration to function correctly. After creating the payment method, you must add a specific script to the order processing section of the checkout page.
  2. Generate dynamic VietQR codes in Google Sheets

    You can generate dynamic VietQR codes in Google Sheets by combining bank details, account numbers, amounts, and transfer descriptions into a URL and passing that URL into the Google Sheets IMAGE(url) function. This allows the QR code to update automatically as the content of the referenced cells changes.
    =IMAGE("https://img.vietqr.io/image?<bank_id>&apikey=<your_api_key>&accountName=<name>&amount=<amount>&addInfo=<description>")
  3. Open a specific banking app using VietQR Deeplinks

    VietQR.io provides a unified deeplink service to open specific banking applications on mobile devices (Android and iOS). This reduces the manual effort for users to switch from a shopping app or website to their banking app for payment. To use this, the user must have the corresponding banking app installed on their device.
    <!-- Example: Open Vietcombank app -->
    <a href="https://dl.vietqr.io/pay?app=vcb">Open VCB App</a>
  4. Integrate VietQR payment into Sapo

    To integrate VietQR into a Sapo store, first create a VietQR payment method within the Sapo admin store. Then, add the Casso Pay script to the checkout page, customizing the script parameters with your specific bank details.
    <!-- Replace bank_name, account_number, account_name, and prefix with your own information -->
    <script src="https://vn.csscdn.net/casso-pay/sapo.js?bank_name=vpbank&account_number=790967023427&account_name=Nguyen Huu Hao&prefix=DH">
    </script>
  5. Create a custom VietQR Template

    For official projects, you can replace the default <TEMPLATE> parameter in the Quick Link with a custom template ID. To create a template:

    1. Register an account at my.vietqr.io.
    2. Create a new template.
    3. Customize the theme, logo, and colors to match your brand.
    4. Use the resulting Template ID in your Quick Link URL.
  6. Migration of Account Number Lookup API to bankHub

    The VietQR Account Number Lookup API is no longer available. This service has been migrated to the bankHub Pay Out API suite to comply with banking open API regulations. The bankHub Pay Out suite includes both Account Number Lookup and Money Transfer APIs for direct business account operations.
  7. Migrate to VietQR API v2

    VietQR API Version 2 is available at the endpoint https://api.vieqr.io/v2. Note the following breaking changes from v1:

    • In the /generate API, the format field has been renamed to template.
    • The template vietqr_net_2 has been renamed to compact.
    • Templates vietqr_net and text are no longer supported in v2.
    # API v2 Endpoint
    https://api.vieqr.io/v2
  8. Use VietQR Deeplinks for Bank App Autofill

    VietQR provides deeplinks that automatically fill payment information when opened in supported banking apps. The deeplink structure allows specifying the bank app, account number, amount, and description.
    # Example Deeplink for MBBank
    https://dl.vietqr.io/pay?app=mb&ba=22102025@icb&am=2000&tn=ck&bn=BAN%20VAN%20DONG%20CUU%20TRO%20TRUNG%20UONG&url=https://payos.vn
    
    # Example Deeplink for VietinBank iPay
    https://dl.vietqr.io/pay?app=icb&ba=22102025@icb&am=2000&tn=ck&bn=BAN%20VAN%20DONG%20CUU%20TRO%20TRUNG%20UONG&url=https://payos.vn
    
    # Example Deeplink for BIDV SmartBanking
    https://dl.vietqr.io/pay?app=bidv&ba=22102025@icb&am=2000&tn=ck&bn=BAN%20VAN%20DONG%20CUU%20TRO%20TRUNG%20UONG&url=https://payos.vn
    
    # Example Deeplink for ACB ONE
    https://dl.vietqr.io/pay?app=acb&ba=22102025@icb&am=2000&tn=ck&bn=BAN%20VAN%20DONG%20CUU%20TRO%20TRUNG%20UONG&url=https://payos.vn
    
    # Example Deeplink for OCB Omni
    https://dl.vietqr.io/pay?app=ocb&ba=22102025@vtb&am=2000&tn=ck
  9. Generate VietQR payment images using Quick Link

    Quick Link allows developers to generate a VietQR payment image by constructing a specific URL. The URL consists of a path containing the bank ID, account number, and template, followed by optional query parameters for amount, description, and account name.
    https://img.vietqr.io/image/<BANK_ID>-<ACCOUNT_NO>-<TEMPLATE>.png?amount=<AMOUNT>&addInfo=<DESCRIPTION>&accountName=<ACCOUNT_NAME>
    
    # Example:
    https://img.vietqr.io/image/vietinbank-113366668888-compact2.jpg?amount=790000&addInfo=dong%20gop%20quy%20vac%20xin&accountName=Quy%20Vac%20Xin%20Covid
  10. Configure Quick Link parameters

    When using the Quick Link URL, the following parameters and constraints apply:

    1. <BANK_ID>: Can be the bank's BIN code, common name, or NAPAS short name (e.g., 970415, Vietinbank, or ICB).
    2. <ACCOUNT_NO>: The recipient's account number (alphanumeric, max 19 characters). Supports Alias Names and Virtual Account Numbers.
    3. <TEMPLATE>: Defines the visual layout of the image. Available themes include:
      • compact2 (540x640): QR, logos, and transfer info.
      • compact (540x540): QR with VietQR, Napas, and bank logos.
      • qr_only (480x480): Simple QR code only.
      • print (600x776): QR, logos, and full transfer info.
      • loax (2583x3719): Optimized for payment/notification speakers.
    4. <AMOUNT>: Positive number, maximum 13 digits.
    5. <DESCRIPTION>: Transfer content, maximum 50 characters, no special characters.
    6. <ACCOUNT_NAME>: The name of the beneficiary to be displayed on the image (non-standard VietQR field).
  11. Add amount, description, and account name to VietQR Quick Link

    To include payment details in a VietQR image, append query parameters to the Quick Link URL. Supported parameters include amount for the payment value, addInfo for the description, and accountName for the account holder's name.
    https://img.vietqr.io/image/<BANK_ID>-<ACCOUNT_NO>-<TEMPLATE>.png?amount=<AMOUNT>&addInfo=<DESCRIPTION>&accountName=<ACCOUNT_NAME>
    
    Example:
    https://img.vietqr.io/image/vietinbank-113366668888-compact2.jpg?amount=1000&addInfo=dong%20qop%20quy%20vac%20xin&accountName=Quy%20Vac%20Xin%20Covid