Google Pay™

Google Pay™ can be integrated in two ways:

With the first option the merchant does not need to do additional steps. Google Pay will appear in the list of payment methods available within its Iframe. If the merchant's integration is not Iframe, fullscreen or through a plugin, it will be necessary to carry out a native integration with Google Pay using the credentials provided by PAYCOMET. After receiving the payment data, Google Pay returns an encrypted object that must be sent to PAYCOMET to obtain a idUser and a tokenUser with which to perform the transaction.


For the native integration the following steps should be accomplished: Google Pay.

Google Pay button in Iframe. (Hosted integration)

Google Pay button will be displayed in the payment form of iframe or fullscreen.

In this case, the merchant delegates to PAYCOMET the display of the button and the payment. After having contracted it in PAYCOMET, it must simply be activated in the "Configure product" section of your control panel and it will appear as a payment method in the PAYCOMET form.

Native integration

This is a direct merchant integration using the Google Pay SDK.

With this integration, the merchant has total control of the payment process: You can show the Google Pay button at the time and place you want just like when integrate JET IFRAME.

PAYCOMET provides the merchant with the credentials to generate a paymentToken (Google Pay's response to the payment request) and then make the payment with it.

Credentials

            {
    'gateway': 'paycomet',
    'gatewayMerchantId': 'id provided by PAYCOMET'
}
            
            
The id provided by PAYCOMET corresponds to the Terminal number which can be consulted in the "Configure product" section in the merchant's control panel.


To use Google Pay after contracting with PAYCOMET, it must be activated in the merchant's control panel, "Product configuration" section.

In the same way, it is mandatory to accept Acceptable Use Policy and the terms indicated in Google Pay API Terms of Service.
Adherence to these terms is part of the registration process of the merchant in Google Pay.

The manual for the Google Pay integration is available at Google Pay Web Developer Docs.

Specifications for the interaction of Google Pay with PAYCOMET

We recommend following the tutorial from Google Pay.

Google Pay will place the button in an html element indicated in the integration. This element can be located in anywhere on the web, but it does not have to be loaded dynamically as it needs to exist when run the javascript code of the integration.

Step 2 of the tutorial: the credentials to use are the following:


            const tokenizationSpecification = {
                    type: 'PAYMENT_GATEWAY',
                    parameters: {
                        'gateway': 'paycomet',
                        'gatewayMerchantId': 'id provided by PAYCOMET'
                    }
            };
            
            

Steps 3 and 4 of the tutorial: When the payment method object is created, it must be indicated that only card is allowed:

The cards with which the business can work must be indicated, by default:

                
                    const allowedCardNetworks = ["MASTERCARD", "VISA"];
                
            
            
                const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"];
                const baseCardPaymentMethod = {
                    type: 'CARD',
                    parameters: {
                        allowedAuthMethods: allowedCardAuthMethods,
                        allowedCardNetworks: allowedCardNetworks
                    }
                };
                
            

We recommend using this resource: complete example

The following requirements must be fulfilled in order to accept the integration with Google Pay:Google Pay Web Developer Integration Checklist

After the integration is finished, when pressing the Google Pay button a pop up from Google will appear and the user must login with its Google account and then select a card from the list or register a new one.



            function processPayment(paymentData) {
    paymentToken = paymentData.paymentMethodData.tokenizationData.token;
    return paymentToken;
}
                
            

            {
"terminal": merchant terminal,
"paymentToken": "base 64 encoded paymentToken"
}
                
            

The response from the api will have the following format:


            {
    "idUser":123456123,
    "tokenUser":"abcdefghi1234",
    "errorCode":0
}
                
            

If you receive an error 133, you should check the json format before encoding it and make sure it's valid json. If so, it will be necessary to review the format of the request to the api.

With the idUser and tokenUser obtained, you must operate as with any card payment at PAYCOMET.


Links for merchant integration




Back