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
Registered user checkout
iOS SDKAndroid SDK
Airwallex iOS SDK Privacy Details
Plugins
Native API
Automatic Currency Conversion
Invoice integrations

Android SDK

When capturing a Stored Credential for the first time

Android Recurring first time

  1. Create a customer object and pass it to your server if it is a new customer. Recurring payment requires a customer ID to be initiated.

    From your server, Create a Customer API with customer data received from client app and save the Customer ID returned.

  2. (Optional) If the shopper wishes to pay for the first order

    Your client app will need a PaymentIntent to form a payment session for Airwallex SDK to present payment flow.

    From your server, access Airwallex API to Create a Payment Intent API and pass the PaymentIntent returned to client app.

  3. Call AirwallexStarter.presentPaymentFlowto present the payment flow or the autentication flow to the shopper.

    a. PaymentIntent was created

    Call AirwallexStarter.presentPaymentFlow with an AirwallexRecurringWithIntentSession and a PaymentResultListener to present payment flow to the shopper. See sample code below for parameters required to create an AirwallexRecurringWithIntentSession.

    Java

    b. NO payment is required here

    Call AirwallexStarter.presentPaymentFlow with an AirwallexRecurringSession and a PaymentResultListener to present the authentication flow to the shopper. See sample code below for parameters required to create an AirwallexRecurringWithIntentSession.

    Java
  4. In your PaymentFLowListener, handle the authentication result returned from SDK and present it to the shopper.

    If PaymentIntent was created earlier, in onSuccess function above, ask your server to retrieve the payment result. From your server , retrieve the Payment Intent API after SDK has confirmed it with Airwallex API, and pass the payment result to your client app.

When initiating a subsequent one-click transaction (CIT)

Android Recurring CIT (card)

  1. Create a Payment Intent with Customer ID to request payment for this order. You will get Payment Intent ID and client_secret returned

  2. Call AirwallexStarter.presentPaymentFlow with an AirwallexSession and a PaymentResultListener to present payment flow to the shopper.

    Java
  3. Retrieve the Payment Intent API in onSuccess function above to get the payment result from the PaymentIntent after the SDK has confirmed it with Airwallex API.

When initiating a subsequent subscription and autodebit transaction (MIT)

MIT (card & E-wallet)

  1. From your server, Create a Payment Intent API to request for a subsequent payment.

  2. Confirm the Payment Intent API with reference to Payment Consent ID of the stored Payment Consent

On this page