Vietnamese ATM cards (NAPAS)

Overview

Introduction

Vietnamese ATM is a payment method which allows to process payments in Vietnamese dongs by using payment cards branded by NAPAS (a local payment service provider that connects to local participating banks) in Vietnam. Usual domestic cards in Vietnam are restricted to salary payment and cash withdrawal functions but with possibility to conduct domestic purchases via NAPAS payment provider. This method supports purchases, refunds and payouts. Purchases are processed by using two channels. Refer to your key account manager ecommpay to learn to which channel is applicable. Payouts are processed by using one channel.

This article provides information about working with the Vietnamese ATM method: general insights are presented in the Overview section, while information about the actions required to process payments and perform other actions is presented in the sections that follow.

General information

Payment method type bank payments
Payment instruments payments cards
Countries and regions VN
Payment currencies VND
Currency conversion
One-time purchases +
Credential-on-file purchases
Full refunds
Partial refunds to request full refund contact the ecommpay technical support
Payouts +
Chargebacks
Notes
  • Payment Page supports different bank selection options
  • the amounts for VND currency are specified without using the fractional part
Onboarding and access fee Refer to your key account manager ecommpay

Interaction diagram

Payment processing by using the Vietnamese ATM method involves the merchant's web service, one of ecommpay interfaces, the ecommpay payment platform, and technical facilities of the bank service.



Operations support

Various platform interfaces can be used to process payments and perform operations using the Vietnamese ATM method. Purchases can be processed by using Payment Page, Gate and Dashboard (using payment links), payouts—by using Gate and Dashboard. At the same time, regardless of the interfaces used, the following properties and limitations are applicable.

When working with the Vietnamese ATM the following properties and limitations are applicable.

Amounts, VND ¹
minimum minimum
Purchases 2,000 *

Channel 1: customer card limit

Channel 2: 20,000,000,000

Payouts 100,000 100,000,000
Note:
  1. For most banks minimum amount of the purchase is 2,000 VND, but there is an exception for the Vietcombank—20,000 VND.

Processing scenarios

To perform a purchase by using the Vietnamese ATM method, you need to redirect customer to the Vietnamese ATM service, while to initiate a payout, you need to notify the customer via the web service.

Scenarios for performing operations via the main interfaces of the payment platform correspond to those presented in the diagrams. Similarly, when additional features (such as payment links) are used, scenarios for performing operations also correspond to the specifics of those features.

At the same time, the specifics of working with the method include the necessity of selecting a bank for each payment. When Payment Page is used for payment processing, the customer usually selects a bank while already in the payment form. When Payment Page is opened with the method and bank preselected as well as when payments are initiated through Gate, the bank must be selected on the side of the web service and the identifier of this bank must be specified in requests. Possible options for bank selection when working with Payment Page are described in Purchase by using Payment Page, ways of using bank identifiers—in the next subsection, Supported banks.

At the same time, different options for selecting a bank are supported for payments by using this method; they are described in the Purchase by using Payment Page section of this article.

Supported banks

The following table lists the names and identifiers of banks supported by the Vietnamese ATM method. Keep in mind that this list is presented for informational purposes.

