How it works
When a user taps the Google Pay payment button, they see a payment sheet. It displays the payment methods they've saved to their Google Account and optional fields such as a shipping address. Users can then select a payment method quickly and provide a shipping address if required, or they can add new information.
In-app payment
The Google Pay API enables fast, simple checkout within your app, giving you convenient access to hundreds of millions of cards saved to Google Accounts worldwide.
These above screens represent a recommended Google Pay buy flow for a shopping cart experience.
These guidelines will help you implement Google Pay within your apps: https://developers.google.com/pay/api/android/guides/brand-guidelines.
Web payment
The Google Pay API enables fast, simple checkout on your website. This provides convenient access to hundreds of millions of cards that are saved to Google Accounts worldwide.
The above screens represent a recommended Google Pay buy flow for a shopping cart experience.
These guidelines will help you reference the Google Pay brand within your websites: https://developers.google.com/pay/api/web/guides/brand-guidelines.
Step by Step Set-Up Guide
Once you have decided to support Google Pay, there is a set of steps that need to be done. This guide is applicable for both, in-app and also web payments.
1. Verify if your Acquirer supports Google Pay, for the card networks supported and support for Android device tokens.
This information will be provided by Multiexcerpt include |
---|
SpaceWithExcerpt | EN |
---|
MultiExcerptName | Partner-Name |
---|
PageWithExcerpt | Wording |
---|
|
support team: Multiexcerpt include |
---|
SpaceWithExcerpt | EN |
---|
MultiExcerptName | Helpdesk-Name |
---|
PageWithExcerpt | Wording |
---|
|
.
2. If you already do not have one, request creation of Multiexcerpt include |
---|
SpaceWithExcerpt | EN |
---|
MultiExcerptName | Partner-Name |
---|
PageWithExcerpt | Wording |
---|
|
Merchant ID, unique identifier that represents a merchant in Multiexcerpt include |
---|
SpaceWithExcerpt | EN |
---|
MultiExcerptName | Platform-Name |
---|
PageWithExcerpt | Wording |
---|
|
platform. You need to use Multiexcerpt include |
---|
SpaceWithExcerpt | EN |
---|
MultiExcerptName | Partner-Name |
---|
PageWithExcerpt | Wording |
---|
|
Merchant ID also in Google Pay API.
Please contact Multiexcerpt include |
---|
SpaceWithExcerpt | EN |
---|
MultiExcerptName | Partner-Name |
---|
PageWithExcerpt | Wording |
---|
|
support team: Multiexcerpt include |
---|
SpaceWithExcerpt | EN |
---|
MultiExcerptName | Helpdesk-Name |
---|
PageWithExcerpt | Wording |
---|
|
.
3. Integrate Google Pay API: https://developers.google.com/pay/api/.
Apps: https://developers.google.com/pay/api/android/overview
Web: https://developers.google.com/pay/api/web/overview
a. For payment tokenization method, choose “GATEWAY”, with following values:
const tokenizationSpecification = { type: “PAYMENT GATEWAY”, parameters: { 'gateway': 'computop', 'gatewayMerchantId': 'yourComputopMerchantID' } |
b. For supported payment card networks, choose the ones your acquirer is supporting:
const allowedCardNetworks = ["AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA"]; |
c. The Google Pay API may return cards on file on Google.com (PAN_ONLY) and/or a device token on an Android device authenticated with a 3-D Secure cryptogram (CRYPTOGRAM_3DS).
Please make sure that you define CRYPTOGRAM_3DS only if your acquirer is supporting this functionality. Please contact Multiexcerpt include |
---|
SpaceWithExcerpt | EN |
---|
MultiExcerptName | Helpdesk-Name |
---|
PageWithExcerpt | Wording |
---|
|
to verify this point if needed.
const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"]; |
If you are operating in EEA region, please define CRYPTOGRAM_3DS only, as these payments are already Strong Customer Authenticated in Google Pay wallet and therefore compliant with PSD2 SCA regulation.
Note: If you receive Soft Decline in Response, you need to restart the payment with 3-D Secure authentication.
d. In response from Google Pay API, you should receive Token similar to this:
Code Block |
---|
|
{
"signature": "MEQCIC4z/QHSrzekRkkuk3vGYxBTBdNgEQl5XFHx0Wk5fFLIUAiB3+q227havAJdagfGZaMXbefhatdJE7Df2qrIoKDv1Og==",
"protocolVersion": "ECv1",
"signedMessage": "{\"encryptedMessage\":\"bOYRmExGeCsBrFqESt7kd9O1FN+vQZf2KG0UNYC8jNA+VVf9nQeK7lDvU8k37cH+LOziJQkHNL2OxDHIk6GoRV1BrXprwBnAJR0O2VnCUH8lsqq0ELwemeqW364Ir8cU/hDFzWNp+38H25JVDAMExZBKodMMTzUXXgyO+s5jOyAl8jUhnAw3fTRPkefuYsE8NFK5tvcs4L29h87Zo7ot0/8XrUhXt9b/Fld1LEthkuPSN+K1eEFP7bseB6jjRdHnwYAdqiE3iOmh71pcDmNIyrlWRj74UJaszeerZW7DoZNx11oN7fouq/8fe1vklsr/e+y/RSG2nQMWg5yR/fMTfqCyabTDhJMvMM1Zhe91+dQ0/xi/zKRgsIhiongJUjYtoSNIjUHnMLRuVTKdjX50CCI1QOiBtr9h0bOLePhxw9cLYeU1KwCfYJyt28DBKCvaWFSbCl+dzNcZ9B83kv\",\"ephemeralPublicKey\":\"BFUju73/IT/KqnB/nc0W3BaL3BXFybrbYaPiMCKXIcg78PbslwV7MRUq3SpWEDEJT6pakLCvf34412HbDGCpsa4\\u003d\",\"tag\":\"xIuCUWB2U6yWEfidsJpQaa+leU/kqS522JLOnrnk42g\\u003d\"}"
} |
You need to Base64 encode the whole token string and include it in Multiexcerpt include |
---|
SpaceWithExcerpt | EN |
---|
MultiExcerptName | Platform-Kurz |
---|
PageWithExcerpt | Wording |
---|
|
parameter TokenExt.
Process flow chart
Multiexcerpt |
---|
MultiExcerptName | ProcessFlow |
---|
|
draw.io Diagram |
---|
border | true |
---|
diagramName | Google Pay Payment |
---|
simpleViewer | false |
---|
links | auto |
---|
tbstyle | top |
---|
lbox | true |
---|
diagramWidth | 1109 |
---|
|
Google Pay process flow |