Web SDK
Installation
To use the Link modal directly without an SDK, simply include the script below. The Pinwheel Link modal will be appended to the document body through an iframe that is loaded in the DOM.
<!DOCTYPE html>
<html style="height: 100%; width: 100%;">
<head>
<script src="https://cdn.getpinwheel.com/pinwheel-v3.0.js"></script>
<script>
window.onload = function () {
Pinwheel.open({ linkToken: "INSERT LINK TOKEN", onEvent: console.log });
}
</script>
</head>
<body style="height: 100%; width: 100%;" />
</html>
Usage
Pinwheel.open()
Pinwheel.open()
This method opens the modal. It takes one parameter object with the parameters found here.
Example
Pinwheel.open({
linkToken: 'Put your generated link token string here',
onSuccess: (event) => {
if (event.job === 'direct_deposit_switch') {
console.log('User has successfully updated their direct deposit.');
}
},
});
Pinwheel.close()
Pinwheel.close()
This method closes the modal.
Updated 11 months ago