This page will help you get started with WEB SDK
- 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>
- Place exchange button to the body of your page
<div id="WhitebirdButton"></div>
- 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
});
- 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'
});
- Run application and click to the button!