Table 1. Channel 1. List of banks
Bank ID Purchase Payout
Agribank 139 + +
An Binh Commercial Joint Stock Bank (ABBANK) 465 + +
ANZ bank 464 +
Asia Commercial Bank 150 + +
Bac A Commercial Joint Stock Bank (Bac A Bank) 439 + +
Bank for Investment and Development of Vietnam 136 + +
Bao Viet Bank 453 +
Citibank 454 +
Dai A Joint-stock Commercial Bank 466 + +
DongA Joint Stock Commercial Bank 130 + +
Eximbank Vietnam 135 + +
Global Petro Commercial Joint Stock Bank (GPBank) 444 + +
Global Trust Bank 459 +
HoChiMinh City Development Joint Stock Commercial Bank (HDBank) 448 + +
HSBC Vietnam 462 +
Joint Stock Commercial Bank for Foreign Trade of Vietnam (Vietcombank) 133 + +
KB Kookmin Bank 458 +
Kien Long Commercial Joint - Stock Bank 455 + +
LienVietPostBank 706 +
Military JSC Bank (MB) 447 + +
Nam A commercial joint stock bank (NamABank) 452 + +
Nam Viet Bank (NaviBank) 441 +
National Citizen Bank 442 +
Ocean Commercial One Member Limited Liability Bank (OceanBank) 450 + +
Orient Commercial Bank (PhuongDong Bank) 467 + +
Petrolimex Group Commercial Joint Stock Bank (PGBank) 443 + +
Public Bank Vietnam 3981 +
Sai Gon Joint Stock Commercial Bank (SCB) 460 + +
Sai Gon Thuong Tin Commercial Joint Stock Bank 131 + +
SAIGON Bank 137 + +
Saigon Hanoi Commercial Joint Stock Bank (SHB) 451 + +
SHINHAN bank 461 + +
SouthEast Asia Joint Stock Commercial Bank (SeaBank) 468 + +
Standard Chartered Bank 463 +
Tien Phong Commercial Joint Stock Bank (TienPhongBank) 445 + +
VietinBank 134 + +
Vietnam Asia Commercial Joint Stock Bank (VietA Bank) 446 + +
Vietnam International Bank 138 + +
Vietnam Maritime Commercial Joint Stock Bank (MaritimeBank) 440 + +
Vietnam Prosperity Bank (VPBank) 449 + +
Vietnam Public Joint-stock Commercial Bank 457 + +
Vietnam Technological and Commercial Joint- stock Bank 132 + +
Table 2. Channel 2. List of banks
Bank ID Purchase Payout
Agribank 139 + +
An Binh Commercial Joint Stock Bank (ABBANK) 465 + +
ANZ bank 464 +
Asia Commercial Bank 150 + +
Bac A Commercial Joint Stock Bank (Bac A Bank) 439 + +
Bank for Investment and Development of Vietnam 136 + +
Bao Viet Bank 453 +
Citibank 454 +
Dai A Joint-stock Commercial Bank 466 +
DongA Joint Stock Commercial Bank 130 +
Eximbank Vietnam 135 + +
Global Petro Commercial Joint Stock Bank (GPBank) 444 + +
Global Trust Bank 459 +
HoChiMinh City Development Joint Stock Commercial Bank (HDBank) 448 + +
HSBC Vietnam 462 +
Joint Stock Commercial Bank for Foreign Trade of Vietnam 456 +
Joint Stock Commercial Bank for Foreign Trade of Vietnam (Vietcombank) 133 + +
KB Kookmin Bank 458 +
Kien Long Commercial Joint - Stock Bank 455 +
Military JSC Bank (MB) 447 + +
Nam A commercial joint stock bank (NamABank) 452 + +
Nam Viet Bank (NaviBank) 441 +
National Citizen Bank 442 +
Ocean Commercial One Member Limited Liability Bank (OceanBank) 450 + +
Orient Commercial Bank (PhuongDong Bank) 467 + +
Petrolimex Group Commercial Joint Stock Bank (PGBank) 443 + +
SAIGON Bank 137 + +
Saigon Hanoi Commercial Joint Stock Bank (SHB) 451 + +
Sai Gon Joint Stock Commercial Bank (SCB) 460 + +
Sai Gon Thuong Tin Commercial Joint Stock Bank 131 + +
SHINHAN bank 461 +
SouthEast Asia Joint Stock Commercial Bank (SeaBank) 468 + +
Standard Chartered Bank 463 +
Tien Phong Commercial Joint Stock Bank (TienPhongBank) 445 + +
VietinBank 134 +
Vietnam Asia Commercial Joint Stock Bank (VietA Bank) 446 + +
Vietnam International Bank 138 + +
Vietnam Maritime Commercial Joint Stock Bank (MaritimeBank) 440 + +
Vietnam Prosperity Bank (VPBank) 449 + +
Vietnam Public Joint-stock Commercial Bank 457 +
Vietnam Technological and Commercial Joint-stock Bank 132 + +

Since the list of available banks may change over time, it is recommended to send a POST request to the one of the following endpoints: /v2/info/banks/atm/vietnam/sale/list for purchases and /v2/info/banks/atm/vietnam/sale/list for payouts to obtain up-to-date information. These endpoints belong to the /v2/info/banks/{payment_method}/{operationType}/list group of the Gate API. The request must contain the project and payment identifiers, signature, currency code, and payment amount, as shown in the example. Specify real payment data if possible. However, random values are also allowed.

Figure: Example of data in the request for receiving the list of banks

{
  "general": {
    "project_id": 200,
    "payment_id": "ORDER_155860015",
    "signature": "K6jllym+PtObocZtr345st...=="
  },
  "payment": {
    "amount": 1000,
    "currency": "VND"
  }
}

Figure: Example of data in the response containing the information about banks

[
  {
    "id": 150, // Bank ID
    "abbr": "ACB", // Bank abbreviation (for internal use)
    "name": "ACB", // International bank name
    "nativeName": "Asia Commercial Bank", // Local bank name
    "currencies": [ // Array with information about the currencies supported by the bank
      {
        "id": 104, // Currency ID in the payment platform
        "alpha_3_4217": "VND", // ISO-4217 alphabetic currency code
        "number_3_4217": "704", // ISO-4217 numeric currency code
        "exponent": 0 // The number of decimal units of the currency
      }
    ]
  },
  {
    "id": 459, 
    "abbr": "GTB", 
    "name": "Global Trust Bank", 
    "nativeName": "Global Trust Bank", 
    "currencies": [
      {
        "id": 104,
        "alpha_3_4217": "VND",
        "number_3_4217": "704",
        "exponent": 0
      }
    ]
  },
  {
    "id": 139, 
    "abbr": "AGB", 
    "name": "AGB", 
    "nativeName": "Agribank", 
    "currencies": [
      {
        "id": 104,
        "alpha_3_4217": "VND",
        "number_3_4217": "704",
        "exponent": 0
      }
    ]
  }
]

If you have any questions about working with banks supported by the Vietnamese ATM method, refer to your ecommpay account manager.

Regions supporting payout processing

The region_id parameter is mandatory in the payout request through Vietnamese ATM. Payout processing is supported in the regions provided in the table below.

