Google Pay
This documentation is intended for merchants integrating ePay Blocks directly. If you are using ePay Checkout, no additional setup is required for Google Pay.
We recommend that all merchants use the Quick Setup guide, as it reduces the maintenance burden on your integration. By using Quick Setup, ePay can automatically apply updates to your integration for any future changes to Google’s protocols.
Quick Setup
To integrate Google Pay, make the following changes to your implementation, where googlePayContainer is the id referring to the div element of the Google Pay button
<script async src="https://pay.google.com/gp/p/js/pay.js" onload="epay.onGooglePayLoaded()"></script>...let clientReady = epay .setSessionId("<-- sessionId here -->") .setSessionKey("<-- sessionKey here -->") .init();epay.mountGooglePayButton('googlePayContainer', { buttonColor: 'black', buttonType: 'buy', buttonRadius: 48, buttonSizeMode: 'fill', },);Google Pay button style
Refer to Customize your button to preview different styles of the Google Pay button.
Advanced Setup
If you have any special needs, like tracking, regarding Google Pay transactions and the in-app experience you can modify the payment flow by manually creating the Google Pay payment session.
Card schemes
We support the following card schemes: Visa, Mastercard, Amex, JCB and Discover for merchants in the Nordic region (Denmark including Greenland and Faroe Islands, Norway, Sweden, Finland and Iceland)
Technical details
Other rather technical details regarding Google Pay integration follow below.
TokenizationSpecification
Regarding TokenizationSpecification object, which is part of request to loadPaymentData, set the parameters accordingly:
- parameter: gateway: epay
- parameter: gatewayMerchantID set this to Point Of Sale Id - available from ePay Backoffice
"tokenizationSpecification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "epay", "gatewayMerchantId": "263c20dc-20de-11f0-914a-00155d32ef77" }}SCA / 3DS
Regarding strong customer authentication (3DS) for PAN_ONLY authentication method - this is - like other transactions - controlled by the scaMode parameter when initializing the payment session. Default is NORMAL and will ensure 3DS flow is attempted - further details
Billing Address
Google Pay allow filtering on cards returned by the wallet to e.g. only allow cards with full billing address specified. We don't require BillingAddressParameter to be specified. Refer to the Google Pay reference for details regarding object BillingAddressParameters
External references
- Google Pay Web developer documentation
- Google Pay Web integration checklist
- Google Pay Web Brand Guidelines
- Google Pay Customize your button
Register merchant
To accept Google Pay payments, you need to register as a merchant with Google Pay and configure your merchant accordingly.
This guide walks you through the necessary steps.
Please note that Google Pay Terms of Service terms apply whenever the Google Pay service is offered.
Create a Merchant ID
Follow the steps on Google Pay Publish your integration
Notes regarding the described steps:
-
Via Google Pay & Wallet Console you register your business and manage the domain(s) and sub-domain(s) you want to use with Google Pay.
-
ePay hosts a supported payment gateway
-
Once the MerchantId is obtained, submit it to the ePay backoffice
Navigate to Payment / Point of sale / Google Pay tab and enter your Google Pay Merchant id and update settings (save).
This replaces the step about explicit set the merchantId property on the merchantInfo object, as this is done by the ePay Javascript class. -
Likewise for the initialization of PaymentsClient - this is wrapped by the ePay Javascript class