Implementing Google Pay Button

To integrate GooglePay in your website please refer to the following links:

Google Pay Web developer documentation

Google Pay Web integration checklist

Google Pay Web brand guidelines

Also, you may look for examples at Live Google Pay demos

In Google's documentation, to see what you need to do to accept payments via Google Pay. If your system is ready, follow this Google tutorial to create the JS code that renders the Google Pay button.

To identify the request towards Google, below two IDs are required.

gateway id, the ID that identifies the gateway you are using to process the charges.

the gateway merchant id, the ID that identifies your web page. This can be copied from the detail page in Onepay

Merchant ID: googletest

These IDs must be set in your JS code, like this:


"type": "CARD",

"parameters": {

"allowedAuthMethods": ["CRYPTOGRAM_3DS"], 

"allowedCardNetworks": ["MASTERCARD", "VISA"] 


const tokenizationSpecification = {


parameters: {

'gateway': onepayglobal, 

'gatewayMerchantId': 'Put your MERCHANT_ID from Onepay’ 




We support four card types: American Express, Discover, MasterCard and Visa. You have to specify this in your JS code:

const allowedCardNetworks = ["AMEX", "DISCOVER", "MASTERCARD", "VISA"];

Currently, we only support cards that already been authenticated with 3DS or via ID&V as network tokens, so you must specify this as well.

const allowedCardAuthMethods = ["CRYPTOGRAM_3DS", "PAN_ONLY"];

The system needs the billing address, for this the following parameterization must be used:

parameters: {

 billingAddressRequired: true, 

 billingAddressParameters: { 

     format: "FULL" 



Please use the FULL value to specify the format. See BillingAddressParameters for more information.

To be able to get the e-mail address of the customer, please specify the "emailRequired": true in the PaymentDataRequest. This will the Google API to send back the e-mail address of the Google wallet in the PaymentData object.