Vietnamese QR banking

Overview

Vietnamese QR banking is one of them most convenient way for Vietnamese customers to pay via scanning QR code by using their online banking app. A payment is credited immediately after a customer confirms the withdrawal by entering OTP or predefined payment code within secure environment of the app. Purchases through this method can be performed by using Payment Page and Gate.

General information

Payment method type Payments by using QR code
Countries and regions VN
Payment currencies VND
Currency conversion
Purchases +
Payouts
Stored credentials payments
Full refunds To request full refund contact the ECommPay technical support
Partial refunds
Chargebacks
Notes The amounts for VND currency are specified in the major currency units (without fractional part)
Onboarding and access fee Refer to your key account manager ECommPay

Interaction diagram

Payment processing by using the Vietnamese QR banking payment method requires merchant's web service, one of ECommPay interfaces, and the ECommPay payment platform, as well as provider's the technical facilities.



Operations support

Interfaces Amounts, VND
Payment Page CMS Plug-ins Gate Dashboard (Old Dashboard) minimum maximum
Purchases + + 2 000 20 000 000 000

Processing scenarios

In the Vietnamese QR banking method to perform a purchase operation customer needs to scan QR code by using bank mobile application.

Figure: Purchase by using Payment Page procedure diagram



Figure: Payout by using Gate procedure diagram



Supported banks

The section provides information about the banks the Vietnamese QR banking method supports to process purchases. Banks have their own IDs, which are used to initiate purchases by using Gate.

The following table contains information about banks and their IDs. The information is presented for informational purposes only, therefore for detailed information about banks and their IDs, contact your ECommPay Key Account Manager or use the /v2/info/banks/vietnam-qr/sale/list request that belongs the /v2/info/banks/{payment_method}/{operationType}/list request group.

The request must contain the project and payment IDs, signature, currency, and payment amount, as shown in the example. It is important to specify real payment data, but if the payment has not yet been generated, you can specify a random value for the payment ID in the request.

Figure: Example of requesting a list of banks

{
  "general": {
    "project_id": 200,
    "payment_id": "ORDER_155860015",
    "signature": "K6jllym+PtObocZtr345st...=="
  },
  "payment": {
    "amount": 1000,
    "currency": "VND"
  }
}
Table 1. List of banks
Bank ID
Agribank 139
An Binh Commercial Joint Stock Bank (ABBANK) 465
Bac A Commercial Joint Stock Bank (Bac A Bank) 439
Bank for Investment and Development of Vietnam 136
Eximbank Vietnam 135
Indovina Bank Ltd. (IVB) 569
Joint Stock Commercial Bank for Foreign Trade of Vietnam 133
Military JSC Bank (MB) 447
Nam A commercial joint stock bank (NamABank) 452
Nam Viet Bank (NaviBank) 441
Orient Commercial Bank (PhuongDong Bank) 467
Saigon Hanoi Commercial Joint Stock Bank (SHB) 451
Sai Gon Joint Stock Commercial Bank (SCB) 460
Tien Phong Commercial Joint Stock Bank (TienPhongBank) 445
VietinBank 134
Vietnam International Bank 138
Vietnam Maritime Commercial Joint Stock Bank (MaritimeBank) 440
Vietnam Prosperity Bank (VPBank) 449
WeChat Pay 570

The sections that follow provide detailed information about what you need to perform payments and how you can analyze the information on payments and operations.

Purchase by using Payment Page

General information

In the Vietnamese QR banking method, to perform a purchase by using Payment Page, the merchant web service should send a request with all the required parameters and signature to the ECommPay URL and get the callback with the payment result from the payment platform. When opening Payment Page, you can have Payment Page opened with the Vietnamese QR banking method selected. For more information about preselecting payment methods, see in Preselecting payment method.

The full sequence and particularities of the purchase process are provided below.



Figure: Purchase sequence in the Payment Page method:

  1. Customer initiates purchase by using the web service.
  2. The merchant web service sends to the specified ECommPay URL the purchase request for processing the purchase by using Payment Page.
  3. The payment platform receives the request for processing the purchase by using Payment Page.
  4. The payment platform performs the initial request processing that involves validation of the required parameters and signature.
  5. Requested Payment Page is generated into the ECommPay payment platform as specified in the project settings and the request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects the Vietnamese QR banking payment method and agrees to use the method (or accepts the method already selected on Payment Page and agrees).
  8. The list of supported banks is displayed to the customer on the Payment Page.
  9. The customer selects bank.
  10. The payment platform receives the purchase request for payment processing in the Vietnamese QR banking service.
  11. The payment platform performs the internal purchase request processing and sends it to the Vietnamese QR banking service.
  12. The purchase request is processed on the Vietnamese QR banking side.
  13. The Vietnamese QR banking service generates the data for the displaying QR code to the customer and sends it to the payment platform.
  14. The payment platform sends to Payment Page the data for the displaying QR code to the customer.
  15. The QR code is displayed to the customer on Payment Page.
  16. The customer scans QR code by using mobile application of the bank and completes all the required steps.
  17. The payment is processed on the Vietnamese QR banking side.
  18. Vietnamese QR banking service sends email with the payment result to the customer.
  19. Vietnamese QR banking service sends the payment result notification to the payment platform.
  20. The payment platform sends the callback to the web service.
  21. The payment platform sends payment results to Payment Page.
  22. A page with the payment result information is displayed to the customer.