Table 3. List of regions
Region name Region identifier
An Giang 137
Bà Rịa - Vũng Tàu 138
Bình Thuận 141
Bình Định 142
Bến Tre 147
Cao Bằng 149
Gia Lai 152
Hà Giang 156
Hà Tĩnh 158
Hòa Bình 159
Hậu Giang 162
Khánh Hòa 163
Kiến Giang 164
Kon Tum 165
Lai Châu 166
Long An 167
Lào Cai 168
Lâm Đồng 169
Lạng Sơn 170
Nghệ An 172
Ninh Bình 173
Ninh Thuận 174
Phú Yên 176
Quảng Bình 177
Quảng Nam 178
Quảng Ngãi 179
Quảng Ninh 180
Quảng Trị 181
Sóc Trăng 182
Sơn La 183
Thanh Hóa 184
Thái Bình 185
Thừa Thiên-Huế 187
Tiền Giang 188
Trà Vinh 189
Tuyên Quang 190
Tây Ninh 191
Vĩnh Long 192
Yên Bái 194
Điện Biên 195
Đắk Lắk 196
Đắk Nông 197
Đồng Nai 198
Đồng Tháp 199
Bắc Kạn 277
Bắc Giang 278
Bạc Liêu 279
Bắc Ninh 280
Bình Dương 281
Bình Phước 282
Cà Mau 283
Can Tho 284
Da Nang 285
Hà Nam 286
Ha Noi 287
Hải Dương 288
Hai Phong 289
Ho Chi Minh 290
Hưng Yên 291
Nam Định 292
Phú Thọ 293
Thái Nguyên 294
Toàn quốc 295
Vĩnh Phúc 296

Purchase by using Payment Page

General information

To process a purchase through Payment Page by using the Vietnamese ATM method, the merchant's web service is required to send a request with all required parameters and signature to the ecommpay URL and receive a callback with the result. The full sequence and special aspects of purchase processing are provided below.



Figure: Purchase processing by using Payment Page: step-by-step description

  1. A customer initiates a purchase in the web service.
  2. The web service sends the request for opening Payment Page to the specified ecommpay URL.
  3. The request for opening Payment Page is sent to the payment platform.
  4. The payment platform receives the request and validates the required parameters and signature.
  5. Payment Page is generated based on the project and request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects one of the banks supported by the Vietnamese ATM method.
  8. The page requesting email address and phone number is displayed to the customer on Payment Page.
  9. The customer enters the email address and phone number on Payment Page.
  10. The payment platform receives the purchase request for payment processing from Payment Page.
  11. The payment platform processes the request and sends it to the bank service.
  12. The request is processed on the bank service side.
  13. The data for redirecting the customer to the bank service is sent from the bank service to the payment platform.
  14. The data for redirecting the customer is sent from the payment platform to Payment Page.
  15. The customer is redirected to the bank service.
  16. The customer completes all required payment steps.
  17. The purchase is processed in the bank service.
  18. The result information is displayed to the customer in the bank service.
  19. The customer is redirected to Payment Page.
  20. The bank service sends a notification about the result to the payment platform.
  21. The payment platform sends the payment result callback to the web service.
  22. The payment platform sends the result information to Payment Page.
  23. The result information is displayed to the customer on Payment Page.

Generally, when a customer confirms their intention to pay on the side of the web service, they are redirected to Payment Page where they select the payment method and, in the case of working with the Vietnamese ATM method, additionally select one of the available banks. However, in some situations, other options for choosing a payment method and bank may be relevant. For example, upon opening Payment Page, you can immediately redirect the customer to the bank selection page or limit the list of supported banks for a particular payment and display only target bank selection buttons to the customer. The specific option of selecting the payment method and bank is determined depending on the parameters specified in the request for opening Payment Page (more details below). The following options are available:

  • 1—when the payment form is opened, it sequentially displays separate pages for selecting a method and a bank. Then the customer selects the method and the bank (this option is used by default).
  • 2—when the payment form is opened, the buttons for selecting other methods and banks supported by this method are displayed on one page. Then the customer selects one of these banks.
  • 3—when the payment form is opened, it displays a page with buttons for selecting all available banks for this method. Then the customer selects one of these banks.
  • 4—when the payment form is opened, it displays a page with buttons for selecting only specific banks supported by this method. Then the customer selects one of these banks.
  • 5—when the payment form is opened, it displays a page requesting confirmation of redirection to the service of the specific bank. Then the customer confirms the redirection.

Information about the formats of requests and callbacks used for processing payments by using the Vietnamese ATM method via Payment Page is presented further in this section; general information about working with the Payment Page API is presented in Interaction concepts.

Channel 1. Request format

