Skip to main content

Google Pay™

note

We're working hard on finishing our Google Pay integration - the information available here is how to integrate and use it - once we're done!

This documentation is intended for merchants integrating ePay Hosted Fields directly. If you are using the ePay Payment Window, 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