Methods
# confirmPaymentIntent(data) → {Promise.<(Intent|boolean)>}
Parameters:
Name | Type | Description |
---|---|---|
data |
PaymentMethod
|
PaymentMethodWithConsent
|
Promise.<(Intent|boolean)>
# confirmPaymentIntentWithSavedCard(data) → {Promise.<(Intent|boolean)>}
Parameters:
Name | Type | Description |
---|---|---|
data |
PaymentMethod
|
Promise.<(Intent|boolean)>
# createElement(type, options)
Parameters:
Name | Type | Description |
---|---|---|
type |
ElementType
|
|
options |
ElementOptionsTypeMap.<T>
|
# createPaymentConsent(data) → {Promise.<(Intent|boolean)>}
Parameters:
Name | Type | Description |
---|---|---|
data |
PaymentConsentRequest
|
Promise.<(Intent|boolean)>
# createPaymentMethod(id, client_secret) → {Promise.<(Intent|boolean)>}
Parameters:
Name | Type | Description |
---|---|---|
id |
string
|
|
client_secret |
string
|
Promise.<(Intent|boolean)>
# get3dsReturnUrl()
- Deprecated:
- this function would need exactly the same API version for merchant and element, so better to not use it
# getBrowserInfo(data) → {GetBrowserInfoResponse}
Parameters:
Name | Type | Description |
---|---|---|
data |
GetDeviceFingerprintRequest
|
# getDeviceFingerprint(data) → {string}
Parameters:
Name | Type | Description |
---|---|---|
data |
GetDeviceFingerprintRequest
|
string
# getElement(type) → {Element|null}
Parameters:
Name | Type | Description |
---|---|---|
type |
ElementType
|
Element
|
null
# getGatewayUrl(env) → {string}
Parameters:
Name | Type | Description |
---|---|---|
env |
AirwallexEnv
|
Indicate which airwallex integration env your merchant site would like to connect with |
gateway url
string
# handle3ds()
- Deprecated:
- this function would need exactly the same API version for merchant and element, so better to not use it
# loadAirwallexJs(gatewayUrl) → {HTMLScriptElement}
Parameters:
Name | Type | Description |
---|---|---|
gatewayUrl |
string
|
url |
HTMLScriptElement
Type Definitions
'dev'
|
'preview'
|
'qa'
|
'staging'
|
'demo'
|
'prod'
# AirwallexEnv
Indicate which airwallex integration env your merchant site would like to connect with
'applePayButton'
|
'cardNumber'
|
'expiry'
|
'cvc'
|
'googlePayButton'
|
'paymentRequestButton'
|
'card'
|
'wechat'
|
'qrcode'
|
'redirect'
|
'dropIn'
|
'fullFeaturedCard'
|
'directDebit'
# ElementType
Supported integration element type
'required'
|
'invalid'
|
'un_support'
|
'expired'
|
'validation_error'
|
'duplicate_request'
|
'resource_not_found'
|
'resource_already_exists'
|
'state_invalid_for_operation'
|
'service_unavailable'
|
'processor_unavailable'
|
'processor_busy'
|
'processor_declined'
|
'amount_above_limit'
|
'frequency_above_limit'
|
'transaction_blocked'
|
'payment_blocked'
|
'unsupported_operation_on_payment_method'
|
'capture_amount_above_limit'
|
'refund_amount_above_limit'
|
'insufficient_available_funds'
|
'insufficient_incoming_funds'
|
'processor_user_account_abnormal'
|
'processor_refund_period_expired'
|
'processor_refund_offline_required'
# ERROR_CODE
Define of error code when failed to validate user input or failed to request
[Error codes](https://www.airwallex.com/docs/payments__error-codes)
'onReady'
|
'onSubmit'
|
'onDynamicCurrencyConversion'
|
'onSuccess'
|
'onError'
|
'onCancel'
|
'onFocus'
|
'onBlur'
|
'onChange'
|
'onClick'
|
'onPendingVerifyAccount'
|
'onPressArrowKey'
|
'onSwitchMethod'
# EventCode
Event code supported value by element when shopper interact with the checkout element
`onReady`: The event fires when a given element resource has loaded.
`onSubmit`: The event is raised when confirm the intent. It fires after the click Pay button or calling confirmPaymentIntent function.
`onSuccess`: The event fires when a intent is confirm with Airwallex
`onError`: Error events are fired at various targets for different kinds of errors with shopper interaction, refer to `ElementError` interface.
`onCancel`: The event fires when shopper click cancel button when interact with the payment form.
`onFocus`: The event is raised when the shopper sets focus on an input by click or tab switch interaction.
`onBlur`: The event is raised when an input in element loses focus.
`onChange`: The events fire when the user commits a value change to a input. This may be done, for example, by clicking outside of the input or by using the Tab key to switch to a different input.
`onClick`: The event is raised when the user clicks on an input element.
`onDynamicCurrencyConversion`: The events fire when merchant enable Dynamic Currency Conversion (DCC) feature and shopper is confirm payment with an intent which match DCC scenario
`onPendingVerifyAccount`: The events fire when shoppers checkout with direct debit methods and the bank account need to be verified
`onSwitchMethod`: The event fires when shoppers switch payment method in hpp or dropIn element
'googlepay'
|
'applepay'
|
'card'
|
'wechatpay'
|
PaymentMethodWithRedirect
|
DirectDebitPaymentMethod
# PaymentMethodType
Supported integration payment method type for dropin and hostPaymentPage
'alipayhk'
|
'kakaopay'
|
'wechatpay'
# PaymentMethodWithQrcode
All payment method options for qrcode element, those payment method type integration will render qrcode from your checkout site to specific provider’s authentication page.
'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'
# PaymentMethodWithRedirect
All payment method options for redirect element, those payment method type integration will trigger redirection from your checkout site to specific provider’s authentication page.
':hover'
|
':focus'
|
'::placeholder'
|
'::selection'
|
':disabled'
# PseudoClasses
Supported customized pseudo css style for `cardNumber` | `expiry` | `cvc` elements
https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes
RedirectElementPaymentOptions
|
RedirectElementRecurringOptions
# RedirectElementOptions
Apply to Redirect element type integration, interface used when call createElement with type `redirect`