JS API
Deposit page sends the following events:
- "height" event;
- "status" event.
To get the Deposit page content height, you need to subscribe to the "height" event.
Example code:
function handleDepositSize(evt) {
if (evt.data.type === 'height') {
iframe.height = evt.data.height;
}
}
window.addEventListener('message', handleDepositSize);
To receive the deposit status (only success is implemented as of now), you must subscribe to the “event” status
Example code:
function handleDepositStatus(evt) {
if (evt.data.status === 'success') {
do something
}
}
window.addEventListener('message', handleDepositStatus);