Bank Elements
Bank elements let you collect account numbers and routing numbers in your own form without those values ever appearing in your JavaScript or reaching your server. Each field is an isolated iframe; tokenization happens inside the Ozura-origin tokenizer frame.Field Types
type | Description |
|---|---|
accountNumber | 4–17 digit bank account number. Rendered as a password-type input to prevent shoulder surfing. |
routingNumber | 9-digit US ABA routing number. Validated against the standard ABA checksum algorithm. |
Creating and Mounting
createBankElement Options
| Option | Type | Description |
|---|---|---|
style | ElementStyleConfig | Per-element style overrides. See Styling. |
placeholder | string | Placeholder text shown inside the field |
disabled | boolean | Mount the field in a disabled state |
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
| Option | Type | Required | Description |
|---|---|---|---|
firstName | string | ✅ | Account holder first name |
lastName | string | ✅ | Account holder last name |
BankTokenResponse
Events
Bank elements emit the same events as card elements:Error messages
| Field | Error | Condition |
|---|---|---|
accountNumber | "Invalid account number" | Not 4–17 digits |
routingNumber | "Invalid routing number" | Not 9 digits or fails ABA checksum |
Gating the submit button
Displaying Account Info After Tokenization
Thebank.last4 and bank.routingNumber 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 with the standard ABA routing number checksum:
(3×(d1+d4+d7) + 7×(d2+d5+d8) + (d3+d6+d9)) mod 10 === 0 - Invalid routing numbers are flagged immediately when the 9th digit is entered