Drop-in Element - Airwallex.js
Search documentation
Ask Kai
Ask Kai
Drop-in Element
Copy for LLMView as Markdown
The Drop-in ElementDocs lets you embed multiple payment methods with a single integration while offering options to customize the look and feel of the checkout experience.
createElement('dropIn', options?)
Use this function to create an instance of an individual Element.
Parameters
type required'dropIn'
The type of element you are creating.
options optionalDropInElementOptions
Options for creating dropIn Element.
HideDropInElementOptions properties
client_secret requiredstring
The client_secret of the Payment Intent when Payment Intent is provided. Otherwise, this should be the client_secret of the Customer object.
currency requiredstring
The three-letter ISO currency code representing the currency of the Payment Intent or Payment Consent. Only payment methods supported for the specified currency will be shown on the payment page.
allowedCardNetworks optional('visa' | 'mastercard' | 'maestro' | 'unionpay' | 'amex' | 'jcb' | 'diners' | 'discover')[]
One or more card networks that you support.
appearance optionalDropInAppearance
Customize the visual appearance of the DropIn Element to match your website's design.
ShowDropInAppearance properties
mode optional'light' | 'dark'
The appearance mode for the Element. Accepts 'dark' or 'light' modes where each mode provides a different color variable preset and color generation logic.
Default: 'light'
rules optionalobject
Set rules to further customize the appearance of the Element.
Showobject properties
.ApplePayButton optionalCSSProperties
.ApplePayButton:hover optionalCSSProperties
.Button optionalCSSProperties
.Button:hover optionalCSSProperties
.GooglePayButton optionalCSSProperties
.GooglePayButton:hover optionalCSSProperties
.Input optionalCSSProperties
.Input:active optionalCSSProperties
.Input:hover optionalCSSProperties
variables optionalVariables
Set variables to customize the Element's appearance. All color values can be specified in either RGB or HEX format.
ShowVariables properties
colorBackground optionalstring
Sets the primary background color. This option also generates a complete set of background colors, including primary, secondary, field, and disabled backgrounds.
Default: '#ffffff' (light mode) and '#14171A' (dark mode)
colorBrand optionalstring
Sets the main accent color used for Elements such as text links, focus borders, interactive backgrounds, highlights, etc.
Default: '#612fff' (light mode) and '#ABA8FF' (dark mode)
colorText optionalstring
Sets the primary text color. This selection automatically expands to generate a comprehensive color set, including secondary text, inverse text, disabled text, placeholder text, and more.
Default: '#14171a' (light mode) and '#F5F6F7' (dark mode)
applePayRequestOptions optionalApplePayRequestOptions
Checkout configuration options for Apple Pay.
ShowApplePayRequestOptions properties
countryCode requiredstring
The merchant's two-letter ISO 3166 country code. For example, 'US'.
applicationData optionalstring
Optional user-defined data.
billingContact optionalApplePayPaymentContact
Billing contact information for the shopper.
ShowApplePayPaymentContact properties
addressLines optionalstring[]
The street portion of the address for the contact.
administrativeArea optionalstring
The state for the contact.
country optionalstring
The name of the country for the contact.
countryCode optionalstring
The contact’s two-letter ISO 3166 country code.
emailAddress optionalstring
An email address for the contact.
familyName optionalstring
The contact's family name.
givenName optionalstring
The contact's given name.
locality optionalstring
The city for the contact.
phoneNumber optionalstring
A phone number for the contact.
phoneticFamilyName optionalstring
The phonetic spelling of the contact's family name.
phoneticGivenName optionalstring
The phonetic spelling of the contact's given name.
postalCode optionalstring
The zip code or postal code, where applicable, for the contact.
subAdministrativeArea optionalstring
The subadministrative area (such as a county or other region) in a postal address.
subLocality optionalstring
Additional information associated with the location, typically defined at the city or town level (such as district or neighborhood), in a postal address.
buttonColor optional'black' | 'white' | 'white-outline'
Indicate the color of the button.
Default: 'black'
buttonType optionalenum
Supported methods for presenting the Apple Pay button.
A translated button label may appear if a language specified in the viewer's browser matches an available language.
Show possible enums
add-money
Useful for adding money to a card, account, or payment system.
book
Useful for booking trips, flights, or other experiences.
buy
Useful for product purchases.
check-out
Useful for purchase experiences that include other payment buttons that start with "Check out".
continue
Useful for general purchases.
contribute
Useful to help people contribute money to projects, causes, organizations, and other entities.
donate
Used by approved nonprofit organization that lets people make donations.
order
Useful for placing orders for items such as meals or flowers.
pay
Useful for paying bills or invoices.
plain
Shows Apple Pay logo only, useful when an additional call to action isn't needed.
reload
Useful for adding money to a card, account, or payment system.
rent
Useful for renting items such as cars or scooters.
set-up
Useful for prompting the user to set up a card.
subscribe
Useful for purchasing a subscription such as a gym membership or meal-kit delivery service.
support
Useful for helping people give money to projects, causes, organizations, and other entities.
tip
Useful for letting people tip for goods or services.
top-up
Useful for adding money to a card, account, or payment system.
existingPaymentMethodRequired optionalboolean
Whether the shopper must have an active card provisioned in Apple Pay.
When set to true, the Apple Pay button will only be displayed if the user has
an active card in their Apple Pay wallet, checked via
ApplePaySession.canMakePaymentsWithActiveCard().
Default: false
lineItems optionalApplePayLineItem[]
A set of line items that explain recurring payments and/or additional charges.
ShowApplePayLineItem properties
amount requiredstring
The line item's amount.
label requiredstring
A short, localized description of the line item.
automaticReloadPaymentThresholdAmount optionalstring
The balance an account reaches before the merchant applies the automatic reload amount.
deferredPaymentDate optionalDate
The date, in the future, of the payment.
paymentTiming optional'immediate' | 'deferred' | 'recurring' | 'automaticReload'
The time that the payment occurs as part of a successful transaction.
recurringPaymentEndDate optionalDate
The date of the final payment.
recurringPaymentIntervalCount optionalnumber
The number of interval units that make up the total payment interval.
recurringPaymentIntervalUnit optional'year' | 'month' | 'day' | 'hour' | 'minute'
The amount of time — in calendar units, such as day, month, or year — that represents a fraction of the total payment interval.
recurringPaymentStartDate optionalDate
The date of the first payment.
type optional'final' | 'pending'
A value that indicates if the line item is final or pending.
merchantCapabilities optional('supports3DS' | 'supportsEMV' | 'supportsCredit' | 'supportsDebit')[]
Payment capabilities supported by the merchant.
If not configured, merchantCapabilities will be based on merchant's account settings.
supports3DS: Required. This value must be supplied.
supportsCredit: Optional. If present, only transactions that are categorized as credit cards are allowed.
supportsDebit: Optional. If present, only transactions that are categorized as debit cards are allowed.
supportsEMV: Include this value only if you support China Union Pay transactions. (if
supportedNetworksdoes not contain chinaUnionPay, don't include it).
requiredBillingContactFields optional'postalAddress'[]
The billing information that you require from the shopper in order to process the transaction. Only postalAddress is supported. If you need to collect name, email, phone, you need to add requiredShippingContactFields config. e.g. requiredShippingContactFields: ['name', 'email', 'phone']
requiredShippingContactFields optional('email' | 'name' | 'phone' | 'postalAddress' | 'phoneticName')[]
The shipping information that you require from the shopper in order to fulfill the order.
shippingContact optionalApplePayPaymentContact
Shipping contact information for the shopper.
ShowApplePayPaymentContact properties
addressLines optionalstring[]
The street portion of the address for the contact.
administrativeArea optionalstring
The state for the contact.
country optionalstring
The name of the country for the contact.
countryCode optionalstring
The contact’s two-letter ISO 3166 country code.
emailAddress optionalstring
An email address for the contact.
familyName optionalstring
The contact's family name.
givenName optionalstring
The contact's given name.
locality optionalstring
The city for the contact.
phoneNumber optionalstring
A phone number for the contact.
phoneticFamilyName optionalstring
The phonetic spelling of the contact's family name.
phoneticGivenName optionalstring
The phonetic spelling of the contact's given name.
postalCode optionalstring
The zip code or postal code, where applicable, for the contact.
subAdministrativeArea optionalstring
The subadministrative area (such as a county or other region) in a postal address.
subLocality optionalstring
Additional information associated with the location, typically defined at the city or town level (such as district or neighborhood), in a postal address.
shippingMethods optionalApplePayShippingMethod[]
A set of shipping method objects that describe the available shipping methods.
ShowApplePayShippingMethod properties
amount requiredstring
The amount associated with this shipping method.
detail requiredstring
A further description of the shipping method.
identifier requiredstring
A client-defined identifier.
label requiredstring
A short description of the shipping method.
dateComponentsRange optionalApplePayDateComponentsRange
A dictionary that specifies the start and end dates for a range of time.
ShowApplePayDateComponentsRange properties
endDateComponents requiredApplePayDateComponents
The end date and time of the range.
ShowApplePayDateComponents properties
days requirednumber
A number that represents a day.
hours requirednumber
A number that represents an hour.
months requirednumber
A number between 1 and 12 that represents a month.
years requirednumber
A number that represents a year.
startDateComponents requiredApplePayDateComponents
The start date and time of the range.
ShowApplePayDateComponents properties
days requirednumber
A number that represents a day.
hours requirednumber
A number that represents an hour.
months requirednumber
A number between 1 and 12 that represents a month.
years requirednumber
A number that represents a year.
shippingType optional'shipping' | 'delivery' | 'storePickup' | 'servicePickup'
An optional value that indicates how purchased items are to be shipped.
supportedCountries optionalstring[]
A list of ISO 3166 country codes for limiting payments to cards from specific countries.
supportedNetworks optionalstring[]
Card networks supported by the merchant.
If not configured, supportedNetworks will be based on merchant's account settings.
For more details, see Apple Pay supported networks.
totalPriceLabel optionalstring
Provide a business name for the label field. Use the same business name that you want displayed for the charge on the shopper's bank or credit card statement. For example, "COMPANY, INC.".
totalPriceType optional'pending' | 'final'
Indicate whether a line item is final or pending.
If the mode is recurring and if it's a variable subscription, the value should be pending.
Default: 'final'
authFormContainer optionalstring
The container of the authentication form used in 3D Secure authentication.
authorizationType optional'pre_auth' | 'final_auth'
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: 'final_auth'
autoCapture optionalboolean
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: true
autoSaveCardForFuturePayments optionalboolean
Specifies whether the card payment method should be automatically saved for future transactions.
This parameter is only effective in payment mode when a customer_id is provided.
- If set to
true, the "Save my card for future payments" checkbox will be preselected by default. - If set to
false, the checkbox will remain unchecked, requiring the shopper to manually opt in.
Default: true
billing optionalBilling
Billing information provided by the merchant.
This option overrides the billing information from the shopper as provided in the input billing fields. Do not set withBilling and requiredBillingContactFields when you use this option.
ShowBilling properties
address requiredAddress
Billing address
ShowAddress properties
city requiredstring
The city of the billing address.
country_code requiredstring
The two-letter ISO 3166 country code of the shopper's country.
postcode requiredstring
Local post code.
state requiredstring
The state or province of the billing address.
street requiredstring
The street address of the billing address.
email requiredstring
Billing email address.
first_name requiredstring
The shopper's first name.
last_name requiredstring
The shopper's last name.
date_of_birth optionalstring
The shopper's date of birth in YYYY-MM-DD format.
phone_number optionalstring
The shopper's phone number.
country_code optionalstring
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.
customer_id optionalstring
The ID of the Customer used in registered user checkout. Refer to Airwallex Client APIAPI
This field is required when mode is 'recurring'.
cvcRequired optionalboolean
Whether you require the shopper to provide CVC when they checkout with a network tokenized card.
disableAutoCurrencyConversion optionalboolean
Whether to force disable automatic currency conversion.
true: Overrides merchant settings to disable conversion.false: Respects the merchant's automatic conversion configuration.
Default: false
googlePayRequestOptions optionalGooglePayRequestOptions
Checkout configuration options for Google Pay.
ShowGooglePayRequestOptions properties
countryCode requiredstring
The two-letter ISO-3166 country code.
allowCreditCards optionalboolean
Whether a credit card may be used for this transaction.
Default: true
allowedAuthMethods optionalenum[]
Allowed authentication methods.
Default: ['PAN_ONLY', 'CRYPTOGRAM_3DS']
Show possible enums
PAN_ONLY
Authenticate using a PAN (personal account number) only. Note: in addition to the PAN (personal account number) there will also be an expiration month and year. If you are using [[PaymentMethodTokenizationType|PAYMENT_GATEWAY]], you will not need to handle this sensitive data as it will be delivered to your gateway. Warning: do not rely on the PAN returned being stable or being able to be used to reauthorize new transactions as the PAN is meant for one-time use only. Authorization for new transactions may fail if you reuse the credential across unrelated transactions.
CRYPTOGRAM_3DS
Authenticate using the a 3-D Secure (3DS) cryptogram. Note: in addition to the 3DS cryptogram there will also be an associated PAN (personal account number), expiration month and year, and Electronic Commerce Indicator for certain card networks. If you are using [[PaymentMethodTokenizationType|PAYMENT_GATEWAY]], you will not need to handle this sensitive data as it will be delivered to your gateway. Warning: do not rely on the PAN returned being stable or being able to be used to reauthorize new transactions as the PAN and associated 3DS cryptogram are meant for one-time use only. Authorization for new transactions may fail if you reuse the credential across unrelated transactions.
allowedCardNetworks optional('MASTERCARD' | 'MAESTRO' | 'VISA' | 'AMEX' | 'DISCOVER' | 'JCB')[]
One or more card networks that you support.
allowPrepaidCards optionalboolean
Whether a prepaid card may be used for this transaction.
Default: true
assuranceDetailsRequired optionalboolean
Set to true if you need information about the validation performed on the returned payment data.
Default: false
billingAddressParameters optionalBillingAddressParameters
Optional billing address parameters for the returned billing address.
ShowBillingAddressParameters properties
format requiredenum
Billing address format.
If omitted, defaults to [[BillingAddressFormat|MIN]].
Note: you should only set format to [[BillingAddressFormat|FULL]]
when it is required to process the order. Additional form entry or
customer data requests can increase friction during the checkout
process and can lead to a lower conversion rate.
Show possible enums
MIN
Minimal billing address When this format is used, the billing address returned will only contain the following fields: - [[Address.name|name]] - [[Address.countryCode|countryCode]] - [[Address.postalCode|postalCode]] - [[Address.phoneNumber|phoneNumber]] if [[BillingAddressParameters.phoneNumberRequired|BillingAddressParameters.phoneNumberRequired]] is set to true. Note: some countries do not use postal codes. The postal code field will be empty in those countries.
FULL
Full billing address All the fields in [[Address|Address]] will be returned, with the possible exception of [[Address.phoneNumber|Address.phoneNumber]] which will only be returned if [[BillingAddressParameters.phoneNumberRequired|BillingAddressParameters.phoneNumberRequired]] is set to true. Only select this format when it is required to process the order. Additional form entry or customer data requests can increase friction during the checkout process and can lead to a lower conversion rate.
FULL-ISO3166
Same as FULL but includes [[Address.iso3166AdministrativeArea|Address.iso3166AdministrativeArea]]
phoneNumberRequired optionalboolean
Whether billing phone number required.
If omitted, defaults to false.
Note: you should only set this to true when a phone number
is required to process the order. Additional form entry or customer
data requests can increase friction during the checkout process and
can lead to a lower conversion rate.
billingAddressRequired optionalboolean
Whether a billing address is required from the shopper.
Default: false
buttonColor optionalenum
Specifies the button color of the Google Pay button.
Default: 'default'
Show possible enums
default
A Google-selected default value. Currently black but it may change over time.
black
A black button suitable for use on white or light backgrounds.
white
A white button suitable for use on colorful backgrounds.
buttonSizeMode optionalenum
Determines how the button's size should change relative to the button's parent element.
Default: 'static'
Show possible enums
static
Default behavior. The button has a fixed width and height.
fill
The button fills its container.
buttonType optionalenum
Specifies the text to be displayed within the Google Pay button.
Show possible enums
book
"Book with Google Pay" button.
buy
"Buy with Google Pay" button.
checkout
"Checkout with Google Pay" button.
donate
"Donate with Google Pay" button.
order
"Order with Google Pay" button.
pay
"Pay with Google Pay" button.
plain
"Google Pay" button without text.
subscribe
"Subscribe with Google Pay" button.
long
Same as "buy".
short
Same as "plain".
callbackIntents optionalenum[]
List of callbacks that the developer intents to handle.
Upon selection by the shopper, these intents can be used to update the
request with new data based on that selection (For exmaple, if a shipping
option is selected, the developer could update the transactionInfo
with new totalPrice and diplayItems).
Show possible enums
OFFER
Callback occurs when offer info is changed.
SHIPPING_ADDRESS
Callback occurs when shipping address is changed.
SHIPPING_OPTION
Callback occurs when shipping option is changed. If this callback intent is set, then [[PaymentDataRequest.shippingOptionRequired|PaymentDataRequest.shippingOptionRequired]] must be set to true. [[PaymentDataRequest.shippingOptionParameters|PaymentDataRequest.shippingOptionParameters]] can optionally be set, if omitted, we will render a placeholder shipping option named "Shipping option pending" with id "shipping_option_unselected". If developers receive a [[IntermediatePaymentData.shippingOptionData|IntermediatePaymentData.shippingOptionData]] with id "shipping_option_unselected", it means they need to populate valid [[PaymentDataRequest.shippingOptionParameters|PaymentDataRequest.shippingOptionParameters]] in the [[PaymentDataRequestUpdate.newShippingOptionParameters|PaymentDataRequestUpdate.newShippingOptionParameters]].
PAYMENT_AUTHORIZATION
Callback occurs when user authorized payment and [[PaymentData|PaymentData]] will be returned.
PAYMENT_METHOD
Callback occurs when payment method is changed. Developer will receive callback data in [[IntermediatePaymentData.paymentMethodData|IntermediatePaymentData.paymentMethodData]]
checkoutOption optionalenum
The options for checkout.
Show possible enums
DEFAULT
The default option for checkout. Use the 'Continue' button for a buy flow in the payments sheet. Once loadPaymentData completes, the integrator should show an order confirmation screen to finalize the purchase.
COMPLETE_IMMEDIATE_PURCHASE
Use the 'Pay' button to indicate a buy flow without a confirmation in the payments sheet to indicate that no further confirmation will be shown and the transaction will be processed once the user confirms only if [[TransactionInfo.totalPriceStatus|TransactionInfo.totalPriceStatus]] is set to [[TotalPriceStatus|FINAL]]. Otherwise, a payment data request will fail.
CONTINUE_TO_REVIEW
Use the 'Continue to Review Order' button for a buy flow in the payments sheet. Once loadPaymentData completes, the integrator should show an order confirmation screen to finalize the purchase.
displayItems optionalDisplayItem[]
Description of a cart item.
ShowDisplayItem properties
label requiredstring
The label to be displayed for the item.
This field is required.
price requiredstring
Price of this item.
The format of this string should follow the regular expression
format:
^[0-9]+(.[0-9][0-9])?$ (e.g., "10.45")
type requiredenum
Type of displayed line item, this is going to be used for analysis purpose.
This field is required.
Show possible enums
LINE_ITEM
Regular line item.
SUBTOTAL
Subtotal of all regular items.
TAX
Item for the collected tax.
DISCOUNT
Item for a discount.
SHIPPING_OPTION
Item for shipping option.
status optionalenum
The status of a DisplayItem.
This field is optional and default value is
[[DisplayItemStatus|FINAL]] if absent.
Show possible enums
FINAL
DisplayItem is final and the item displays the value in price.
PENDING
DisplayItem does not display value in price but instead display as "pending".
emailRequired optionalboolean
Whether the shopper must provide their email.
Default: false
existingPaymentMethodRequired optionalboolean
Whether the shopper must use an existing payment method.
Default: false
gatewayMerchantId optionalstring
The merchant account ID in Airwallex. It is required for Google Pay Express Checkout Element.
merchantInfo optionalobject
Detailed information about the merchant.
Showobject properties
merchantName optionalstring
Merchant name encoded as UTF-8.
offerInfo optionalOfferInfo
Offers available for redemption that can be used with the current order.
ShowOfferInfo properties
offers requiredOfferDetail[]
List of merchant provided offers applicable to the current order.
ShowOfferDetail properties
description requiredstring
Description for the offer visible to the user to inform them about the offer. The description is displayed in buyflow and should be less than 60 characters long.
redemptionCode requiredstring
Redemption code available for this transaction. This is used to identify the offer when the user decides to apply the offer.
paymentDataCallbacks optionalPaymentDataCallbacks
Defines callback methods for handling changed payment data and payment authorized events.
ShowPaymentDataCallbacks properties
onPaymentAuthorized optionalPaymentAuthorizedHandler
This method is called when a payment is authorized in the payment sheet.
onPaymentDataChanged optionalPaymentDataChangedHandler
This method handles payment data changes in the payment sheet such as shipping address and shipping options.
shippingAddressParameters optionalShippingAddressParameters
Optional shipping address parameters for the returned shipping address.
ShowShippingAddressParameters properties
allowedCountryCodes optionalstring[]
Allowed country codes for the shipping address.
This list should be an array of ISO 3166-1 alpha-2 country codes
(e.g., ["US", "CA", "JP"]).
If omitted, a shipping address from any supported country may be returned.
format optionalenum
Shipping address format.
If omitted, defaults to [[ShippingAddressFormat|FULL]].
*
Show possible enums
FULL
Full shipping address All the fields in [[Address|Address]] will be returned, with the possible exception of [[Address.phoneNumber|Address.phoneNumber]] which will only be returned if [[ShippingAddressParameters.phoneNumberRequired|ShippingAddressParameters.phoneNumberRequired]] is set to true. Only select this format when it is required to process the order. Additional form entry or customer data requests can increase friction during the checkout process and can lead to a lower conversion rate.
FULL-ISO3166
Same as FULL but includes [[Address.iso3166AdministrativeArea|Address.iso3166AdministrativeArea]]
phoneNumberRequired optionalboolean
Whether a phone number is additionally required from the buyer for the shipping address (the phone number will only be returned if an address is required, otherwise this field has no effect).
If omitted, defaults to false.
shippingAddressRequired optionalboolean
Whether a shipping address is required from the shopper.
Default: false
shippingOptionParameters optionalShippingOptionParameters
Parameters for shipping option that can be used in this request. Note: This field is currently for web only.
ShowShippingOptionParameters properties
shippingOptions requiredSelectionOption[]
All the shipping options available for the current request. Will be rendered in the UI with given order.
This field is required.
ShowSelectionOption properties
id requiredstring
A unique identifier for the option.
This field is required.
label requiredstring
The label to be displayed as the option.
This field is required.
description optionalstring
A descriptive text that will be displayed below option label.
This field is optional.
defaultSelectedOptionId optionalstring
Identifier to the default selected shipping option. If this field is not provided the first option will be the default option.
This field is optional.
shippingOptionRequired optionalboolean
Whether a shipping option is required from the shopper.
Note: This field is currently for web only.
Default: false
totalPriceLabel optionalstring
Total price label of this transaction. The string will be shown as the total price label on the cart modal dialog page. This field is optional, but required if developer wants to show cart information. Otherwise the cart modal dialog will not be rendered.
totalPriceStatus optionalenum
The status of the total price. If it is a variable subscription, the status should be NOT_CURRENTLY_KNOWN.
Default: 'FINAL'
Show possible enums
NOT_CURRENTLY_KNOWN
The total price is not known currently.
ESTIMATED
The total price provided is an estimated price. The final price may change depending on the shipping address or billing address, if requested.
FINAL
The total price is the final total price of the transaction, and will not change based on selections made by the shopper.
transactionId optionalstring
Correlation ID to refer to this transaction.
This field is optional. It is generated by the merchant and used to reference this transaction later, such as for debugging issues when communicating with Google.
intent_id optionalstring
The ID of the Payment Intent you would like to checkout. Required when mode is 'payment'.
layout optionalLayout
The layout of the DropIn element.
ShowLayout properties
alwaysShowMethodLabel optionalboolean
By default, the payment method icon is not visible when there is only one payment method. Set it to true if you want to always show the payment method icon.
Default: false
type optional'tab' | 'accordion'
Specify the layout for the payment elements. By default, accordion layout is used on desktop and tab layout is used on mobile.
methods optionalenum[]
The payment methods your website would like to integrate with.
Show possible enums
googlepay
applepay
card
airwallex_pay
alipaycn
alipayhk
gcash
dana
kakaopay
tng
rabbit_line_pay
poli
fpx
online_banking
bank_transfer
permatanet
alfamart
indomaret
doku_ewallet
enets
payeasy
seven_eleven
konbini
tesco_lotus
grabpay
skrill
eps
giropay
ideal
multibanco
p24
sofort
trustly
bancontact
dragonpay
blik
mybank
paybybankapp
verkkopankki
maxima
narvesen
paypost
perlas_terminals
paysafecash
paysafecard
paysera
satispay
family_mart
hi_life
sam_kiosk
axs_kiosk
bigc
esun
permata_atm
boost
shopee_pay
paypal
payu
ovo
bitpay
truemoney
atome
duit_now
pay_now
prompt_pay
go_pay
linkaja
jenius_pay
klarna
wero
korean_local_card
naver_pay
payco
samsung_pay
au_pay
bkash
d_barai
line_pay
merpay
payeasy_atm
paypay
rakuten_pay
safetypay
toss_pay
upi
zip
spei
afterpay
cash_app_pay
twint
laybuy
venmo
payme
tabby
octopus
spaylater
bizum
swish
wechatpay
fps
pix
jkopay
ach_direct_debit
bacs_direct_debit
becs_direct_debit
sepa_direct_debit
eft_direct_debit
mode optional'payment' | 'recurring'
The checkout mode for the shopper, 'payment' or 'recurring'.
Default: 'payment'
payment_consent optionalPaymentConsentOptions
The payment consent details.
ShowPaymentConsentOptions properties
next_triggered_by required'merchant' | 'customer'
The party to initiate subsequent payment
merchant_trigger_reason optional'scheduled' | 'unscheduled' | 'installments'
The trigger reasons for CoF. One of installments, unscheduled and scheduled
Default: 'unscheduled'
terms_of_use optionalTermsOfUse
Specifies the agreed legal and regulatory terms governing the recurring payment arrangement between the merchant and the customer.
ShowTermsOfUse properties
payment_amount_type required'FIXED' | 'VARIABLE'
The types of Payto agreements. Should be one of FIXED, VARIABLE.
payment_currency requiredstring
The currency of this payment.
start_date requiredstring
Start date to expect payment request.
billing_cycle_charge_day optionalnumber
The granularity per billing cycle. Required when payment_schedule.period_unit is WEEK, MONTH, or YEAR.
end_date optionalstring
End date to expect payment request.
first_payment_amount optionalnumber
The first payment. It could include the costs associated with the first debited amount. Optional if payment_amount_type is VARIABLE.
fixed_payment_amount optionalnumber
The fixed payment amount that can be charged for a single payment. Required if payment_amount_type is FIXED.
max_payment_amount optionalnumber
The maximum payment amount that can be charged for a single payment. Optional if payment_amount_type is VARIABLE.
payment_schedule optionalobject
Payment schedule details.
Showobject properties
period requirednumber
The number of period units between billing cycles. For example, the payment cycle is one month if period=1 and period_unit=MONTH. Required when merchant_trigger_reason = scheduled.
period_unit required'DAY' | 'WEEK' | 'MONTH' | 'YEAR'
Specifies billing frequency. One of DAY, WEEK, MONTH, and YEAR. Required when merchant_trigger_reason = scheduled.
total_billing_cycles optionalnumber
The total number of billing cycles of the payment schedule. If null, the mandate will continue indefinitely.
platformConnectedAccount optionalstring
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.
quote_id optionalstring | null
This field is used for Multi-Currency Pricing(MCP). The merchant can create a quote for the shopper, and pass the quote_id to Drop-in Element. If the quote_id is provided, Drop-in Element will use that quote to convert the amount and currency. And each time the shopper changes the currency, the merchant needs to create a new quote or reuse existing quotes and update the quote_id. If the quote_id is not provided, Drop-in Element will use ACC logic to automatically convert the amount and currency.
requiredBillingContactFields optional('name' | 'email' | 'country_code' | 'address' | 'phone')[]
The billing information that you require from the user in order to process the transaction.
savedPaymentMethod optionalSavedPaymentMethodOptions
The options for saved payment method.
Default: { displayMode: 'auto', saveMode: 'auto' }
ShowSavedPaymentMethodOptions properties
displayMode optional'auto' | 'never'
Controls if UI displays existing saved payment methods.
- 'auto' (default): If we have customer_id + valid payment consents, fetch and show saved methods (current behavior).
- 'never': Never show saved methods in the UI, even if they exist.
Note: This only affects display. Whether we store a method is controlled by saveMode.
Default: 'auto'
shopper_email optionalstring
The shopper's email address.
shopper_name optionalstring
The shopper's full name.
shopper_phone optionalstring
The shopper's phone number.
showConfirmButton optionalboolean
Whether to display the built-in confirm button. Default is true.
When set to false:
- The confirm button will be hidden
- Only card payment method will be displayed, other payment methods will be hidden
- You must implement your own button and call
dropInElement.confirm()to submit the payment
Default: true
style optionalBoxStyle
Box style for the dropIn element.
ShowBoxStyle properties
base optionalCSSProperties
Base styling applied to the integral iframe. All styling extends from this style.
input optionalCSSProperties & PseudoClassStyle
Styling applied to the input element.
popupHeight optionalnumber
Customized Popup overlay height like 3DS payment flow.
popupWidth optionalnumber
Customized Popup overlay width like 3DS payment flow.
variant optional'standard' | 'outlined' | 'filled' | 'bootstrap'
Input variation.
submitType optional'pay' | 'book' | 'subscribe' | 'save'
Describes the type of transaction being performed in order to customize the submit button text.
Available options are 'pay', 'book', or 'subscribe'.
The type can only be specified in payment mode.
If blank, the default value will be 'pay'
Default: 'pay'
wechatpay optionalWeChatPayFlow
The options for Wechat Pay.
ShowWeChatPayFlow properties
desktopFlow optional'webqr' | 'mweb' | 'jsapi' | 'inapp'
mobileFlow optional'webqr' | 'mweb' | 'jsapi' | 'inapp'
components optionalenum[]Deprecated
use methods instead
The payment methods your website would like to integrate with
Show possible enums
googlepay
applepay
card
airwallex_pay
alipaycn
alipayhk
gcash
dana
kakaopay
tng
rabbit_line_pay
poli
fpx
online_banking
bank_transfer
permatanet
alfamart
indomaret
doku_ewallet
enets
payeasy
seven_eleven
konbini
tesco_lotus
grabpay
skrill
eps
giropay
ideal
multibanco
p24
sofort
trustly
bancontact
dragonpay
blik
mybank
paybybankapp
verkkopankki
maxima
narvesen
paypost
perlas_terminals
paysafecash
paysafecard
paysera
satispay
family_mart
hi_life
sam_kiosk
axs_kiosk
bigc
esun
permata_atm
boost
shopee_pay
paypal
payu
ovo
bitpay
truemoney
atome
duit_now
pay_now
prompt_pay
go_pay
linkaja
jenius_pay
klarna
wero
korean_local_card
naver_pay
payco
samsung_pay
au_pay
bkash
d_barai
line_pay
merpay
payeasy_atm
paypay
rakuten_pay
safetypay
toss_pay
upi
zip
spei
afterpay
cash_app_pay
twint
laybuy
venmo
payme
tabby
octopus
spaylater
bizum
swish
wechatpay
fps
pix
jkopay
ach_direct_debit
bacs_direct_debit
becs_direct_debit
sepa_direct_debit
eft_direct_debit
recurringOptions optionalRecurringOptionsDeprecated
use payment_consent instead
Options for recurring flow.
ShowRecurringOptions properties
connected_account_id optionalstring
The ID of the connected account linked to the platform. The platform should indicate the connected entity in the transaction only when platform is the owner of the transaction.
currency optionalstring
The three-letter ISO currency code representing the currency of the initial Payment Intent. Only applicable to card payment method.
descriptor optionalstring
Descriptor that may be displayed to the customer during verification.
merchant_trigger_reason optional'scheduled' | 'unscheduled'
Whether subsequent payments are 'scheduled' or 'unscheduled'. Only applicable when next_triggered_by is 'merchant'.
Default: 'unscheduled'
next_triggered_by optional'merchant' | 'customer'
Whether the merchant or customer should trigger subsequent payments.
Default: 'customer'
three_ds_action optional'SKIP_3DS' | 'FORCE_3DS'
Set it to SKIP_3DS if you want to skip 3DS regardless of the risk score and Strong Customer Authentication (SCA) regulation. Only applicable when it's a card recurring flow.
Set it to FORCE_3DS if you want to force 3DS regardless of the risk score and Strong Customer Authentication (SCA) regulation. Only applicable when it's a card recurring flow.
withBilling optionalbooleanDeprecated
please use requiredBillingContactFields instead
Indicate to improve 3DS experience, indicate if the payment form will collect billing info from shopper
Returns
DropInElement | null
createElement('dropIn', options?)
npm
1import { init, createElement } from '@airwallex/components-sdk';
2
3await init({
4 env: 'prod',
5 enabledElements: ['payments'],
6});
7
8const element = await createElement('dropIn', {
9 intent_id: 'replace-with-your-intent-id',
10 client_secret: 'replace-with-your-client-secret',
11 currency: 'replace-with-your-intent-currency',
12});
13
14element.mount('dropin-container');
confirm(data?)
Using this function to confirm payment intent when showConfirmButton is set to false, only applicable for card payment method.
Parameters
data optionalDropInConfirmData
Payment confirmation data
HideDropInConfirmData properties
client_secret optionalstring
The client_secret of the Payment Intent when Payment Intent is provided. Otherwise, this should be the client_secret of the Customer object.
Returns
Intent requiredobject
Hideobject properties
id requiredstring
The ID of the Payment Intent.
amount optionalnumber
Payment amount. This is the order amount you would like to charge your customer.
client_secret optionalstring
The client_secret of the Payment Intent when Payment Intent is provided. Otherwise, this should be the client_secret of the Customer object.
created_at optionalstring
The time this Payment Intent was created, in ISO 8601 format.
currency optionalstring
The three-letter ISO currency code representing the currency of the Payment Intent.
customer_id optionalstring
The ID of the Customer who intends to pay for the Payment Intent.
customer_payment_consents optionalobject
Showobject properties
id requiredstring
next_triggered_by required'merchant' | 'customer'
payment_method requiredobject
Showobject properties
type required'card' | 'ach_direct_debit' | 'becs_direct_debit'
ach_direct_debit optionalobject
Showobject properties
aba_routing_number requiredstring
account_number requiredstring
owner_email requiredstring
owner_name requiredstring
becs_direct_debit optionalobject
Showobject properties
account_number requiredstring
bsb_number requiredstring
owner_email requiredstring
owner_name requiredstring
card optionalobject
Showobject properties
bin requiredstring
brand requiredstring
fingerprint requiredstring
last4 requiredstring
number_type required'AIRWALLEX_NETWORK_TOKEN' | 'EXTERNAL_NETWORK_TOKEN' | 'PAN'
id optionalstring
status required'PENDING_VERIFICATION' | 'VERIFIED' | 'DISABLED'
customer_payment_methods optionalobject
Showobject properties
id requiredstring
card optionalobject
Showobject properties
bin requiredstring
brand requiredstring
fingerprint requiredstring
last4 requiredstring
number_type required'AIRWALLEX_NETWORK_TOKEN' | 'EXTERNAL_NETWORK_TOKEN' | 'PAN'
merchant_order_id optionalstring
The merchant's order ID for this payment.
payment_consent_id optionalstring
The ID of the Payment Consent associated with this Payment Intent.
request_id optionalstring
Unique request ID specified by the merchant.
status optionalstring
The status of the Payment Intent (e.g. 'REQUIRES_PAYMENT_METHOD', 'SUCCEEDED').
updated_at optionalstring
The time this Payment Intent was last updated, in ISO 8601 format.
confirm(data?)
1element.confirm({
2 client_secret: 'replace-with-your-client-secret',
3});
4// or
5element.confirm({});
destroy()
Destroys the Element instance.
destroy()
1element.destroy();
mount(domElement)
Mounts Element to your HTML DOM.
Parameters
domElement requiredstring | HTMLElement
Returns
HTMLElement | null
mount(domElement)
1// There are two ways to mount the element:
2// 1. Call with the container DOM id
3element.mount('container-dom-id');
4
5// 2. Find the created DOM in the existing HTML and call with the container DOM element
6const containerElement = document.getElementById('container-dom-id');
7element.mount(containerElement);
on('ready', handler)
This event will be fired when the element is mounted and ready to interact with the user.
Parameters
type required'ready'
The event name.
handler required() => void
The callback function that will be called when the event occurs.
on('ready', handler)
1element.on('ready', () => {
2 console.log('Element is ready');
3});
on('success', handler)
This event will be fired when the payment is successful.
Parameters
type required'success'
The event name.
handler requiredfunction
The callback function that will be called when the event occurs.
The handler receives an object with the following properties:
Hideobject properties
detail requiredobject
Showobject properties
consent optionalConsent
The consent of the payment
ShowConsent properties
client_secret requiredstring
The client_secret returned when creating a Payment Consent.
created_at requiredstring
The time this Payment Consent was created.
customer_id requiredstring
The ID of the Customer who intends to pay for the Payment Intent.
id requiredstring
The ID of the Payment Consent to be confirmed.
next_triggered_by required'merchant' | 'customer'
Whether the merchant or customer should trigger subsequent payments.
status required'PENDING_VERIFICATION' | 'VERIFIED' | 'DISABLED'
The status of the Payment Consent.
updated_at requiredstring
The time this Payment Consent was last updated.
initial_payment_intent_id optionalstring
The ID of the initial Payment Intent.
merchant_trigger_reason optional'scheduled' | 'unscheduled'
Whether subsequent payments are 'scheduled' or 'unscheduled'. Only applicable when next_triggered_by is 'merchant'.
Default: 'unscheduled'
intent optionalIntent
The intent of the payment
ShowIntent properties
id requiredstring
The ID of the Payment Intent.
amount optionalnumber
Payment amount. This is the order amount you would like to charge your customer.
client_secret optionalstring
The client_secret of the Payment Intent when Payment Intent is provided. Otherwise, this should be the client_secret of the Customer object.
created_at optionalstring
The time this Payment Intent was created, in ISO 8601 format.
currency optionalstring
The three-letter ISO currency code representing the currency of the Payment Intent.
customer_id optionalstring
The ID of the Customer who intends to pay for the Payment Intent.
customer_payment_consents optionalobject
Showobject properties
id requiredstring
next_triggered_by required'merchant' | 'customer'
payment_method requiredobject
Showobject properties
type required'card' | 'ach_direct_debit' | 'becs_direct_debit'
ach_direct_debit optionalobject
Showobject properties
aba_routing_number requiredstring
account_number requiredstring
owner_email requiredstring
owner_name requiredstring
becs_direct_debit optionalobject
Showobject properties
account_number requiredstring
bsb_number requiredstring
owner_email requiredstring
owner_name requiredstring
card optionalobject
Showobject properties
bin requiredstring
brand requiredstring
fingerprint requiredstring
last4 requiredstring
number_type required'AIRWALLEX_NETWORK_TOKEN' | 'EXTERNAL_NETWORK_TOKEN' | 'PAN'
id optionalstring
status required'PENDING_VERIFICATION' | 'VERIFIED' | 'DISABLED'
customer_payment_methods optionalobject
Showobject properties
id requiredstring
card optionalobject
Showobject properties
bin requiredstring
brand requiredstring
fingerprint requiredstring
last4 requiredstring
number_type required'AIRWALLEX_NETWORK_TOKEN' | 'EXTERNAL_NETWORK_TOKEN' | 'PAN'
merchant_order_id optionalstring
The merchant's order ID for this payment.
payment_consent_id optionalstring
The ID of the Payment Consent associated with this Payment Intent.
request_id optionalstring
Unique request ID specified by the merchant.
status optionalstring
The status of the Payment Intent (e.g. 'REQUIRES_PAYMENT_METHOD', 'SUCCEEDED').
updated_at optionalstring
The time this Payment Intent was last updated, in ISO 8601 format.
on('success', handler)
1element.on('success', (e) => {
2 const { intent, consent } = e.detail;
3 console.log('Payment is successful', { intent, consent });
4});
on('error', handler)
This event will be fired when the form encounters an unexpected error.
Parameters
type required'error'
The event name.
handler requiredfunction
The callback function that will be called when the event occurs.
The handler receives an object with the following properties:
Hideobject properties
detail requiredobject
Showobject properties
error requiredobject
Showobject properties
code requiredstring
The unexpected error code, for example: UNKNOWN_ERROR.
details optionalRecord <string, unknown>
The Error details
message optionalstring
The Error message
on('error', handler)
1element.on('error', (e) => {
2 const { error } = e.detail;
3 console.error('There is an error', error);
4});
on('cancel', handler)
This event will be fired when the payment is cancelled.
Parameters
type required'cancel'
The event name.
handler required() => void
The callback function that will be called when the event occurs.
on('cancel', handler)
1element.on('cancel', () => {
2 console.log('Payment cancelled');
3});
on('clickConfirmButton', handler)
This event will be fired when the user clicks the confirm button.
Parameters
type required'clickConfirmButton'
The event name.
handler required() => void
The callback function that will be called when the event occurs.
on('clickConfirmButton', handler)
1element.on('clickConfirmButton', () => {
2 console.log('Confirm button clicked');
3});
on('switchMethod', handler)
This event will be fired when the user switches the payment method.
Parameters
type required'switchMethod'
The event name.
handler requiredfunction
The callback function that will be called when the event occurs.
The handler receives an object with the following properties:
Hideobject properties
detail requiredobject
Showobject properties
methodLabel requiredstring
The localized translation of the method name
methodType requiredenum
The enum value of the payment method
Show possible enums
googlepay
applepay
card
airwallex_pay
alipaycn
alipayhk
gcash
dana
kakaopay
tng
rabbit_line_pay
poli
fpx
online_banking
bank_transfer
permatanet
alfamart
indomaret
doku_ewallet
enets
payeasy
seven_eleven
konbini
tesco_lotus
grabpay
skrill
eps
giropay
ideal
multibanco
p24
sofort
trustly
bancontact
dragonpay
blik
mybank
paybybankapp
verkkopankki
maxima
narvesen
paypost
perlas_terminals
paysafecash
paysafecard
paysera
satispay
family_mart
hi_life
sam_kiosk
axs_kiosk
bigc
esun
permata_atm
boost
shopee_pay
paypal
payu
ovo
bitpay
truemoney
atome
duit_now
pay_now
prompt_pay
go_pay
linkaja
jenius_pay
klarna
wero
korean_local_card
naver_pay
payco
samsung_pay
au_pay
bkash
d_barai
line_pay
merpay
payeasy_atm
paypay
rakuten_pay
safetypay
toss_pay
upi
zip
spei
afterpay
cash_app_pay
twint
laybuy
venmo
payme
tabby
octopus
spaylater
bizum
swish
wechatpay
fps
pix
jkopay
ach_direct_debit
bacs_direct_debit
becs_direct_debit
sepa_direct_debit
eft_direct_debit
surchargeFee requirednumber
The surcharge fee of the method
method requiredenumDeprecated
replaced by methodType
- The method of the payment
Show possible enums
googlepay
applepay
card
airwallex_pay
alipaycn
alipayhk
gcash
dana
kakaopay
tng
rabbit_line_pay
poli
fpx
online_banking
bank_transfer
permatanet
alfamart
indomaret
doku_ewallet
enets
payeasy
seven_eleven
konbini
tesco_lotus
grabpay
skrill
eps
giropay
ideal
multibanco
p24
sofort
trustly
bancontact
dragonpay
blik
mybank
paybybankapp
verkkopankki
maxima
narvesen
paypost
perlas_terminals
paysafecash
paysafecard
paysera
satispay
family_mart
hi_life
sam_kiosk
axs_kiosk
bigc
esun
permata_atm
boost
shopee_pay
paypal
payu
ovo
bitpay
truemoney
atome
duit_now
pay_now
prompt_pay
go_pay
linkaja
jenius_pay
klarna
wero
korean_local_card
naver_pay
payco
samsung_pay
au_pay
bkash
d_barai
line_pay
merpay
payeasy_atm
paypay
rakuten_pay
safetypay
toss_pay
upi
zip
spei
afterpay
cash_app_pay
twint
laybuy
venmo
payme
tabby
octopus
spaylater
bizum
swish
wechatpay
fps
pix
jkopay
ach_direct_debit
bacs_direct_debit
becs_direct_debit
sepa_direct_debit
eft_direct_debit
methodName requiredstringDeprecated
replaced by methodLabel
- The name of the method
on('switchMethod', handler)
1element.on('switchMethod', (e) => {
2 const { method, methodName, surchargeFee } = e.detail;
3 console.log('User switched to', { method, methodName, surchargeFee });
4});
on('pendingVerifyAccount', handler)
This event will be fired when the user is pending to verify their account. It is only used in the direct debit payment method.
Parameters
type required'pendingVerifyAccount'
The event name.
handler requiredfunction
The callback function that will be called when the event occurs.
The handler receives an object with the following properties:
Hideobject properties
detail requiredobject
Showobject properties
intent requiredIntent
The intent of the payment
ShowIntent properties
id requiredstring
The ID of the Payment Intent.
amount optionalnumber
Payment amount. This is the order amount you would like to charge your customer.
client_secret optionalstring
The client_secret of the Payment Intent when Payment Intent is provided. Otherwise, this should be the client_secret of the Customer object.
created_at optionalstring
The time this Payment Intent was created, in ISO 8601 format.
currency optionalstring
The three-letter ISO currency code representing the currency of the Payment Intent.
customer_id optionalstring
The ID of the Customer who intends to pay for the Payment Intent.
customer_payment_consents optionalobject
Showobject properties
id requiredstring
next_triggered_by required'merchant' | 'customer'
payment_method requiredobject
Showobject properties
type required'card' | 'ach_direct_debit' | 'becs_direct_debit'
ach_direct_debit optionalobject
Showobject properties
aba_routing_number requiredstring
account_number requiredstring
owner_email requiredstring
owner_name requiredstring
becs_direct_debit optionalobject
Showobject properties
account_number requiredstring
bsb_number requiredstring
owner_email requiredstring
owner_name requiredstring
card optionalobject
Showobject properties
bin requiredstring
brand requiredstring
fingerprint requiredstring
last4 requiredstring
number_type required'AIRWALLEX_NETWORK_TOKEN' | 'EXTERNAL_NETWORK_TOKEN' | 'PAN'
id optionalstring
status required'PENDING_VERIFICATION' | 'VERIFIED' | 'DISABLED'
customer_payment_methods optionalobject
Showobject properties
id requiredstring
card optionalobject
Showobject properties
bin requiredstring
brand requiredstring
fingerprint requiredstring
last4 requiredstring
number_type required'AIRWALLEX_NETWORK_TOKEN' | 'EXTERNAL_NETWORK_TOKEN' | 'PAN'
merchant_order_id optionalstring
The merchant's order ID for this payment.
payment_consent_id optionalstring
The ID of the Payment Consent associated with this Payment Intent.
request_id optionalstring
Unique request ID specified by the merchant.
status optionalstring
The status of the Payment Intent (e.g. 'REQUIRES_PAYMENT_METHOD', 'SUCCEEDED').
updated_at optionalstring
The time this Payment Intent was last updated, in ISO 8601 format.
url requiredstring
The url of the payment
on('pendingVerifyAccount', handler)
1element.on('pendingVerifyAccount', (e) => {
2 const { intent, url } = e.detail;
3 console.log('User is pending to verify their account', { intent, url });
4});
on('surchargeFeeChange', handler)
This event will be fired when the surcharge fee changes.
Note: This event is specifically for surcharge fee updates. It may fire when switching payment methods if the new method has different fees. For general form state changes (completeness, input values, errors), use the change event instead.
Parameters
type required'surchargeFeeChange'
The event name.
handler requiredfunction
The callback function that will be called when the event occurs.
The handler receives an object with the following properties:
Hideobject properties
detail requiredobject
Showobject properties
base_amount requirednumber
The base amount of the payment
currency requiredstring
The currency of the payment
methodLabel requiredstring
The localized translation of the method name
methodType requiredenum
The enum value of the payment method
Show possible enums
googlepay
applepay
card
airwallex_pay
alipaycn
alipayhk
gcash
dana
kakaopay
tng
rabbit_line_pay
poli
fpx
online_banking
bank_transfer
permatanet
alfamart
indomaret
doku_ewallet
enets
payeasy
seven_eleven
konbini
tesco_lotus
grabpay
skrill
eps
giropay
ideal
multibanco
p24
sofort
trustly
bancontact
dragonpay
blik
mybank
paybybankapp
verkkopankki
maxima
narvesen
paypost
perlas_terminals
paysafecash
paysafecard
paysera
satispay
family_mart
hi_life
sam_kiosk
axs_kiosk
bigc
esun
permata_atm
boost
shopee_pay
paypal
payu
ovo
bitpay
truemoney
atome
duit_now
pay_now
prompt_pay
go_pay
linkaja
jenius_pay
klarna
wero
korean_local_card
naver_pay
payco
samsung_pay
au_pay
bkash
d_barai
line_pay
merpay
payeasy_atm
paypay
rakuten_pay
safetypay
toss_pay
upi
zip
spei
afterpay
cash_app_pay
twint
laybuy
venmo
payme
tabby
octopus
spaylater
bizum
swish
wechatpay
fps
pix
jkopay
ach_direct_debit
bacs_direct_debit
becs_direct_debit
sepa_direct_debit
eft_direct_debit
surchargeFee requirednumber
The surcharge fee of the method
on('surchargeFeeChange', handler)
1element.on('surchargeFeeChange', (e) => {
2 const { methodType, methodLabel, surchargeFee, currency, base_amount } = e.detail;
3 console.log('Surcharge fee changed', { methodType, methodLabel, surchargeFee, currency, base_amount });
4});
on('change', handler)
This event will be fired when the form data changes. Only triggered when showConfirmButton is set to false.
Note: This event focuses on form state changes (completeness, input values, errors). For surcharge fee updates, use the surchargeFeeChange event instead.
Parameters
type required'change'
The event name.
handler requiredfunction
The callback function that will be called when the event occurs.
The handler receives an object with the following properties:
Hideobject properties
detail requiredobject
Showobject properties
complete requiredboolean
Whether the form is complete
empty requiredboolean
Whether the form is empty
selectedPaymentMethod required'card' | 'null'
The selected payment method
value requiredobject
The form value
Showobject properties
type required'card'
The type of payment method
card optionalobject
The card details (if type is 'card')
Showobject properties
brand requiredstring
The card brand
complete requiredboolean
Whether the card input is complete
empty requiredboolean
Whether the card input is empty
error optionalobject
The error information (if any)
Showobject properties
code requiredstring
The error code
message requiredstring
The error message
field optionalstring
The field that has the error
on('change', handler)
1element.on('change', (e) => {
2 const { complete, empty, selectedPaymentMethod, value, error } = e.detail;
3 console.log('Form changed', { complete, empty, selectedPaymentMethod, value, error });
4});
trigger('intentRefetch')
Call this function to refetch the latest intent information.
Parameters
type required'intentRefetch'
The event name.
trigger('intentRefetch')
1element.trigger('intentRefetch');
unmount()
Unmounts the Element. Note that the Element instance will remain.
unmount()
1element.unmount();
update(options?, initOptions?)
Call this function to update Element options after creating the Element.
Parameters
options optionalDropInElementOptions
HideDropInElementOptions properties
allowedCardNetworks optional('visa' | 'mastercard' | 'maestro' | 'unionpay' | 'amex' | 'jcb' | 'diners' | 'discover')[]
One or more card networks that you support.
appearance optionalDropInAppearance
Customize the visual appearance of the DropIn Element to match your website's design.
ShowDropInAppearance properties
mode optional'light' | 'dark'
The appearance mode for the Element. Accepts 'dark' or 'light' modes where each mode provides a different color variable preset and color generation logic.
Default: 'light'
rules optionalobject
Set rules to further customize the appearance of the Element.
Showobject properties
.ApplePayButton optionalCSSProperties
.ApplePayButton:hover optionalCSSProperties
.Button optionalCSSProperties
.Button:hover optionalCSSProperties
.GooglePayButton optionalCSSProperties
.GooglePayButton:hover optionalCSSProperties
.Input optionalCSSProperties
.Input:active optionalCSSProperties
.Input:hover optionalCSSProperties
variables optionalVariables
Set variables to customize the Element's appearance. All color values can be specified in either RGB or HEX format.
ShowVariables properties
colorBackground optionalstring
Default: '#ffffff' (light mode) and '#14171A' (dark mode)
colorBrand optionalstring
Sets the main accent color used for Elements such as text links, focus borders, interactive backgrounds, highlights, etc.
Default: '#612fff' (light mode) and '#ABA8FF' (dark mode)
colorText optionalstring
Default: '#14171a' (light mode) and '#F5F6F7' (dark mode)
applePayRequestOptions optionalApplePayRequestOptions
Checkout configuration options for Apple Pay.
ShowApplePayRequestOptions properties
countryCode requiredstring
The merchant's two-letter ISO 3166 country code. For example, 'US'.
applicationData optionalstring
Optional user-defined data.
billingContact optionalApplePayPaymentContact
Billing contact information for the shopper.
ShowApplePayPaymentContact properties
addressLines optionalstring[]
The street portion of the address for the contact.
administrativeArea optionalstring
The state for the contact.
country optionalstring
The name of the country for the contact.
countryCode optionalstring
The contact’s two-letter ISO 3166 country code.
emailAddress optionalstring
An email address for the contact.
familyName optionalstring
The contact's family name.
givenName optionalstring
The contact's given name.
locality optionalstring
The city for the contact.
phoneNumber optionalstring
A phone number for the contact.
phoneticFamilyName optionalstring
The phonetic spelling of the contact's family name.
phoneticGivenName optionalstring
The phonetic spelling of the contact's given name.
postalCode optionalstring
The zip code or postal code, where applicable, for the contact.
subAdministrativeArea optionalstring
The subadministrative area (such as a county or other region) in a postal address.
subLocality optionalstring
Additional information associated with the location, typically defined at the city or town level (such as district or neighborhood), in a postal address.
buttonColor optional'black' | 'white' | 'white-outline'
Indicate the color of the button.
Default: 'black'
buttonType optionalenum
Supported methods for presenting the Apple Pay button.
Show possible enums
add-money
Useful for adding money to a card, account, or payment system.
book
Useful for booking trips, flights, or other experiences.
buy
Useful for product purchases.
check-out
Useful for purchase experiences that include other payment buttons that start with "Check out".
continue
Useful for general purchases.
contribute
Useful to help people contribute money to projects, causes, organizations, and other entities.
donate
Used by approved nonprofit organization that lets people make donations.
order
Useful for placing orders for items such as meals or flowers.
pay
Useful for paying bills or invoices.
plain
Shows Apple Pay logo only, useful when an additional call to action isn't needed.
reload
Useful for adding money to a card, account, or payment system.
rent
Useful for renting items such as cars or scooters.
set-up
Useful for prompting the user to set up a card.
subscribe
Useful for purchasing a subscription such as a gym membership or meal-kit delivery service.
support
Useful for helping people give money to projects, causes, organizations, and other entities.
tip
Useful for letting people tip for goods or services.
top-up
Useful for adding money to a card, account, or payment system.
existingPaymentMethodRequired optionalboolean
Whether the shopper must have an active card provisioned in Apple Pay.
Default: false
lineItems optionalApplePayLineItem[]
A set of line items that explain recurring payments and/or additional charges.
ShowApplePayLineItem properties
amount requiredstring
The line item's amount.
label requiredstring
A short, localized description of the line item.
automaticReloadPaymentThresholdAmount optionalstring
The balance an account reaches before the merchant applies the automatic reload amount.
deferredPaymentDate optionalDate
The date, in the future, of the payment.
paymentTiming optional'immediate' | 'deferred' | 'recurring' | 'automaticReload'
The time that the payment occurs as part of a successful transaction.
recurringPaymentEndDate optionalDate
The date of the final payment.
recurringPaymentIntervalCount optionalnumber
The number of interval units that make up the total payment interval.
recurringPaymentIntervalUnit optional'year' | 'month' | 'day' | 'hour' | 'minute'
The amount of time — in calendar units, such as day, month, or year — that represents a fraction of the total payment interval.
recurringPaymentStartDate optionalDate
The date of the first payment.
type optional'final' | 'pending'
A value that indicates if the line item is final or pending.
merchantCapabilities optional('supports3DS' | 'supportsEMV' | 'supportsCredit' | 'supportsDebit')[]
Payment capabilities supported by the merchant.
If not configured, merchantCapabilities will be based on merchant's account settings.
supports3DS: Required. This value must be supplied.
supportsCredit: Optional. If present, only transactions that are categorized as credit cards are allowed.
supportsDebit: Optional. If present, only transactions that are categorized as debit cards are allowed.
supportsEMV: Include this value only if you support China Union Pay transactions. (if
supportedNetworksdoes not contain chinaUnionPay, don't include it).
requiredBillingContactFields optional'postalAddress'[]
requiredShippingContactFields optional('email' | 'name' | 'phone' | 'postalAddress' | 'phoneticName')[]
The shipping information that you require from the shopper in order to fulfill the order.
shippingContact optionalApplePayPaymentContact
Shipping contact information for the shopper.
ShowApplePayPaymentContact properties
addressLines optionalstring[]
The street portion of the address for the contact.
administrativeArea optionalstring
The state for the contact.
country optionalstring
The name of the country for the contact.
countryCode optionalstring
The contact’s two-letter ISO 3166 country code.
emailAddress optionalstring
An email address for the contact.
familyName optionalstring
The contact's family name.
givenName optionalstring
The contact's given name.
locality optionalstring
The city for the contact.
phoneNumber optionalstring
A phone number for the contact.
phoneticFamilyName optionalstring
The phonetic spelling of the contact's family name.
phoneticGivenName optionalstring
The phonetic spelling of the contact's given name.
postalCode optionalstring
The zip code or postal code, where applicable, for the contact.
subAdministrativeArea optionalstring
The subadministrative area (such as a county or other region) in a postal address.
subLocality optionalstring
Additional information associated with the location, typically defined at the city or town level (such as district or neighborhood), in a postal address.
shippingMethods optionalApplePayShippingMethod[]
A set of shipping method objects that describe the available shipping methods.
ShowApplePayShippingMethod properties
amount requiredstring
The amount associated with this shipping method.
detail requiredstring
A further description of the shipping method.
identifier requiredstring
A client-defined identifier.
label requiredstring
A short description of the shipping method.
dateComponentsRange optionalApplePayDateComponentsRange
A dictionary that specifies the start and end dates for a range of time.
ShowApplePayDateComponentsRange properties
endDateComponents requiredApplePayDateComponents
The end date and time of the range.
ShowApplePayDateComponents properties
days requirednumber
A number that represents a day.
hours requirednumber
A number that represents an hour.
months requirednumber
A number between 1 and 12 that represents a month.
years requirednumber
A number that represents a year.
startDateComponents requiredApplePayDateComponents
The start date and time of the range.
ShowApplePayDateComponents properties
days requirednumber
A number that represents a day.
hours requirednumber
A number that represents an hour.
months requirednumber
A number between 1 and 12 that represents a month.
years requirednumber
A number that represents a year.
shippingType optional'shipping' | 'delivery' | 'storePickup' | 'servicePickup'
An optional value that indicates how purchased items are to be shipped.
supportedCountries optionalstring[]
A list of ISO 3166 country codes for limiting payments to cards from specific countries.
supportedNetworks optionalstring[]
Card networks supported by the merchant.
If not configured, supportedNetworks will be based on merchant's account settings.
For more details, see Apple Pay supported networks.
totalPriceLabel optionalstring
totalPriceType optional'pending' | 'final'
Indicate whether a line item is final or pending.
If the mode is recurring and if it's a variable subscription, the value should be pending.
Default: 'final'
authFormContainer optionalstring
The container of the authentication form used in 3D Secure authentication.
authorizationType optional'pre_auth' | 'final_auth'
Default: 'final_auth'
autoCapture optionalboolean
Default: true
autoSaveCardForFuturePayments optionalboolean
Specifies whether the card payment method should be automatically saved for future transactions.
This parameter is only effective in payment mode when a customer_id is provided.
Default: true
billing optionalBilling
ShowBilling properties
address requiredAddress
Billing address
ShowAddress properties
city requiredstring
The city of the billing address.
country_code requiredstring
The two-letter ISO 3166 country code of the shopper's country.
postcode requiredstring
Local post code.
state requiredstring
The state or province of the billing address.
street requiredstring
The street address of the billing address.
email requiredstring
Billing email address.
first_name requiredstring
The shopper's first name.
last_name requiredstring
The shopper's last name.
date_of_birth optionalstring
The shopper's date of birth in YYYY-MM-DD format.
phone_number optionalstring
The shopper's phone number.
client_secret optionalstring
The client_secret of the Payment Intent when Payment Intent is provided. Otherwise, this should be the client_secret of the Customer object.
country_code optionalstring
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.
currency optionalstring
customer_id optionalstring
cvcRequired optionalboolean
Whether you require the shopper to provide CVC when they checkout with a network tokenized card.
disableAutoCurrencyConversion optionalboolean
Whether to force disable automatic currency conversion.
true: Overrides merchant settings to disable conversion.false: Respects the merchant's automatic conversion configuration.
Default: false
googlePayRequestOptions optionalGooglePayRequestOptions
Checkout configuration options for Google Pay.
ShowGooglePayRequestOptions properties
countryCode requiredstring
The two-letter ISO-3166 country code.
allowCreditCards optionalboolean
Whether a credit card may be used for this transaction.
Default: true
allowedAuthMethods optionalenum[]
Allowed authentication methods.
Default: ['PAN_ONLY', 'CRYPTOGRAM_3DS']
Show possible enums
PAN_ONLY
CRYPTOGRAM_3DS
allowedCardNetworks optional('MASTERCARD' | 'MAESTRO' | 'VISA' | 'AMEX' | 'DISCOVER' | 'JCB')[]
One or more card networks that you support.
allowPrepaidCards optionalboolean
Whether a prepaid card may be used for this transaction.
Default: true
assuranceDetailsRequired optionalboolean
Set to true if you need information about the validation performed on the returned payment data.
Default: false
billingAddressParameters optionalBillingAddressParameters
Optional billing address parameters for the returned billing address.
ShowBillingAddressParameters properties
format requiredenum
Billing address format.
If omitted, defaults to [[BillingAddressFormat|MIN]].
Show possible enums
MIN
FULL
FULL-ISO3166
Same as FULL but includes [[Address.iso3166AdministrativeArea|Address.iso3166AdministrativeArea]]
phoneNumberRequired optionalboolean
Whether billing phone number required.
If omitted, defaults to false.
billingAddressRequired optionalboolean
Whether a billing address is required from the shopper.
Default: false
buttonColor optionalenum
Specifies the button color of the Google Pay button.
Default: 'default'
Show possible enums
default
A Google-selected default value. Currently black but it may change over time.
black
A black button suitable for use on white or light backgrounds.
white
A white button suitable for use on colorful backgrounds.
buttonSizeMode optionalenum
Determines how the button's size should change relative to the button's parent element.
Default: 'static'
Show possible enums
static
Default behavior. The button has a fixed width and height.
fill
The button fills its container.
buttonType optionalenum
Specifies the text to be displayed within the Google Pay button.
Show possible enums
book
"Book with Google Pay" button.
buy
"Buy with Google Pay" button.
checkout
"Checkout with Google Pay" button.
donate
"Donate with Google Pay" button.
order
"Order with Google Pay" button.
pay
"Pay with Google Pay" button.
plain
"Google Pay" button without text.
subscribe
"Subscribe with Google Pay" button.
long
Same as "buy".
short
Same as "plain".
callbackIntents optionalenum[]
Show possible enums
OFFER
Callback occurs when offer info is changed.
SHIPPING_ADDRESS
Callback occurs when shipping address is changed.
SHIPPING_OPTION
PAYMENT_AUTHORIZATION
Callback occurs when user authorized payment and [[PaymentData|PaymentData]] will be returned.
PAYMENT_METHOD
checkoutOption optionalenum
The options for checkout.
Show possible enums
DEFAULT
COMPLETE_IMMEDIATE_PURCHASE
CONTINUE_TO_REVIEW
displayItems optionalDisplayItem[]
Description of a cart item.
ShowDisplayItem properties
label requiredstring
The label to be displayed for the item.
This field is required.
price requiredstring
Price of this item.
The format of this string should follow the regular expression
format:
^[0-9]+(.[0-9][0-9])?$ (e.g., "10.45")
type requiredenum
Type of displayed line item, this is going to be used for analysis purpose.
This field is required.
Show possible enums
LINE_ITEM
Regular line item.
SUBTOTAL
Subtotal of all regular items.
TAX
Item for the collected tax.
DISCOUNT
Item for a discount.
SHIPPING_OPTION
Item for shipping option.
status optionalenum
The status of a DisplayItem.
This field is optional and default value is
[[DisplayItemStatus|FINAL]] if absent.
Show possible enums
FINAL
DisplayItem is final and the item displays the value in price.
PENDING
DisplayItem does not display value in price but instead display as "pending".
emailRequired optionalboolean
Whether the shopper must provide their email.
Default: false
existingPaymentMethodRequired optionalboolean
Whether the shopper must use an existing payment method.
Default: false
gatewayMerchantId optionalstring
The merchant account ID in Airwallex. It is required for Google Pay Express Checkout Element.
merchantInfo optionalobject
Detailed information about the merchant.
Showobject properties
merchantName optionalstring
Merchant name encoded as UTF-8.
offerInfo optionalOfferInfo
Offers available for redemption that can be used with the current order.
ShowOfferInfo properties
offers requiredOfferDetail[]
List of merchant provided offers applicable to the current order.
ShowOfferDetail properties
description requiredstring
redemptionCode requiredstring
Redemption code available for this transaction. This is used to identify the offer when the user decides to apply the offer.
paymentDataCallbacks optionalPaymentDataCallbacks
Defines callback methods for handling changed payment data and payment authorized events.
ShowPaymentDataCallbacks properties
onPaymentAuthorized optionalPaymentAuthorizedHandler
This method is called when a payment is authorized in the payment sheet.
onPaymentDataChanged optionalPaymentDataChangedHandler
This method handles payment data changes in the payment sheet such as shipping address and shipping options.
shippingAddressParameters optionalShippingAddressParameters
Optional shipping address parameters for the returned shipping address.
ShowShippingAddressParameters properties
allowedCountryCodes optionalstring[]
Allowed country codes for the shipping address.
This list should be an array of ISO 3166-1 alpha-2 country codes
(e.g., ["US", "CA", "JP"]).
If omitted, a shipping address from any supported country may be returned.
format optionalenum
Shipping address format.
If omitted, defaults to [[ShippingAddressFormat|FULL]].
*
Show possible enums
FULL
FULL-ISO3166
Same as FULL but includes [[Address.iso3166AdministrativeArea|Address.iso3166AdministrativeArea]]
phoneNumberRequired optionalboolean
If omitted, defaults to false.
shippingAddressRequired optionalboolean
Whether a shipping address is required from the shopper.
Default: false
shippingOptionParameters optionalShippingOptionParameters
Parameters for shipping option that can be used in this request. Note: This field is currently for web only.
ShowShippingOptionParameters properties
shippingOptions requiredSelectionOption[]
All the shipping options available for the current request. Will be rendered in the UI with given order.
This field is required.
ShowSelectionOption properties
id requiredstring
A unique identifier for the option.
This field is required.
label requiredstring
The label to be displayed as the option.
This field is required.
description optionalstring
A descriptive text that will be displayed below option label.
This field is optional.
defaultSelectedOptionId optionalstring
Identifier to the default selected shipping option. If this field is not provided the first option will be the default option.
This field is optional.
shippingOptionRequired optionalboolean
Whether a shipping option is required from the shopper.
Note: This field is currently for web only.
Default: false
totalPriceLabel optionalstring
totalPriceStatus optionalenum
The status of the total price. If it is a variable subscription, the status should be NOT_CURRENTLY_KNOWN.
Default: 'FINAL'
Show possible enums
NOT_CURRENTLY_KNOWN
The total price is not known currently.
ESTIMATED
The total price provided is an estimated price. The final price may change depending on the shipping address or billing address, if requested.
FINAL
The total price is the final total price of the transaction, and will not change based on selections made by the shopper.
transactionId optionalstring
Correlation ID to refer to this transaction.
intent_id optionalstring
The ID of the Payment Intent you would like to checkout. Required when mode is 'payment'.
layout optionalLayout
The layout of the DropIn element.
ShowLayout properties
alwaysShowMethodLabel optionalboolean
By default, the payment method icon is not visible when there is only one payment method. Set it to true if you want to always show the payment method icon.
Default: false
type optional'tab' | 'accordion'
Specify the layout for the payment elements. By default, accordion layout is used on desktop and tab layout is used on mobile.
methods optionalenum[]
The payment methods your website would like to integrate with.
Show possible enums
googlepay
applepay
card
airwallex_pay
alipaycn
alipayhk
gcash
dana
kakaopay
tng
rabbit_line_pay
poli
fpx
online_banking
bank_transfer
permatanet
alfamart
indomaret
doku_ewallet
enets
payeasy
seven_eleven
konbini
tesco_lotus
grabpay
skrill
eps
giropay
ideal
multibanco
p24
sofort
trustly
bancontact
dragonpay
blik
mybank
paybybankapp
verkkopankki
maxima
narvesen
paypost
perlas_terminals
paysafecash
paysafecard
paysera
satispay
family_mart
hi_life
sam_kiosk
axs_kiosk
bigc
esun
permata_atm
boost
shopee_pay
paypal
payu
ovo
bitpay
truemoney
atome
duit_now
pay_now
prompt_pay
go_pay
linkaja
jenius_pay
klarna
wero
korean_local_card
naver_pay
payco
samsung_pay
au_pay
bkash
d_barai
line_pay
merpay
payeasy_atm
paypay
rakuten_pay
safetypay
toss_pay
upi
zip
spei
afterpay
cash_app_pay
twint
laybuy
venmo
payme
tabby
octopus
spaylater
bizum
swish
wechatpay
fps
pix
jkopay
ach_direct_debit
bacs_direct_debit
becs_direct_debit
sepa_direct_debit
eft_direct_debit
mode optional'payment' | 'recurring'
The checkout mode for the shopper, 'payment' or 'recurring'.
Default: 'payment'
payment_consent optionalPaymentConsentOptions
The payment consent details.
ShowPaymentConsentOptions properties
next_triggered_by required'merchant' | 'customer'
The party to initiate subsequent payment
merchant_trigger_reason optional'scheduled' | 'unscheduled' | 'installments'
The trigger reasons for CoF. One of installments, unscheduled and scheduled
Default: 'unscheduled'
terms_of_use optionalTermsOfUse
Specifies the agreed legal and regulatory terms governing the recurring payment arrangement between the merchant and the customer.
ShowTermsOfUse properties
payment_amount_type required'FIXED' | 'VARIABLE'
The types of Payto agreements. Should be one of FIXED, VARIABLE.
payment_currency requiredstring
The currency of this payment.
start_date requiredstring
Start date to expect payment request.
billing_cycle_charge_day optionalnumber
The granularity per billing cycle. Required when payment_schedule.period_unit is WEEK, MONTH, or YEAR.
end_date optionalstring
End date to expect payment request.
first_payment_amount optionalnumber
The first payment. It could include the costs associated with the first debited amount. Optional if payment_amount_type is VARIABLE.
fixed_payment_amount optionalnumber
The fixed payment amount that can be charged for a single payment. Required if payment_amount_type is FIXED.
max_payment_amount optionalnumber
The maximum payment amount that can be charged for a single payment. Optional if payment_amount_type is VARIABLE.
payment_schedule optionalobject
Payment schedule details.
Showobject properties
period requirednumber
period_unit required'DAY' | 'WEEK' | 'MONTH' | 'YEAR'
Specifies billing frequency. One of DAY, WEEK, MONTH, and YEAR. Required when merchant_trigger_reason = scheduled.
total_billing_cycles optionalnumber
The total number of billing cycles of the payment schedule. If null, the mandate will continue indefinitely.
platformConnectedAccount optionalstring
quote_id optionalstring | null
requiredBillingContactFields optional('name' | 'email' | 'country_code' | 'address' | 'phone')[]
The billing information that you require from the user in order to process the transaction.
savedPaymentMethod optionalSavedPaymentMethodOptions
The options for saved payment method.
Default: { displayMode: 'auto', saveMode: 'auto' }
ShowSavedPaymentMethodOptions properties
displayMode optional'auto' | 'never'
Controls if UI displays existing saved payment methods.
Note: This only affects display. Whether we store a method is controlled by saveMode.
Default: 'auto'
shopper_email optionalstring
The shopper's email address.
shopper_name optionalstring
The shopper's full name.
shopper_phone optionalstring
The shopper's phone number.
showConfirmButton optionalboolean
Whether to display the built-in confirm button. Default is true.
When set to false:
Default: true
style optionalBoxStyle
Box style for the dropIn element.
ShowBoxStyle properties
base optionalCSSProperties
Base styling applied to the integral iframe. All styling extends from this style.
input optionalCSSProperties & PseudoClassStyle
Styling applied to the input element.
popupHeight optionalnumber
Customized Popup overlay height like 3DS payment flow.
popupWidth optionalnumber
Customized Popup overlay width like 3DS payment flow.
variant optional'standard' | 'outlined' | 'filled' | 'bootstrap'
Input variation.
submitType optional'pay' | 'book' | 'subscribe' | 'save'
Default: 'pay'
wechatpay optionalWeChatPayFlow
The options for Wechat Pay.
ShowWeChatPayFlow properties
desktopFlow optional'webqr' | 'mweb' | 'jsapi' | 'inapp'
mobileFlow optional'webqr' | 'mweb' | 'jsapi' | 'inapp'
components optionalenum[]Deprecated
use methods instead
The payment methods your website would like to integrate with
Show possible enums
googlepay
applepay
card
airwallex_pay
alipaycn
alipayhk
gcash
dana
kakaopay
tng
rabbit_line_pay
poli
fpx
online_banking
bank_transfer
permatanet
alfamart
indomaret
doku_ewallet
enets
payeasy
seven_eleven
konbini
tesco_lotus
grabpay
skrill
eps
giropay
ideal
multibanco
p24
sofort
trustly
bancontact
dragonpay
blik
mybank
paybybankapp
verkkopankki
maxima
narvesen
paypost
perlas_terminals
paysafecash
paysafecard
paysera
satispay
family_mart
hi_life
sam_kiosk
axs_kiosk
bigc
esun
permata_atm
boost
shopee_pay
paypal
payu
ovo
bitpay
truemoney
atome
duit_now
pay_now
prompt_pay
go_pay
linkaja
jenius_pay
klarna
wero
korean_local_card
naver_pay
payco
samsung_pay
au_pay
bkash
d_barai
line_pay
merpay
payeasy_atm
paypay
rakuten_pay
safetypay
toss_pay
upi
zip
spei
afterpay
cash_app_pay
twint
laybuy
venmo
payme
tabby
octopus
spaylater
bizum
swish
wechatpay
fps
pix
jkopay
ach_direct_debit
bacs_direct_debit
becs_direct_debit
sepa_direct_debit
eft_direct_debit
recurringOptions optionalRecurringOptionsDeprecated
use payment_consent instead
Options for recurring flow.
ShowRecurringOptions properties
connected_account_id optionalstring
currency optionalstring
The three-letter ISO currency code representing the currency of the initial Payment Intent. Only applicable to card payment method.
descriptor optionalstring
Descriptor that may be displayed to the customer during verification.
merchant_trigger_reason optional'scheduled' | 'unscheduled'
Whether subsequent payments are 'scheduled' or 'unscheduled'. Only applicable when next_triggered_by is 'merchant'.
Default: 'unscheduled'
next_triggered_by optional'merchant' | 'customer'
Whether the merchant or customer should trigger subsequent payments.
Default: 'customer'
three_ds_action optional'SKIP_3DS' | 'FORCE_3DS'
withBilling optionalbooleanDeprecated
please use requiredBillingContactFields instead
Indicate to improve 3DS experience, indicate if the payment form will collect billing info from shopper
initOptions optionalInitOptions
HideInitOptions properties
env optional'sandbox' | 'prod'
The Airwallex integration environment your site would like to connect with.
Default: 'prod'
fonts optionalFontOptions[]
Global option to customize font styles of Elements.
ShowFontOptions properties
family optionalstring
The font-family property, for example, AxLLCircular.
src optionalstring
The font-source property, for example, https://checkout.airwallex.com/fonts/CircularXXWeb/CircularXXWeb-Regular.woff2. See @font-face.
weight optionalstring | number
The font-weight property. Supported font weights include: regular (400) and bold (700).
locale optionalenum
The locale for your website. Defaults to the browser's locale; however, if the browser's locale is not supported, it will default to 'en'.
Show possible enums
ar
da
de
en
es
fi
fr
he
id
it
ja
ko
ms
nl
pl
pt
ro
ru
si
sv
tr
vi
ur
zh
zh-HK
origin optionalstringDeprecated
This field is no longer used.
update(options?, initOptions?)
1element.update({
2 methods: ['card'],
3}, {
4 locale: 'en',
5});
Was this page helpful?
YesNo
Ask AI
Docs AI Assistant answers questions using sources from Airwallex Docs, Airwallex API, Airwallex JS, and other public Airwallex knowledge bases. To get your questions answered right from your coding agent, try our Developer MCP server.
Hi, how can I help?
How do I start as a merchant?How to create a billing customer?
Deep thinking
Powered by
protected by reCAPTCHA
Cookies on the Airwallex website
We use cookies to enhance your website experience at Airwallex. Visit our cookie policy to learn more and manage your preferences at any time.
I accept