Setup Google Pay
Compatible with Android 5.0 and later.
With Google Pay in your application, you can allow users to securely pay with nearly all credit and debit cards.
info
Users can see Google Pay as a payment method in the following scenarios:
- When using a device compatible with Google Pay.
- If a user is located in a region where Google Pay is available.
- If a user already has Google Pay set up on their device.
To enable Google Pay in your app and start accepting payments, you must first set up the integration. To set up the integration, do the following:
- You must first enable the Google Pay API to use Google Pay. To do so, add the following snippet to
<application>
:
AndroidManifest.xml
<application>
...
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
</application>
- Request a
gatewayMerchantId
from Dojo. - Login to Google Pay portal and obtain your
Merchant Id
. - Upload screenshots of your app containing the checkout scenario to your Google Pay console for review.
- After Google approves your app, pass the
gatewayMerchantId
andMerchant Id
to the following code snippet:
- Kotlin
- Java
- React Native
capture-google-pay.kts
loading...
capture-google-pay.java
loading...
capture-google-pay.js
loading...
Testing Google Pay
The Google Pay Test Card Suite allows you to test Google Pay without the need of adding real cards to Google accounts.
To instantly view these cards in your Google Account TEST environment, join Google's User Group and all test cards will be automatically added to your account so you don't need to add them manually.