Airwallex logo

Hosted Payment Page Integration

When capturing a Stored Credential for the first time

HPP-capturing credential

  1. Create a Customer if it is a new customer and save the Customer ID returned
  2. (Option 1) Generate a client secret for the Customer and save the client_secret returned
  3. (Option 2) Create a 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.
  4. Create a redirect button which triggers Airwallex redirectToCheckout

When initiating a subsequent transaction using a Stored Credential

A. For subsequent Subscription and Autodebit (MIT) transactions: HPP-MIT

  1. Create a Payment Intent to request for a subsequent payment
  2. Confirm the Payment Intent with reference to Payment Consent ID of the stored Payment Consent

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

  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. Create a checkout button which triggers the Airwallex redirectToCheckout function and passes the Payment Intent ID and client_secret retrieved in the previous step