Google Pay

1 Introduction

Google Pay™ (formerly Android Pay) is a digital wallet, which enables simple and fast card payments, without the need to enter the card data for each payment. The card data is safely stored by Google. This payment method is available for all devices (mobile phones and computers), irrespective of the operating system and web browser.

Note: the description below applies to provision of this service directly by displaying the Google Pay lightbox at the website of payment recipient (e-store) or in the mobile application.

2 Integration

2.1 Web integration

To integrate the website with the Google Pay method, proceed according to the instructions placed at this website:

The gateway parameter in the script should have the constant value of payu, according to the example below:

                var tokenizationParameters = {
                    tokenizationType: 'PAYMENT_GATEWAY',
                    parameters: {
                        gateway: 'payu',
                        gatewayMerchantId: '[Point of Service Id (pos_id)]'
                    }
                }
            

The value of the gatewayMerchantId parameter should be the identifier of the payment point where the order is made.

Please note that PayU as the processor of Google Pay payments enables the handling of all types of payment cards issued by the Visa and MasterCard organizations (including Maestro). This implies the following configuration of the Google script:

                var allowedCardNetworks = ['MASTERCARD', 'VISA'];
                var allowedPaymentMethods = ['CARD', 'TOKENIZED_CARD'];
            

In response, Google shall return the PaymentData item, and the field paymentMethodToken.token shall contain a safely encrypted Google Pay Token (a string of characters).

A sample Google Pay Token looks like this:

                {
                    "signature": "MEUCIQDY3wBQyHB4sZcktRoJXKxm+OLcjHzCvdDeGn23oX0kkwIgKznRFZZL+sDMv1b5cuD+YurXMZraYBsr9hbravVY5Ro\u003d",
                    "protocolVersion": "ECv1",
                    "signedMessage": "{\"encryptedMessage\":\"cI87tLqzqTGyCFnMMCVWcTHw3xhYIK+CEnuQ74K+nlLpCgOlfpScib9jds4sxDtN6CunCqCSMfd/3yHeeRy6aCx1yyqcT4ey6NueeBznprJpkmVVgI1JHWLQt4hzAXMUAcYASYLOabKP9fUZvHkOBDytD531jpzNXa+Spc/zrpGzFKx2C4VU9sC95q9i+ey+kr7ZMNVCOFJPWXu7lKZ105IOOqozJ6/70MKmxP3jM89eeq+/19QnyHjQLXfnQPvQjiUJKGCcRKDLlrb3XoY5ZUUzGfN5eZCLzCVg0hWEbwU+6J7KWYJyW+Wr1r8bagN9zWsrMKhDpsQbHfyzb+yBzFUoxeUgL4a7FeVvEllIcHtqsvTCf6FENV20aF5VLDv5qzUkV+PzTAIbFEuabA0God9UbVCVVv7nM8QFzvRPhzYYFVFTn4JHvL2qZ4pAR9lE+w\\u003d\\u003d\",\"ephemeralPublicKey\":\"BPHLC4sBHpenY1M0ixmiDMuWJTaTJOqggRUwtgBJMcBp28VsxHD7zPI7985x4F5EjMP5y8j/cuUzbe/cGPjOKGk\\u003d\",\"tag\":\"RaXrPOUuc5iw3oxDa0C2MOjaKxgxIRQvwOspmtFV0zU\\u003d\"}"
                }
            

2.2 Android integration

To integrate the mobile application with the Google Pay method, proceed according to the instructions placed at this website:

To make the integration easier, use the technical documentation for the PayU | Mobile SDK.

3 Order

To charge the payment card stored under Google Pay, in the request OrderCreateRequest place an extended item of payMethods.

The item payMethods.payMethod must contain the authorizationCode field, whose value is the GooglePay Token parameter, coded with the Base64 function. The field payMethod.value should have the ap value, and the field payMethod.type - the PBL value.

                "payMethods": {
                    "payMethod": {
                        "value": "ap",
                        "type": "PBL",
                        "authorizationCode": "eyJzaWduYXR1cmUiOiJNRVVDSVFEWTN3QlF5SEI0c1pja3RSb0pYS3htK09MY2pIekN2ZERlR24yM29YMGtrd0lnS3puUkZaWkwrc0RNdjFiNWN1RCtZdXJYTVpyYVlCc3I5aGJyYXZWWTVSb1x1MDAzZCIsInByb3RvY29sVmVyc2lvbiI6IkVDdjEiLCJzaWduZWRNZXNzYWdlIjoie1wiZW5jcnlwdGVkTWVzc2FnZVwiOlwiY0k4N3RMcXpxVEd5Q0ZuTU1DVldjVEh3M3hoWUlLK0NFbnVRNzRLK25sTHBDZ09sZnBTY2liOWpkczRzeER0TjZDdW5DcUNTTWZkLzN5SGVlUnk2YUN4MXl5cWNUNGV5Nk51ZWVCem5wckpwa21WVmdJMUpIV0xRdDRoekFYTVVBY1lBU1lMT2FiS1A5ZlVadkhrT0JEeXRENTMxanB6TlhhK1NwYy96cnBHekZLeDJDNFZVOXNDOTVxOWkrZXkra3I3Wk1OVkNPRkpQV1h1N2xLWjEwNUlPT3Fveko2LzcwTUtteFAzak04OWVlcSsvMTlRbnlIalFMWGZuUVB2UWppVUpLR0NjUktETGxyYjNYb1k1WlVVekdmTjVlWkNMekNWZzBoV0Vid1UrNko3S1dZSnlXK1dyMXI4YmFnTjl6V3NyTUtoRHBzUWJIZnl6Yit5QnpGVW94ZVVnTDRhN0ZlVnZFbGxJY0h0cXN2VENmNkZFTlYyMGFGNVZMRHY1cXpVa1YrUHpUQUliRkV1YWJBMEdvZDlVYlZDVlZ2N25NOFFGenZSUGh6WVlGVkZUbjRKSHZMMnFaNHBBUjlsRSt3XFx1MDAzZFxcdTAwM2RcIixcImVwaGVtZXJhbFB1YmxpY0tleVwiOlwiQlBITEM0c0JIcGVuWTFNMGl4bWlETXVXSlRhVEpPcWdnUlV3dGdCSk1jQnAyOFZzeEhEN3pQSTc5ODV4NEY1RWpNUDV5OGovY3VVemJlL2NHUGpPS0drXFx1MDAzZFwiLFwidGFnXCI6XCJSYVhyUE9VdWM1aXczb3hEYTBDMk1PamFLeGd4SVJRdndPc3BtdEZWMHpVXFx1MDAzZFwifSJ9"
                    }
                }
            

Further processing of the request is subject to the standard process, which is described under REST API.

Please note that it may be necessary to handle a redirect of the request to the 3D Secure authentication page.

As the orders paid with the Google Pay method shall be settled just as standard card payments, it is worth considering the integration of the service transaction data retrieve. In this manner, you will be able to differentiate cards entered through the PayU form from cards downloaded from Google Pay.

4 Sandbox

The Google Pay payment method is available also under the Sandbox environment – during the integration process, openly indicate the test environment:

                var paymentsClient = new google.payments.api.PaymentsClient({environment: 'TEST'});
            

As Google Pay is not the default payment method, please contact our IT support department (tech@payu.pl) after registration in the Sandbox environment, but before commencing integration with the use of the Google Pay method.