Android SDK
When capturing a Stored Credential for the first time

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 IDreturned.(Optional) If the shopper wishes to pay for the first order
Your client app will need a
PaymentIntentto 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
PaymentIntentreturned to client app.Call
AirwallexStarter.presentPaymentFlowto present the payment flow or the autentication flow to the shopper.a. PaymentIntent was created
Call
AirwallexStarter.presentPaymentFlowwith anAirwallexRecurringWithIntentSessionand aPaymentResultListenerto present payment flow to the shopper. See sample code below for parameters required to create anAirwallexRecurringWithIntentSession.Javab. NO payment is required here
Call
AirwallexStarter.presentPaymentFlowwith anAirwallexRecurringSessionand aPaymentResultListenerto present the authentication flow to the shopper. See sample code below for parameters required to create anAirwallexRecurringWithIntentSession.JavaIn your
PaymentFLowListener, handle the authentication result returned from SDK and present it to the shopper.If
PaymentIntentwas created earlier, inonSuccessfunction 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)

Create a Payment Intent with Customer ID to request payment for this order. You will get Payment Intent ID and client_secret returned
Call
AirwallexStarter.presentPaymentFlowwith anAirwallexSessionand aPaymentResultListenerto present payment flow to the shopper.JavaRetrieve the Payment Intent API in
onSuccessfunction above to get the payment result from thePaymentIntentafter the SDK has confirmed it with Airwallex API.
When initiating a subsequent subscription and autodebit transaction (MIT)

From your server, Create a Payment Intent API to request for a subsequent payment.
Confirm the Payment Intent API with reference to Payment Consent ID of the stored Payment Consent