Skip to main content

Set up Adyen Google Pay through REST API

Zuora

Set up Adyen Google Pay through REST API

Google Pay is a digital wallet payment method to support in-app, online, and in-person contactless payments on mobile devices. It enables users to make payments over the web or through Android devices with credit or debit cards stored in their Google account. 

Zuora supports setting up Google Pay and processing Google Pay payments and refunds with the Adyen Integration v2.0 payment gateway integrations. You can use the Zuora REST API to create a Google Pay payment method, and then it can be used to process payments and refunds through the UI and the REST APIs.

Limitations

  • Zuora’s implementation of Google Pay on Adyen does not support 3D Secure.
  • Google Pay is not compatible with Zuora's Payment Pages 2.0 feature.
  • Creation of Google Pay payment methods is only supported through the REST API. It is not supported through the Zuora UI.
  • See Adyen documentation for more information about Google Pay availability limitations on Adyen.

Configure Google Pay for Adyen Integration v2.0

Prerequisites

  • Enabled the Google Pay integration for your Adyen merchant account to be able to generate Google Pay tokens and process Google Pay transactions as described in Adyen documentation and the checklist before you go live.
  • In your Adyen merchant account, enable the following fields for the additional card data in the Adyen dashboard:
    • Card bin
    • Subvariant
    • Card summary
    • Expiry date
  • Ensure that an Adyen Integration v2.0 gateway instance is in active use in your Zuora tenant.

Procedure

Take the following steps to set up Adyen Google Pay:

  1. Obtain a Google Pay token.
  2. Enable Google Pay for Adyen in Zuora.
  3. Add a new Adyen Google Pay payment method in Zuora.

Obtain a Google Pay token

After Google Pay is enabled for your Adyen merchant account on the Adyen platform, obtain a Google Pay token from the Google Pay API PaymentData response. For more information about the fields this token contains, refer to Google Pay API documentation.

Enable Google Pay for Adyen in Zuora

Take the following steps to enable Adyen Google Pay in Zuora:

  1. In your Zuora tenant, navigate to Payments Settings > Payment Method.
  2. Click Edit and then select Adyen Google Pay.
  3. Click Save. The Google Pay payment method is then activated in your Zuora tenant.

Note that no update is required for your existing Adyen Integration v2.0 instance in Zuora to support Google Pay.

Add a new Adyen Google Pay payment method in Zuora

After you have enabled Google Pay in your Zuora tenant, you can create an Adyen Google Pay payment method and associate it with a customer account. 

Adyen Google Pay payment methods can only be created through the Zuora REST APIs. You can use the Create a payment method API operation to create a new Adyen Google Pay payment method, and the following fields must be specified in the request:

  • accountKey: Specify the customer account ID. This field is required unless the Orphan Payment Method feature is enabled.
  • type: Specify AdyenGooglePay.
  • googlePaymentToken: Specify the stringified Google Pay token.

You can also pass the shopperEmail information to the gateway through any of the following methods:

If shopperEmail is not provided through either the email or gatewayOptions field, the shopperEmail field in the payment request is set to the BillTo personal email if it is available. If BillTo personal email is not specified, the shopperEmail field is set to the BillTo work email.

The following code is a sample request for creating a new Google Pay payment method:

Method and endpoint POST  https://rest.apisandbox.zuora.com/apps/v1/payment-methods
Request body
{
  "accountKey": "2c92c0f97911f46a0179147510484b90",
  "type": "AdyenGooglePay",
  "email": "testemail@test.com",
  "googlePaymentToken": "{\"signature\":\"MEUCICeJTEEW+a9ak93yk8pYg4xGlPJbrBNjD8b6vahxD5TRAiEAyMiNhzosJDl2N46Dojzc53bwbT/O0t+VToLCqr01qs4\\u003d\",\"protocolVersion\":\"ECv1\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"aXpc95j3gEFJfaHF8PEpybNuV/k/IDKMa/FkbNnj2p/uaH8ll99hAUwWkH5EnHr2NwNgLuj3j9IhDomWI9gJ4n2fQlsQ9FsNuqsJjct/QuNvlzooLhu76HlzE3mScXcTUqPI1fgC8s/CVNz06aCUd7/oNMzyCw6VploO9abxp3zcpRvAO39bScaO3fri2Kl0WGozyiS0egXcUzMOpPxDw03SjmpgU/X5FjmxayOBUNxM9r/yOQyvY9mTUHOK855XVl3Xf9dpj6GDnDMp4bvCW8zpXWr76Snwtvv41dIaLxNWsBP0lS5PpJ5K1/rSRZg/dauIKQbWGmTTL24vz4Om7hVu25L7XrSM6F2PRUE4rqMblVDvXAlVsD+149r2fjXsB4DXmvGmwaDcuFeTDuI3ov7GDetgW3Fdl+n7RtBOK/luJYs76a9nPbVLhN/aKU5Hpd0ZrIO8ZUOoUYr6WuecD24tTzwic3k921eLJez8IJnG1k05kiqPpHEqMeLyP/WovjH/U7Vu3iDrH4yAxMEuh0MMi0tTgjXlVEezVnsU\\\",\\\"ephemeralPublicKey\\\":\\\"BGNnBpAd6WypQEYJmDH/DhUZ9mX2b/wJK6as8g6hZmDCDpHSWFC1BZ42UBrX/hrF/UarrT24CMcWLZp6fYl6PNw\\\\u003d\\\",\\\"tag\\\":\\\"j9fPmiEL/zj8R+0JRrTC1NgV9VVCYQ9zYaB7uZrEz9U\\\\u003d\\\"}\"}"
}
   

In addition to the Create a payment method operation, you can also use the following operations to create a Google Pay payment method together with other objects:

Once an Adyen Google Pay payment method is created, it cannot be edited. 

View and export payment method data

After an Adyen Google Pay payment method is successfully created, you can view this payment method from the customer account details page in the Zuora UI or the response of the API operations for retrieving payment methods.

All related information about Adyen Google Pay payment methods can be exported using the Method Specific Data field for the Payment Method data source. If you are not familiar with Data Source Exports, see Create a Data Source Export for instructions.

To filter only specific information about Adyen Google Pay payment methods, you can use several other Payment Method data source fields in combination. The following table provides the mapping relationship between Zuora data source fields and Adyen Google Pay fields.

Data source field Adyen Google Pay field Description
Method Reference Id GoogleGatewayToken The recurringDetailReference returned from Adyen after a successful response.
Sub-Type GoogleCardType The brand or type of the card. For example, Visa and Mastercard.
User Reference Id GoogleCardNumber The last 4 digits of the DPAN returned from Adyen as the card summary.

Note that in the Credit Card Type field in the UI and the googleCardType field in the API response, Zuora stores the first 100 characters of paymentMethodVariant returned from Adyen. 

Make payments with Adyen Google Pay

After a Google Pay payment method for Adyen has been added to a customer account, it can be used to make payments and refunds through the Zuora UI and all Payments API operations except for CRUD operations. 

Zuora’s payment numbers are used as references when processing payments. When a payment method is created, a random string is generated and temporarily used as the payment number. It will be updated later with a real Zuora payment number in payment processing.

You can pass the shopperEmail information to the gateway by using the gatewayOptions field in the Create a payment API operation. For more information about the logic of populating the shopperEmail field in the request, see Gateway Options fields supported by Adyen Integration v2.0.

Additional Adyen fields supported for Adyen Google Pay

The following Adyen fields are supported for Adyen Google Pay through Zuora's Adyen Integration v2.0:

  • expiryDate
  • paymentMethodVariant
  • cardSummary
  • cardBin