Initialize Main Flow

This page will help you get started with WEB SDK

  1. Load init script in your html page. If you use SPA just add it to index.html
<script src="https://sdk.whitebird.io/v1.1/script-builder.js"></script>
  1. Place exchange button to the body of your page
<div id="WhitebirdButton"></div>
  1. Add button click handler
whitebirdSdk.insertButton('#WhitebirdButton', {
      sdkUrl: 'https://sdk.whitebird.io/v1.1/',
      title: 'Whitebird with Whitebird',
      buttonName: 'Exchange',
      w: '550',
      h: '600',
  		onClose: () => {},//close sdk callback
    });
  1. Prepare exchange request using preorder result. For example, this request could be called when you client ready to click to sdk button
whitebirdSdk.buildW({
            id: preOrder.id,
            lang: 'en'
});
  1. Run application and click to the button!