Insights Contact

Payment Rails

RTP Instant Payments, File by File: API, pacs.008, pacs.002, Rules and Security

By SP Sankar

⏱ About a 6-minute read. Click “Read more” or “Sample file” whenever you want the details.

It is 9 p.m. on a Sunday, and Sree pays a contractor $1,250.50. With RTP, the money lands in seconds.

  • Not a banker? Just look at the pictures and read the “In one line” boxes. That is enough to get the idea.
  • Work in banking or operations? Open “Read more” under each file and each payment type.
  • Product owner? Read the status codes, the “Status, rules, security and data” boxes and the product owner rows. Those are the decisions that land on your desk.
  • Developer? Open every “Sample file”, then read the data mapping section and the developer rows.
  • Operations or support? Use the runbook table: what to watch at each file, and who acts.
  • Tester? Use the “What to test” rows as your starting checklist.
  • Forward deployed engineer? Jump to “For forward deployed engineers”. It covers what to ask the client, set-up, testing, go-live and where things usually go wrong.

How RTP works

In one line: Instant, any time of day or night, and final. The receiving bank has to answer within seconds.

CUSTOMERYOUR BANK · INTERNALOUTSIDE · EXTERNALCustomerapp / ERPany time, 24/7GatewayAPIreal-timeValidate+ mapto one internalpayment recordChecks+ postfraud · OFACfunds in secondsRTPrun by TCHReceivingbankreplies fastAPI JSON · pain.001pacs.008pacs.008COMING BACKpacs.002 accept/reject · camt.056API status · webhookReconcile: bank books vs networkRTP settlement = sent − receivedStatementcamt.054 · BAI2settlement reportwhat the networksays movedInstant and final · request for payment uses pain.013 / pain.014ledger postings
RTP: what comes in, what goes out, what comes back, and how the bank checks it all matches.
  • Coming in: an API call (JSON) or a pain.001.
  • Going out: a pacs.008 to the RTP network.
  • Coming back: a pacs.002 saying accepted or rejected. A camt.056 to ask for money back. pain.013 and pain.014 for requests for payment.

Status, rules, security and data

Status flowRequested → Checked → Sent → Accepted → Settled, final
Side paths: Rejected, Timed out, Return requested
Regulation and rulesThe RTP Operating Rules from The Clearing House. UCC Article 4A. Regulation E for consumers. OFAC sanctions.
Security standardsThe Clearing House certifies every participant. Because a payment cannot be pulled back, fraud has to be scored in real time before it is sent.
Data governanceDetailed remittance information travels with the payment. Keep it linked to the invoice so reconciliation is easy.
Read more: RTP

For tech teams, product owners and testers

For developersYou need a fast path. Fraud, OFAC and balance checks all finish within seconds. Make the APIs idempotent and send the final status by webhook.
For product ownersLimits per payment and per day. How you support customers around the clock. What happens during system maintenance.
What to testA slow receiving bank (timeout). A duplicate request. A request for payment that is declined. Payments in the middle of the night.

Step by step

  1. The app or the company’s system calls the bank’s API. It sends an idempotency key, so a retry never pays twice.
  2. Within a few seconds, the bank checks for fraud, sanctions and enough money, then debits the account.
  3. The bank sends a pacs.008 to the RTP network.
  4. The receiving bank must quickly accept or reject it. RTP sends back a pacs.002.
  5. The payment is settled and final. The customer is told through the API or a webhook.
  6. If something went wrong, the bank sends a camt.056 asking for the money back. The other bank replies, or returns the money.
  7. For bills, the payee can send a request for payment (pain.013). If the payer approves it, a normal pacs.008 follows.

When things go wrong: rejected, returned, cancelled

Not every payment goes through. On RTP, there are three ways a payment can fail. Each one means something different for the money.

RTP: rejected, returned and cancelledRejectedin secondsOther bank says noMoney never movespacs.002App shows whyAPI / webhookReturnedafter sendingSender asks for it backcamt.056Other bank decidesMoney back, or nopacs.004 / camt.029Cancelledby the senderNot sent yet?cancel in appAlready sent?finalAsk for it backcamt.056Rejected = money never moved · Returned = money moved, then came back · Cancelled = stopped (or recalled) by the sender
Navy: the money never moved. Blue: it moved and came back. Grey: the sender stopped it.

Rejected. The sending bank can stop it (fraud score, limits, not enough money), or the receiving bank can reject it (account closed, name doesn’t match, account can’t take RTP). Either way, the answer comes back in seconds as a pacs.002 with status RJCT, and no money moves.

Returned. RTP payments are final, so a “return” is really a polite request. The sending bank sends a camt.056 (request for return of funds). The receiving bank checks with its customer and either sends the money back as a pacs.004 or says no with a camt.029.

Cancelled. You can only cancel a payment that hasn’t been sent yet, such as one scheduled for later in the app. Once it’s sent, it’s done. The only way back is the return request above.

Codes you will see: AC03/AC04 wrong or closed account · AM04 not enough money · AB05/AB06 timed out · FF02 bad message · FRAD fraud

Which files carry the bad news?

Each path has its own file or message. Here is what travels, who sends it, and what is inside.

PathFile or messageFrom → toWhat it says
Rejectedpacs.002 (RJCT)Receiving bank → RTP → sending bankRejected in seconds, with reason
RejectedAPI error or webhookBank → app or clientWhat the customer sees
Returnedcamt.056 (request for return of funds)Sending bank → receiving bankPlease send it back
Returnedpacs.004 or camt.029Receiving bank → sending bankThe money back, or “no”
Declined requestpain.014 (RJCT)Payer’s bank → payee’s bankRequest for payment declined
Sample file: pacs.002 with RJCT

