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