FastACH 0.9.0

dotnet add package FastACH --version 0.9.0
                    
NuGet\Install-Package FastACH -Version 0.9.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FastACH" Version="0.9.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FastACH" Version="0.9.0" />
                    
Directory.Packages.props
<PackageReference Include="FastACH" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FastACH --version 0.9.0
                    
#r "nuget: FastACH, 0.9.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FastACH@0.9.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FastACH&version=0.9.0
                    
Install as a Cake Addin
#tool nuget:?package=FastACH&version=0.9.0
                    
Install as a Cake Tool

FastACH

.NET library for reading and writing ACH files

Continuous integration

Branch Build status
master Build and Publish

Installation NuGet

.NET 8.0, .NET 9.0, .NET 10.0

PM> Install-Package FastACH

Add namespace to the program

using FastACH;
using FastACH.Builders; // For using AchFileBuilder

Usage

Reading ACH file

var achFile = await AchFile.Read("ACH.txt");

achFile.WriteToConsole(); // Output to console
// Line map can be used for the error reporting
var lineMap = new List<(IRecord record, uint line)>();
var achFile = await AchFile.Read("ACH.txt", lineMap);

Reading ACH file to colorful console

var achFile = await AchFile.Read(name);
achFile.WriteToConsole();

Console Output

The AchFileBuilder provides a fluent API for building ACH files with less boilerplate code.

Simple Example - Credit and Debit Transactions
var achFile = new AchFileBuilder()
    .With(
        ImmediateDestination: "123456789",
        ImmediateOrigin: "987654321",
        ImmediateDestinationName: "Bank of America",
        ImmediateOriginName: "My Corporation")
    .WithBatch(batch => batch
        .With(
            CompanyId: "1234567890",
            OriginatingDFIID: "12345678",
            CompanyEntryDescription: "PAYROLL",
            CompanyName: "My Company")
        .WithCreditTransaction(
            amount: 1500.00m,
            routingNumber: "111111111",
            accountNumber: "987654321",
            receiverName: "John Doe")
        .WithDebitTransaction(
            amount: 500.00m,
            routingNumber: "222222222",
            accountNumber: "123456789",
            receiverName: "Jane Smith"))
    .Build();

await achFile.WriteToFile("ACH.txt");
Advanced Example - With All Optional Fields
var achFile = new AchFileBuilder()
    .With(
        ImmediateDestination: "123456789",
        ImmediateOrigin: "987654321",
        ImmediateDestinationName: "PNC Bank",
        ImmediateOriginName: "Microsoft Inc.",
        ReferenceCode: "REF12345",
        FileIdModifier: 'A')
    .WithBatch(batch => batch
        .With(
            CompanyId: "1234567890",
            OriginatingDFIID: "12345678",
            CompanyEntryDescription: "PAYROLL",
            CompanyName: "My Company",
            ServiceClassCode: 200,
            entryClassCode: "PPD",
            CompanyDiscretionaryData: "DISCRETIONARY",
            CompanyDescriptiveDate: new DateOnly(2024, 1, 15),
            EffectiveEntryDate: new DateOnly(2024, 1, 31),
            OriginatorsStatusCode: '1',
            BatchNumber: 1)
        .WithCreditTransaction(
            amount: 1500.00m,
            routingNumber: "111111111",
            accountNumber: "987654321",
            receiverName: "Employee One",
            receiverId: "EMP001",
            discretionaryData: "PAY")
        .WithAddenda(
            addendaTypeCode: 5,
            addendaInformation: "Salary payment for January 2024",
            addendaSequenceNumber: 1))
    .Build();

await achFile.WriteToFile("ACH.txt");
Multiple Batches Example
var achFile = new AchFileBuilder()
    .With("123456789", "987654321")
    .WithBatch(batch => batch
        .With("1234567890", "12345678", "PAYROLL", "Company A")
        .WithCreditTransaction(1000.00m, "111111111", "ACCT001", "Employee 1")
        .WithCreditTransaction(1200.00m, "222222222", "ACCT002", "Employee 2"))
    .WithBatch(batch => batch
        .With("0987654321", "87654321", "INVOICE", "Company B")
        .WithDebitTransaction(500.00m, "333333333", "ACCT003", "Customer 1")
        .WithDebitTransaction(750.00m, "444444444", "ACCT004", "Customer 2"))
    .Build();