Fictional data, shortened. Real files carry more fields.

<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.002.001.10">
 <FIToFIPmtStsRpt>
  <GrpHdr><MsgId>FED-STS-88120</MsgId><CreDtTm>2026-11-20T10:02:11</CreDtTm></GrpHdr>
  <TxInfAndSts>
   <OrgnlInstrId>SND-20261120-0007</OrgnlInstrId>
   <OrgnlEndToEndId>INV-7781</OrgnlEndToEndId>
   <OrgnlUETR>3f1c9d2e-7b4a-4c1e-9a55-2d8e6f0b1a77</OrgnlUETR>
   <TxSts>RJCT</TxSts>
   <StsRsnInf><Rsn><Cd>AC04</Cd></Rsn></StsRsnInf>   <!-- account closed -->
  </TxInfAndSts>
 </FIToFIPmtStsRpt>
</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: 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.029 the answer

Fictional data, shortened. Real files carry more fields.

<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.029.001.09">
 <RsltnOfInvstgtn>
  <Assgnmt><Id>ANS-20261120-0019</Id><CreDtTm>2026-11-20T16:40:00</CreDtTm></Assgnmt>
  <Sts><Conf>RJCR</Conf></Sts>             <!-- RJCR = request refused, CNCL = accepted -->
  <CxlDtls><TxInfAndSts>
   <OrgnlEndToEndId>INV-7781</OrgnlEndToEndId>
   <CxlStsRsnInf><Rsn><Cd>NOAS</Cd></Rsn></CxlStsRsnInf>   <!-- payee did not answer -->
  </TxInfAndSts></CxlDtls>
 </RsltnOfInvstgtn>
</Document>

RTP runbook: what to watch at each file

This is the day-to-day runbook for the files above, in the same order. For each step: the file you are looking at, what “good” looks like, what to do when it isn’t, and who acts. L1 is the service desk, L2 is payment operations and app support, and L3 is engineering.

StepFileCheckIf it goes wrongWho
1. API requestJSON with an idempotency keyKey is present and new, request is valid.Same key again? Return the first result. Never create a second payment.L3 owns the code, L2 watches
2. Checks in secondsInternal recordFraud score, sanctions, limits and money, all within seconds.Check service slow or down? Fail the payment safely and tell the user. Don’t send unchecked.L2, L3 if it’s technical
3. Sendpacs.008Sent, and a pacs.002 came back in time.Timeout? Treat the status as unknown and ask the network. Never resend blindly.L2
4. Tell the customerAPI response and webhookFinal status reaches the app.Webhook failing? Retry with backoff, then alert. Customers must not see “pending” forever.L2 and L3
5. Return requestscamt.056, camt.029, pacs.004Every request answered on time, money linked to the original.Fraud case? Move fast, and keep the evidence.L2 with fraud team
6. Reconcile, 24/7Settlement reportsSent equals settled, every cycle, weekends too.Break at night? On-call L2 opens it and hands it over in the morning.L2 with finance

Golden rules

  • Instant means final. Check fraud before you send, not after.
  • A timeout is “unknown”, not “failed”. Ask the network before you do anything.
  • Every API call needs an idempotency key.
  • Someone is on call every night and weekend.

Want the full picture, from building it to running it live? Read the Instant Payments Runbook: RTP and FedNow. For a plain explainer, see How RTP and FedNow Work.

For forward deployed engineers (FDE)

As an FDE, you sit with the client and make the integration actually work. Here is your checklist for this rail.

First call with the clientWhich payments really need to be instant (payouts, bills, refunds)? What are the limits per payment and per day? What 24/7 support do they expect? Do they need request for payment?
Set up and connectivityAPI keys, OAuth, mutual TLS, IP allow-lists, the webhook URL and its signing secret, idempotency rules and sandbox access.
Test and certifyThe normal path, reject codes, a timeout, the same request sent twice with one idempotency key, and webhook retries. On the bank side, certification with The Clearing House.
Go-live and hypercareStart with low limits. Watch speed and reject rates. Have someone on call for nights and weekends.
Where it usually breaksThe client retries without an idempotency key and pays twice. The webhook endpoint is down. The receiving bank is not on RTP. Fraud rules that are too strict, or too loose.

The files on this rail

Each file below shows how it starts, what is inside, its status codes and a sample. For all the other files, see the full guide: how payment files are processed in US banks.

API (JSON): real-time requests

In one line: How apps and fintechs start payments one at a time, especially 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 developersUse 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 ownersAn API needs rate limits, a sandbox, versioning and clear error codes. Treat it as a product, not just a pipe.
What to testThe same Idempotency-Key sent twice. An expired token. A webhook that arrives twice or late. A timeout when the payment actually went through.

pacs.008 and pacs.009: bank-to-bank payment

In one line: The message one bank sends to the network to move money. pacs.008 is for a customer’s payment. pacs.009 is when the bank pays 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 developersEvery 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 ownersBetter 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 testEach network’s required fields. Very long names and addresses. A missing UETR. A duplicate InstrId. A message sent after the network’s cut-off.

pacs.002: the network’s answer

In one line: The network’s answer about a bank-to-bank payment: 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 developersMatch 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 ownersDecide what the customer sees at each status, and at what point you tell them the money is gone for good.
What to testA reject after a timeout. An answer that never arrives. Two answers for one payment. A reject reason you have never seen before.

camt.056, camt.029 and pacs.004: asking for money back

In one line: How one bank asks another to send a payment back, and how the money returns.

  • 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 developersA 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 ownersSet 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 testA 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.

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.

  • 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 developersPut 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 ownersPick 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 testOpening 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).

Read next

Sources: Federal Reserve Financial Services; The Clearing House; Nacha Operating Rules; Swift. 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