redirectToCheckout(props)
Function to redirect the shopper in a Hosted Payment Page(HPP) integration.
Returns
string | void1import { init } from '@airwallex/components-sdk';23const { payment } = await init({4 env: 'demo', // Choose the Airwallex environment ('demo' or 'prod')5 enabledElements: ['payments'],6});7payment.redirectToCheckout({8 intent_id: 'replace-with-your-intent-id',9 client_secret: 'replace-with-your-client-secret',10 currency: 'replace-with-your-currency',11 country_code: 'replace-with-your-country-code',12});
HostedPaymentPageOptions
Configuration option for Hosted Payment Page(HPP), a checkout solution that redirects shoppers to a secure, pre-built payment page hosted by Airwallex.
The client_secret of the Payment Intent when Payment Intent is provided. Otherwise, this should be the client_secret of the Customer object.
The three-letter ISO currency code representing the currency of the Payment Intent or Payment Consent.
One or more card networks that you support.
Checkout configuration options for Apple Pay.
The authorization type for the card payment. Set it to 'pre_auth' if you want to place a hold on your customer’s card for more than 7 days, i.e., extend the authorization time window. Currently 'pre_auth' is only available when the card brand is Visa or Mastercard. autoCapture will be automatically set to false if you enable 'pre_auth'. Default value is 'final_auth'.
Whether the amount should be captured automatically upon successful payment authorization. Set it to false if you want to place a hold on the payment method and capture the funds sometime later. Default value is true.
The two-letter ISO country code of the shopper's country. This is required for bank_transfer, online_banking, skrill or seven_eleven payment methods.
The ID of the Customer used in registered user checkout. Refer to Airwallex Client APIAPI This field is required when mode is 'recurring'.
Whether you require the shopper to provide CVC when they checkout with a network tokenized card.
Whether auto redirect to the URL specified by the merchant should be disabled. Default value is false.
The Airwallex integration environment your site would like to connect with. Default value is prod.
The HTPS URL to redirect shoppers when payment fails.
Checkout configuration options for Google Pay.
The ID of the Payment Intent you would like to checkout. Required when mode is 'payment'.
The URL of your website logo to display on the header of the Hosted Payment Page.
The payment methods your website would like to integrate with.
When using Payments for Platforms, specify the ID of the connected account associated with the payment if you want to use its information to process the payment. For example, the statement descriptor displayed on the shopper's credit card or bank statement and the payment methods activated by the connected account.
Options for recurring flow.
The billing information that you require from the user in order to process the transaction.
The shopper's email address.
The shopper's full name.
The shopper's phone number.
The HTTPS URL to redirect shoppers when payment is successful.
The options for WeChat Pay.
The payment methods your website would like to integrate with.
Used to increase the likelihood of 3DS frictionless checkout. Set this to true if you want the payment form to collect billing information from the shopper. Only applies to card payment method.