Airwallex logo
Airwallex logo
Home
Developer Tools
Developer Tools
Back to home
OverviewAPI
SDKs
Airwallex.js
Customization optionsUpgrade to Airwallex.js
Upgrade from Payment Elements SDKUpgrade from Payouts Web SDK
Error codes
Mobile SDKsServer-side SDKs (Beta)
Sandbox environment

Upgrade from Payouts Web SDK

Refer to this guide if your integration uses Airwallex Payouts Web SDK

The Airwallex Payouts Web SDK JavaScript library has been deprecated. For the latest features and customization options for Transfer Element and Beneficiary Element, please upgrade to Airwallex.js JS. This guide covers the changes made and instructions for migrating to Airwallex.js.

Update JavaScript client library

npm/yarn/pnpm installation

Install the new package.

cdn installation

Update the URL in the <script> tag.

  • Before: <script src="https://static.airwallex.com/widgets/payouts/sdk/v1/index.js"></script>
  • After: <script src="https://static.airwallex.com/components/sdk/v1/index.js"></script>

After installation, you will need to initialize the SDK by calling the init() method.

Update SDK functions

init()

New parameters

  • enabledElements: An array of Element groups representing the Elements. For example, to use Payouts elements, set enabledElements to payouts.
  • locale: The specified locale will be applied to both the Element UI strings and error messages unless overridden by the locale field at the Payout Element level. Supports en, zh, zh-HK, de, es, fr, it, ja, ko with only en support available for Tax Form Element.

Deprecated parameters

  • langKey

BEFORE

JavaScript
1import { init } from '@airwallex/payouts-web-sdk';
2init({
3 env: 'prod',
4 langKey: 'en',
5 authCode: '<auth_code>',
6 clientId: '<client_id>',
7 codeVerifier: '<code_verifier>',
8});

AFTER

JavaScript
1import { init } from '@airwallex/components-sdk';
2init({
3 env: 'prod',
4 enabledElements: ['payouts'],
5 locale: 'fr',
6 authCode: '<auth_code>',
7 clientId: '<client_id>',
8 codeVerifier: '<code_verifier>',
9});

createElement()

No changes to the function other than the import source.

BEFORE

JavaScript
1import { createElement } from '@airwallex/payouts-web-sdk';
2createElement('beneficiaryForm');

AFTER

JavaScript
1import { createElement } from '@airwallex/components-sdk';
2createElement('beneficiaryForm');
Was this page helpful?
On this page
Was this page helpful?