5.14 NACH file format reference
NACH (National Automated Clearing House) is the NPCI-operated bulk-debit / credit infrastructure. Lenders use NACH for collecting EMI / loan repayments via pre-authorised mandate.
The NACH file format is fixed-width with delimited records following NPCI’s specifications. This page is the engineer’s quick reference.
Authoritative source: NPCI’s NACH Procedural Guidelines and the NACH 2.0 File Format Specifications (issued and updated periodically). Always cross-reference the current version on NPCI’s site before implementing — NPCI periodically updates field widths and codes.
NACH overall flow
Section titled “NACH overall flow”1. Lender holds active mandate (paper NACH or eNACH) for borrower's bank account.2. Lender generates presentation file for tomorrow's debits.3. Lender submits file to sponsor bank by daily cut-off.4. Sponsor bank submits to NPCI.5. NPCI processes overnight; routes to destination banks.6. Destination banks attempt debit on settlement date.7. NPCI returns ack file to sponsor bank next day.8. Sponsor bank forwards ack file to lender.9. Lender processes acks: success or bounce per row.Daily cycle. Most banks have late-evening cut-off (e.g., 15:00 – 18:00 for files presented for next-day settlement).
File types
Section titled “File types”The lender exchanges these file types with the sponsor bank:
| File | Direction | Purpose |
|---|---|---|
| Mandate request | Lender → Bank | Activate new mandate (one-time, for paper mandates) |
| Mandate response | Bank → Lender | Mandate activation result |
| Presentation file | Lender → Bank | Daily batch of debits to attempt |
| Inward presentation acknowledgement | Bank → Lender | Sponsor bank confirms receipt |
| Return file (settlement acknowledgement) | Bank → Lender | Per-debit success / bounce with reason codes |
| Reversal file | Bank → Lender | Reversal of a previously-settled debit (rare) |
Presentation file structure
Section titled “Presentation file structure”The presentation file has three record types:
- Header record (1 per file).
- Detail records (1 per debit).
- Trailer record (1 per file).
All records fixed-width; padding spaces / zeros as per spec.
Header record (illustrative; verify against current NPCI spec)
Section titled “Header record (illustrative; verify against current NPCI spec)”| Position | Width | Field | Description |
|---|---|---|---|
| 1 | 1 | Record type | 1 for header |
| 2 – 5 | 4 | Transaction code | NACH transaction code (e.g., 0067 for retail debit) |
| 6 – 14 | 9 | Sponsor bank IFSC prefix | Sponsor bank routing |
| 15 – 26 | 12 | User number | Lender’s NPCI-assigned User Number |
| 27 – 50 | 24 | User name | Lender’s NPCI-registered name |
| 51 – 58 | 8 | Settlement date | DDMMYYYY of intended settlement |
| 59 – 70 | 12 | Product code | NPCI product code |
| 71 – 95 | 25 | Filler | Spaces |
(Exact widths per current NACH spec; the above is illustrative structure.)
Detail record (illustrative; verify against current spec)
Section titled “Detail record (illustrative; verify against current spec)”| Position | Width | Field | Description |
|---|---|---|---|
| 1 | 1 | Record type | 2 for detail |
| 2 – 17 | 16 | UMRN | Unique Mandate Reference Number from mandate registration |
| 18 – 26 | 9 | Customer reference number | Lender’s internal reference (loan ID etc.) |
| 27 – 37 | 11 | Customer account number | Borrower’s bank account (right-aligned, zero-padded) |
| 38 – 48 | 11 | Amount | Amount in paise (right-aligned, zero-padded; 000010000 = ₹100.00) |
| 49 – 70 | 22 | Customer name | Borrower’s name (left-aligned, space-padded) |
| 71 – 81 | 11 | IFSC | Borrower’s bank IFSC |
| 82 – 92 | 11 | MICR code | Borrower’s bank MICR code |
| 93 – 102 | 10 | Settlement reference | NPCI-assigned (lender leaves blank) |
| 103 – 110 | 8 | Date | Settlement date (same as header) |
| 111 – 130 | 20 | Filler | Spaces |
Trailer record
Section titled “Trailer record”| Position | Width | Field | Description |
|---|---|---|---|
| 1 | 1 | Record type | 7 for trailer |
| 2 – 11 | 10 | Total record count | Excluding header / trailer |
| 12 – 26 | 15 | Total amount | Sum of detail amounts in paise (right-aligned, zero-padded) |
| 27 – 50 | 24 | Filler | Spaces |
Sample file (illustrative)
Section titled “Sample file (illustrative)”10067SBIN00000001234567890123XYZ NBFC PRIVATE LIMITED 11052026PRODCODE00012HDFC0001234ABC123456000001234500001500000Sundar Textiles Pvt Ltd HDFC0001234123456789 110520262HDFC0001234XYZ987654000005678900000750000Ravi Enterprises HDFC0005678987654321 1105202670000000020000000000022500000(Whitespace / padding adjusted; actual lines are exact-width.)
Return file structure
Section titled “Return file structure”Bank returns per-debit outcome:
| Position | Width | Field | Description |
|---|---|---|---|
| 1 | 1 | Record type | 2 for detail (one row per attempted debit) |
| 2 – 17 | 16 | UMRN | (echo) |
| 18 – 26 | 9 | Customer reference number | (echo — lender uses this to map back) |
| 27 – 28 | 2 | Return code | 00 for success; otherwise a bounce reason code |
| 29 – 50 | 22 | Return reason text | Human-readable reason |
| … | Other echo fields |
NACH return / bounce reason codes (illustrative subset)
Section titled “NACH return / bounce reason codes (illustrative subset)”Always verify against current NPCI procedural guidelines:
| Code | Reason | Lender action |
|---|---|---|
00 | Success | Process repayment |
01 | Funds insufficient | Apply bounce fee; re-present per policy |
02 | Account closed | Mark mandate inactive; contact borrower |
03 | Account does not exist / wrong account | Mark mandate inactive; verify borrower |
05 | Payment stopped by drawer | Mandate likely revoked unilaterally; contact borrower |
09 | Other reasons (technical) | Re-present |
10 | Connectivity / format / technical | Re-present |
21 | KYC not done | Borrower’s bank-side issue; contact bank |
25 | Different from KYC name | Verify mandate; may need re-registration |
30 | Mandate inactive at customer’s bank | Mandate cancelled by borrower; contact |
42 | Mandate not found | Mandate may have lapsed; verify validity |
.. | Various other codes | Per spec; lender’s adapter has full mapping |
Always refer to NPCI’s current bounce-reason-code matrix — codes are updated periodically and new codes added for new failure modes.
Re-presentation policy
Section titled “Re-presentation policy”NACH allows re-presentation after a bounce per NPCI rules. Common pattern:
| Bounce reason | Re-present? | When |
|---|---|---|
Funds insufficient (01) | Yes | After 1 – 3 days; cap at 2 – 3 attempts per cycle |
Account closed (02) | No | Mandate dead; contact borrower |
Stopped by drawer (05) | No | Borrower revoked; contact |
Technical (09, 10) | Yes | Next day |
Mandate inactive (30, 42) | No | Re-register mandate |
Lender’s bounce-handling logic encodes this matrix.
Timing and cut-offs
Section titled “Timing and cut-offs”NPCI’s NACH cycle is T+1 settlement with these checkpoints:
- Lender cut-off to sponsor bank: typically
15:00 – 18:00for next-day settlement. - Sponsor bank cut-off to NPCI: typically
19:00 – 20:00. - NPCI processing: overnight.
- Settlement on T+1 during the day.
- Ack file: returned to sponsor bank typically by
T+2 morning. - Lender receives ack: by
T+2 mid-daytypically.
Lender’s daily batch (5.8) is built around these timings.
Mandate file structure (paper NACH mandate registration)
Section titled “Mandate file structure (paper NACH mandate registration)”For paper-based mandate registration (still common for some segments):
- Lender uploads scanned paper mandate to sponsor bank with a structured metadata file.
- Sponsor bank processes; returns UMRN on activation or rejection reason.
For eNACH (Aadhaar / Debit card / Netbanking), mandate registration is API-based and faster.
Lender implementation notes
Section titled “Lender implementation notes”Sponsor bank choice
Section titled “Sponsor bank choice”Different sponsor banks have slightly different:
- File format variants (within NPCI spec).
- Cut-off times.
- API vs SFTP submission.
- Ack format / timing.
Document per-sponsor-bank quirks in the NACH adapter.
File integrity
Section titled “File integrity”- Total amount in trailer must equal sum of detail amounts.
- Record count in trailer must equal detail count.
- Sponsor bank rejects on any integrity failure.
Idempotency
Section titled “Idempotency”The lender’s customer reference number must be unique per loan per cycle — used to match ack back to LMS.
Volume considerations
Section titled “Volume considerations”Once daily presentation exceeds ~50,000 debits, batching across multiple files for the same date may be needed per sponsor bank’s limits.
eNACH (Electronic NACH)
Section titled “eNACH (Electronic NACH)”eNACH is the API-driven mandate registration alternative to paper:
- Borrower authorises via Aadhaar OTP (most common).
- Or Debit card swipe.
- Or Netbanking.
- Mandate is registered in NPCI’s NPCI-eMandate system within hours.
- Lender receives UMRN.
Once registered, eNACH mandates work identically to paper NACH for presentation purposes.
Vendor implementation: Digio DigiCollect, Razorpay, Cashfree, Setu, Decentro.
UPI AutoPay (newer alternative)
Section titled “UPI AutoPay (newer alternative)”For amounts within UPI AutoPay limits (NPCI-defined; periodically revised), UPI AutoPay provides:
- Real-time mandate registration via UPI app.
- Real-time debit attempts (vs NACH’s T+1).
- Lower bounce rate.
Increasingly used in addition to NACH for backup mandate.
What the platform’s NACH adapter must do
Section titled “What the platform’s NACH adapter must do”- Presentation file generation per sponsor-bank format.
- Submission via SFTP / API per sponsor bank.
- Ack file processing with bounce-reason code interpretation.
- Re-presentation logic per policy.
- Mandate lifecycle management (registration → active → cancelled).
- UMRN persistence per loan / borrower.
- Sponsor bank failover if multi-sponsor-bank arrangement.
Compliance
Section titled “Compliance”- NPCI procedural guidelines govern format and operations.
- RBI Payment System Data Storage — payment data in India.
- DPDP — borrower data in mandate handled with consent.
Related
Section titled “Related”- 4.8 Mandates and repayments — vendor stack.
- 4.12 Core banking / payouts — sponsor bank.
- 3.K Collections — bounce handling.
- 13.11 Collections backlog.