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 paymentsAirwallex platform overviewOnline payments modelPricing model
Features
3D Secure authenticationSave payment details for future payments
Hosted Payment PageEmbedded ElementsRedirect/QR Code ElementDrop-in ElementMobile SDK
iOS SDKAndroid SDK
Native API
Multi-currency pricingFraud managementRiskNetwork TokenizationDisputes

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