- METHOD TYPEE-wallet
- PAYMENTS
- PAYOUTS
- REFUNDS
- RECURRING
Overview
Google Pay enables your customers to complete their purchases quickly and easily in apps and on the web using the payment methods saved in their Google account or on their Android device.
This guide describes how to implement Google Pay using Nuvei REST API 2.0, which currently supports non-3D-Secure Google Pay payments.
Supported Countries
- Afghanistan
- Aland Islands
- Albania
- Algeria
- Andorra
- Angola
- Anguilla
- Antarctica
- Antigua and Barbuda
- Argentina
- Armenia
- Aruba
- Australia
- Austria
- Azerbaijan
- Bahamas
- Bahrain
- Bangladesh
- Barbados
- Belarus
- Belgium
- Belize
- Benin
- Bermuda
- Bhutan
- Bolivia
- Bonaire
- Bosnia-Herzegovina
- Botswana
- Bouvet Island
- Brazil
- British Indian Ocean Territory
- Brunei
- Bulgaria
- Burkina Faso
- Cambodia
- Cameroon
- Canada
- Cape Verde
- Cayman Islands
- Central African Republic
- Chad
- Chile
- China
- Chinese Taipei
- Christmas Island
- Close
- Cocos (Keeling) Islands
- Colombia
- Comoros
- Congo
- Cook Islands
- Costa Rica
- Cote dIvoire
- Croatia
- Curacao
- Curaçao
- Cyprus
- Czech Republic
- Denmark
- Djibouti
- Dominica
- Dominican Republic
- Ecuador
- Egypt
- El Salvador
- Equatorial Guinea
- Eritrea
- Estonia
- Ethiopia
- Falkland Islands (Malvinas)
- Faroe Islands
- Fiji
- Finland
- France
- French Guiana
- French Polynesia
- French Southern Territories
- Gabon
- Gambia
- Georgia
- Germany
- Ghana
- Gibraltar
- Greece
- Greenland
- Grenada
- Guadeloupe
- Guam
- Guatemala
- Guernsey
- Guinea
- Guinea-Bissau
- Guyana
- Haiti
- Heard Island
- Honduras
- Hong Kong
- Hungary
- Iceland
- India
- Indonesia
- Iraq
- Ireland
- Isle of Man
- Israel
- Italy
- Jamaica
- Japan
- Jersey
- Jordan
- Kazakhstan
- Kenya
- Kiribati
- Kosovo
- Kuwait
- Kyrgyzstan
- Laos
- Latvia
- Lebanon
- Lesotho
- Liberia
- Libya
- Liechtenstein
- Lithuania
- Luxembourg
- Macau
- Macedonia
- Madagascar
- Malawi
- Malaysia
- Maldives
- Mali
- Malta
- Marshall Islands
- Martinique
- Mauritania
- Mauritius
- Mayotte
- Mexico
- Micronesia
- Moldova
- Monaco
- Mongolia
- Montenegro
- Montserrat
- Morocco
- Mozambique
- Myanmar
- Namibia
- Nauru
- Nepal
- Netherlands
- Netherlands Antilles
- New Caledonia
- New Zealand
- Nicaragua
- Niger
- Nigeria
- Niue
- Norfolk Island
- Northern Mariana Islands
- Norway
- Oman
- Pakistan
- Palau
- Palestinian Territory
- Panama
- Papua New Guinea
- Paraguay
- Peru
- Philippines
- Pitcairn
- Poland
- Portugal
- Puerto Rico
- Qatar
- Reunion
- Romania
- Russia
- Rwanda
- Saint Barthélemy
- Saint Helena
- Saint Kitts and Nevis
- Saint Lucia
- Saint Martin
- Saint Pierre and Miquelon
- Saint Thomas
- Saint Vincent
- Saint Vincent and Grenadines
- Samoa
- San Marino
- Sao Tome and Principe
- Saudi Arabia
- Senegal
- Serbia
- Seychelles
- Sierra Leone
- Singapore
- Slovakia
- Slovenia
- Solomon Islands
- Somalia
- South Africa
- South Georgia, South Sandwich Islands
- South Korea
- Spain
- Sri Lanka
- Suriname
- Svalbard and Jan Mayen Islands
- Swaziland
- Sweden
- Switzerland
- Taiwan
- Tajikistan
- Tanzania, United Republic of
- Thailand
- Timor-Leste
- Togo
- Tokelau
- Tonga
- Trinidad and Tobago
- Tunisia
- Turkey
- Turkmenistan
- Turks and Caicos Islands
- Tuvalu
- Uganda
- Ukraine
- United Arab Emirates
- United Kingdom
- Uruguay
- Uzbekistan
- Vanuatu
- Vatican City
- Venezuela
- Vietnam
- Virgin Islands
- Wallis and Futuna
- Western Sahara
- Yemen
- Zambia
- Zimbabwe
Supported Currencies
Google Pay supports all currencies supported by Nuvei.
Availability
Offering your customers Google Pay as a payment option depends on the following factors:
- Card Types Supported
The following card types are supported: VISA, Mastercard, Discover/Diners, AMEX and JCB. - Merchant Location
When it comes to being able to accept Google Pay transactions, the location of your business matters. Merchants in the following regions are eligible:- United States
- Europe
- Asia Pacific
- Australia
- Location of where the Customer’s Card Details are Stored
Customer compatibility depends on where the customer’s card details are stored:- Cards stored on a Google Account:
- Available worldwide
- Cards stored on an Android Device:
Available to customers in the following countries:- United States
- United Kingdom
- Singapore
- Australia
- Hong Kong
- Poland
- New Zealand
- Ireland
- Belgium
- Russia
- Japan
- Canada
- Taiwan
- Spain
- Ukraine
- Brazil
- Czech Republic
- Slovakia
- France
- South Korea
- Cards stored on a Google Account:
Prerequisites and Notes
- This guide assumes you have completed all account setup prerequisites, and are ready to integrate Google Pay into your payment flow.
- Use these gateway credentials in requests:
- For the test (sandbox) environment:
gatewayMerchantId
: “googletest“ - For the production environment:
gatewayMerchantId
: “nuveidigital“
- For the test (sandbox) environment:
- The Google Pay Web environment must be set up according to the Google Pay guidelines:
- Google Pay Web Developer Documentation
- Google Pay Brand Promoting Guidelines
For your domain to be verified with Google, the merchant must send Nuvei’s Integration Team screenshots (like the one shown below) of your payment flow along with your domain URL:
- Google Pay Test Card Suite
- Google Pay Web Integration Checklist
- The Google account used for testing should be linked to a relevant test card:
- Google Pay provides test cards, see Google Pay Test Card Suite for details.
- Alternatively, you can use one of the test cards listed in Testing Cards for REST 2.0.
Test credentials and testing scenarios can be provided by Nuvei if necessary.
You can contact Nuvei Support for any assistance.
Implementation
Follow these steps to implement Google Pay using Nuvei REST API 2.0:
- Authentication.
- Google Pay UI button.
- Collect card details.
- Integrate Google Pay for payments – Nuvei decrypts the Google Pay token.
Upon completion, customers are able to make payments using Google Pay.
Google Pay UI Button
- Create the Google Pay UI button according to the instructions in the Google Pay for Web Payments Brand Guidelines Guide.
- On your payment page, define the
tokenizationSpecification
constant as shown below.
(When the customer presses the Google Pay button, this parameter identifies your gateway and your site’s gateway merchant identifier.)Example
tokenizationSpecification
Requestconst tokenizationSpecification = { type: "PAYMENT_GATEWAY", parameters: { "gateway": "nuveidigital", "gatewayMerchantId": "googletest", //'googletest' for test or 'nuveidigital' for production } };
Collect Card Details
Pressing the Google Pay button collects your customer’s card details and returns them to you as an encrypted Google Pay token.
- The customer triggers the Google Pay payment flow by pressing the Google Pay button.
- Google Pay displays all the cards associated with the customer’s Google account, or asks the customer to “Add new credit or debit card” details.
- The customer selects a payment method and Google Pay returns the encrypted Google Pay token (containing the
paymentMethod
class in JSON format).
Payments – Nuvei Decrypts Token
The Google Pay token contains Google Pay authentication values from a successful Google Pay authentication. The merchant sends the encrypted Google Pay token as-is in a non-3DS /payments
request. Nuvei decrypts the token and uses the relevant data extracted from it.
Send a non-3DS POST /payments
request with its mandatory parameters and include:
paymentOption
class with:store
: “none“networkToken
class with:provider
: “GooglePay“token
: “<token received from Google Pay>“
Example Google Pay /payments
Request
{ "processingEntityId": "<your processingEntityid>", "transactionType": "Sale", "amount": 10, "currency": "EUR", "paymentOption": { "store": "none", "networkToken": { "provider": "GooglePay", "token": "<token received from Google Pay>" } }, "deviceDetails": { "ipAddress": "<customer's IP address>" }, "buyerDetails": { "buyerId": "<unique customer identifier in merchant system>", "firstName": "John", "lastName": "Smith", "email": "[email protected]", "phone": "6175551414", "billingAddress": { "address": "22 Main Street", "zip": "02460", "city": "Boston", "phone": "6175551414", "countryCode": "GB" }, "shippingAddress": { "sameAsBilling": true } }, "urlDetails": { "webhookUrl": "https://webhook.site/2f2334ce-d187-4e52-b71a-f93562f27a1b" } }
Example Non-3DS /payments
Response
{ "paymentId": "7b77229fa01d478cb369809f26534345", "transactionId": "8110000000001701567", "amount": 10, "currency": "EUR", "transactionType": "Sale", "result": { "status": "approved" }, "authCode": "111387", "partialApproval": { "requestedAmount": 10, "requestedCurrency": "EUR" }, "paymentOption": { "networkToken": { "provider": "GooglePay", "expirationMonth": "12", "expirationYear": "26", "bin": "476134", "last4Digits": "1390", "acquirerId": "19", "cardType": "Debit", "cardBrand": "VISA" } } }