The sections that follow discuss in more details the request format and the Payment Page parameters to use in the Vietnamese QR banking payment method and provide the information on the format of callbacks with payment results. For the general information on how to use the API, see Payment Page API Description.

Request format

There are several things you need to consider when using the Vietnamese QR banking method:

  1. You must provide values for the basic minimum of parameters. Listed below are the parameters that are mandatory for any payment method:
    • project_id—the project ID obtained from ECommPay
    • payment_id—payment ID unique within the project
    • payment_currency—payment currency in ISO-4217 alpha-3 format
    • payment_amount—payment amount
    • customer_id—customer ID unique within the project
  2. The currency of payment can only be VND.
  3. If you need to have payment form displayed with the Vietnamese QR banking method selected, set the force_payment_method parameter to vietnam-banks-qr.
  4. Additionally it is possible to set the language (English or Vietnamese) of the email with the payment result. By default the Vietnamese language is used. To change it to English, pass en in the parameter customer.language.
  5. If required, you can also add any other additional parameters Payment Page supports.
  6. After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign a payment request, see Signature generation and verification.

Thus, a correct payment request in the Vietnamese QR banking method must include project, customer, and payment IDs, the currency and the amount of a payment in the appropriate currency, as shown in the following example:

EPayWidget.run(
    { project_id: 0, 
      payment_id: 'X03936', 
      customer_id: 'user123',
      payment_amount: 3 000, 
      payment_currency: 'VND', 
      customer_id: 'customer1',
      signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y1Y4HASCQ9vySO\/RL
                               CvhtT4DqtVUkDJrOcZzUCwX6R\/ekpZhkIQg=="
    }
)

For information about all parameters available in the Vietnamese QR banking method , see Payment Page invocation parameters.

Callback format

The Vietnamese QR banking method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.

The following is the example of a callback with an information about successful 2 000 VND purchase made by the 1 customer in the 200 project.

Figure: Example of a successful purchase callback

{
        "project_id": 200,
        "payment": {
            "id": "TEST_1561223423_VND1",
            "type": "purchase",
            "status": "success",
            "date": "2019-07-01T07:54:16+0000",
            "method": "Vietnam banks-qr",
            "sum": {
                "amount": 2000,
                "currency": "VND"
            },
            "description": "TEST_1561714332889"
        },
        "customer": {
            "id": "1",
            "phone": "0914695523"
        },
        "operation": {
            "id": 39811000003358,
            "type": "sale",
            "status": "success",
            "date": "2019-07-01T07:54:16+0000",
            "created_date": "2019-07-01T07:53:19+0000",
            "request_id": "1fb651fe71b5db9db3d6382c995c8f51b08785ff",
            "sum_initial": {
                "amount": 2000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 2000,
                "currency": "VND"
            },
            "provider": {
                "id": 1283,
                "payment_id": "56366711",
                "auth_code": "",
                "endpoint_id": "TCB"
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "YreiJ0aXQgDVuo74tsBXpZ8tmJi0IRVCyFucJ1aYk4mjybiVRcd/0M
                                       iUb8E9twm5IDxiZ8C2sqcuuncjkbazWKg=="
    }
}

The following is the example of a callback for a purchase declined due to amount limit.

Figure: Example of a declined purchase callback

{
        "project_id": 200,
        "payment": {
            "id": "TEST_1561223423_VND1",
            "type": "purchase",
            "status": "decline",
            "date": "2019-07-01T07:54:16+0000",
            "method": "Vietnam banks-qr",
            "sum": {
                "amount": 1000,
                "currency": "VND"
            },
            "description": "TEST_1561714332889"
        },
        "customer": {
            "id": "1",
            "phone": "0914695523"
        },
        "operation": {
            "id": 39811000003358,
            "type": "sale",
            "status": "success",
            "date": "2019-07-01T07:54:16+0000",
            "created_date": "2019-07-01T07:53:19+0000",
            "request_id": "1fb651fe71b5db9db3d6382c995c8f51b08785ff",
            "sum_initial": {
                "amount": 1000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 1000,
                "currency": "VND"
            },
            "provider": {
                "id": 1283,
                "payment_id": "56366711",
                "auth_code": "",
                "endpoint_id": "TCB"
            },
            "code": "20101",
            "message": "Decline due to amount or frequency limit"
        },
        "signature": "YreiJ0aXQgDVuo74tsBXpZ8tmJi0IRVCyFucJ1aYk4mjybiVRcd/0M
                                       iUb8E9twm5IDxiZ8C2sqcuuncjkbazWKg=="
    }
}

