How to process a Google Pay payment
This how-to guide covers:
- Setting up your Google Pay integration for use with Mangopay
- Making payment requests.
For an overview of the data flows, see the Google Pay guide. To integrate Google Pay on your side, see the Google Pay documentation.
Prerequisites
- A
ClientId
and an API key – if you don’t have these, contact Sales to get access to the Mangopay Dashboard - A User object created for your end user, and their associated Wallet
- Google Pay integrated in your website or Android app
- Google Pay activated for your
ClientId
by Mangopay (contact our teams via the Dashboard)
1. Configure your Google Pay integration for Mangopay
When making payment requests to the Google Pay API, use the following values:
gateway
- The payment gateway used: in this case,whenthen
.gatewayMerchantId
- Your platform’sClientId
provided by Mangopay.allowedAuthMethods
- The supported authentication methods:PAN_ONLY
, meaning the card is registered in the user’s Google account and requires additional 3DS authentication;CRYPTOGRAM_3DS
, meaning the card is enrolled in the customer’s Google Wallet and authentication is handled by Google, with no 3DS redirection and no liability for the platform.allowedCardNetworks
- The card networks supported by Mangopay on Google Pay: onlyVISA
andMASTERCARD
.
Note - Ensure readiness of the rest of your Google Pay integration
Further integration steps are necessary to be able to offer Google Pay in your app or website, including creating the Google Pay button in line with their guidance.
For more information, see the Google Pay documentation.
2. Include payment data in the pay-in call
Include the payment data received from Google Pay for the payment as the value for the PaymentData
parameter in your request to the Create a Google Pay PayIn endpoint.
To be notified of the outcome, you can use the same webhook event types as for other pay-ins. The same pay-in functional errors are also possible.