Skip to content

Reference

Sample payment files

10 sample files to download or open in the free viewers: NACHA (ACH) files, BAI2 bank reports and an X9.37 image cash letter. Names, account numbers and amounts in them are made up.

Last updated

NACHA (ACH) files

Plain text, one 94-character record per line, for the NACHA Viewer. Every file but the validation demo passes every check.

  • NACHAsample-ppd.ach1.9 KB

    PPD payroll (classic sample)

    The original NACHA Navigator sample — MY COMPANY USA prenoting its payroll accounts in two PPD batches, plus one $0.10 credit — corrected so that it passes every check.

    • Prenotes to checking (23) and savings (33), and a live checking credit (22)
    • Two PPD batches with balanced controls
    • Block fill to 20 records
  • NACHAsample-ccd-addenda.ach1.9 KB

    CCD vendor payments with remittance addenda

    A credits-only CCD batch paying vendors with one type 05 addenda each, and a debits-only CCD batch collecting invoices.

    • Service Class Codes 220 and 225
    • Type 05 addenda with X12 RMR segments and plain text
    • A zero-dollar remittance entry (Transaction Code 24)
  • NACHAsample-ctx.ach1.9 KB

    CTX payments with EDI 820 remittance

    Two CTX payments whose ANSI X12 820 remittance advice spans several type 05 addenda records.

    • Number of Addenda Records (positions 55–58)
    • Addenda sequence numbers 0001–0004
    • Receiving Company Name/ID Number layout
  • NACHAsample-returns-noc.ach2.8 KB

    Returns and Notifications of Change

    A file sent back by an RDFI: a PPD batch of returns (R01, R02, R03, R10, R15) and a COR batch of NOCs (C01, C02, C05).

    • Return Transaction Codes 21, 26 and 36 with type 99 addenda
    • Date of death on an R15 return
    • Type 98 addenda with corrected account, routing number and transaction code
  • NACHAsample-with-errors.ach1.1 KB

    Validation demo (deliberate errors)

    A small payroll file damaged on purpose so the validator has something to find. Every problem is listed below.

    • Control totals that do not add up
    • Routing, trace and addenda problems
    • A record with its trailing blanks stripped

    The 12 problems in it, on purpose:

    • Line 3: Routing number 065503349 fails the check-digit test (its first eight digits imply 8, not 9) ED_RDFI_CHECK_DIGIT
    • Line 4: Prenote (Transaction Code 23) for $10.00; prenotes must be zero ED_PRENOTE_AMOUNT
    • Line 5: Trace number …0000002 follows …0000003 ED_TRACE_ORDER
    • Line 6: Addenda Record Indicator 1, but no addenda record follows ED_ADDENDA_INDICATOR
    • Line 7: Entry Hash 0099999999; the RDFI numbers add up to 0066196257 BC_ENTRY_HASH
    • Line 7: Total credit $9,999.99; the credits add up to $4,340.00 BC_TOTAL_CREDIT
    • Line 8: Effective Entry Date 261131 (November 31) INVALID_DATE
    • Line 9: A debit (Transaction Code 27) in a credits-only batch (Service Class Code 220) ED_SERVICE_CLASS_MISMATCH
    • Line 11: Batch Control Company Identification differs from the Batch Header BC_COMPANY_ID
    • Line 12: Batch Count 1; the file has 2 batches FC_BATCH_COUNT
    • Line 12: File Control Record is 55 characters: its trailing blanks were stripped RECORD_LENGTH
    • Line 12: 12 records and no block fill (warning) BLOCK_FILL_MISSING
  • NACHAsample-reversal-demo.ach1.9 KB

    Reversal demo (payroll, memberships, vendor payment)

    The file behind the reversal demo, as generated for October 27, 2026: a payroll batch, a batch of membership debits and a vendor payment with a remittance addenda.

    • Credits and debits across three batches
    • A prenote that can’t be reversed
    • A CCD payment with a remittance addenda

    The demo link builds the same file in your browser for today’s date, so its five-banking-day reversal window is always open; the dates in this download stay as they were generated.

A NACHA file, line by line

The first batch of sample-ppd.ach, its File Control and the first block-fill line. The NACHA file format reference lays out every field.

LineRecordWhat it says
1101 065503681 0655036811202170910A094101HANCOCK BANK MY COMPANY USA File Header: from MY COMPANY USA to HANCOCK BANK, routing number 065503681, created February 17, 2012 at 09:10, File ID Modifier A.
25200MY COMPANY USA 9123456789PPDPAYROLL 120220120221 1065503680000001Company/Batch Header: Service Class 200, company ID 9123456789, SEC code PPD, description PAYROLL, effective February 21, 2012, batch 1.
36220655033481111111 0000000010000001309 JOHN M SMITH 0065503680000001Entry Detail: Transaction Code 22, a checking credit of $0.10 to routing number 065503348, account 1111111, JOHN M SMITH.
463326557758511122333 0000000000000001309 JOHN M SMITH 0065503680000002Entry Detail: Transaction Code 33, a prenote to a savings account: $0.00, checking the account before live payments.
56230655033481234567899 0000000000000001309 JOHN M SMITH 0065503680000003Entry Detail: Transaction Code 23, a prenote to a checking account.
6623065503681111222111 0000000000000001309 JOHN M SMITH 0065503680000004Entry Detail: another checking prenote, trace number 065503680000004.
7820000000400462087940000000000000000000000109123456789 065503680000001Company/Batch Control: 4 entries and addenda, Entry Hash 0046208794, debits $0.00, credits $0.10.
149000002000002000000080137163116000000000000000000000010 File Control, after the second batch (lines 8–13): 2 batches, 2 blocks, 8 entries and addenda, Entry Hash 0137163116.
159999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999Block fill: lines 15–20 are 94 nines each, padding the file to 20 lines, two blocks of 10.