Related topics

The following topics might be useful when implementing payments by using Payment Page:

Purchase by using Gate

General information

In the Vietnamese QR banking method, when processing a purchase by using Gate, the merchant web service is required to do the following:

  1. Send a request with all the required parameters and signature to the ECommPay URL.
  2. Provide the displaying of the QR code on the web service side.
  3. Get the callback with the payment result from the payment platform.

The following diagram provides the detailed picture of the payment processing procedure.



Figure: Purchase by using Gate

  1. Customer initiates purchase on the merchant web service by using Vietnamese QR banking method.
  2. The web service sends the request for processing the purchase by using Gate to the specified ECommPay URL.
  3. The payment platform receives the request for processing the purchase by using Gate.
  4. The payment platform performs the initial request processing that includes validation of the required parameters and signature.
  5. The payment platform sends to the web service response with request receipt confirmation and correctness check result.
  6. The payment platform performs the internal payment request processing and sends it to the Vietnamese QR banking service.
  7. The purchase request is processed on the Vietnamese QR banking side.
  8. The Vietnamese QR banking service generates the data for the displaying QR code to the customer and sends it to the payment platform.
  9. The payment platform sends to the web service the callback that delivers the data for the displaying QR code to the customer.
  10. The QR code is displayed to the customer on the web service side.
  11. The customer scans QR code by using mobile application of the bank and completes all the required steps.
  12. The payment is processed on the Vietnamese QR banking side.
  13. The Vietnamese QR banking service sends email with the payment result to the customer.
  14. The Vietnamese QR banking service sends the payment result notification to the payment platform.
  15. The payment platform sends the callback to the web service.
  16. The customer receives the payment result from the web service.

The sections that follow discuss in more details the request format and the Gate parameters to use in the Vietnamese QR banking payment method and provide the information on the format of callbacks with purchase results.

Request format

There are several things you must consider when using purchase requests in the Vietnamese QR banking method:
  1. You perform a purchase by sending the request to /v2/payment/banks/vietnam-qr/sale by using HTTP method POST. This is a bank payment request group /v2/payment/banks/{payment_method}/sale
  2. The following objects and parameters must be specified in any request:
    • general—object that contains general request identification information:
      • project_id—the project ID obtained from ECommPay
      • payment_id—payment ID unique within the project
      • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification);
    • payment—object that contains customer information:
      • amount—purchase amount
      • currency—purchase currency in ISO-4217 alpha-3 format
    • customer—object that contains customer information:
      • id—the ID of the customer within the merchant project
      • email—email address
      • ip_address—IP address
    • account—object that contains customer account information:
      • bank_id—bank identifier
  3. The currency of payment can only be VND.
  4. Additionally it is possible to set the language (English or Vietnamese) of the email with the payment result. By default the Vietnamese language is used. To change it to English, pass en in the parameter customer.language.
  5. If required, you can also add any other additional parameters Gate supports.
  6. After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign a payment request, see Signature generation and verification.

Thus, a correct payment request in the Vietnamese QR banking method must include project and payment IDs, currency and amount of the purchase, customer ID, email, and IP address, bank identifier, as shown in the following example:

Figure: Example of a purchase request

{
    "general": {
        "project_id": 603,
        "payment_id": "test_payment_1",
        "signature": "U5LCm6489ly9cXCKIVBNV0mFr4XiCruECSyQEbT1hSXJ70zuH...=="
    },
    "payment": {
        "amount": 3000,
        "currency": "VND"
    },
    "account": {
        "bank_id": 505
    },
    "customer": {
        "email": "Betelgeuse@gmail.com",
        "ip_address": "248.121.176.220",
        "id": "123"
    }
}

Formats of the data displayed to customers

To complete the payment, customers must get the payment QR code from you. The QR code data is sent in the callback from the payment platform in the qr_code parameter as an image encoded in Base64. Therefore, before displaying the QR code, you need to accept and process such callback.

This callback is sent from the ECommPay payment platform to the URL specified in the merchant project settings to get the final result not an asynchronous response, as in case with customer redirection data. The payment status in this callback is awaiting customer action until the payment is completed by the customer.

The following is the callback fragment containing payment QR code data.

