Skip to main content

Google Pay

Introduction to Google Pay

Google Pay™ (formerly Android Pay) is a digital wallet that streamlines card payments, enabling swift and effortless transactions without the need to repeatedly input card information. Google securely stores the card data. This option is compatible with all devices (mobile phones and computers), irrespective of the operating system and web browser.

When utilizing Google Pay, the Acceptor is required to adhere to the regulations specified in the following regulations.


The following description concerns the direct provision of this service by showcasing the Google Pay lightbox on the payment recipient's website (e-store) or within a mobile application.

If you wish to offer this method via PayU hosted payment page, no additional integration effort is required.

Google Pay Web Integration

For website integration with the Google Pay method, follow these steps:

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

const tokenizationSpecification = {
parameters: {
gateway: 'payu',
gatewayMerchantId: '[Point of Service Id (pos_id)]',

The gatewayMerchantId parameter should be set to the identifier of the payment point where the order is initiated.

Please be aware that PayU, as the processor of Google Pay payments, facilitates the handling of various payment card types issued by Visa and MasterCard organizations, including Maestro. This necessitates configuring the Google script as follows:

const allowedCardNetworks = ['MASTERCARD', 'VISA']
const allowedCardAuthMethods = ['PAN_ONLY', 'CRYPTOGRAM_3DS']

As a response, Google will provide the PaymentData item, wherein the paymentMethodData.tokenizationData.token field will include encrypted Google Pay Token (a string of characters).

Sample Google Pay Token
"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\"}"

Google Pay Android Integration


For mobile applications, native Google Pay integration is recommended, as Google Pay does not support WebView mode.

For mobile integration with the Google Pay method, follow these steps:

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

Creating a Google Pay Order

To initiate a charge on the payment card stored within Google Pay, include an extended payMethods object in the standard order request.

The payMethods.payMethod object is required to include the authorizationCode field, where the value corresponds to the Google Pay Token parameter encoded using the Base64 function. Additionally, ensure that the payMethod.value field is set to the ap value, while the payMethod.type field should be assigned the PBL value.

Extended paymethod Object
"payMethods": {
"payMethod": {
"value": "ap",
"type": "PBL",

Subsequent processing of the request follows the standard procedure outlined in the Create a New Order section.


Keep in mind that you might need to manage the redirection of the request to the 3D Secure authentication page.

Given that orders paid using the Google Pay method are settled similarly to standard card payments, it is worth considering the integration of the service transaction data retrieve. This approach enables the distinction between cards entered via the PayU form and those acquired from Google Pay.

Error Codes in Google Pay

List of standard errors returned by Google Pay lightbox can be found on the Google Developers site.

Possible errors that may occur
Validation error.
Google Pay token was created for different point of sale. Point of sale IDs used in OrderCreateRequest and in the gatewayMerchantId field must match.
  • Nieoczekiwany błąd po stronie programisty - spróbuj ponownie później - This message is returned, for instance, if the environment parameter is set to PRODUCTION for a Point of Sale (POS) originating from the Sandbox environment.


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',