Paying with Google Pay™ via the 9Pay Payment Gateway helps expand payment options, attracting customers who prefer to use Google Pay™ in a convenient and secure manner.
Integration through the 9Pay Payment Gateway ensures a fast payment process, reduces transaction failure rates, and thereby increases conversion rates and revenue for merchants.
Google Pay™ Terms: By integrating Google Pay™, all merchants must comply with the Google Pay™ API Acceptable Use Policy and agree to the terms defined in the Google Pay™ API Terms of Service.
A. Process flow

B. Explanation
Step 1: The customer makes a payment for the order on the partner's website.
When the customer initiates the payment, the partner's website interface may or may not display the Google Pay™ payment method.
Steps 2 & 3: The partner creates a payment link containing the order details and a unique invoice_no . Then, the partner's website redirects the customer to the 9Pay payment URL.
Steps 4 & 5: The customer enters payment information and completes authentication.
Step 6: After the customer completes the payment steps on the 9Pay payment URL, if the transaction is successful, 9Pay will send an IPN (Instant Payment Notification) with the transaction status to the partner's website using the IPN URL registered with 9Pay.
Step 7: The customer is redirected back to the partner's website via the return_url provided in Step 2.
Step 8: The partner displays the transaction result to the customer.
Step 9: About 20 minutes after the payment URL is created, if no IPN is received, the partner should proactively query the transaction status to update the result.
IPNs may be missed due to network issues, service unavailability, or similar reasons.
C. API configuration
1. Create a payment URL
On the merchant's website, after the customer adds products/services to the shopping cart, the merchant's system will generate a payment URL. Then, it will redirect the customer to the payment page
You only need to build the Merchant signature without constructing the entire header.
| Language | Reference link |
| PHP | https://gitlab.com/9pay-sample/sample-php |
| JAVA | https://gitlab.com/9pay-sample/sample-java |
| NodeJS | https://gitlab.com/9pay-sample/sample-javascript |
Required parameters
| Attribute | Type | Required | Description |
| invoice_no | String (30) | Yes | Unique transaction code defined by the partner, used to identify the transaction when sending a payment request to 9Pay. |
| amount | Number | Yes | Payment amount. Minimum: 10,000 VND Maximum: 100,000,000 VND Currency: VND |
| description | String(255) | Yes | Description of the order information. |
| method | String | No | By default, customers are redirected to 9Pay to choose the payment method. If "method = GOOGLE_PAY" is provided, the customer is redirected to enter Google Pay™ payment details directly. |
| return_url | String | Yes | A merchant's URL. This URL is used to redirect from 9Pay page to merchant's page after customer's payment |
| currency | String (10) | No | Currency. Default is VND. Support as USD, EUR, GBP, CNY, JPY |
| time | Int (10) | Yes | Example: 1335939007(UTC+0, 10-digit timestamp). |
| merchantKey | String | Yes | The merchant identification string provided by 9Pay. |
| lang | String | No | The language displayed on transaction screens for customers. (vi and en). Default is vi |
| is_customer_pay_fee | Int | No |
Determine the entity responsible for transaction fees. 0: Merchant bears the transaction fees., 1: Customers bear the transaction fees. Default is 0 |
2. Payment
2.1. The 9Pay Payment Gateway only supports partners using Google Pay™ on the checkout page hosted by 9Pay.
2.2. Supported Card Transaction Authentication Methods:
-
PAN_ONLY: Applies to cards stored in the customer’s Google Account and automatically populated (Google Autofill) during checkout. With this method, the customer is still required to enter the 3D Secure (3DS) authentication code requested by the issuing bank to complete the transaction.
-
CRYPTOGRAM_3DS: Applies to cards stored in Google Wallet in the form of a token. During payment, the device (Android) sends a 3D Secure authentication cryptogram generated by the hardware, enhancing security and verification with the issuing bank. With this method, the customer does not need to manually enter 3DS, allowing the payment process to be faster and smoother.
Note: The JCB card network currently does not support the CRYPTOGRAM_3DS authentication method, as it has not yet implemented support for tokenized card formats (DPAN).
2.3. Google Pay™ Payment Steps

Step 1: On the payment page, the customer selects Google Pay™ and places the order.
Steps 2 & 3: The customer selects a payment card and proceeds.
Step 4: The customer chooses a payment method and verifies the information.
Step 5: A notification of successful transaction is received.
3. Processing payment result
Pay attention to duplicate handling when receiving results for a transaction using both methods.
Return
After the payment flow is completed, the customer is redirected to the return_url provided by the partner when the payment URL was created.
The partner uses the result (included in the query string upon redirection) to display a success or failure notification to the customer.
IPN - Instant Payment Notification
After a successful payment transaction, 9Pay will send a POST request (x-www-form-urlencoded) to the partner's registered IPN_url.
Data reponse
| Attribute | Type | Required | Description |
| result | String | Yes | Transaction Information |
| checksum | String | Yes | The checksum is generated using the result and the partner's checksum key. |
| version | String | Yes | IPN version |
The value in the result after decoding:
| Attribute | Type | Required | Description |
| payment_no | Number | Yes | 9Pay Transaction ID |
| invoice_no | String | Yes | Partner Transaction ID |
| amount | Number | Yes | Same as Initial Payment Amount |
| description | String (255) | Yes | Order Description |
| method | String | Yes | GOOGLE_PAY |
| currency | String (10) | Yes | Same as Initial Currency |
| created_at | Array | Yes | Example: 1335939007 (UTC+0, length=10) |
| card_brand | String | Yes | Paying Bank Name |
| status | Number | Yes | Transaction Status |
| failure_reason | String | Yes | Transaction Failure Reason |
| card_info | Array | Yes | Payment Data Information |
| card_info.card_name | String | Yes | Cardholder Name (as printed on card) |
| card_info.card_brand | String | Yes | Issuing Bank |
4. See also