<!-- Simple example of enabling Plaid -->
<form pl-form="payment_method">
<button id="plaid-add-btn" type="button">Add Bank Account</button>
</form>
<script src="https://payload.co/Payload.js"></script>
<script>
Payload('test_client_key_3bcr16ohAy8aEcwK3Vffs')
new Payload.Form({
form: document.getElementById('add-billing-form'),
autosubmit: false,
payment_method: {
transfer_type: 'receive-only'
}
})
.plaid(document.getElementById('plaid-add-btn'))
.on('created', function(evt) {
console.log(evt.payment_method_id)
})
</script>
Integrate Plaid to collect banking details securely using Payload.js with a simple line of JavaScript. Using Plaid will allow an account holder to login to their bank through Plaid's embedded auth flow and select their desired account.
Once selected, a payment method will be created for the
account and can be used to send or receive funds using Payload. You can also initiate a payment with the
selected account details using the pl-form="payment"
Payload Form type.
The plaid
integration
will work in correlation with any other Payload.Form
inputs like customer_id
or default_payment_method
.