There are several things you need to consider when sending purchase requests by using the Vietnamese ATM method:

  1. The following parameters required for any payment must be specified:
    • project_id—project identifier obtained from ecommpay during integration
    • payment_id—payment identifier unique within the project
    • payment_currency—payment currency code in the ISO-4217 alpha-3 format
    • payment_amount—payment amount in the smallest currency unit
    • customer_id—customer identifier unique within the project
  2. The following parameters required for any payment must be specified: project_id, payment_id, payment_currency, payment_amount, customer_id.
  3. The currency of payment can only be VND.
  4. Additionally it is necessary to specify the email and phone number of the customer in the customer_email and customer_phone parameters.
  5. To open Payment Page using the Vietnamese language, specify the vi code in the language_code parameter in the request. For more information, see Interface language support.
  6. The following are the bank selection options:

    1. Selecting the method and the bank on Payment Page (1)—the default option, applied if the force_payment_method parameter and the payment_methods_options object are not used.
    2. Selecting a bank among other methods on Payment Page (2)—for this option in the payment_methods_options object specify the vietnam_atm object containing the split_banks parameter with the value true:
      "payment_methods_options": "{\"vietnam_atm\": {\"split_banks\": true}}"
    3. Selecting a bank among all available ones on Payment Page (3)—for this option specify the method code vietnam-atm in the force_payment_method parameter.
    4. Selecting a bank among specific ones on Payment Page (4)—for this option specify the following:
      • the vietnam-atm code in the force_payment_method parameter
      • the payment_methods_options object with the vietnam_atm object that contains the split_banks parameter with the value true and a banks_id object with an array containing the target bank identifiers:
        "payment_methods_options": "{\"vietnam_atm\": {\"split_banks\": true, \"banks_id\": [135, 136]}}"
    5. Confirming redirection to the service of the specific bank on Payment Page (5)—for this option specify the following:
      • the vietnam-atm code in the force_payment_method parameter
      • the payment_methods_options object with the vietam_atm object that contains the split_banks parameter with the value true and a banks_id object with an array containing the target bank identifier:
        "payment_methods_options": "{\"vietnam_atm\": {\"split_banks\": true, \"banks_id\": [135]}}"
  7. Additionally, any other parameters available for working with Payment Page can be used (details).
  8. After all target parameters are specified, generate a signature (details).

Thus, a correct request for opening the payment form using the Vietnamese ATM method must contain the project identifier, basic payment information (identifier, amount, and currency code), customer information and signature.

{
   "project_id": 120,
   "payment_id": "580",
   "payment_amount": 1000,
   "payment_currency": "VND",
   "customer_id": "customer1",
   "customer_email": "johna@examle.com",
   "customer_phone": "841213369965",
   "signature": "kUi2x9dKHAVNU0FYldOcZzUCwX6R\/ekpZhkIQg=="
}

Figure: Example of sufficient data in a purchase request

{
   "project_id": 120,
   "payment_id": "580",
   "payment_amount": 1000,
   "payment_currency": "VND",
   "customer_id": "customer1",
   "customer_email": "johna@examle.com",
   "customer_phone": "841213369965",
   "signature": "kUi2x9dKHAVNU0FYldOcZzUCwX6R\/ekpZhkIQg=="
}

At the same time, in case of selecting a bank among specific banks (4), the request for opening Payment Page may contain additional data.

{
   "project_id": 120,
   "payment_id": "580",
   "payment_amount": 1000,
   "payment_currency": "USD",
   "customer_id": "customer1",
   "force_payment_method": "vietnam-atm",
   "payment_methods_options": "{\"vietnam_atm\": {\"split_banks\": true, \"banks_id\": [135, 136]}}",
   "signature": "kUi2x9dKHAVNU0FYldOcZzUCwX6R\/ekpZhkIQg=="
}

Channel 2. Request format

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

  1. The following parameters required for any payment must be specified:
    • project_id—project identifier obtained from ecommpay during integration
    • payment_id—payment identifier unique within the project
    • payment_currency—payment currency code in the ISO-4217 alpha-3 format
    • payment_amount—payment amount in the smallest currency unit
    • customer_id—customer identifier unique within the project
  2. The following parameters required for any payment must be specified: project_id, payment_id, payment_currency, payment_amount, customer_id.
  3. The currency of payment can only be VND.
  4. Depending on the bank, additional parameters may be required. They will be requested from the customer on the Payment Page, for more information see Submission of additional payment information.
  5. To open Payment Page using the Vietnamese language, specify the vi code in the language_code parameter in the request. For more information, see Interface language support.
  6. The following are the bank selection options:

    1. Selecting the method and the bank on Payment Page (1)—the default option, applied if the force_payment_method parameter and the payment_methods_options object are not used.
    2. Selecting a bank among other methods on Payment Page (2)—for this option in the payment_methods_options object specify the vietnam_atm object containing the split_banks parameter with the value true:
      "payment_methods_options": "{\"vietnam_atm\": {\"split_banks\": true}}"
    3. Selecting a bank among all available ones on Payment Page (3)—for this option specify the method code vietnam-atm in the force_payment_method parameter.
    4. Selecting a bank among specific ones on Payment Page (4)—for this option specify the following:
      • the vietnam-atm code in the force_payment_method parameter
      • the payment_methods_options object with the vietnam_atm object that contains the split_banks parameter with the value true and a banks_id object with an array containing the target bank identifiers:
        "payment_methods_options": "{\"vietnam_atm\": {\"split_banks\": true, \"banks_id\": [139, 465]}}"
    5. Confirming redirection to the service of the specific bank on Payment Page (5)—for this option specify the following:
      • the vietnam-atm code in the force_payment_method parameter
      • the payment_methods_options object with the vietam_atm object that contains the split_banks parameter with the value true and a banks_id object with an array containing the target bank identifier:
        "payment_methods_options": "{\"vietnam_atm\": {\"split_banks\": true, \"banks_id\": [139]}}"
  7. Additionally, any other parameters available for working with Payment Page can be used (details).
  8. After all target parameters are specified, generate a signature (details).

