Search...
Log inGet started
Airwallex logo
Home
Core API
Payments
Transactional FX
Payouts
Issuing
Back to home
OverviewChoose your payments solutionGet started with payments
Supported currencies
Online payments
Online payments overviewPayment Method Onboarding RequirementGet started with online paymentsHosted Payment Page
Drop-in Element
Embedded Elements
Mobile SDK
Guest user checkout
iOS Airwallex SDK
Android Airwallex SDK
OverviewBefore you startNative UI Integration
RedirectWeChat PayGoogle Pay
SDK Examples
Registered user checkout
Airwallex iOS SDK Privacy Details
Plugins
Native API
Automatic Currency Conversion
Invoice integrations

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 Google Pay API business console , this is not required since Airwallex manages this on your behalf.

Configure your SDK with required options to process Google 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.