The library does generation, parsing and validation locally and free. The hosted API adds live routing verification against the FedACH directory.
# JavaScript / TypeScript npm i achkit # Python pip install achkit
Generate a balanced file, parse one back, or validate reconciliation before your ODFI sees it. Money is integer cents; dates are YYYY-MM-DD.
import { AchFile, parse, validate } from 'achkit' const file = AchFile.create({ originDfi: '091000019', companyId: '1234567890' }) file.batch({ sec: 'PPD', description: 'PAYROLL', effectiveDate: '2026-07-22' }) .credit({ name: 'Jane Doe', routing: '011401533', account: '0072', amountCents: 124050 }) const bytes = file.render() const { ok, errors } = validate(bytes)
Base URL https://achkit.com. Authenticate with your API key (from the dashboard) in the x-api-key header. Create an account and subscribe to get a key.
Validate an ACH file. Without a key: reconciliation checks only (rate-limited). With a key: also cross-checks every entry's routing against the live FedACH directory and returns routing[].
curl -X POST https://achkit.com/api/validate \ -H "x-api-key: ak_your_key" \ --data-binary @payroll.ach // { ok, errors, tier, routing: [{ routing, checksumValid, found, active, bank }] }
Verify a 9-digit routing number against the FedACH participant directory - is it a real, active ACH bank, and which one.
curl https://achkit.com/api/routing/021000021 \ -H "x-api-key: ak_your_key" // { routing, checksumValid, found, active, bank: { name, city, state } }
Keyed /api/validate responses also include rulesVersion and a ruleWarnings[] array - stale effective dates, invalid SEC codes, non-zero prenotes, and Same-Day amount-cap breaches, checked against the current NACHA rule set.
Send an ACH return file (the R-code addenda your ODFI hands back). We decode every return into a structured event and deliver it to your registered webhooks.
curl -X POST https://achkit.com/api/returns \ -H "x-api-key: ak_your_key" \ --data-binary @returns.ach // { count, returns: [{ returnCode, reason, routing, amountCents, traceNumber }] }
Register the https URLs that should receive return events. Each delivery is signed with x-achkit-signature - an HMAC-SHA256 of the raw body using the secret returned when you add the hook.
curl -X POST https://achkit.com/api/webhooks \ -H "x-api-key: ak_your_key" \ -H "content-type: application/json" \ -d '{"url":"https://your-app.com/hooks/ach"}' // { id, url, secret } -> manage them in the dashboard
Errors use standard HTTP status codes with a plain-text message. 401 = missing/invalid key, 429 = over your monthly limit.