Thus, a correct request for opening the payment form using the Vietnamese ATM method must contain the project identifier, basic payment information (identifier, amount, and currency code), customer identifier and signature.

{
   "project_id": 120,
   "payment_id": "580",
   "payment_amount": 1000,
   "payment_currency": "VND",
   "customer_id": "customer1",
   "signature": "kUi2x9dKHAVNU0FYldOcZzUCwX6R\/ekpZhkIQg=="
}

Figure: Example of sufficient data in a purchase request

{
   "project_id": 120,
   "payment_id": "580",
   "payment_amount": 1000,
   "payment_currency": "VND",
   "customer_id": "customer1",
   "signature": "kUi2x9dKHAVNU0FYldOcZzUCwX6R\/ekpZhkIQg=="
}

At the same time, in case of selecting a bank among specific banks (4), the request for opening Payment Page may contain additional data.

{
   "project_id": 120,
   "payment_id": "580",
   "payment_amount": 1000,
   "payment_currency": "USD",
   "customer_id": "customer1",
   "force_payment_method": "vietnam-atm",
   "payment_methods_options": "{\"vietnam_atm\": {\"split_banks\": true, \"banks_id\": [139, 465]}}",
   "signature": "kUi2x9dKHAVNU0FYldOcZzUCwX6R\/ekpZhkIQg=="
}

Callback format

The Vietnamese ATM 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 information about a 2,000 VND purchase made in the 603 project.

Figure: Example of callback data indicating that the purchase has been processed

