Field Types
Creating and Mounting
createBankElement Options
Tokenizing
CallcreateBankToken() after the user has filled both fields. firstName and lastName are required — they are included in the vault record alongside the account data.
createBankToken options
BankTokenResponse
bank.routingNumberLast4 is the last 4 digits of the routing number — sufficient for display and reconciliation. The full routing number is never exposed to your JavaScript.Events
Bank elements emit the same events as card elements:Error messages
Gating the submit button
Gate on vault readiness, field iframe readiness, and field completeness:Displaying Account Info After Tokenization
Thebank.last4 and bank.routingNumberLast4 values returned by createBankToken() are safe to display to the user as confirmation:
Validation Details
Account number
- Accepts 4–17 digits
- All non-digit characters are stripped as the user types
- Rendered as a password field (dots, not plain text) to prevent shoulder surfing
Routing number
- Must be exactly 9 digits
- Validated against the standard US ABA routing number checksum
- Invalid routing numbers are flagged immediately when the 9th digit is entered
Accessing an Existing Bank Element
Teardown
Full End-to-End Example (Vanilla JS + Express)
A minimal but complete bank tokenization flow: HTML form, Express session route, and a backend ACH route that receives the vault token.Frontend (HTML + JS)
Backend (Express)
Next Steps
Proxy
Forward the bank token to your ACH processor.
Styling
Customize colors, fonts, and states.
React Components
Use OzBankCard, OzBankAccountNumber, and OzBankRoutingNumber in React.
Error Handling
Handle errors from createBankToken().