Log inGet started
Airwallex logo
Home
Online Payments
Treasury
Transactional FX
Payouts
Issuing
Scale
Open Banking
Developer Tools
API Reference
Home
Online Payments
Overview
Starting with paymentsTransaction and settlement modelPricing model
Integration options
Integration OverviewPayment LinksPayment Links APIHosted Payment PageEmbedded ElementsDrop-in ElementMobile SDK
iOS Airwallex SDKAndroid Airwallex SDK
OverviewBefore you startNative UI Integration
RedirectWeChat PayGoogle Pay
SDK Examples
Native APIPlugins

Google Pay

This guide describes how to add Google Pay to your Airwallex Android SDK integration.

In addition to this, please refer additional material

  1. Google Pay API setup instructions
  2. Google Pay button brand guidelines
  3. Google Pay UX best practices

When setting up your Google registration, use the following Airwallex details when you are requested to provide your gateway information to tokenize card details:

gateway : airwallex gatewayMerchantId : Your merchant name as registered with Airwallex

Step 1 : Install Google Pay component

SDK components are available through Maven Central, you only need to add the Gradle dependency.

To install the SDK, in your app-level build.gradle, add the following:

Step 2 : Configure the SDK

We provide GooglePay parameter that can be used to debug the SDK, you can call it in Application. Please refer sample code below:

Step 3 : Setup Google Pay on SDK

As a merchant you need to complete the registration with Google following the integration guidelines . Request production access to use Google Pay API once the integration checklist is complete.

Note : Do not fill information under direct integration section on Goolge Pay API business console , this is not required since Airwallex amanges this your behalf.

Configure your SDK with required options to process Goolge Pay transactions. Refer code sample below:

( allowedCardAuthMethods = listOf("CRYPTOGRAM_3DS") billingAddressParameters = BillingAddressParameters(BillingAddressParameters.Format.FULL), shippingAddressParameters = ShippingAddressParameters(listOf("AU", "CN"), true) ) val paymentSession = AirwallexPaymentSession.Builder ( paymentIntent = ..., countryCode = ..., googlePayOptions = googlePayOptions )

Step 5: Present the payment sheet to shopper

Present the payment sheet to the shopper, Use presentPaymentFlow to complete the payment, you need to pass in a AirwallexSession object.

Step 6 : obtain the payment result

To obtain the payment result, you can use the retrievePaymentIntent method and check the latest status. Then you can prompt the shopper with the result.

Customise googlePay options

You can customize the Google Pay options to restrict as well as provide extra context. For more information, please refer to GooglePayOptions class below:

You can also overwrite color values in your app, refer link for more details.