"qr_code": "iVBORw0KGgoAAAANSUhEUgAAAG8AAABvAQMAAADYCwwjAAAABlBMVEX///
8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABG0lEQVQ4jdXTsY3FIAwGYCMXdLBApKxBx0qZ4AILJCvRsQYSC7x0FCg
+J3l3rwPahyj4CiT7lw3wjUcTOYNOIlHqUgH6MIHMDgZo8yZhMbiXIfpQweZxa\nsIhAjqbD/oU2SD3u5nM97/9Bq/vEnT8hNm
gLnRCEjQ7M8JJxwqG/N1CmyLMGycTcLN98l9R6CBY3lW1qCw5ixToNUDBJTFL9nc4HRaiMimT9AB1TBzjGuHnKbJJZWcfkgj4k
qlL4AmUlcN3tk8l8bwmsC6yTxEnHcgH3og+lcEj8ooRxT7vLvDkcEqf18TCpCTvWp+8C3vk8JMOA7yX8ZnbEXqqa+HHEHfK\nG
8AaBshVcZKxPovWJve7E4eZlr/2G/y+8wt5N/rpIH9KkwAAAABJRU5ErkJggg=="

Callback format

The Vietnamese QR banking method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.

The following is the example of a callback with an information about successful 2 000 VND purchase made by the 1 customer in the 200 project.

Figure: Example of a successful purchase callback

{
        "project_id": 200,
        "payment": {
            "id": "TEST_1561223423_VND1",
            "type": "purchase",
            "status": "success",
            "date": "2019-07-01T07:54:16+0000",
            "method": "Vietnam banks-qr",
            "sum": {
                "amount": 2000,
                "currency": "VND"
            },
            "description": "TEST_1561714332889"
        },
        "customer": {
            "id": "1",
            "phone": "0914695523"
        },
        "operation": {
            "id": 39811000003358,
            "type": "sale",
            "status": "success",
            "date": "2019-07-01T07:54:16+0000",
            "created_date": "2019-07-01T07:53:19+0000",
            "request_id": "1fb651fe71b5db9db3d6382c995c8f51b08785ff",
            "sum_initial": {
                "amount": 2000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 2000,
                "currency": "VND"
            },
            "provider": {
                "id": 1283,
                "payment_id": "56366711",
                "auth_code": "",
                "endpoint_id": "TCB"
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "YreiJ0aXQgDVuo74tsBXpZ8tmJi0IRVCyFucJ1aYk4mjybiVRcd/0M
                                       iUb8E9twm5IDxiZ8C2sqcuuncjkbazWKg=="
    }
}

The following is the example of a callback for a purchase declined due to amount limit.

Figure: Example of a declined purchase callback

{
        "project_id": 200,
        "payment": {
            "id": "TEST_1561223423_VND1",
            "type": "purchase",
            "status": "decline",
            "date": "2019-07-01T07:54:16+0000",
            "method": "Vietnam banks-qr",
            "sum": {
                "amount": 1000,
                "currency": "VND"
            },
            "description": "TEST_1561714332889"
        },
        "customer": {
            "id": "1",
            "phone": "0914695523"
        },
        "operation": {
            "id": 39811000003358,
            "type": "sale",
            "status": "success",
            "date": "2019-07-01T07:54:16+0000",
            "created_date": "2019-07-01T07:53:19+0000",
            "request_id": "1fb651fe71b5db9db3d6382c995c8f51b08785ff",
            "sum_initial": {
                "amount": 1000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 1000,
                "currency": "VND"
            },
            "provider": {
                "id": 1283,
                "payment_id": "56366711",
                "auth_code": "",
                "endpoint_id": "TCB"
            },
            "code": "20101",
            "message": "Decline due to amount or frequency limit"
        },
        "signature": "YreiJ0aXQgDVuo74tsBXpZ8tmJi0IRVCyFucJ1aYk4mjybiVRcd/0M
                                       iUb8E9twm5IDxiZ8C2sqcuuncjkbazWKg=="
    }
}

Related topics

The following topics might be useful when implementing payments through Gate:

Analysis of payments results

As with other payment methods ECommPay offers, when using the Vietnamese QR banking method, you have several options to analyse the information about payments and operations performed by using the method—alone or in conjunction with other methods.

You can load and analyse all the necessary information in Dashboard, for instance you can use the analytic panels on the Analytics tab to this end.

Also, you can export the information for further analysis by using third party analytical tools. The following options are available:

  • Dashboard allows you to download reports in CSV and XLS formats—by using the tools on the Payments tab. You can perform export as a one-time download to your local computer or have payment data regularly exported and delivered to email addresses you specify.
  • Data API allows you to have payment information exported in JSON format and delivered to a URL you specify. The payment information is exported by using the /operations/get queries.

If you have any further questions regarding payment data analysis, contact ECommPay technical support.