Airwallex logo

Embedded Fields Integration

When capturing a Stored Credential for the first time

embedded fields - recurring

  1. Create payment method Element and display Element on your website
  2. Create a Customer if it is a new customer and save the Customer ID returned
  3. (Option 1) Generate a client secret for a Customer and save client_secret returned
  4. (Option 2) Create Payment Intent for the order with the customer ID. You will get client_secret returned. This step is only needed for shopper wishes to pay for the first order in the payment method binding process.
  5. Create payment consent and save Consent ID for subsequent transactions

When initiating a subsequent transaction using a Stored Credential

A. For subsequent Subscription and Autodebit (MIT) transactions: embedded fields - recurring2

  1. Create payment_intents to request for subsequent payments
  2. Confirm payment_intents with payment_consent_reference.id to request payment with reference to stored PaymentConsent

B. For subsequent Oneclick (CIT) transactions: embedded fields - recurring3

  1. Create payment_intents with customer id to request payment for this order. You will get customer_payment_methods and customer_payment_consents of this customer saved. Retrieve card information by using these 2 parameters and you are ready to display to your customer payment methods.
  2. Create Element and display the payment methods options to your customer.
  3. Confirm payment_intents with payment_consent_id to request payment