Global

Methods

# confirmPaymentIntent(data) → {Promise.<(Intent|boolean)>}

Parameters:
Name Type Description
data PaymentMethod | PaymentMethodWithConsent

View Source src/index.ts, line 149

Promise.<(Intent|boolean)>

# confirmPaymentIntentWithSavedCard(data) → {Promise.<(Intent|boolean)>}

Parameters:
Name Type Description
data PaymentMethod

View Source src/index.ts, line 164

Promise.<(Intent|boolean)>

# createElement(type, options)

Parameters:
Name Type Description
type ElementType
options ElementOptionsTypeMap.<T>

View Source src/index.ts, line 105

# createPaymentConsent(data) → {Promise.<(Intent|boolean)>}

Parameters:
Name Type Description
data PaymentConsentRequest

View Source src/index.ts, line 211

Promise.<(Intent|boolean)>

# createPaymentMethod(id, client_secret) → {Promise.<(Intent|boolean)>}

Parameters:
Name Type Description
id string
client_secret string

View Source src/index.ts, line 195

Promise.<(Intent|boolean)>

# destroyElement(type) → {boolean}

Parameters:
Name Type Description
type ElementType

View Source src/index.ts, line 121

boolean

# get3dsReturnUrl()

Deprecated:
  • this function would need exactly the same API version for merchant and element, so better to not use it

View Source src/index.ts, line 242

# getBrowserInfo(data) → {GetBrowserInfoResponse}

Parameters:
Name Type Description
data GetDeviceFingerprintRequest

View Source src/index.ts, line 226

# getDeviceFingerprint(data) → {string}

Parameters:
Name Type Description
data GetDeviceFingerprintRequest

View Source src/index.ts, line 234

string

# getElement(type) → {Element|null}

Parameters:
Name Type Description
type ElementType

View Source src/index.ts, line 135

Element | null

# getGatewayUrl(env) → {string}

Parameters:
Name Type Description
env AirwallexEnv Indicate which airwallex integration env your merchant site would like to connect with

View Source src/index.ts, line 14

gateway url
string

# handle3ds()

Deprecated:
  • this function would need exactly the same API version for merchant and element, so better to not use it

View Source src/index.ts, line 249

# init(options)

Parameters:
Name Type Description
options InitOptions

View Source src/index.ts, line 80

# loadAirwallex(options)

Parameters:
Name Type Description
options InitOptions

View Source src/index.ts, line 36

# loadAirwallexJs(gatewayUrl) → {HTMLScriptElement}

Parameters:
Name Type Description
gatewayUrl string url

View Source src/index.ts, line 21

HTMLScriptElement

# redirectToCheckout(props) → {void}

Parameters:
Name Type Description
props HostPaymentPage

View Source src/index.ts, line 92

void

Type Definitions

'dev' | 'preview' | 'qa' | 'staging' | 'demo' | 'prod'

# AirwallexEnv

Indicate which airwallex integration env your merchant site would like to connect with

View Source types/airwallex.d.ts, line 37

'applePayButton' | 'cardNumber' | 'expiry' | 'cvc' | 'googlePayButton' | 'paymentRequestButton' | 'card' | 'wechat' | 'qrcode' | 'redirect' | 'dropIn' | 'fullFeaturedCard' | 'directDebit'

# ElementType

Supported integration element type

View Source types/element.d.ts, line 12

'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)

View Source types/element.d.ts, line 25

'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

View Source types/element.d.ts, line 30

'googlepay' | 'applepay' | 'card' | 'wechatpay' | PaymentMethodWithRedirect | DirectDebitPaymentMethod

# PaymentMethodType

Supported integration payment method type for dropin and hostPaymentPage

View Source types/element.d.ts, line 21

'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.

View Source types/qrcodeElement.d.ts, line 6

'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.

View Source types/element.d.ts, line 16

':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

View Source types/element.d.ts, line 174

RedirectElementPaymentOptions | RedirectElementRecurringOptions

# RedirectElementOptions

Apply to Redirect element type integration, interface used when call createElement with type `redirect`

View Source types/redirectElement.d.ts, line 49