Google Pay

Get started with Google Pay
This page offers a comprehensive guide to successfully integrating Google Pay with DEUNA.
Google Pay is a digital wallet platform and online payment system that powers in-app, tap-to-pay, and website purchases. It enables users to make payments online from the Web and with Android phones, tablets and watches.
How it works
An integration with Google Pay is significantly different than other traditional payment methods, making it important to first understand its functionalities before integrating with DEUNA.
Use cases
You can use Google Pay for web purchases in your commercial strategy. Customers can use Google Pay for straightforward transactions while shopping on web browsers such as Google Chrome.
Key concepts
Purchases with a network token use a tokenized version of a card instead of transmiting a card's details. The process involves securely replacing the actual card information with a token and includes a dynamic cryptogram to validate and secure transactions.
This method protects sensitive customer data while enabling smooth and secure payments.
Network Token
A network token is a unique identifier issued by the card network (like Visa or Mastercard) and is specifically generated for secure and context-specific transactions, merchants, or devices.
The network token acts as a stand-in for the original card number, enabling secure transactions without exposing sensitive cardholder data. It is often paired with a cryptogram that protects the token against fraud.
Cryptogram
A cryptogram is a dynamic, transaction-specific code generated during a payment transaction to authenticate and secure the payment process. It is typically used in tokenized payment systems to add an additional layer of security.
The cryptogram is created by the card network or issuing bank, and is unique for each transaction. This ensures that, even if intercepted, it cannot be reused by attackers.
A cryptogram is often transmitted alongside the network token and is validated by the card network to authorize the transaction.
Why is a Network Token More Secure?
- Dynamic Security
- Traditional payments use fixed PAN and CVV, which can be intercepted and reused.
- Network tokens pair with a cryptogram, a one-time transaction-specific security code that cannot be reused if stolen.
- Card Number Concealment
- The original PAN is never exposed during transactions.
- Even if data is intercepted, the tokenized representation is useless outside its intended context.
- Revocability and Lifecycle Management
- Tokens can be easily revoked or replaced without affecting the underlying card.
- If a token is compromised, it is replaced without needing a new physical card.
Google Pay with DEUNA
This is a standard process for a Google Pay purchase in Deuna:
Card tokenization
- A customer adds a credit or debit card to their Google Pay app.
- Google Pay requests a token from the bank that issued that card.
- After tokenization, the card is now “tokenized” (it has a unique identification number associated with it).
- Google Pay encrypts the card and makes it ready for payments.
Google Pay purchase
- At the time of sale, Google Pay sends the customer’s tokenized card and a cryptogram, which acts as a one-time-use password used in the encryption process, to the merchant app along with basic transaction information.
- The next step, typically handled by the merchant app when using a traditional workflow without DEUNA, is to decrypt the payload from Google and send the payment token and related transaction information to a supporting processor.
- The token is sent to one of the few gateways that natively support Google Pay.
Secure authorization
- DEUNA receives the encrypted Google Pay payload from the merchant app and is responsible for decrypting the payment token and relaying the transaction information to a chosen gateway or receiver.
- The card network uses the token to retrieve the underlying card information in a secure environment and authorizes the payment without exposing the card.
- For the authentication method of the card transaction:
- authMethod in paymentMethodDetails, DEUNA supports PAN_ONLY and CRYPTOGRAM_3DS.
- PAN_ONLY gives support for payment methods that Google Pay deems are non-tokenized cards.
- CRYPTOGRAM_3DS gives support for payment methods that Google Pay deems are tokenized cards.
Requirements
Before integrating Google Pay into your DEUNA account, ensure you have
- Name: Gateway
- A Google Merchant id
- Private API Key
Keep in mind the following guidelines: Google Pay Web developer documentation, Google Pay Web integration checklist and [Google Pay Web Brand Guidelines].
Integration steps
Now that the technical requirements are set, you can start the step-by-step integration.
1. Configure your credentials
To set up your credential follow the steps for DEUNA's Admin documentation..
Then add your Google Pay™ credentials in the following configuration panel:
- Name: Gateway
- External MerchantID: Your Google Merchant id
- Private API Key
Enable 3DS
PAN_ONLY
credentials returned via Google Pay API.
2. Start a purchase
Make a Purchase using Google Pay and a network token.
Once an order has been generated, the Payment API receives the information the token instead of a credit card details, for further details regarding billing address parameters refer to API reference purchase section.
This token is used to make a purchase that provides the network token or cryptogram to perform a transaction.
Example request
// ... more fields deleted for simplicity
{
"processor_name": "kushki",
"amount": 1000,
"email": "[email protected]",
"specific_fields": {
"google_pay": {
"paymentData": {
"apiVersion": 2,
"apiVersionMinor": 0,
"paymentMethodData": {
"description": "Visa •••• 4655",
"info": {
"assuranceDetails": {
"accountVerified": true,
"cardHolderAuthenticated": false
},
"cardDetails": "4655",
"cardNetwork": "VISA"
},
"tokenizationData": {
"token": "{\"signature\":\"MEQCICcKYKgxIjOU3KnRh9XnTKzWQrZKjI0kcvKH2z1etqGzAiBw0eRf2JhB7EV/9wBQjoasHSi9Cmbs0dHwVs6yelITAA\\u003d\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECYB8LbM/sbZhW+JwlKM4WMivuD7eN0weP2UgJ99hY+Wh8cZumzmUaGLUpB3FwHSUfzx3TcZmBNN2lpi96a2b2w\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1734027487566\\\"}\",\"signatures\":[\"MEYCIQCrX4N/apPBNyKtsReihGwUBk22496hC/7yojep26/oQwIhAII1eMQ95ywl3oYH0uFKNT9yFNCW0g9S4P9HFWJLYNMS\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"Gjzp+nTdbu40IbeDy5P66+yugMl8D+dH+0N2Adb9MCUvkZR+fgyHQHFuNdilE5Y/F7YnJ/5CY4GOywsCxlby3Om/ZQhmDbrYAvGJiFyXA5sJyyztoob8CeUQIbokYrBXiLFrbheZ/A9wakrg3lIvCVgjRC9R+DU5/8H3o/n9HTW4wwkMM/HS2vvhl5ZEyinrI4TWeDXIwBTC//+DLL4MFIyv9k+oEB7dta9ZOM4DLTdOW4KGzKEbXPRRIUXG37fuakAQNUV1fCSOB+UeiGtCeG7K+Qj7xhomn1e8tc+UY7SW8aXUwtg6zUvMdtewTl/DmjVAkjXiosL3Ao1BxC3ytrz99LU0KIIL0MQfJJk9pAVGm0Ux3gYydK7otW9iawRz7sleZnYtHeNmUICisX4n04ZZamrUYGk\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BPw80izPiMUvR8fxfi4mXMNpdbFCKxQ5bd6tkAYcrSgCsd2yCA5QV90WfgbE2WbRQkDTRGLkAUJnQMn0+aB/lB4\\\\u003d\\\",\\\"tag\\\":\\\"FmT/q+dV+G/fERDTaao7HYeiAsGMEjiiXriKpbeC1qI\\\\u003d\\\"}\"}",
"type": "DIRECT"
},
"type": "CARD"
}
}
}
},
"credit_card": {
"expiry_month": "",
"expiry_year": "",
"card_holder": "Duna Developers",
"card_holder_dni": "185396924",
"card_holder_number": "310.555.124",
"card_number": "",
"card_cvv": "",
"address1": "Vergara 548",
"zip": "001100",
"city": "santiago",
"state": "rm",
"country": "cl",
"phone": "12345755"
},
"billing_address": {
"email": "[email protected]",
"identification": "050623568956124",
"id": 13,
"user_id": "ebd6105c-b2ae-11eb-8529-0242ac130003",
"first_name": "NELSON",
"last_name": "JIMENEZ",
"phone": "593986100449",
"identity_document": "1150218418",
"lat": -0.100032,
"lng": -78.46956,
"address1": "Av. Eloy Alfaro 20, Quito 170515, Ecuador BILLING Purchase",
"address2": "Av. Eloy Alfaro 20, Quito 170515, Ecuador",
"city": "Quito",
"zipcode": "170515",
"state_name": "CRT",
"country": "EC",
"additional_description": "Descripción adicional",
"address_type": "home",
"is_default": false,
"created_at": "2021-11-03T22:09:09.086990957Z",
"updated_at": "2021-11-03T22:09:09.087014623Z"
}
}
3. Process the payment
4. Validate the payment
Updated about 4 hours ago