Google Pay™
Overview
Google Pay allows customers to make secure, one-tap payments using their saved cards from their Google Account. It provides a seamless checkout experience across Android devices and Chrome browsers, reducing friction and improving conversion rates.
Key Features
Faster, Simpler Checkout
Customers can complete purchases with a single tap using cards saved to their Google Account. There is no need to manually enter card numbers or billing details.
Secure by Design
Google Pay protects your customers' payment information through built-in security measures and encryption. Sensitive card details are never shared directly with your business, keeping every transaction safe.
Trusted Across Devices
With native support across Android apps and web browsers, Google Pay delivers a consistent and reliable payment experience on any device.
How does it work?
- When a customer is ready to checkout, they'll choose the Pay with Google Pay button on the PayMongo Checkout page.
- The user will then be prompted to select any cards previously stored in their Google Pay account.
- Once the card is selected, the customer can click "Pay" to proceed with the transaction.
Pre-requisites
Account configuration is required This feature is only available for M2 accounts.
If you are the account owner and you don't see the prompt on your dashboard, feel free to reach out to [email protected]
Once enabled, you can start integrating Google Pay on your custom website or app.
For API Users: We need to onboard your account (whether you are planning to use our test keys or live keys) before you can start testing and integrating.
Google Pay is available on the PayMongo Checkout page, making it accessible to all users of Checkout API, Shopify, Pages, and Links. Customers can pay using any card saved to their Google Account that supports Google Pay.
To start using Google Pay, merchants are required to comply with Google Pay and Wallet API's Acceptable Use Policy and accept the terms defined in the Google Pay API Terms of Service.
Implementation
Integrating Google Pay through the Payment Intent Workflow
The payment intent workflow is the main workflow used to make payments via PayMongo. Before getting started with integrating Google Pay, make sure that you are familiar with the payment intent workflow. To enable Google Pay, a few additional steps just needs to be added to the existing workflow.
- Create a Payment Intent and include
google_pay_cardunder thepayment_method_allowedarray. - Add Google Pay as a button on your checkout page. For website integration, follow these steps:
- Set the following values in the
tokenizationSpecificationobject:gateway: set this value to thepaymongo.gatewayMerchantID: set this value to your organization ID available in your PayMongo dashboard.
"tokenizationSpecification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "paymongo",
"gatewayMerchantId": "org_abcdefg123456"
}
}- PayMongo currently supports Mastercard and VISA card networks with the Google Pay API. You can define these values in the
allowedCardNetworksproperty:
const allowedCardNetworks = ['MASTERCARD', 'VISA'];- Google Pay integration provides two different authentication option:
PAN_ONLY: physical card details stored in Google Pay.- 3DS required: yes, standard 3DS flow applies.
- Availability: all enabled merchants.
CRYPTOGRAM_3DS: tokenized virtual card stored on device.- 3DS required: no, authentication is performed by Google Pay.
- Availability: coming soon.
const allowedCardAuthMethods = ["PAN_ONLY"];- When a customer pays with Google Pay, it generates an encrypted payment data. Extract the encrypted payment data from the
paymentMethodData.tokenizationData.tokenproperty of thePaymentDataresponse object. - Submit the serialized token into the Payment Method request:
curl --request POST \
--url https://api.paymongo.com/v1/payment_methods \
--header 'Content-Type: application/json' \
--header 'accept: application/json'
--header 'authorization: Basic {BASE64_API_KEY}'
--data '
{
"data": {
"attributes": {
"type": "google_pay_card",
"details": {
"token": "{GOOGLE_PAY_TOKEN}"
}
}
}
}'- Finish the transaction by attaching Payment Method.
Updated 1 day ago
