Plaid Integration
Accept instant bank payments with bank account verification
Plaid allows customers to connect their bank accounts instantly by logging into their bank through Plaid Link. Instead of manually entering routing and account numbers, customers authenticate with their online banking credentials and select their account. Plaid verifies the account in real-time, eliminating the delays and friction of traditional micro-deposit verification.
Customers connect their bank accounts in seconds through their online banking credentials. For businesses that prefer traditional manual entry, see Bank Account Payment Methods.
When to Use Plaid
Use Plaid when you want to enable bank payments with instant bank account verification. Plaid is ideal for reducing checkout friction, enabling immediate bank processing, and improving conversion rates for bank payment flows.
Benefits of Plaid
- Enhanced Security: Uses bank-level authentication with OAuth and MFA
- Better User Experience: No need to find checks or bank statements for account numbers
- Reduced Errors: Eliminates typos and invalid account numbers from manual entry
- Balance Check: Verify sufficient funds before processing to reduce NSF returns
- Higher Success Rates: Verified accounts have lower return rates than manual entry
Common use cases
- Subscription Payments: Enable instant recurring bank billing setup
- Large Transactions: Accept high-value payments with lower fees than card processing
- Instant Payouts: Verify bank accounts for payout disbursements
- Wallet Funding: Enable customers to fund wallets from bank accounts
Plaid Availability
Plaid is available for all Payload accounts and works across browsers and platforms.
Supported Banks
Plaid supports over 12,000 financial institutions in the United States and Canada, including:
- Major banks (Chase, Bank of America, Wells Fargo, etc.)
- Regional and community banks
- Credit unions
- Online banks (Chime, Ally, etc.)
Bank Coverage: Plaid supports most U.S. and Canadian banks. If a customer's bank is not supported, fall back to manual bank account entry. The Plaid Link interface will show bank search results and availability.
Checking Availability
The SDK provides a callback to detect if Plaid is available:
/** @type {HTMLElement | null} */
const plaidBtn = document.getElementById('plaid-button')
if (plaidBtn) {
form.plaid(
(plaidBtn)
)
}Integrating Plaid
Process bank payments immediately
Use Plaid with the Payment Form SDK to process bank payments immediately. This is ideal for checkout flows where customers pay with their bank account.
This example shows the complete flow for accepting Plaid payments:
- Backend: Create an intent with
type='payment_form'and configure payment amount - Frontend HTML: Add a button with
pl-plaidattribute - Frontend JavaScript: Initialize the form and activate Plaid with
.plaid() - Event Handling: Listen for
processed,authorized, ordeclinedevents
When the customer clicks the Plaid button:
- Plaid Link opens with a bank search interface
- Customer selects their bank and logs in with banking credentials
- Customer selects the account to use for payment
- Account is verified and payment is processed immediately
- The
processedevent fires with the transaction ID
Save bank accounts for future use
Use Plaid with the Payment Method Form SDK to save bank accounts for future use. This is ideal for subscription signups, wallet management, and recurring billing setup.
This example shows the complete flow for connecting bank accounts with Plaid:
- Backend: Create an intent with
type='payment_method_form' - Frontend HTML: Add a button with
pl-plaidattribute - Frontend JavaScript: Initialize the form and activate Plaid with
.plaid() - Event Handling: Listen for
successorerrorevents
When the customer clicks the Plaid button:
- Plaid Link opens with a bank search interface
- Customer selects their bank and logs in
- Customer selects the account to connect
- Account is verified and saved as a payment method
- The
successevent fires with the payment method ID
Setting Account Defaults
Configure the connected bank account as the default for automatic billing:
# On your backend
intent = pl.Intent.create(
type="payment_method_form",
payment_method_form={
"payment_method_template": {
"account_id": "acct_abc123",
"bank_account": {
"currency": "USD" # USD or CAD
},
"account_defaults": {
"paying": "payments" # Make this the default payment method
}
}
}
)Instant Verification: Bank accounts connected through Plaid are instantly verified and can be used for bank payments immediately. No micro-deposit verification is required.
Styling the Plaid Button
You can customize the Plaid button appearance to match your design.
Standard Plaid Button
Use Plaid's standard button style:
<button pl-plaid class="plaid-button">
<img src="/plaid-logo.svg" alt="Plaid" />
<span>Connect with Plaid</span>
</button>.plaid-button {
background-color: #000;
color: #fff;
border: none;
border-radius: 4px;
padding: 12px 24px;
font-size: 16px;
font-weight: 500;
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
transition: background-color 0.2s;
}
.plaid-button:hover {
background-color: #333;
}
.plaid-button img {
height: 20px;
}Bank Account Theme
Create a bank-themed button:
<button pl-plaid class="bank-button">
<svg class="bank-icon" viewBox="0 0 24 24">
<path d="M12 3L1 9l11 6 9-4.91V17h2V9M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82z" />
</svg>
<span>Pay with Bank Account</span>
</button>.bank-button {
background-color: #0066cc;
color: #fff;
border: none;
border-radius: 6px;
padding: 14px 28px;
font-size: 16px;
font-weight: 600;
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.bank-button:hover {
background-color: #0052a3;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.bank-icon {
width: 24px;
height: 24px;
fill: currentColor;
}Handling Events
The Payment Form SDK emits events for payment processing and connection status.
Success Events
form.on('success', (evt) => {
console.log('Payment processed:', evt.transaction_id)
if (evt.payment_method_id) {
console.log('Bank account connected:', evt.payment_method_id)
}
window.location.href = `/success?txn=${evt.transaction_id}`
})Error Events
form.on('error', (evt) => {
console.error('Error:', evt.message)
alert(`Failed to connect bank account: ${evt.message}`)
})
form.on('declined', (evt) => {
console.error('Payment declined:', evt.message)
alert('Your payment was declined. Please try another bank account or payment method.')
})Testing Plaid Integration
Testing Plaid requires using Plaid's test mode with special test credentials.
Using Plaid Test Credentials
When using Payload in test mode, Plaid automatically operates in sandbox mode. Use these test credentials:
Testing Different Scenarios
Test various scenarios using different credentials:
// Test successful connection
Username: user_good;
Password: pass_good;
// Test invalid credentials
Username: user_bad;
Password: pass_good;
// Test locked account
Username: user_locked;
Password: pass_good;
// Test MFA requirement
Username: user_mfa;
Password: pass_good;
// MFA Code: 1234Plaid Sandbox: In test mode, no real bank connections are made. All interactions are simulated through Plaid's sandbox environment. See Plaid's Testing Guide (opens in a new tab) for comprehensive test credentials.
Testing Payment Processing
After connecting a test bank account:
- Create a test payment using the connected account
- Verify the transaction appears in Payload Dashboard
- Check that webhooks fire correctly
- Test refunds and voids with the test transaction
Troubleshooting
Common issues and solutions when integrating Plaid.
Plaid Button Not Appearing
Symptoms: The Plaid button doesn't appear on the page.
Solutions:
- Check the availability callback is properly configured
- Ensure the page is served over HTTPS
- Verify the intent token is valid
- Check browser console for JavaScript errors
Plaid Link Not Opening
Symptoms: Clicking the button doesn't open Plaid Link.
Solutions:
- Verify the form is properly initialized with
new Payload.Form() - Ensure
.plaid()is called after form initialization - Check that the intent token is valid and not expired
- Verify no JavaScript errors are preventing execution
- Test in a different browser
Institution Connection Failing
Symptoms: Selected bank connection fails or returns errors.
Solutions:
- Verify the customer is entering correct banking credentials
- Check if the institution is experiencing outages (shown in Plaid Link)
- Test with a different bank to isolate institution-specific issues
- Review error details in the
errorevent handler - Contact Plaid support for institution-specific problems
MFA Issues
Symptoms: Multi-factor authentication not working in Plaid Link.
Solutions:
- Ensure the customer has access to their MFA device/email
- Try alternative MFA methods if offered by the bank
- In test mode, use Plaid's test MFA codes (1234)
- Contact the bank if MFA consistently fails
Best Practices
Follow these best practices for optimal Plaid integration.
User Experience
- Show Plaid prominently for bank payment options
- Provide fallback to manual entry if Plaid is unavailable
- Explain the process before opening Plaid Link
Integration
- Check availability before showing Plaid button
- Handle errors gracefully with clear user messaging
Next Steps
Enhance bank payment processing with additional features and integrations
Manage Bank Payments
Learn about Bank Account Payment Methods to understand bank account processing, explore Payment Processing for bank payment lifecycle and settlement details, and review Payment Method Verification for verification methods and requirements.
Add More Payment Options
Accept Apple Pay payments from Apple Pay users, enable Google Pay for Google Pay users, and build custom forms with Payment Form for card and manual bank account payments.
Setup Recurring Billing
Configure Recurring Payments to setup automatic billing with saved bank accounts, enable Autopay Overview for automatic invoice payment, and manage Subscription Billing for subscription billing cycles.
Monitor and Analyze Payments
Use Webhook Events to monitor payment and connection events in real-time, check Transaction Status for bank payment status updates, and track payment metrics with Reporting Overview.
Related articles
- Payment Form - Build custom payment forms
- Payment Method Form - Save bank accounts
- Bank Account Payment Methods - Bank account processing
- Apple Pay - Apple Pay integration
- Google Pay - Google Pay integration
- Intents API Reference - Complete API reference
- Payment Methods API Reference - Payment method API details