Bank Check
Documentation for the Bank Check document model
Overview
The Bank Check model extracts and structures information from US bank checks, including payee/payer information, amounts, and MICR (Magnetic Ink Character Recognition) data. The model is specifically designed to handle standard US bank check formats.
Model Details
- Model ID:
BANK_CHECK
- Supported Locales:
en-US
- Version: GA
- Release Date: November 30, 2024
Schema Structure
Root Level Fields
Field | Type | Description |
---|---|---|
PayerName | string | Name of the payer (drawer) |
PayerAddress | string | Address of the payer (drawer) |
PayTo | string | Name of the payee |
CheckDate | string (ISO date) | Date the check was written |
NumberAmount | number | Amount of the check in numeric form |
WordAmount | string | Amount of the check in written form |
BankName | string | Name of the bank |
Memo | string? | Short note describing the payment |
MICR | MICR | MICR line information |
MICR Fields
The MICR
object contains:
Field | Type | Description |
---|---|---|
RoutingNumber | string | Routing number of the bank |
AccountNumber | string | Account number |
CheckNumber | string | Check number |
Example Usage
Validation Functions
validateBankCheck
Validates the entire check structure against the schema:
validateAmounts
Validates that numeric and written amounts match:
Returns true
if the difference between numberAmount
and wordAmount
is less than 0.01.
validateMICR
Validates the MICR line format:
Verifies that:
- Routing number is exactly 9 digits
- Special MICR symbols (⑆, ⑈) are properly handled
Date Handling
The model accepts dates in two formats:
- ISO 8601 datetime strings
- YYYY-MM-DD format strings
All dates are automatically converted to ISO format during validation.
Type Definitions
You can import the following TypeScript types:
Field Validation Rules
- All monetary amounts must be non-negative numbers
- Required fields include: payerName, payerAddress, payTo, checkDate, numberAmount, wordAmount, bankName, and micr
- The memo field is optional
- PayerSignatures defaults to an empty array if not specified
- Numeric amount and written amount must match (within 0.01 difference)
- MICR routing number must be exactly 9 digits
- MICR special characters (⑆, ⑈) are preserved but ignored during validation
Best Practices
- Always validate both amounts:
- Validate MICR data:
-
Store MICR data as strings to preserve leading zeros and special characters
-
Handle date conversions properly:
- Remember that signature verification is not part of the model’s capabilities - signatures are stored as strings for reference only