{
        "project_id": 603,
        "payment": {
            "id": "EP3f43-5d18",
            "type": "purchase",
            "status": "success",
            "date": "2019-02-22T13:36:17+0000",
            "method": "ATM Vietnam banking",
            "sum": {
                "amount": 10000,
                "currency": "VND"
            },
            "description": ""
        },
        "operation": {
            "id": 2000000471,
            "type": "sale",
            "status": "success",
            "date": "2019-02-22T13:36:17+0000",
            "created_date": "2019-02-22T13:35:13+0000",
            "request_id": "db567db9bf0fdbecba5b7",
            "sum_initial": {
                "amount": 10000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "VND"
            },
            "provider": {
                "id": 1331,
                "payment_id": "19647319",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "iJtnnWh4EyZWnWt0uzv+A3hb//4oz43juZrsYyK4tI6zl01MxRhz0eL7wqYts8ugrA=="
    }

The following is the example of a callback with information about a declined purchase.

Figure: Example of callback data indicating that the purchase has been declined

{
        "project_id": 603,
        "payment": {
            "id": "EPd87a-9ea7",
            "type": "purchase",
            "status": "decline",
            "date": "2019-02-22T13:42:26+0000",
            "method": "ATM Vietnam banking",
            "sum": {
                "amount": 10000,
                "currency": "VND"
            },
            "description": ""
        },
        "operation": {
            "id": 1000000477,
            "type": "sale",
            "status": "decline",
            "date": "2019-02-22T13:42:26+0000",
            "created_date": "2019-02-22T13:42:22+0000",
            "request_id": "251469bcb435b24e9a55dd1b",
            "sum_initial": {
                "amount": 10000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "VND"
            },
            "provider": {
                "id": 1332,
                "payment_id": "",
                "auth_code": ""
            },
           "code": "20102",
            "message": "Incorrect account data entered"
        },
        "signature": "9TDUuc8PLSzgwD2jE5MaXIgzhTRYMwYq3PTqN0Gjc+7I59NZCkC5pZ6XA2rQ=="
    }

Useful links

The following articles can be useful when implementing purchases via Payment Page:

Purchase by using Gate

General information

To process a purchase through Gate by using the Vietnamese ATM method, the merchant's web service is required to do the following:

  1. Send a request with all the required parameters and signature to the ecommpay URL.
  2. Receive an intermediate callback from the payment platform and redirect the customer to the Vietnamese ATM service.
  3. Receive the final callback from the payment platform.

The full sequence and special aspects of purchase processing are provided below.



Figure: Purchase processing by using Gate: step-by-step description

  1. A customer initiates a purchase by using the Vietnamese ATM method in the web service.
  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.
  4. The payment platform validates the required parameters and signature in the request.
  5. The payment platform sends the response to the web service with information about the receipt of the request and its validity (details).
  6. The payment platform performs further processing of the request (with parameter consistency check) and sends it to the bank service.
  7. The request is processed on the bank side.
  8. The request is processed on the bank service side.
  9. The bank service sends the redirection data to the payment platform.
  10. The payment platform sends the callback with the redirection data to the web service.
  11. The customer completes all required payment steps.
  12. The purchase is processed in the bank service.
  13. The result is displayed to the customer.
  14. The customer is redirected to the web service.
  15. The bank service sends the payment result notification to the payment platform.
  16. The payment platform sends the payment result callback to the web service.
  17. The customer receives the payment result information from the web service.

Information about the formats of requests and callbacks used for processing payments by using the Vietnamese ATM method via Gate is presented further in this section. General information about working with the Gate API is presented in Interaction concepts.

Channel 1. Request format

There are several things you need to consider when sending purchase requests by using the Vietnamese ATM method:

  1. To initiate each purchase, send a separate POST request to the /v2/payment/atm/vietnam/sale endpoint. This endpoint belongs to the group /v2/payment/atm/{payment_method}/sale.
  2. Each request must include the following objects and parameters:
    • Object general—general purchase information:
      • project_id—project identifier obtained from ecommpay during integration
      • payment_id—payment identifier unique within the project
      • signature—request signature generated after all required parameters are specified (details—in the Signature generation and verification) (details)
    • Object payment—payment information:
      • amount—payment amount in the smallest currency unit
      • currency—payment currency code in the ISO-4217 alpha-3 format
    • Object customer—customer information:
      • id—customer identifier unique within the project
      • ip_address—customer IP address relevant for the initiated payment
      • email—customer email address
      • phone—customer phone number
    • Object account—customer account information:
      • bank_id—bank identifier
  3. The currency of a purchase can only be VND.
  4. Additionally, any other parameters included in the specification can be used.

Thus, a correct purchase request by using the Vietnamese ATM method must contain the project identifier, basic payment information (identifier, amount, and currency code), customer information, as well bank identifier as signature.

{
"general": {
      "project_id": 2990,
      "payment_id": payment_id,
      "signature": "PJkV8ejrtyUG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "payment": {
      "amount": 2000,
      "currency": "VND"
      },
    "customer": {
      "ip_address": "192.0.2.0",
      "email": "email@example.com",
      "phone": "64891845653",
      "id": "customer123"
    },
    "account":{
      "bank_id": 135
    }
}

Figure: Example of sufficient data in a purchase request

{
"general": {
      "project_id": 2990,
      "payment_id": payment_id,
      "signature": "PJkV8ejrtyUG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "payment": {
      "amount": 2000,
      "currency": "VND"
      },
    "customer": {
      "ip_address": "192.0.2.0",
      "email": "email@example.com",
      "phone": "64891845653",
      "id": "customer123"
    },
    "account":{
      "bank_id": 135
    }
}

Channel 2. Request format

There are several things you need to consider when sending purchase requests by using the Vietnamese ATM method:

  1. To initiate each purchase, send a separate POST request to the /v2/payment/atm/vietnam/sale endpoint. This endpoint belongs to the group /v2/payment/atm/{payment_method}/sale.
  2. Each request must include the following objects and parameters:
    • Object general—general purchase information:
      • project_id—project identifier obtained from ecommpay during integration
      • payment_id—payment identifier unique within the project
      • signature—request signature generated after all required parameters are specified (details—in the Signature generation and verification) (details)
    • Object payment—payment information:
      • amount—payment amount in the smallest currency unit
      • currency—payment currency code in the ISO-4217 alpha-3 format
    • Object customer—customer information:
      • id—customer identifier unique within the project
      • ip_address—customer IP address relevant for the initiated payment
      • email—customer email
    • Object account—customer account information:
      • bank_id—bank identifier
  3. Depending on the bank, some of these additional parameters of the card object may be required:
    • pan—permanent account number
    • card_holder—cardholder name
    • year—year of issue or expiration of the card
    • month—month of issue or expiration of the card

    The list of required additional parameters depends on the bank. If web service supports clarification of parameters, then you will receive a message with a list of missing parameters in a callback. For more information see Submission of additional payment information.

    If web service does not support clarification of parameters, then you need to specify all the parameters from the second and third points in the purchase request.

  4. The currency of a purchase can only be VND.
  5. Additionally, any other parameters included in the specification can be used.

Thus, a correct purchase request by using the Vietnamese ATM method must contain the project identifier, basic payment information (identifier, amount, and currency code), customer information, as well bank identifier as signature.

Figure: Example of sufficient data in a purchase request (with clarification support)

{
"general": {
      "project_id": 2990,
      "payment_id": payment_id,
      "signature": "PJkV8ejrtyUGaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "payment": {
      "amount": 2000,
      "currency": "VND"
      },
    "customer": {
      "ip_address": "192.0.2.0",
      "email": "email@example.com",
      "id": "customer1"
    },
    "account":{
      "bank_id": 135
    }
}

Figure: Example of sufficient data in a purchase request (with clarification support)

{
"general": {
      "project_id": 2990,
      "payment_id": payment_id,
      "signature": "PJkV8ejrtyUGaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "payment": {
      "amount": 2000,
      "currency": "VND"
      },
    "customer": {
      "ip_address": "192.0.2.0",
      "email": "email@example.com",
      "id": "customer1"
    },
    "account":{
      "bank_id": 135
    }
}

Figure: Example of sufficient data in a purchase request (without clarification support)

{
"general": {
      "project_id": 2990,
      "payment_id": payment_id,
      "signature": "PJkV8ejrtyUG0aC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "payment": {
      "amount": 2000,
      "currency": "VND"
      },
    "customer": {
      "ip_address": "192.0.2.0",
      "email": "email@example.com",
      "id": "customer1"
    },
    "account":{
      "bank_id": 135,
    },
    "card": {
        "pan": "4321432154325432",
        "card_holder": "FORD PREFECT",
        "year": 2018,
        "month": 11
    }
}

Figure: Example of sufficient data in a purchase request (without clarification support)

{
"general": {
      "project_id": 2990,
      "payment_id": payment_id,
      "signature": "PJkV8ejrtyUG0aC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "payment": {
      "amount": 2000,
      "currency": "VND"
      },
    "customer": {
      "ip_address": "192.0.2.0",
      "email": "email@example.com",
      "id": "customer1"
    },
    "account":{
      "bank_id": 135,
    },
    "card": {
        "pan": "4314220000000056",
        "card_holder": "FORD PREFECT",
        "year": 2018,
        "month": 11
    }
}

Formats of intermediate callbacks for customer redirection

Each payment made with the Vietnamese ATM method requires redirection of customers from the merchant's web service to the Vietnamese ATM service. To redirect a customer it is necessary to receive an intermediate callback from the payment platform and use the information included in the redirect_data object. The format of such callbacks is standard (details), and the following objects and parameters are included in the redirect_data object:

  • body—object with data to be sent in the request body
  • method—parameter specifying the HTTP method for sending the request (GET or POST)
  • url—parameter containing a link for redirection

Figure: redirect_data example

  "redirect_data": {
    "body": {},
    "method": "GET",
    "url": "https://www.example.com/pay"
  }

Final callback format

The standard format for callbacks is used to deliver purchase results from Vietnamese ATM. For more information, see Callbacks.

The following is the example of a callback with information about a 2,000 VND purchase made in the 603 project.

Figure: Example of callback data indicating that the purchase has been processed

 {
        "project_id": 603,
        "payment": {
            "id": "TEST_154385980520099",
            "type": "purchase",
            "status": "success",
            "date": "2018-12-03T13:06:32+0000",
            "method": "ATM Vietnam banking",
            "sum": {
                "amount": 2000,
                "currency": "VND"
            },
            "description": "TEST_1543831735980"
        },
        "customer": {
            "id": "1"
        },
        "operation": {
            "id": 12919000002116,
            "type": "sale",
            "status": "success",
            "date": "2018-12-03T13:06:32+0000",
            "created_date": "2018-12-03T13:06:29+0000",
            "request_id": "41fcbd2791eabee713b7d7e89e53",
            "sum_initial": {
                "amount": 2000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 2000,
                "currency": "VND"
            },
            "provider": {
                "id": 1154,
                "payment_id": "",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "Cug4rIB6OimEkwmMeugWYrFyBErmi0OVw34WpHt5CzEA=="
    }

The following is the example of a callback with information about a declined purchase.

Figure: Example of callback data indicating that the purchase has been declined

{
        "project_id": 603,
        "payment": {
            "id": "TEST_1548313365790",
            "type": "purchase",
            "status": "decline",
            "date": "2019-01-24T09:43:27+0000",
            "method": "ATM Vietnam banking",
            "sum": {
                "amount": 2000,
                "currency": "VND"
            },
            "description": "TEST_1548313365790"
        },
        "customer": {
            "id": "1"
        },
        "operation": {
            "id": 3745000002722,
            "type": "sale",
            "status": "decline",
            "date": "2019-01-24T09:43:27+0000",
            "created_date": "2019-01-24T09:41:49+0000",
            "request_id": "3a872bd43f92091",
            "sum_initial": {
                "amount": 2000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 2000,
                "currency": "VND"
            },
            "provider": {
                "id": 1154,
                "payment_id": "010UDR0CCTJEPAN6KFWU14VDN",
                "date": "2019-01-24T09:42:58+0000",
                "auth_code": ""
            },           
           "errors": [
            {
                "code": "2801",
                "message": "Bank ID not found",
                "description": "Gate. Bank ID was not found in request"
             }
           ],
            "code": "2801",
            "message": "Bank ID not found"
        },
        "signature": "cQbMiD0pON9eJc5ZugNQiyWj7NWQRmVyHzNTmOX6Zg5w=="
    }

Useful links

The following articles can be useful when implementing purchases via Gate:

Payouts by using Gate

General information

To process a payout through Gate by using the Vietnamese ATM method, send a request with all required parameters and signature to the ecommpay URL and receive a callback with the result. The full sequence and special aspects of payout processing are provided below.



Figure: Payout processing by using Gate: step-by-step description

  1. A customer initiates a payout by using the Vietnamese ATM method in the web service.
  2. The web service sends the request for processing the payout by using Gate to the specified ecommpay URL.
  3. The payment platform receives the request.
  4. The payment platform validates the required parameters and signature in the request.
  5. The payment platform sends the response to the web service with information about the receipt of the request and its validity (details).
  6. The payment platform performs further processing of the request (with parameter consistency check) and sends it to the bank service.
  7. The payout is processed on the side of the bank service.
  8. The bank service sends the result notification to the payment platform.
  9. The payment platform sends the result callback to the web service.
  10. The customer receives the payout result information from the web service.

Information about the formats of requests and callbacks used for processing payouts by using the Vietnamese ATM method via Gate is presented further in this section. General information about working with the Gate API is presented in Interaction concepts.

Request format

There are several things you need to consider when sending payout requests by using the Vietnamese ATM method:

  1. To initiate each payout send a separate POST request to the /v2/payment/atm/vietnam/payout endpoint. This endpoint belongs to the group /v2/payment/atm/{payment_method}/payout.
  2. Each request must include the following objects and parameters:
    • Object general—general payout information:
      • project_id—project identifier obtained from ecommpay during integration
      • payment_id—payment identifier unique within the project
      • signature—request signature generated after all required parameters are specified (details—in the Signature generation and verification) details
    • Object payment—payment information:
      • amount—payout amount in the smallest currency unit
      • currency—payout currency code in the ISO-4217 alpha-3 format
    • Object customer—customer information:
      • id—customer identifier unique within the project
      • ip_address—customer IP address relevant for the initiated payout
    • Object account—customer account information:
      • bank_id—bank identifier
      • region_id—payout region
    • card—customer payment card information:
      • pan—card PAN
      • year—card expiry year
      • month—card expiry month
      • card_holder—card holder name
  3. The currency of payout can only be VND.
  4. Additionally, any other parameters included in the specification can be used.

Thus, a correct payout request by using the Vietnamese ATM method must contain the project identifier, basic payment information (identifier, amount, and currency code), customer, acoount and payment card information, as well as account number and signature.

{
  "general": {
    "project_id": 603,
    "payment_id": "10000004",
    "signature": "PJkV8ej\/UG0Di8hTnaNIipTv+AWoXW\/9MTO8yJA=="
  },
  "card": {
    "pan": "4314220000000056",
    "month": 12,
    "year": 2021,
    "card_holder": "Card Holder"
  },
 "account":{
      "bank_id": 130,
      "region_id": 137
 },
 "customer": {
    "id":"2990", 
    "ip_address": "192.0.2.0"
  },
  "payment": {
    "amount": 100000,
    "currency": "VND"
  }
}

Figure: Example of sufficient data in a purchase request

{
  "general": {
    "project_id": 603,
    "payment_id": "10000004",
    "signature": "PJkV8ej\/UG0Di8hTnaNIipTv+AWoXW\/9MTO8yJA=="
  },
  "card": {
    "pan": "4242424242424242",
    "month": 12,
    "year": 2021,
    "card_holder": "Card Holder"
  },
 "account":{
      "bank_id": 130,
      "region_id": 137
 },
 "customer": {
    "id":"2990", 
    "ip_address": "192.0.2.0"
  },
  "payment": {
    "amount": 100000,
    "currency": "VND"
  }
}

Callback format

The Vietnamese ATM method uses the standard format for callbacks to deliver payout results. For more information, see Callbacks.

The following is the example of a callback with information about a 100,000 VND payout made in the 603 project.

Figure: Example of callback data indicating that the payout has been processed

{
        "project_id": 603,
        "payment": {
            "id": "100000010",
            "type": "payout",
            "status": "success",
            "date": "2019-02-22T13:50:52+0000",
            "method": "ATM Vietnam banking",
            "sum": {
                "amount": 100000,
                "currency": "VND"
            },
            "description": ""
        },
        "account": {
            "number": "424242******4242"
        },
        "customer": {
            "id": "111232323"
        },
        "operation": {
            "id": 2000000472,
            "type": "payout",
            "status": "success",
            "date": "2019-02-22T13:50:52+0000",
            "created_date": "2019-02-22T13:50:48+0000",
            "request_id": "c0c14111edf06ba2",
            "sum_initial": {
                "amount": 100000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 100000,
                "currency": "VND"
            },
            "provider": {
                "id": 1331,
                "payment_id": "843",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "qeaYBc4TzLFqi9+KOzNwdevayqTjWGDoDatdK4CHaPpw=="
    }

The following is the example of a callback with information about a declined payout.

Figure: Example of callback data indicating that the payout has been declined

{
        "project_id": 603,
        "payment": {
            "id": "10000034",
            "type": "payout",
            "status": "decline",
            "date": "2019-02-22T14:00:17+0000",
            "method": "ATM Vietnam banking",
            "sum": {
                "amount": 100000,
                "currency": "VND"
            },
            "description": ""
        },
        "account": {
            "number": "424242******4242"
        },
        "customer": {
            "id": "111232323"
        },
        "operation": {
            "id": 2000000474,
            "type": "payout",
            "status": "decline",
            "date": "2019-02-22T14:00:17+0000",
            "created_date": "2019-02-22T14:00:14+0000",
            "request_id": "a43380dbe08d069b0dd61c895db3257",
            "sum_initial": {
                "amount": 100000,
                "currency": "VND"
            },
            "sum_converted": {
                "amount": 100000,
                "currency": "VND"
            },
            "provider": {
                "id": 1330,
                "payment_id": "770",
                "auth_code": ""
            },
           "errors": [
            {
                "code": "2801",
                "message": "Bank ID not found",
                "description": "Gate. Bank ID was not found in request"
             }
           ],
            "code": "2801",
            "message": "Bank ID not found"
        },
        "signature": "rdewQWnb0h6XfZgfMwWJKJMLoC5Pfpcn9TrQC4IamAw=="
    }

Useful links

The following articles can be useful when implementing payouts via Gate:

Analysis of payments results

To analyse information about payments made with the Vietnamese ATM method and other methods, you can use:

  • Dashboard interface toolkit with various lists and analytic panels.
  • Reports in CSV file format, available via the Reports section (one-time and periodically).
  • Data in JSON format, sent by program requests to a specified URL available by using the Data API interface.

If you have any questions, refer to the documentation (Dashboard and Using Data API) and ecommpay technical support.