
⏱ About a 10-minute read. Click “Read more” or “Sample file” whenever you want the details.
Meet Sree. Sree runs payroll and supplier payments for a mid-sized company. Every Thursday evening, Sree’s system drops one file at the bank. By Friday morning the staff have their salaries (by ACH), a supplier has its money (by wire) and a contractor in India has been paid in rupees (by SWIFT). One file, three networks. In my years running payment products, most of the problems I had to chase started in that file. So that’s where we start too. Then we follow the money out of the bank to the Fed, The Clearing House and the other networks.
- Not a banker? Look at the pictures and read the “In one line” boxes. You’ll get the whole idea from those.
- In banking or operations? Open “Read more” under each file and each payment type. That’s where the detail lives.
- Product owner? Focus on the status codes, the “Status, rules, security and data” boxes and the product owner rows. Those are the calls that end up on your desk.
- Developer? Open every “Sample file”, then go straight to the data mapping section and the developer rows.
- Tester? The “What to test” rows are your starting checklist. Add your own edge cases from there.
Part 1. The files, one by one
In one line: Every payment is a short conversation in files. The customer asks, the bank replies, the network confirms, and the statement closes the loop.
1.1 pain.001: “please pay these people”
In one line: The company saying to its bank, “please pay these people.” One file can carry a single payment or ten thousand.
- How it starts: the company’s payments manager approves a payment run, such as Thursday’s payroll, and the company’s ERP or payroll system creates the file.
- How it gets to the bank: by secure file transfer (SFTP), SWIFT FileAct, an upload on the bank’s portal, or an API call.
- What is inside: a header with the file ID, the number of payments and the total. Then one or more payment blocks (date, which account pays, ACH or wire). Then one line for each person being paid.
- What happens next: the bank sends a pain.002 back to say how it went. Then it creates one network message for each payment, such as a NACHA entry or a pacs.008.
Sample file: pain.001
Made-up data, shortened. Real files have more fields.
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09">
<CstmrCdtTrfInitn>
<GrpHdr>
<MsgId>PAY-20261119-001</MsgId>
<CreDtTm>2026-11-19T17:05:00</CreDtTm>
<NbOfTxs>1</NbOfTxs>
<CtrlSum>1250.50</CtrlSum>
<InitgPty><Nm>Sree Corp</Nm></InitgPty>
</GrpHdr>
<PmtInf>
<PmtInfId>BATCH-01</PmtInfId>
<PmtMtd>TRF</PmtMtd>
<PmtTpInf>
<SvcLvl><Cd>NURG</Cd></SvcLvl> <!-- NURG = ACH, URGP = wire -->
<LclInstrm><Prtry>CCD</Prtry></LclInstrm>
</PmtTpInf>
<ReqdExctnDt><Dt>2026-11-20</Dt></ReqdExctnDt>
<Dbtr><Nm>Sree Corp</Nm></Dbtr>
<DbtrAcct><Id><Othr><Id>1112223334</Id></Othr></Id></DbtrAcct>
<DbtrAgt><FinInstnId><ClrSysMmbId><MmbId>222333445</MmbId></ClrSysMmbId></FinInstnId></DbtrAgt>
<CdtTrfTxInf>
<PmtId><EndToEndId>INV-7781</EndToEndId></PmtId>
<Amt><InstdAmt Ccy="USD">1250.50</InstdAmt></Amt>
<CdtrAgt><FinInstnId><ClrSysMmbId>
<ClrSysId><Cd>USABA</Cd></ClrSysId><MmbId>123456780</MmbId>
</ClrSysMmbId></FinInstnId></CdtrAgt>
<Cdtr><Nm>Acme Supplies Inc.</Nm></Cdtr>
<CdtrAcct><Id><Othr><Id>9876543210</Id></Othr></Id></CdtrAcct>
<RmtInf><Ustrd>Invoice INV-7781</Ustrd></RmtInf>
</CdtTrfTxInf>
</PmtInf>
</CstmrCdtTrfInitn>
</Document>Read more: pain.001
For tech teams, product owners and testers
| For developers | First check the file against the XSD (the official schema). Then check the business rules. NbOfTxs and CtrlSum must match the lines. The MsgId must be new, or it is a duplicate. The date must be a banking day. Finally, use SvcLvl and LclInstrm to pick the rail: NURG + CCD means ACH, URGP means wire. |
| For product owners | Decide which versions you accept (many US banks take pain.001.001.03 and .09). Set a cut-off time for each rail. And decide: does one bad line reject the whole file, or just that line? |
| What to test | Totals that do not add up. The same MsgId sent twice. A date in the past. A bank holiday. A file with 10,000 lines. A name with & or accents. An amount with three decimals. |
1.2 pain.002: “here is what happened”
In one line: The bank writing back: “here’s what happened to your file, and to each payment in it.”
- How it starts: the bank creates it automatically at key moments. That is when the file arrives, when it passes checks, and when each payment is sent, settled or rejected.
- What is inside: the ID of the original file, one overall status, and a status for each payment with a reason code.
- Statuses you will see: ACTC (file checked), ACCP (accepted), ACSP (sent, settling), ACSC (settled), PDNG (pending), PART (partly accepted) and RJCT (rejected).
Sample file: pain.002
Made-up data, shortened. Real files have more fields.
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.002.001.10">
<CstmrPmtStsRpt>
<GrpHdr><MsgId>STS-20261120-044</MsgId><CreDtTm>2026-11-20T09:12:00</CreDtTm></GrpHdr>
<OrgnlGrpInfAndSts>
<OrgnlMsgId>PAY-20261119-001</OrgnlMsgId>
<OrgnlMsgNmId>pain.001.001.09</OrgnlMsgNmId>
<GrpSts>PART</GrpSts> <!-- some OK, some not -->
</OrgnlGrpInfAndSts>
<OrgnlPmtInfAndSts>
<OrgnlPmtInfId>BATCH-01</OrgnlPmtInfId>
<TxInfAndSts>
<OrgnlEndToEndId>INV-7781</OrgnlEndToEndId>
<TxSts>ACSC</TxSts> <!-- settled -->
</TxInfAndSts>
<TxInfAndSts>
<OrgnlEndToEndId>INV-7790</OrgnlEndToEndId>
<TxSts>RJCT</TxSts>
<StsRsnInf><Rsn><Cd>AC01</Cd></Rsn> <!-- wrong account number -->
<AddtlInf>ACH return R03: no account</AddtlInf></StsRsnInf>
</TxInfAndSts>
</OrgnlPmtInfAndSts>
</CstmrPmtStsRpt>
</Document>Read more: pain.002
For tech teams, product owners and testers
| For developers | Link every status back to the original MsgId, PmtInfId and EndToEndId. Each network has its own reason codes (NACHA has R codes, for example). Map them all to one internal list. Then map that list to standard ISO reason codes such as AC01 (wrong account) or AM04 (not enough money). |
| For product owners | Decide how many pain.002 messages the client gets: one at every step, or only the final one. Agree the reason codes with big clients, because their ERP reads them automatically. |
| What to test | The whole file is rejected. One line is rejected. An older status arrives after a newer one. A return comes in two days after the payment showed ACSC (settled). |
1.3 pain.008: “please collect from these people”
In one line: The opposite of pain.001: “please collect from these people.” Think of a gym taking its monthly fee by direct debit.
- How it starts: before each collection date, the company’s billing system creates the file. It only includes customers who signed an authorization.
- In the US: the bank turns it into ACH debits. The SEC code says what kind: PPD for consumers, CCD for businesses, WEB for authorizations given online.
- What is inside: the collector’s account and the collection date. Then, for each payer, the amount, their account and the mandate (the authorization ID and the date it was signed).
- What happens next: the bank sends a NACHA debit file, then pain.002 statuses. Sometimes a debit comes back, for example R10, which means the customer says they never agreed to it.
Sample file: pain.008
Made-up data, shortened. Real files have more fields.
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.08">
<CstmrDrctDbtInitn>
<GrpHdr><MsgId>COLL-20261201-01</MsgId><CreDtTm>2026-11-28T16:00:00</CreDtTm>
<NbOfTxs>1</NbOfTxs><CtrlSum>49.99</CtrlSum><InitgPty><Nm>FitGym LLC</Nm></InitgPty></GrpHdr>
<PmtInf>
<PmtInfId>DD-DEC</PmtInfId>
<PmtMtd>DD</PmtMtd>
<PmtTpInf><LclInstrm><Prtry>PPD</Prtry></LclInstrm><SeqTp>RCUR</SeqTp></PmtTpInf>
<ReqdColltnDt>2026-12-01</ReqdColltnDt>
<Cdtr><Nm>FitGym LLC</Nm></Cdtr>
<CdtrAcct><Id><Othr><Id>5556667778</Id></Othr></Id></CdtrAcct>
<DrctDbtTxInf>
<PmtId><EndToEndId>MEMBER-2231-DEC</EndToEndId></PmtId>
<InstdAmt Ccy="USD">49.99</InstdAmt>
<DrctDbtTx><MndtRltdInf>
<MndtId>AUTH-2231</MndtId><DtOfSgntr>2026-01-05</DtOfSgntr>
</MndtRltdInf></DrctDbtTx>
<DbtrAgt><FinInstnId><ClrSysMmbId><MmbId>123456780</MmbId></ClrSysMmbId></FinInstnId></DbtrAgt>
<Dbtr><Nm>Sam Lee</Nm></Dbtr>
<DbtrAcct><Id><Othr><Id>4445556667</Id></Othr></Id></DbtrAcct>
</DrctDbtTxInf>
</PmtInf>
</CstmrDrctDbtInitn>
</Document>Read more: pain.008
For tech teams, product owners and testers
| For developers | Store MndtId and DtOfSgntr in your tables. You will need them when a customer disputes a debit. Map SeqTp (first, recurring or final) and LclInstrm to the NACHA SEC code. |
| For product owners | Debits carry more fraud and return risk than credits. Set limits for each collector, watch their return rates, and decide how long you keep proof of authorization. |
| What to test | No mandate. A collection on a weekend. Returns R01 (no money), R10 (not authorized) and R29 (the business says it did not authorize). One collector with a very high return rate. |
1.4 pacs.008 and pacs.009: bank-to-bank payment
In one line: What your bank sends to the network to actually move the money. pacs.008 carries a customer’s payment. pacs.009 is the bank paying for itself.
- How it starts: your bank creates it once all checks pass. It is built from the bank’s own internal payment record, not copied from the customer’s file.
- Who uses it: Fedwire, CHIPS, RTP, FedNow and SWIFT for cross-border payments.
- What is inside: the amount, the settlement date, the sending and receiving banks, who pays, who gets paid, the customer’s EndToEndId and a UETR (a unique tracking ID).
Sample file: pacs.008 and pacs.009
Made-up data, shortened. Real files have more fields.
<!-- Business Application Header (head.001) is sent with it -->
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08">
<FIToFICstmrCdtTrf>
<GrpHdr>
<MsgId>20261120BANKOUT000123</MsgId><CreDtTm>2026-11-20T10:01:07</CreDtTm>
<NbOfTxs>1</NbOfTxs>
<SttlmInf><SttlmMtd>CLRG</SttlmMtd></SttlmInf>
</GrpHdr>
<CdtTrfTxInf>
<PmtId>
<InstrId>OUT-000123</InstrId>
<EndToEndId>INV-7781</EndToEndId> <!-- from the customer -->
<UETR>8a562c67-ca16-48ba-b074-65581be6f001</UETR>
</PmtId>
<IntrBkSttlmAmt Ccy="USD">1250.50</IntrBkSttlmAmt>
<IntrBkSttlmDt>2026-11-20</IntrBkSttlmDt>
<ChrgBr>SLEV</ChrgBr>
<InstgAgt><FinInstnId><ClrSysMmbId><MmbId>222333445</MmbId></ClrSysMmbId></FinInstnId></InstgAgt>
<InstdAgt><FinInstnId><ClrSysMmbId><MmbId>123456780</MmbId></ClrSysMmbId></FinInstnId></InstdAgt>
<Dbtr><Nm>Sree Corp</Nm>
<PstlAdr><TwnNm>Edison</TwnNm><CtrySubDvsn>NJ</CtrySubDvsn><Ctry>US</Ctry></PstlAdr></Dbtr>
<DbtrAcct><Id><Othr><Id>1112223334</Id></Othr></Id></DbtrAcct>
<DbtrAgt><FinInstnId><ClrSysMmbId><MmbId>222333445</MmbId></ClrSysMmbId></FinInstnId></DbtrAgt>
<CdtrAgt><FinInstnId><ClrSysMmbId><MmbId>123456780</MmbId></ClrSysMmbId></FinInstnId></CdtrAgt>
<Cdtr><Nm>Acme Supplies Inc.</Nm></Cdtr>
<CdtrAcct><Id><Othr><Id>9876543210</Id></Othr></Id></CdtrAcct>
<RmtInf><Ustrd>Invoice INV-7781</Ustrd></RmtInf>
</CdtTrfTxInf>
</FIToFICstmrCdtTrf>
</Document>Read more: pacs.008 and pacs.009
For tech teams, product owners and testers
| For developers | Every network has its own rules for which fields are allowed, how long they can be and which characters are OK. Write one formatter per network, all fed from the same internal record. Keep a copy of the exact message you sent, for audit. |
| For product owners | Better data, such as structured addresses and remittance details, means fewer false sanctions alerts and easier reconciliation. Decide how much of it your clients must give you. |
| What to test | Each network’s required fields. Very long names and addresses. A missing UETR. A duplicate InstrId. A message sent after the network’s cut-off. |
1.5 pacs.002: the network’s answer
In one line: The network’s reply to your bank: accepted, settled, or rejected with a reason.
- How it starts: the network or the receiving bank sends it back. On instant rails it takes seconds. On wires it takes minutes.
- Statuses: ACSC (settled), ACSP (in progress), ACWP (accepted, waiting to be posted) and RJCT (rejected, with a reason such as AC04, closed account).
Sample file: pacs.002
Made-up data, shortened. Real files have more fields.
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10">
<FIToFIPmtStsRpt>
<GrpHdr><MsgId>NET-ACK-778899</MsgId><CreDtTm>2026-11-20T10:01:09</CreDtTm></GrpHdr>
<TxInfAndSts>
<OrgnlInstrId>OUT-000123</OrgnlInstrId>
<OrgnlEndToEndId>INV-7781</OrgnlEndToEndId>
<OrgnlUETR>8a562c67-ca16-48ba-b074-65581be6f001</OrgnlUETR>
<TxSts>ACSC</TxSts> <!-- or RJCT with <StsRsnInf><Rsn><Cd>AC04</Cd> -->
</TxInfAndSts>
</FIToFIPmtStsRpt>
</Document>Read more: pacs.002
For tech teams, product owners and testers
| For developers | Match it to the message you sent using OrgnlInstrId, OrgnlEndToEndId or OrgnlUETR. Be ready for statuses that arrive late, twice, or in the wrong order. |
| For product owners | Decide what the customer sees at each status, and at what point you tell them the money is gone for good. |
| What to test | A reject after a timeout. An answer that never arrives. Two answers for one payment. A reject reason you have never seen before. |
1.6 camt.056, camt.029 and pacs.004: asking for money back
In one line: How one bank asks another for a payment back, and how the money returns if the answer is yes.
- How it starts: the customer or the bank spots a mistake, such as a duplicate, a wrong amount or fraud, and asks for a recall.
- camt.056 says “please return this payment.” camt.029 is the answer, and it is often “no.” pacs.004 is the money actually coming back, linked to the original payment.
- Remember: wires and instant payments are final. The other bank does not have to say yes.
Sample file: camt.056, camt.029 and pacs.004
Made-up data, shortened. Real files have more fields.
<!-- Step 1: the sending bank asks for the money back (camt.056) -->
<FIToFIPmtCxlReq>
<Undrlyg><TxInf>
<CxlId>CXL-0042</CxlId>
<OrgnlEndToEndId>INV-7781</OrgnlEndToEndId>
<OrgnlUETR>8a562c67-ca16-48ba-b074-65581be6f001</OrgnlUETR>
<CxlRsnInf><Rsn><Cd>DUPL</Cd></Rsn></CxlRsnInf> <!-- sent twice by mistake -->
</TxInf></Undrlyg>
</FIToFIPmtCxlReq>
<!-- Step 2a: the other bank says no (camt.029) ... -->
<!-- Step 2b: ... or sends the money back (pacs.004) -->
<PmtRtr>
<TxInf>
<RtrId>RTN-5511</RtrId>
<OrgnlEndToEndId>INV-7781</OrgnlEndToEndId>
<OrgnlUETR>8a562c67-ca16-48ba-b074-65581be6f001</OrgnlUETR>
<RtrdIntrBkSttlmAmt Ccy="USD">1250.50</RtrdIntrBkSttlmAmt>
<RtrRsnInf><Rsn><Cd>FOCR</Cd></Rsn></RtrRsnInf> <!-- following cancellation request -->
</TxInf>
</PmtRtr>Read more: camt.056, camt.029 and pacs.004
For tech teams, product owners and testers
| For developers | A pacs.004 has to find the original payment using its EndToEndId and UETR. Then it reverses the posting and updates the status. The amount that comes back can be smaller if fees were taken. |
| For product owners | Set up the recall process: who can ask for one, how fast it happens, and how the customer is told. With fraud, every minute counts. |
| What to test | A recall that is accepted. One that is refused. A partial return. A return for a payment you cannot find. A return in a different currency. |
1.7 camt.052, camt.053 and camt.054: reports and statements
In one line: How the bank tells the customer what came in and what went out, during the day and at the end of it.
- camt.052: a report during the day, sent several times.
- camt.053: the end-of-day statement, with opening and closing balances.
- camt.054: a notice for each debit or credit, sent as it happens.
- Each line is either BOOK (posted) or PDNG (pending).
Sample file: camt.052, camt.053 and camt.054
Made-up data, shortened. Real files have more fields.
<!-- camt.054: one notice, sent as soon as the account is debited -->
<BkToCstmrDbtCdtNtfctn>
<Ntfctn>
<Acct><Id><Othr><Id>1112223334</Id></Othr></Id></Acct>
<Ntry>
<Amt Ccy="USD">1250.50</Amt>
<CdtDbtInd>DBIT</CdtDbtInd>
<Sts><Cd>BOOK</Cd></Sts>
<BookgDt><Dt>2026-11-20</Dt></BookgDt>
<ValDt><Dt>2026-11-20</Dt></ValDt>
<NtryDtls><TxDtls><Refs><EndToEndId>INV-7781</EndToEndId></Refs></TxDtls></NtryDtls>
</Ntry>
</Ntfctn>
</BkToCstmrDbtCdtNtfctn>
<!-- camt.053: the end-of-day statement adds opening and closing balances -->
<Bal><Tp><CdOrPrtry><Cd>OPBD</Cd></CdOrPrtry></Tp><Amt Ccy="USD">50000.00</Amt><CdtDbtInd>CRDT</CdtDbtInd></Bal>
<Bal><Tp><CdOrPrtry><Cd>CLBD</Cd></CdOrPrtry></Tp><Amt Ccy="USD">48749.50</Amt><CdtDbtInd>CRDT</CdtDbtInd></Bal>Read more: camt.052, camt.053 and camt.054
For tech teams, product owners and testers
| For developers | Put the customer’s EndToEndId and the bank’s reference on every entry. That is what the customer’s ERP uses to match payments. Use the standard bank transaction codes (BkTxCd). |
| For product owners | Pick the format and timing for each type of client. For example, camt.053 for large companies, BAI2 for others and PDF for small businesses. |
| What to test | Opening balance plus entries equals the closing balance. A reversal. A pending entry that books later. A day with no activity (the statement should still go out). |
1.8 NACHA file: the ACH format
In one line: A plain text file where every line is exactly 94 characters. US ACH has run on it for decades, and it isn’t going away soon.
- How it starts: the company builds it in its payroll software, or the bank builds it from a pain.001, pain.008, CSV file or API call.
- What is inside: each line starts with a record type. 1 is the file header. 5 is the batch header (company, SEC code, date). 6 is one payment. 7 is an addenda with extra details. 8 is the batch total and 9 is the file total. At the end, lines of 9s fill the file up to a multiple of 10 lines.
- How it travels: from the company to the bank, then from the bank to FedACH or EPN at set times during the day.
Sample file: NACHA file
Made-up data. Every line is exactly 94 characters. The last line of 9s brings the file up to 10 lines (one block).
101 123456780 2223334452611191705A094101RECEIVING BANK SREE CORP BANK PAYROLL1
5220SREE CORP 1234567890CCDPAYMENT 261120261120 1222333440000001
6221234567809876543210 0000125050INV-7781 ACME SUPPLIES INC 1222333440000001
705INVOICE INV-7781 PAID IN FULL 00010000001
822000000200123456780000000000000000001250501234567890 222333440000001
9000001000001000000020012345678000000000000000000125050
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999Read more: NACHA file
For tech teams, product owners and testers
| For developers | Every field sits at a fixed position. The amount, in cents, is in positions 30–39. The receiving bank is in 4–11, with a check digit in 12. The account is in 13–29, the name in 55–76 and the trace number in 80–94. The entry hash is the sum of the 8-digit routing numbers, keeping only the last 10 digits. |
| For product owners | Decide whether clients can send you NACHA files directly. It is fast, but you must check them carefully. The alternative is to accept only pain.001 or API and build the NACHA file yourself. |
| What to test | A line with 93 or 95 characters. A wrong entry hash. Wrong totals in record 8 or 9. Lowercase letters. The wrong transaction code for savings versus checking (32 versus 22). Missing 9s at the end. |
1.9 Flat file and CSV: the bank’s own layout
In one line: A simple spreadsheet-style file. Smaller clients send these when they don’t have ISO 20022 software.
- How it starts: the client exports it from their accounting software or a spreadsheet, following the column layout the bank gave them.
- What the bank does: it maps each column to its internal payment record. From there it builds NACHA or pacs.008, just as it would for a pain.001.
Sample file: Flat file and CSV
Made-up data, shortened. Real files have more fields.
payment_type,value_date,payee_name,payee_aba,payee_account,amount,currency,reference
ACH,2026-11-20,Acme Supplies Inc.,123456780,9876543210,1250.50,USD,INV-7781
WIRE,2026-11-20,Delta Metals LLC,123456780,1231231231,48000.00,USD,PO-5520Read more: Flat file and CSV
For tech teams, product owners and testers
| For developers | Never trust a CSV. Check the delimiters, quotes, encoding, header names, date formats and amounts (1,250.50 versus 1250.50). Reject any cell that starts with =, so nobody can sneak in a spreadsheet formula. |
| For product owners | Publish one clear template with examples. Every “special” layout you agree for one client becomes something you have to maintain forever. |
| What to test | A missing column. An extra column. A comma inside a name. European-style decimals. Blank lines. Excel turning an account number into 9.88E+09. |
1.10 BAI2: the classic US statement
In one line: An older text statement format. Plenty of US treasury teams still reconcile with it every morning.
- How it starts: the bank produces it every morning for the previous day, and sometimes during the day for the current day.
- What is inside: each line starts with a code. 01 is the file header, 02 the group and 03 the account and balances. 16 is one transaction. 49, 98 and 99 are the account, group and file totals.
- Type codes tell you what each line is. For example, 010 is the opening balance, 015 the closing balance and 495 an outgoing wire.
Sample file: BAI2
Made-up data, shortened. Real files have more fields.
01,222333445,SREECORP,261120,0600,001,,,2/
02,SREECORP,222333445,1,261119,2400,USD,2/
03,1112223334,USD,010,5000000,,,015,4874950,,/
16,495,125050,0,OUT-000123,INV-7781,WIRE TO ACME SUPPLIES INC/
49,10000000,3/
98,10000000,1,5/
99,10000000,1,7/Read more: BAI2
For tech teams, product owners and testers
| For developers | Check the control totals in records 49, 98 and 99. A line can carry on in an 88 record. Amounts have no decimal point, so 125050 means $1,250.50. |
| For product owners | BAI2 carries less detail than camt.053. Plan the move for clients who need full remittance data. |
| What to test | 88 continuation lines. Totals that do not match. An account with no activity. A negative balance. |
1.11 SWIFT MT: the older SWIFT messages
In one line: Short text messages built from tagged fields. ISO 20022 is replacing them, but you’ll still run into them.
- MT101: a company asks its bank to make a payment. SWIFT planned to stop banks passing MT101s to each other in November 2026, then pushed that deadline back, so expect to keep seeing MT101 for a while.
- MT103: the classic cross-border customer payment. It was retired for payment instructions on 22 November 2025, and pacs.008 took its place.
- MT940 and MT942: end-of-day and during-the-day statements. Many companies still use them.
Sample file: SWIFT MT
Made-up data, shortened. Real files have more fields.
Legacy MT103 (retired for payment instructions in Nov 2025, shown to compare)
:20:OUT000123
:23B:CRED
:32A:261120USD1250,50
:50K:/1112223334
SREE CORP
:59:/9876543210
ACME SUPPLIES INC
:70:INVOICE INV-7781
:71A:SHA
MT940 statement (still common with corporates)
:20:STMT261120
:25:222333445/1112223334
:28C:00320/1
:60F:C261119USD50000,00
:61:2611201120D1250,50NTRFOUT000123//INV-7781
:86:WIRE TO ACME SUPPLIES INC
:62F:C261120USD48749,50Read more: SWIFT MT
For tech teams, product owners and testers
| For developers | You will see both formats for a while. Translate MT into your internal record the same way you do for pain.001. Watch out for cut-off text: MT lines only hold 35 characters. |
| For product owners | Plan how clients move from MT101 and MT940 to pain.001 and camt.053, and set a date when you stop accepting MT. |
| What to test | Commas used as decimals (1250,50). Names that run over several lines. Characters SWIFT does not allow. The MT and ISO versions of the same payment should give the same result. |
1.12 X9.37 (X9.100-187): check image files
In one line: The file banks use to clear checks as pictures instead of shipping paper around the country.
- How it starts: someone scans a check at a branch, an ATM, a mobile app or a lockbox. The bank reads the MICR line along the bottom (routing number, account and check number) and the amount.
- What is inside: headers, one record for each check, pictures of the front and back, and control totals.
- How it travels: to the Fed or The Clearing House image exchange, then on to the paying bank. Returned checks come back in the same format.
Sample file: X9.37 (X9.100-187)
Made-up data, shortened. Real files have more fields.
X9.37 / X9.100-187 image cash letter (binary: data records + TIFF images)
01 File header from bank 222333445 to Fed / TCH, date 20261120
10 Cash letter header cash letter ID, business date
20 Bundle header bundle of items
25 Check detail MICR: routing 123456780, account 9876543210, check no 1045, amount 0000032000
50 Image view detail front image, back image
52 Image view data the TIFF image bytes
70 Bundle control item count, total amount
90 Cash letter control total items, total amount
99 File control total cash letters, total items, total amountRead more: X9.37 (X9.100-187)
For tech teams, product owners and testers
| For developers | Check the image quality (not too dark, not cut off), the MICR line and the amount. Catch the same check being deposited twice, for example once by mobile and once at a branch. |
| For product owners | Set hold rules that follow Reg CC, set mobile deposit limits, and decide what happens with duplicate deposits. |
| What to test | A duplicate image. The written amount and the read amount do not match. A poor image. A return after the money was already made available. |
1.13 ISO 8583: card messages
In one line: Tiny messages that ask “can this card pay?” and get a yes or no in about a second.
- How it starts: the shopper taps or types in a card. The terminal or website sends a request through the merchant’s processor.
- What is inside: a message type (0100 is a request, 0110 the answer, 0400 a reversal) and numbered data elements. For example, DE2 is the card number, DE4 the amount and DE39 the response code.
- The money moves later, in daily clearing files such as Visa BASE II and Mastercard IPM.
Sample file: ISO 8583
Made-up data, shortened. Real files have more fields.
Authorization request MTI 0100
DE2 PAN (card number) 4111 **** **** 1111 (never stored in clear)
DE3 Processing code 000000 (purchase)
DE4 Amount 000000006400 ($64.00)
DE7 Transmission time 1120143522
DE11 Trace number (STAN) 004512
DE22 Entry mode 071 (contactless chip)
DE41 Terminal ID TRM00017
DE42 Merchant ID MERCH0001234
DE49 Currency 840 (USD)
Authorization response MTI 0110
DE38 Approval code A1B2C3
DE39 Response code 00 (00 = approved, 05 = do not honour, 51 = no funds)Read more: ISO 8583
For tech teams, product owners and testers
| For developers | Never write full card numbers in logs. PCI DSS forbids it. If a request times out, send a reversal (0400) so the shopper is not charged twice. |
| For product owners | Decide what decline messages people see, whether you allow partial approvals, and how disputes are handled. |
| What to test | A timeout followed by a reversal. A partial approval. DE39 codes 00, 05 and 51. A duplicate STAN (the trace number). |
1.14 API (JSON): real-time requests
In one line: How apps and fintechs start payments one at a time, usually the instant ones.
- How it starts: someone presses “Pay” in an app, or a platform calls the bank’s API.
- What is inside: JSON with the amount, the accounts, the payee and a reference. The headers carry the security token and an idempotency key (a unique ID that stops the same payment going twice).
- What happens next: the bank runs the same internal steps as for a file. It replies quickly, then sends a webhook later with the final status.
Sample file: API (JSON)
Made-up data, shortened. Real files have more fields.
POST /v1/payments
Authorization: Bearer <OAuth token>
Idempotency-Key: 6f1c2a90-7b1e-4d3a-9c55-7e0d9e5b1a11
Content-Type: application/json
{
"rail": "RTP",
"amount": { "value": "1250.50", "currency": "USD" },
"debtor_account": "1112223334",
"creditor": { "name": "Acme Supplies Inc.", "aba": "123456780", "account": "9876543210" },
"end_to_end_id": "INV-7781",
"remittance": "Invoice INV-7781"
}
HTTP/1.1 202 Accepted
{ "payment_id": "pmt_8KQ2", "status": "PENDING", "end_to_end_id": "INV-7781" }
Webhook a few seconds later:
{ "event": "payment.settled", "payment_id": "pmt_8KQ2", "status": "COMPLETED",
"network_reference": "8a562c67-ca16-48ba-b074-65581be6f001" }Read more: API (JSON)
For tech teams, product owners and testers
| For developers | Use OAuth 2.0 and mutual TLS. Require an Idempotency-Key so a retry never pays twice. Reply with 202 (accepted), then send the final result by a signed webhook. |
| For product owners | An API needs rate limits, a sandbox, versioning and clear error codes. Treat it as a product, not just a pipe. |
| What to test | The same Idempotency-Key sent twice. An expired token. A webhook that arrives twice or late. A timeout when the payment actually went through. |
Part 2. Data mapping: from the file to the tables to the rail
In one line: Every field in the customer’s file gets saved in the bank’s tables, then written into the exact spot the rail expects. Get this wrong and the money goes to the wrong place, or nowhere.
Read more: data mapping
- Names get cut short. NACHA only allows 22 characters for the payee name, so keep the full name in your own tables.
- Amounts change shape. 1250.50 in the XML becomes 0000125050 in a NACHA file.
- The ABA routing number has a check digit. Check it before you send anything.
- Keep the customer’s EndToEndId all the way through. It is how statuses and returns find the right payment.
For tech teams, product owners and testers
| Tables | PAYMENT_FILE (one row per file), PAYMENT (one row per payment), PARTY and ACCOUNT (who pays and who gets paid), RAIL_MESSAGE (what was sent, with its ID), STATUS_EVENT (every status change and why) and STATEMENT_LINE (what the statement said). |
| Keys | Inside the bank, the key is payment_id. Outside, it is the EndToEndId, the NACHA trace number and the UETR. Keep the raw messages that came in and went out, for audit. |
| Data governance | Give every field one owner. Keep a data dictionary. Be able to trace each value from file to table to message. Mask account numbers in logs and test data. Keep records for as long as BSA rules require (generally 5 years) and your own policy says. |
| For product owners | Every mapping rule (cut it, reject it, fill in a default) is a product decision. Write it down and have compliance sign it off. |
| What to test | A field longer than the rail allows. Special characters. A zero amount. A routing number with the wrong check digit. A return for a payment ID that does not exist. |
When things go wrong: rejected, returned, cancelled
So far every payment worked. In real life some don’t, and the word you pick matters. “Rejected”, “returned” and “cancelled” mean three different things for the money, the customer and the ledger. I’ve sat on incident calls where half the room meant one and half meant another.
Rejected means the payment stopped before any money moved. A check failed, or the bank or the network said no. You get a status like RJCT, fix the problem and send it again.
Returned means the money did move, but the receiving bank couldn’t apply it (a closed account, say), so it sent the money back. That’s a new movement of money, linked to the original one.
Cancelled means the sender stopped it. Before it goes out, that’s easy. After it goes out, most rails only let you ask the other bank to send it back, and they’re allowed to say no.
Below is how each rail handles all three. Every rail post has its own picture and the codes you’ll see.
| Rail | Rejected | Returned | Cancelled |
|---|---|---|---|
| ACH | Bad file or entry: pain.002 RJCT | R codes, 2 days (60 for R10) | Pull before window; reversal within 5 days |
| Fedwire | Bank or Fed refuses: pacs.002 | pacs.004, new payment back | Before release only; then camt.056 |
| CHIPS | Refused before release | pacs.004 via CHIPS | Delete while queued; then camt.056 |
| RTP | Receiver says no in seconds | camt.056 request, pacs.004 if agreed | Only before sending |
| FedNow | Bank, Fed or receiver says no | camt.056 request, pacs.004 if agreed | Only before sending |
| Zelle | Declined by the bank | No formal return; dispute if unauthorized | Only while pending |
| Cards | Declined (05, 51) | Refund or chargeback | Reversal (0400) before capture |
| SWIFT | Any bank in the chain: pacs.002 | pacs.004, less fees and FX | gpi Stop and Recall (camt.056) |
| Checks | Deposit refused (image, duplicate) | Returned image (NSF, stop payment) | Stop payment by the writer |
| PayPal | Declined at send time | Refund, dispute, chargeback or ACH return | Only while unclaimed |
Which files carry the bad news?
The same handful of files keeps showing up. Each rail post shows the exact ones it uses, with samples.
| Path | Files and messages |
|---|---|
| Rejected | pain.002 (to the company) · pacs.002 (between banks) · admi.002 (broken message) · ISO 8583 0110 decline · API error |
| Returned | NACHA return entry (addenda 99) · pacs.004 · X9.37 return file · card refund or chargeback record · PayPal REFUNDED / REVERSED webhook |
| Cancelled | camt.055 (company → bank) · camt.056 and camt.029 (bank ↔ bank) · NACHA reversal batch · ISO 8583 0400 reversal · stop payment |
| Told to the customer | pain.002 status · camt.054 credit notice · camt.053 / BAI2 statement line · webhook or app message |
Sample file: pacs.004 payment return
Fictional data, shortened. Real files carry more fields.
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.004.001.10">
<PmtRtr>
<GrpHdr>
<MsgId>RTN-20261120-0031</MsgId><CreDtTm>2026-11-20T14:20:00</CreDtTm>
<NbOfTxs>1</NbOfTxs><SttlmInf><SttlmMtd>CLRG</SttlmMtd></SttlmInf>
</GrpHdr>
<TxInf>
<RtrId>RTN-0031-1</RtrId>
<OrgnlInstrId>SND-20261120-0007</OrgnlInstrId>
<OrgnlEndToEndId>INV-7781</OrgnlEndToEndId> <!-- links to the original -->
<OrgnlUETR>3f1c9d2e-7b4a-4c1e-9a55-2d8e6f0b1a77</OrgnlUETR>
<RtrdIntrBkSttlmAmt Ccy="USD">1250.50</RtrdIntrBkSttlmAmt>
<IntrBkSttlmDt>2026-11-20</IntrBkSttlmDt>
<RtrRsnInf><Rsn><Cd>AC04</Cd></Rsn></RtrRsnInf> <!-- account closed -->
</TxInf>
</PmtRtr>
</Document>Sample file: camt.056 “please return it”
Fictional data, shortened. Real files carry more fields.
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.056.001.08">
<FIToFIPmtCxlReq>
<Assgnmt>
<Id>CXL-20261120-0004</Id>
<Assgnr><Agt><FinInstnId><ClrSysMmbId><MmbId>222333445</MmbId></ClrSysMmbId></FinInstnId></Agt></Assgnr>
<Assgne><Agt><FinInstnId><ClrSysMmbId><MmbId>123456780</MmbId></ClrSysMmbId></FinInstnId></Agt></Assgne>
<CreDtTm>2026-11-20T11:15:00</CreDtTm>
</Assgnmt>
<Undrlyg><TxInf>
<CxlId>CXL-0004-1</CxlId>
<OrgnlEndToEndId>INV-7781</OrgnlEndToEndId>
<OrgnlUETR>3f1c9d2e-7b4a-4c1e-9a55-2d8e6f0b1a77</OrgnlUETR>
<OrgnlIntrBkSttlmAmt Ccy="USD">1250.50</OrgnlIntrBkSttlmAmt>
<CxlRsnInf><Rsn><Cd>DUPL</Cd></Rsn></CxlRsnInf> <!-- sent twice by mistake -->
</TxInf></Undrlyg>
</FIToFIPmtCxlReq>
</Document>Sample file: NACHA return entry (R03)
Fictional data, shortened. Real files carry more fields.
Record 6 = the original payment coming back (transaction code 21)
Record 7, type 99 = return addenda: reason R03, original trace number
6212223334459876543210 0000125050INV-7781 ACME SUPPLIES INC 1123456780000001
799R03222333440000001 12345678 123456780000001Part 3. Each payment type, in its own post
Tip: see every rail’s runbook and file guide side by side on the Payment Rails page.
Each payment type has its own post: a picture, a step-by-step flow, a box on status, rules, security and data, and only the sample files that rail actually uses.
- ACH: payments grouped into NACHA files and sent a few times a day
- Fedwire: one large payment at a time, final, settled by the Fed
- CHIPS: The Clearing House’s system for large payments, with netting
- RTP: instant, 24/7, run by The Clearing House
- FedNow: instant, 24/7, run by the Fed
- Zelle: person to person by email or phone
- PayPal and Venmo: instant inside the wallet, ACH and cards to the bank
- Cards: approval in seconds, money the next day
- SWIFT (cross-border): dollars to rupees through correspondent banks
- Checks: images in X9.37 files, with holds
Side by side
| Rail | Files in | Bank to network | Coming back | Main rules |
|---|---|---|---|---|
| ACH | NACHA · pain.001 · pain.008 · API | NACHA file | Returns, NOCs | Nacha Rules · OC 4 · Reg E |
| Fedwire | pain.001 · portal · API | pacs.008 / pacs.009 | pacs.002 · pacs.004 · camt.056 | Reg J · UCC 4A · OC 6 |
| CHIPS | pain.001 · SWIFT · API | pacs.008 / pacs.009 | pacs.002 · pacs.004 | CHIPS Rules · UCC 4A |
| RTP | API · pain.001 | pacs.008 | pacs.002 · camt.056 | RTP Rules · Reg E |
| FedNow | API · pain.001 | pacs.008 | pacs.002 · camt.056 · pacs.004 | Reg J · OC 8 · Reg E |
| Zelle | App API | Zelle API | API status | Zelle rules · Reg E |
| Cards | Gateway API | ISO 8583 | Approve/decline · chargebacks | Network rules · PCI DSS |
| SWIFT | pain.001 · MT101 · API | pacs.008 (+ pacs.009 COV) | pacs.002 · tracker · pacs.004 | CBPR+ · OFAC · CSP |
| PayPal / Venmo | App · REST API | Wallet ledger; ACH and cards for bank legs | Webhooks · returns · disputes | Money transmitter licences · Reg E · Nacha |
| Checks | Image + data | X9.37 file | Return image file | Reg CC · Check 21 · OC 3 |
My take
Start with the files, not the rails. Once the basic loop clicks, every rail is the same story with different names. A pain.001 comes in. A pacs.008 or NACHA file goes out. A pacs.002 comes back. A camt.053 closes the day. If I could give a new payments team one piece of advice, it would be this: build one clean internal record, carry the customer’s reference all the way through, write down every mapping rule, and reconcile every single day. The teams that skip that last part are the ones I meet at 2 a.m. on an incident bridge.
Sources: Federal Reserve Financial Services (Fedwire ISO 20022 implementation, FedNow operating procedures, FedLine Security and Resiliency Assurance Program); The Clearing House (CHIPS ISO 20022 migration, RTP technical documentation); Swift (CBPR+ and end of MT/ISO coexistence); Nacha Operating Rules (2026 fraud monitoring). Sample files are fictional and shortened.
Working on a payments project?
I help banks and fintechs deliver real-time payments, ISO 20022, and AI-driven AML and compliance change, from strategy to go-live.
Connect on LinkedInSee how I can help