Airwallex logo

Embedded Fields Integration

When capturing a Stored Credential for the first time

Embedded Fields - capturing credential

  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-MIT

  1. Create payment_intents with corresponding Customer ID
  2. Confirm payment_intents with payment_consent_reference.id to request payment with reference to stored PaymentConsent

B. For subsequent Oneclick (CIT) transactions: EF-CIT

  1. Create payment_intents with corresponding Customer ID
  2. Query payment_consents and payment_methods (optional if no consent with card) with the corresponding Customer ID to render the list of customer’s payment consents they previously verified
  3. Create Element and display the payment methods options to your customer
  4. Confirm payment_intents with payment_consent_id to request payment