Google Pay

Google Pay

The Google Pay offers a quick and easy path to enable secure, one touch payments in your app.
This guide explains how to process payments with our SDK.


  • A Mobile SDK integration (Ready-to-Use UI or SDK & Your Own UI)
  • A Google account, when you're ready to deploy your Google Pay integration, sign-up to get access and test with production credentials.


Open the build.gradle file in the app module and add the following to the dependencies block:

dependencies {
    implementation ''
    implementation ''
    implementation ''
    implementation ''

You can find detailed instructions in the Google Pay API.

Adding the Google Pay to your app must be done in one of two ways, depending on whether you are using the Ready-to-Use UI or the SDK & Your Own UI. These two ways are covered in the sections below. Please follow the instructions relevant to the approach you have chosen.

Ready-to-Use UI

Create the CheckoutSettings, and add the GOOGLEPAY payment brand:

Set<String> paymentBrands = new HashSet<String>();

CheckoutSettings checkoutSettings = new CheckoutSettings(checkoutId, paymentBrands, Connect.ProviderMode.TEST);

Set the entity id, allowed payment methods and allowed card networks:

checkoutSettings.setGooglePayAllowedPaymentMethods(new Integer[] {
checkoutSettings.setGooglePayAllowedCardNetworks(new Integer[] {

If you are using CheckoutActivity, set up the Intent and start the activity:

Intent intent = checkoutSettings.createCheckoutActivityIntent(this);

startActivityForResult(intent, CheckoutActivity.REQUEST_CODE_CHECKOUT);

If you integrate the Google Pay using our drop-in buttons, set the GOOGLEPAY payment brand.

PaymentButtonFragment paymentButtonFragment = new PaymentButtonFragment();


SDK & Your Own UI

Follow this tutorial to integrate the Google Pay into your UI.
Use the following parameters:

gateway = "aciworldwide"
gatewayMerchantId = "YOUR_ENTITY_ID"
To make a transaction create the GooglePayPaymentParams with a received token:

PaymentParams paymentParams = new GooglePayPaymentParams(checkoutId, token);

And submit the transaction:

Transaction transaction = null;

try {
    transaction = new Transaction(paymentParams);
} catch (PaymentException ee) {
    /* error occurred */