await achFile.WriteToFile("ACH.txt");

Writing ACH file (Manual Approach)

var achFile = new AchFile()
{
    FileHeader = new FileHeaderRecord()
    {
        ImmediateDestination = "123456789",
        ImmediateOrigin = "123456789",
        FileCreationDate = DateOnly.FromDateTime(DateTime.Now),
        FileCreationTime = TimeOnly.FromDateTime(DateTime.Now),
        FileIdModifier = 'A',
        ImmediateDestinationName = "PNC Bank",
        ImmediateOriginName = "Microsoft Inc.",
        ReferenceCode = "00000000"
    },
    BatchRecordList =
    {
        new BatchRecord()
        {
            BatchHeader = new BatchHeaderRecord()
            {
                ServiceClassCode = 200,
                CompanyName = "companyName",
                CompanyDiscretionaryData = "companyDiscretionary",
                CompanyId = "companyID",
                CompanyEntryDescription = "EntryDescr",
                CompanyDescriptiveDate = new DateOnly(2011, 02, 03),
                EffectiveEntryDate = new DateOnly(2011, 01, 02),
                OriginatingDFIID = "DFINumber"
            },
            TransactionRecords =
            {
                new TransactionRecord
                {
                    EntryDetail = new EntryDetailRecord()
                    {
                        TransactionCode = 22,
                        ReceivingDFIID = 12345678,
                        CheckDigit = '9',
                        DFIAccountNumber = "1313131313",
                        Amount = 22M,
                        ReceiverIdentificationNumber = "ID Number",
                        ReceiverName = "ID Name",
                        DiscretionaryData = "Desc Data",
                        AddendaRecordIndicator = true,
                    },
                    AddendaRecords = new List<AddendaRecord>
                    {
                        new AddendaRecord()
                        {
                            AddendaInformation = "Monthly bill"
                        }
                    }
                },
                new TransactionRecord()
                {
                    EntryDetail = new EntryDetailRecord()
                    {
                        TransactionCode = 27,
                        ReceivingDFIID = 12345678,
                        CheckDigit = '9',
                        DFIAccountNumber = "1313131313",
                        Amount = 27M,
                        ReceiverIdentificationNumber = "ID Number",
                        ReceiverName = "ID Name",
                        DiscretionaryData = "Desc Data",
                        AddendaRecordIndicator = false,
                    }
                }
            }
        }
    }
};

await achFile.WriteToFile("ACH.txt");

Perfomance results

I created a benchmark to compare reading performance between FastACH and very popular ChoETL.Nacha library.

Method NumberOfEntries Mean Error Gen0 Gen1 Gen2 Allocated
FastACH 1000 8.936 ms NA - - - 835.11 KB
ChoetlNacha 1000 897.993 ms NA 535000.0000 529000.0000 529000.0000 377,0384.62 KB
FastACH 10000 19.415 ms NA - - - 8,261.02 KB
ChoetlNacha 10000 5,566.911 ms NA 3549000.0000 3489000.0000 3487000.0000 37,595,192.04 KB
FastACH 100000 193.902 ms NA 6000.0000 5000.0000 - 82,478.65 KB
ChoetlNacha 100000 37,031.587 ms NA 25610000.0000 25008000.0000 25008000.0000 375,717,659.82 KB
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.0 513 4/30/2026
0.8.0 640 3/30/2026
0.7.4 108 3/30/2026
0.7.3 528 1/19/2026
0.7.2 119 1/19/2026
0.7.1.103 2,156 9/8/2025
0.7.1.1 35,577 1/19/2026
0.7.0.102 216 9/8/2025
0.7.0.101 221 9/8/2025
0.6.0.100 802 8/12/2025
0.6.0.99 873 8/12/2025
0.5.0.98 1,644 3/7/2025
0.4.0.94 877 12/12/2024
0.3.5.93 217 10/22/2024
0.3.5.92 483 10/21/2024
0.3.4.90 252 10/18/2024
0.3.4.89 253 10/18/2024
0.3.3.88 271 6/28/2024
0.3.3.87 672 6/27/2024
0.3.2.86 217 6/27/2024
Loading failed