Google Pay
Google Pay™ transactions can be processed via the Saferpay Payment Page, without much effort from you side. Note that Google Pay is not a classic means of payment, but rather a digital wallet. Your customers will still pay with Visa, Mastercard, or whatever credit card has been saved inside the wallet, thus the actual recorded payment method will correspond to this. However, Saferpay will also return information that this transaction has been performed through Google Pay. Furthermore, all options and limitations of the used means of payment apply, if not mentioned otherwise in this chapter.
The following chapter will guide you through the steps required in order to activate and use Google Pay.
Requirements
The handling of Google Pay payments with Saferpay requires:
The corresponding Saferpay eCommerce licence and thus the existence of a valid identification with a username and password for the Saferpay system.
Availability of at least one active Saferpay terminal by which payments can be carried out and availability of the associated Saferpay TerminalId.
Supported features
Since Google Pay is not a classical payment method, but a digital wallet, the supported features depend on the payment means, that are used.
Furthermore, the merchant can only accept payment methods, that are activated on the specified terminal Id.
The payment means within the wallet are then processed via the normal processors.
For example: If a card holder selects his Visa card, the card is then processed as such, through Google Pay as the wallet.
Supported Google Pay Features
Within Google Pay itself, Saferpay Supports the following featureset:
The Difference between PAN only and Cryptogram lies in the way authentication/3D Secure is handled:
Cryptogram: Authentication is handled by the device, e.g. by using the devices fingerprint sensor. This is limited to Android devices, using the Google Chrome browser! All other devices and browsers will always chose PAN Only!
Activation
The activation of Google Pay for your Saferpay account, be it live, or on the test-environment, requires next to no effort and can be done in a matter of seconds.
However, there are two options available to you, that represent the two integration methods available to you.
Payment Page
Business
You have to decide first, which option you want to use -you can use both, if you want- and then proceed to the activation itself:
2 - Next, select the e-Commerce, or Secure PayGate terminal on which you want to activate Google Pay.
3 - Navigate to the Wallets section, there you will find Google Pay.
4 - Activate Google Pay either for the Payment Page, or for the server to server Business flow.
If you are on the Test-Environment, please always use the Google Pay Simulator!
5 - You will be prompted with a message, to confirm your choice. Click Activate, to activate Google Pay.
6 - And you are done! Google Pay is now available for you on your Saferpay Terminal.
Integration
Google Pay is only available with SpecVersion 1.25 or higher.
The
Condition
parameter does only work for "PAN only" transactions.
Payment Page
However there are some optional features, you can implement, outside of the normal Payment Page flow.
Direct pre-selection
Due to restrictions from Google, Saferpay is not allowed to also directly select Google Pay! If you use this method, Google Pay will be displayed on the Payment Page, with the user having to select it.
If you are using PaymentMethods,
you must also submit Wallets
, if you want Google Pay to be displayed. Also, if you are just submitting one payment method, the Payment Page will still directly jump to the card entry form, skipping Google Pay.
If you are using Wallets
alongside PaymentMethods
, you can limit the brands which your customers can use. However, note that the Payment Page also will display the given brands as dedicated payment methods, so the customer might pay this way instead of using Google Pay.
Google Pay Server-to-Server
Saferpay also offers the option for you to integrate Google Pay directly into your application. This allows a more integrated and seamless solution, as it does not require the usage of the payment page.
Please follow the following steps, in order to directly integrate Google Pay.
1 - Google Pay Integration
It is important to know, that, at this stage, you are directly integrating the Google Pay Widget here and not Saferpay. Google Pay covers the gathering of your clients account data, while Saferpay will use it to create a transaction.
This also means, that your integration underlies all the terms and conditions, rules and guidelines, defined by Google!
Furthermore, please read the following guidelines and documentation:
For Web-Integration:
For Android:
Which integration-method you chose is up to you.
However, the one thing to take note of is to define the correct Payment Gateway, so Saferpay may process your clients data. Google already provides a code example, that has to be edited in the following way:
Javascript/Web
Java/Android
Set the gateway
to worldlinesaferpay
and the gatewayMerchantId
to the terminalId of the terminal, you have activated Google Pay on.
Once done, you can proceed to integrate Google Pay with Saferpay.
The important thing is, that you have to integrate Google Pay to the point, where you gather the Google Pay Payment Token which then needs to be passed to Saferpay.
2 - Submitting the token to Saferpay
Once you have the token, you need to submit it to the Saferpay payment gateway. In order to do so, you first need to pass the token to your backend, so it may be used in a server-to-server request.
How you do this, is up to you. You could use a normal POST, an AJAX-method, or other means to do so.
However never integrate the server-to-server communication to Saferpay on client-side, as it requires the Saferpay API credentials to be present. These could be extracted at this point, allowing an attacker easy access to your account!
Never store sensitive Data and Credentials on client-side!
Do not de-serialize the token as JSON. It must be passed as a string as is.
Saferpay takes the token, analyzes it and, depending on which of the two above methods has been chosen, one of the two results can occour:
2-A: PAN only
2-B: Cryptogram
The transaction will then behave like any other transaction, that has been initiated by the Transaction Interface.
There are two exception to this.
Testing
Last updated