Google Pay
Enable Google Payโข to allow customers to purchase using a credit or debit card connected to their Google Account. This guide walks you through the payment flow and steps to implement the service.
By using Google Pay, you agree to Google's acceptable use policy and terms of service.
Supported Regionsโ
| Region | Currency | Refundable | Minimum API Version |
|---|---|---|---|
| Thailand | THB | โ Yes | 2017-11-02 |
| Japan | JPY | โ Yes | 2017-11-02 |
| Singapore | SGD | โ Yes | 2017-11-02 |
| Malaysia | MYR | โ Yes | 2017-11-02 |
How to Enableโ
To enable Google Pay, send an email requesting this feature to support@omise.co.
Payment Flowโ
Google Pay supports payments on websites and Android devices. Customers who choose to make payments using Google Pay initiate the transaction by tapping or clicking the Google Pay button embedded in your platform. Customers who have already linked a card to their Google Account will be able to choose their preferred card right away. Those who have not will be given the option to link a new card.
Once the customer selects their preferred card and confirms the payment, the card will be charged the same way as the normal credit card payments flow. This means your account's current card processing settings (for example, whether 3-D Secure is enabled) will also apply to Google Pay transactions.
Using a Desktop Browserโ
To start a Google Pay payment, the customer selects Google Pay as their preferred payment method during checkout on your website โถ. The customer then chooses their preferred credit or debit card โท. Upon confirmation, Omise will send a webhook event (if enabled) indicating that the charge is complete โธ.

Using a Mobile Applicationโ
To start a Google Pay payment, the customer selects Google Pay as their preferred payment method on your mobile application โถ. The customer then chooses their preferred credit or debit card โท. The customer reviews and confirms the payment โธ. Omise will send a webhook event (if enabled) indicating that the charge is complete โน.

