Skip to main content

NACHA CCD+ ACH file generator module for python.

This has been tested with “CCD” batches with addenda records.

Forked from carta-ach by Carta, Inc. and modified to include special charater support for Company, Bank and Supplier's Name.

Example:

from pyNacha.builder import AchFile

settings = {
    'immediate_dest': '123456789', # Your bank's routing number
    'immediate_org': '1098765432', # Bank assigned routing number
    'immediate_dest_name': "BANKNAME",
    'immediate_org_name': 'COMPANYNAMR',
    'company_id': '1098765432',
    'company_name': 'COMPANYNAME',
    'trace_num': '00000000'
}

ach_file = AchFile('A', settings) #file Id mod

entries = [
    {
        'type'           : '22', # type of
        'routing_number' : '12345678',
        'account_number' : '11232132',
        'amount'         : '10.00',
        'id_number': '901398852',
        'name'           : 'Alice&Wanderdust',
        'addenda' : [
            {
                'payment_related_info': 'Here is some additional information',
            }
        ],
    },
    {
        'type'           : '22',
        'routing_number' : '12345678',
        'account_number' : '234234234',
        'amount'         : '150.00',
        'id_number': '901398853',
        'name'           : 'Billy Holiday',
        'addenda' : [
            {
                'payment_related_info': 'Here is some additional information2',
            },
        ],
    },
    {
        'type'           : '22',
        'routing_number' : '12323231',
        'account_number' : '123123123',
        'amount'         : '12.13',
        'id_number': '901398853',
        'name'           : 'Rachel Welch',
    },
]

ach_file.add_batch('CCD', entries, credits=True, debits=True)

print(ach_file.render_to_string())

===============================================================================================

This returns the following NACHA file:

101 123456780 1234567801409020123A094101YOUR BANK YOUR COMPANY 5200YOUR COMPANY 1234567890CCDPAYMENT 140903 1123456780000001 62212345678011232132 0000001000 ALICE WANDERDUST 1123456780000001 705HERE IS SOME ADDITIONAL INFORMATION 00000000001 627123456780234234234 0000015000 BILLY HOLIDAY 0123456780000002 622123232318123123123 0000001213 RACHEL WELCH 0123456780000003 820000000400370145870000000150000000000022131234567890 123456780000001 9000001000001000000040037014587000000015000000000002213 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999

Release files for pyNacha 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyNacha 0.0.3
File Size Uploaded
pyNacha-0.0.3.tar.gz 13.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyNacha 0.0.3
File Interpreter ABI Platform
pyNacha-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 27.3 kB

Release files / pyNacha-0.0.3.tar.gz

Download URL pyNacha-0.0.3.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b28c2370e368d57634c6f4978b1f010444c2565eb12a7933ce13cba7e9a94651
BLAKE2b-256 checksum
How to use checksums
feb18c8b0cfceaa7cb4ed2af8d853618968bab6a054f872df0540f9a87255b41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

Release files / pyNacha-0.0.3-py3-none-any.whl

Download URL pyNacha-0.0.3-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f621ab57eeb22ec8cd5ca1e33e277fe9a1f73fc449e773ce9256e96172d41176
BLAKE2b-256 checksum
How to use checksums
73c2008eadf371a88a443626a54698d56e380a7494cb6166a2467edca721f83c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page