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.
- Before: airwallex-payouts-web-sdk
- After: @airwallex/components-sdk
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, setenabledElementstopayouts.locale: The specified locale will be applied to both the Element UI strings and error messages unless overridden by thelocalefield at the Payout Element level. Supportsen,zh,zh-HK,de,es,fr,it,ja,kowith onlyensupport available for Tax Form Element.
Deprecated parameters
langKey
BEFORE
JavaScript1import { 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
JavaScript1import { 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
JavaScript1import { createElement } from '@airwallex/payouts-web-sdk';2createElement('beneficiaryForm');
AFTER
JavaScript1import { createElement } from '@airwallex/components-sdk';2createElement('beneficiaryForm');
Was this page helpful?
On this page
Was this page helpful?