Implementationโ
Follow the Google Pay Brand guidelines (Web, Android) to add Google Pay payment buttons to your website or Android app. After the customer taps on the button and selects their card, you will receive a Google Pay token from Google, which contains the card information. You then send this type of token to our client-side libraries (Omise.js or the Android SDK) to obtain a card token that's usable on our Charge API.
Omise treats Google Pay tokens the same way as sensitive card data. Therefore, unless you have a PCI-DSS license, these tokens must first be converted to card tokens before being used on your servers. Read more in Collecting Cards.
In summary, make the following API requests to create a charge with Google Pay:
- Obtain a Google Pay token from Google when the user initiates payment through the Google Pay button.
- Create a card token from the Google Pay token using Omise.js or the Android SDK.
- Create a new charge using the obtained card token from Step 2.
- After receiving the charge completion webhook event, retrieve the charge to verify its status (optional, but recommended).
The following sequence diagram shows how to obtain the card token:
If you use the Omise pre-built payment form, a Google Pay button will be provided, and a usable card token will be returned automatically. Use your secret key to create a charge on the server.
Obtaining a Google Pay Tokenโ
To render a Google Pay button and receive a Google Pay token, follow the Google Pay Web or Android developer documentation. In the API request, ensure the following fields follow the guidelines below:
- Field
allowedAuthMethodsmust only containPAN_ONLY. - Field
allowedCardNetworksshould reflect the supported card brands from the Capability API. - Field
gatewayis set toomise. - Field
gatewayMerchantIdis your Omise public key.
After the request is sent, a new Google Pay token will be returned under the name token in the response.
Please make sure that your implementation also follows the Google Pay Web or Android brand guidelines.
Creating a Card Tokenโ
Once you receive a Google Pay token, create a new card token using the following tokenization parameters.
| Name | Type | Description |
|---|---|---|
method | string | (required) Set to googlepay string. |
data | string | (required) Google Pay token. Refer to the token field in the PaymentMethodTokenizationData object. |
billing_name | string | (optional, but recommended) Card owner name. Refer to the name field in the Address object. |
billing_city | string | (optional, but recommended) Billing address city. Refer to the locality field in the Address object. |
billing_country | string | (optional, but recommended) Billing address country as two-letter ISO 3166 code. Refer to the countryCode field in the Address object. |
billing_postal_code | string | (optional, but recommended) Billing address postal code. Refer to the postalCode field in the Address object. |
billing_state | string | (optional, but recommended) Billing address state. Refer to the administrativeArea field in the Address object. |
billing_street1 | string | (optional, but recommended) Billing address street #1. Refer to the address1 field in the Address object. |
billing_street2 | string | (optional) Billing address street #2. Refer to the address2 field in the Address object. |
billing_phone_number | string | (optional) Billing address phone number. Refer to the phoneNumber field in the Address object. |
By default, the cardholder's name and billing address won't be attached to a card token, and the name will be displayed as "Google Pay" for such a case. To override this behavior, supply billing address parameters when requesting payment to Google. The billing information from the response can be found in the Address object.
For Omise.js, set the token input type to tokenization at the first argument of the createToken function and submit the tokenization parameters at the second.
- JavaScript
- Kotlin (Android)
- cURL
Omise.setPublicKey("your_omise_public_key");
tokenParameters = {
method: 'googlepay',
data: '{"signature":"MEQCIA+wGZttxT13yz599zQjYugoz5kClNSmVa39vKv6ZOenAiARRtHQ0aYSrfd3oWhB\/ZtEeJs3ilT\/J0pYz1EWnzU2fw\\u003d\\u003d","intermediateSigningKey":{"signedKey":"{\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEev+pVoUgtoS+y8Ecz3c72OFBD3d74XJOcnRxVmCV+2TJTW1g4d0UhDkhHeURhHQNvJPyBFHfYIUUj\/EYhYAzgQ\\\\u003d\\\\u003d\",\"keyExpiration\":\"1647856171825\"}","signatures":["MEYCIQClXfVcil7qaG2btVbyzf6x1\/MqCTbbJM\/tGN4iME4M9wIhANL53daWJHdDPpKxR3M\/Jis4WPVb093PW7fChj\/gCQUS"]},"protocolVersion":"ECv2","signedMessage":"{\"encryptedMessage\":\"4JighTc0b1HhRQu+NgQN1XQWWOeB4YyR5cMFi8Vu3FeWHAjPtGs3LjrdpWhJhWekURzD6BZCbg1xakYvAMsahoTyUzDLtNpKmlglFpVjBSSYkPKFT6xovTKsWS7xC\/x9AvJsATtotwN8TTiP3+1dXtLLFClnCTkg9vEvChvXq0FwnrUOBtMiWukBY84R2rpzqNuZoh6gdvWHgPP6RczhtERg+kqKdd4\/UnKE8ElzOWYDmZoJvFhxU\/O97vHW1ohOe8ut94bxiPH6DB82Ec87Mu\/oArsGMpsnFVsWzIcLX+q+KayGRbKxPQzV726fO7GipG94KiF7YfCk1r+D+jkFR7x0ev6l+XRoTz+PKIlhrcn3DEYJudJAP\/Xh2kj\/csnLn4XdKV0aZ5Ua3IauA4fQl80pAo9foujiRGwagHHOfnp6iMjA\/CdG9SNQS3eUdsxtlJKPoK4rtv7cwISNQvoCWMv748YvV3f+LEOWf8couRgrxPCPbk1vO8TfNOgSAjULzRs+C1xy6\/j5aZU46PpomEClDWrujMAcDVqCnExTx2QE9IAb4n02V6UxWv8Dgqv5TsRKjPe7WSCO0+jRWAvs6wBBUbFPHvEe4do+rQ\\\\u003d\\\\u003d\",\"ephemeralPublicKey\":\"BGJhfH3jWMmZtIALmYr7fWxYSNSCFoAT9MCOcbCZdO3LmP6njpGk9LISmr+H1Wk9XUZuMvNQmMHE+yFzW\/sA5lg\\\\u003d\",\"tag\":\"d9a6aVaoIEQm+bTjd5M2HL7+OeIup0Jb6rM1CN7v3NQ\\\\u003d\"}"}',
// Add your billing information here (optional)
billing_name: 'John Doe',
billing_street1: '1600 Amphitheatre Parkway',
};
Omise.createToken('tokenization', tokenParameters, function(statusCode, response) {
console.log(response)
});
private val client = Client("your_omise_public_key")
val tokenizationParam = TokenizationParam(
method = "googlepay",
data = "{\"signature\":\"MEQCIA+wGZttxT13yz599zQjYugoz5kClNSmVa39vKv6ZOenAiARRtHQ0aYSrfd3oWhB\/ZtEeJs3ilT\/J0pYz1EWnzU2fw\\u003d\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEev+pVoUgtoS+y8Ecz3c72OFBD3d74XJOcnRxVmCV+2TJTW1g4d0UhDkhHeURhHQNvJPyBFHfYIUUj\/EYhYAzgQ\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1647856171825\\\"}\",\"signatures\":[\"MEYCIQClXfVcil7qaG2btVbyzf6x1\/MqCTbbJM\/tGN4iME4M9wIhANL53daWJHdDPpKxR3M\/Jis4WPVb093PW7fChj\/gCQUS\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"4JighTc0b1HhRQu+NgQN1XQWWOeB4YyR5cMFi8Vu3FeWHAjPtGs3LjrdpWhJhWekURzD6BZCbg1xakYvAMsahoTyUzDLtNpKmlglFpVjBSSYkPKFT6xovTKsWS7xC\/x9AvJsATtotwN8TTiP3+1dXtLLFClnCTkg9vEvChvXq0FwnrUOBtMiWukBY84R2rpzqNuZoh6gdvWHgPP6RczhtERg+kqKdd4\/UnKE8ElzOWYDmZoJvFhxU\/O97vHW1ohOe8ut94bxiPH6DB82Ec87Mu\/oArsGMpsnFVsWzIcLX+q+KayGRbKxPQzV726fO7GipG94KiF7YfCk1r+D+jkFR7x0ev6l+XRoTz+PKIlhrcn3DEYJudJAP\/Xh2kj\/csnLn4XdKV0aZ5Ua3IauA4fQl80pAo9foujiRGwagHHOfnp6iMjA\/CdG9SNQS3eUdsxtlJKPoK4rtv7cwISNQvoCWMv748YvV3f+LEOWf8couRgrxPCPbk1vO8TfNOgSAjULzRs+C1xy6\/j5aZU46PpomEClDWrujMAcDVqCnExTx2QE9IAb4n02V6UxWv8Dgqv5TsRKjPe7WSCO0+jRWAvs6wBBUbFPHvEe4do+rQ\\\\u003d\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BGJhfH3jWMmZtIALmYr7fWxYSNSCFoAT9MCOcbCZdO3LmP6njpGk9LISmr+H1Wk9XUZuMvNQmMHE+yFzW\/sA5lg\\\\u003d\\\",\\\"tag\\\":\\\"d9a6aVaoIEQm+bTjd5M2HL7+OeIup0Jb6rM1CN7v3NQ\\\\u003d\\\"}\"}",
// Add your billing information here (optional)
billing_name = "John Doe",
billing_street1 = "1600 Amphitheatre Parkway"
)
val request = Token.CreateTokenRequestBuilder(tokenization = tokenizationParam).build()
client.send(request, object: RequestListener<Token>{
override fun onRequestSucceed(model: Token) {
// you created a token
}
override fun onRequestFailed(throwable: Throwable) {
// something bad happened
}
})
curl https://vault.omise.co/tokens \
-u $OMISE_PUBLIC_KEY: \
-d 'tokenization[method]=googlepay' \
--data-urlencode 'tokenization[data]={"signature":"MEUCIQDY1e/dzFAZUkRXXjXBKFN1AeKDdtnspf3yHUaxNF0iLAIgbmAccscWk9KxyiJO/uSjdjBd3rUnDU4ow5hlhDgW0wM\u003d","intermediateSigningKey":{"signedKey":"{\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEa6knFzfre2if/qjHGrPXRJI4R0fa5gDiw53ZLQIF319MCV1ht0lyMl1jc8+MtPfoTENSicQap6Cs8Fl+83apfg\\u003d\\u003d\",\"keyExpiration\":\"1656417412574\"}","signatures":["MEUCIEWY90SXfDoRMVPs8YZy7u0t1B/UZ0WNP6Ibq/OyrbkzAiEAmvxPrtmkE6mEOGzkv39Cpn6OiwqMVwMv01adhafXJto\u003d"]},"protocolVersion":"ECv2","signedMessage":"{\"encryptedMessage\":\"VI+tGn08DwzYavfneViUCQ0hp59zS9lHmBEDhQEANhPOnka2PAvzyeNNLwmkLHF4fglKtQD70WJBfTbLG5PuFttnPXZN56pU/pnv8MgHdkdkzgeoT3fDWL8G00nQ8dM2lCRjS8lSgKrs0tdd5a0VbuH/OZ8TRaQ8LuaWtmXuwtVXTi7clCe3G977FPJmm1upq50wxS/q1W0Yr296J6pNfA4tQ3v5fWnJBwaypsn7fjqM5p4DK5X9Q2tmHQjSjL6VR8o/ojL9RxMZCrAl6X/ZodipD/0uQmtz7Q/T8VBdgZVa6pptGmmxdbLRa0EPXEJpiQpqlleibIzleQakpNcdLaauMCjlXhTobdCqCkvZ6oTlTmRQ3pddowUKeOMaqT5rGAOL9Z6XAbcw2/WCEC6DXPAPR9ba8C+W5iBjA6FcbRf2P0WvHM/2uPe7Dz+rj9tGaGt+E97eCXXiZ+PV9CELghpfZmqrkc58llBThDDLwN/2vBW1UYIWJQCyPSJttzdM3Cyc5CGBNXcQ+O9z7GUZXhLoyu4T7s+8hxlKYLJ++WhmWAJ1ybYywkBmcbdKmhYkoJ/D85qe4UqvpmA3Hhz6w9gNDQteRY/kQEd/ZQ\\u003d\\u003d\",\"ephemeralPublicKey\":\"BOxUCtd20nc4LxB2hUlFAGxo6rx9R2bP+5FRPuOhLLVhvAy5QyoSyku9JDXwsRh07u/EDQN8Hf7e/mtBrg7vaAs\\u003d\",\"tag\":\"5gC0Mw+mNmDInoIK+K1AIN+siXyyJp6afQjhUMK+5Io\\u003d\"}"}'
Response:
{
"object": "token",
"id": "tokn_test_5s7p3w9z0xhnily5g3j",
"livemode": false,
"location": "https://vault.omise.co/tokens/tokn_test_5s7p3w9z0xhnily5g3j",
"used": false,
"charge_status": "unknown",
"card": {
"object": "card",
"id": "card_test_5s7p3w9ygewzs8yfliv",
"livemode": false,
"location": null,
"deleted": false,
"street1": null,
"street2": null,
"city": null,
"state": null,
"phone_number": null,
"postal_code": null,
"country": "us",
"financing": "credit",
"bank": "JPMORGAN CHASE BANK N.A.",
"brand": "Visa",
"fingerprint": "uHGUFYpH0GCcilfcEdJWQe/+j/FLNfXsZKeW5Xrydc4=",
"first_digits": null,
"last_digits": "1111",
"name": "Google Pay",
"expiration_month": 12,
"expiration_year": 2027,
"security_code_check": true,
"tokenization_method": "googlepay",
"created_at": "2022-06-21T02:32:10Z"
},
"created_at": "2022-06-21T02:32:10Z"
}
The id attribute is the token identifier (begins with tokn).
Creating a Chargeโ
Refer to Credit Card Payments to charge a card with the received card token. There are a couple of differences between card tokens that are generated from a specific tokenization method (googlepay) compared to normal ones:
- These card tokens have a field
tokenization_methodto tell what tokenization method was applied to the card. - These card tokens cannot be used in the Customers API.
Additional Optionsโ
When using a pre-built payment form, you can set additional configurations to control the Google Pay API more. The relevant parameters are described below.
| Data Attribute | Parameter | Description |
|---|---|---|
data-googlepay-merchant-id | googlepayMerchantId | Merchant ID for Google Pay (required when accepting live traffic). |
data-googlepay-request-billing-address | googlepayRequestBillingAddress | Set to true to attach the cardholder's name and billing address to a card token. Supplying this improves your authorization rate for US, UK, and Canadian cardholders. |
data-googlepay-request-phone-number | googlepayRequestPhoneNumber | When the cardholder's billing address is requested, set to true to also attach the cardholder's phone number to a card token. |
The complete list of the supported parameters can be found here.
Testing and Going Liveโ
To complete the whole user journey, you need to have a Google Account and attach a chargeable card to it or use one of the available test cards provided by Google. If your Google Pay environment is in test mode, the card number in Google Pay tokens will always be 4111 1111 1111 1111. You can charge this card with an Omise test key to simulate a successful charge.
To go live, you need a merchant ID in the merchantId field in the Google Pay API. You can obtain this by registering with the Google Pay Business Console. During launch preparation, ensure that you also adhere to the Google Pay Web or Android integration checklist.
FAQโ
What is Google Pay?
Google Pay is Google's digital wallet and mobile payment service that allows customers to make secure payments using their Android device or any browser with a linked Google account. Customers can pay using credit or debit cards stored in their Google account.
Which regions support Google Pay?
Google Pay through Omise is available in:
- Thailand (THB)
- Japan (JPY)
- Singapore (SGD)
- Malaysia (MYR)
Contact support@omise.co to enable Google Pay for your account.
Do I need a Google Pay Business account?
For testing, no. For production (live) payments, yes - you need to register with the Google Pay Business Console to obtain a merchant ID. This is required before you can accept real payments.
Does Google Pay support 3D Secure?
Yes, your account's card processing settings (including 3D Secure) apply to Google Pay transactions. If you have 3D Secure enabled, customers may be prompted for additional authentication.
Can I save Google Pay cards for recurring payments?
No, card tokens generated from Google Pay cannot be attached to customers using the Customers API. Each Google Pay transaction requires the customer to authenticate again. For recurring payments, consider collecting card details directly.
What are the transaction limits?
Transaction limits depend on your merchant account settings and the customer's card issuer. There are no specific Google Pay limits imposed by Omise. Check with your account manager for your specific limits.
Can I refund Google Pay payments?
Yes, Google Pay payments can be refunded just like regular card payments. Both full and partial refunds are supported. Refunds are processed to the original card linked to the Google account.
Why isn't the Google Pay button showing?
The Google Pay button only appears when:
- The customer has Google Pay set up with at least one valid card
- The card brand is supported (check your Capability API)
- The
allowedAuthMethodsincludesPAN_ONLY - Your integration meets Google Pay brand guidelines
Check the browser console for specific errors.
What's the difference between Web and Android integration?
- Web: Uses Google Pay JavaScript API, works on any browser where the user is signed into Google
- Android: Uses Google Pay Android SDK, provides native app integration with better UX
Both methods produce the same token format and work with Omise's tokenization API.
What's the difference between Apple Pay and Google Pay?
Both are digital wallet payment methods, but they target different ecosystems:
- Apple Pay: For iOS/macOS users (iPhone, iPad, Mac, Apple Watch)
- Google Pay: For Android users and Chrome browser on any platform
For maximum customer coverage, implement both payment methods.