BAI2 files

Bank balance and transaction reports for the BAI2 Viewer: comma-separated records, each ending in a slash or continued on an 88 record.

  • BAI2sample-multi-account.bai1.8 KB

    Prior-day and same-day report, 5 accounts

    Two groups (final prior-day and interim same-day), five accounts in USD, EUR and JPY, balances and summaries continued on 88 records, funds types S, V, D and Z, a non-monetary 890 record, and long text with commas and slashes continued on 88 records. Every control total and record count is correct.

  • BAI2sample-with-errors.bai591 bytes

    Report with deliberate errors

    Three accounts with fifteen problems placed on purpose to show what the validator reports.

    The 15 problems in it, on purpose:

    • Line 1: File Creation Time 2575 is not a valid time.
    • Line 2: As-of-Date Modifier 5 is not one of 1–4.
    • Line 4: Funds Type X is not a BAI2 funds type.
    • Line 5: A transaction amount is negative (16 amounts are unsigned).
    • Line 6: Status code 015 (Closing Ledger) is used as a transaction.
    • Line 7: The amount 1250.00 has a decimal point (BAI2 amounts use implied decimals).
    • Line 8: The Account Control Total does not match the account’s amounts.
    • Line 9: Currency code US is not an ISO 4217 code.
    • Line 10: Value date 261332 has month 13.
    • Line 11: Type code 850 is not in the BAI2 list (information only).
    • Line 12: A blank line (information only).
    • Line 13: The account that starts on line 9 has no Account Trailer (49).
    • Line 16: 88 used as the Group Trailer instead of 98 (read as a 98, with a "Did you mean 98?" warning).
    • Line 16: The group trailer says 2 accounts; the group has 3.
    • Line 17: The File Trailer says 99 records; the file has 16.

A BAI2 file, line by line

All of sample-simple.bai. Amounts have no decimal point: 250000 is $2,500.00 in a USD account. The BAI2 file format reference covers every record.

LineRecordWhat it says
101,123456789,987654321,250407,1200,1,,,2/File Header: sender 123456789, receiver 987654321, created April 7, 2025 at 12:00, file 1, version 2.
202,987654321,123456789,1,250407,1200,USD,2/Group Header: status 1 (update), as of April 7, 2025 at 12:00, in USD, modifier 2 (final previous-day data).
303,1234567890,USD,010,1000000,,,015,1100000,,/Account Identifier: account 1234567890, opening ledger (type 010) $10,000.00, closing ledger (type 015) $11,000.00.
416,175,250000,0,CHKDEP001,12345,CHECK DEPOSIT, VENDOR PAYMENT 12345Transaction Detail: check deposit package (type 175), $2,500.00, available immediately (funds type 0), bank reference CHKDEP001. The text runs to the end of the line, commas included.
516,451,150000,0,ACH0001,PAYROLL,ACH WITHDRAWALTransaction Detail: ACH debit received (type 451), $1,500.00.
688,PAYROLL PROCESSINGContinuation: more text for the transaction on line 5.
788,TRANSACTION DETAIL LINE 2Continuation: a second line of text.
849,2500000,6/Account Trailer: control total 2500000 (the account’s amounts added up) and 6 records, lines 3–8.
998,2500000,1,8/Group Trailer: control total, 1 account, 8 records (lines 2–9).
1099,2500000,1,10/File Trailer: control total, 1 group, 10 records in all.

X9.37 file

An image cash letter for the X9 Viewer: binary records with the check images inside, so a text editor can’t show it.

  • X9.37sample-cash-letter.x954.3 KB

    Image cash letter with six checks

    One cash letter of 2 bundles holding 6 checks for $5,216.50 in all, with the front and back image of every check. Business date October 26, 2026.

    • EBCDIC records with 4-byte length prefixes, Standard Level 35 (X9.100-187-2013 or later)
    • 12 image views: TIFF, CCITT Group 4, black and white
    • A Check Detail Addendum A (26) on every check and one Addendum C (28)
    • Marked as a test file (Test File Indicator T), which the viewer notes

    The X9 Viewer has no link that opens this file directly: open the viewer and use its sample button.

What the X9.37 file holds

The records of sample-cash-letter.x9, by type. Each check is a Check Detail (25) with its addenda, followed by an Image View Detail (50) and Image View Data (52) for the front and for the back. The X9.37 file format reference describes each record type.

TypeRecordCount
01File Header1
10Cash Letter Header1
20Bundle Header2
25Check Detail6
26Check Detail Addendum A6
28Check Detail Addendum C1
50Image View Detail12
52Image View Data12
70Bundle Control2
90Cash Letter Control1
99File Control1

Need a different file?

The NACHA Generator builds a valid NACHA file from a form or from JSON, with the totals, entry hash and block fill worked out for you.

Opening a sample or your own file uploads nothing: the viewers read files in your browser.