Methods
Here are the methods available in our JavaScript API
Show
Make TransactionLinks widget reveal itself.
window.transactionlink.open();
Hide
Hide TransactionLink widget.
window.transactionlink.close();
Ready
Trigger a function when a widget is fully loaded.
window.transactionlink_ready = () => {
transactionlink.setContext(<<token>>)
window.transactionlink.open()
}
Set workflow context
Some apps can be provided with additional information about the user, especially if it's a returning one. To provide context to the widget, first you need to obtain token
fromAPI then you need to call window.transactionlink.setContext(<<token>>)
method with obtained token
.
window.transactionlink.setContext(<<token>>);
Updated about 2 months ago