Case study 01 · Banking and auto finance

Payment Reconciliation at CanPulse Finance

How a Forward Deployed Engineer found why an auto lender's payments never reconcile, and rebuilt how its money moves on AWS: the customer, today's architecture, the evidence, the decision, the solution, the rollout and the results.

Fictional company. CanPulse Finance, its partners, people, borrowers and numbers are made up for teaching. Real things are named only where they are real: the Nacha Operating Rules, the BAI2 and Metro 2 formats, PCI DSS and the AWS services. Check every Nacha rule against the current rules and the bank agreement before relying on it.


Overview

CanPulse Finance is an auto lender in Dallas that services about 950,000 car loans. Its borrowers pay about 47,500 times every business day, in nine different ways: autopay, debit cards, one-time bank payments, cash at stores, mailed checks, payments from their own banks, wires, insurers after a total loss, and instant payments at any hour. Every one of those payments must end up, exactly once, on the right loan, and every dollar must be accounted for in the bank and in the books.

At CanPulse, they did not. Seven separate integrations, three teams of analysts and a lot of spreadsheets sat between the partners and the loan system. Analysts spent about 120 hours a day on exceptions, closing the books took seven days, 14 payments were posted twice in one quarter, and borrowers who paid on time were charged late fees.

The VP of Operations asked for "one modern payment platform on AWS." A Forward Deployed Engineer (FDE) was assigned to find out what was really wrong and fix it. This case follows that engagement from the first meeting to measured results, the way the program teaches every engagement: six stages, each with one question and one result.

Figure 1. How the FDE moved from problem to solution in this case.
StageThe question it answersWhat you will seeSections
Before the stagesHow does CanPulse work today, and what is wrong?The customer, what reconciliation means, the existing system and the problem1 to 4
1. DiscoverWhat is the customer experiencing?The request, nine stakeholders, five interviews and the problem statement5
2. InvestigateWhere does it actually break?Where the system breaks, six pieces of evidence and the root causes6 to 8
3. DecideWhich fix is worth it?Requirements, four options compared, and the decisions9 and 10
4. EngineerDoes it work with their real systems?The AWS solution step by step, how it is implemented, every part in depth, and the lab11 to 28
5. DeployCan it run safely every day?Delivery, migration, monitoring, recovery, capacity and the runbooks29 to 34
6. ProveDid the business improve?Cost, value and measured results35 and 36
After the stagesWhat would you ask, check and practice?Questions, assumptions, risks, exercises and a glossary37 and 38

The customer's use cases, and where each one is solved

Every part of this case comes back to a few real situations at CanPulse. Each one is followed from the problem to the fix:

Use caseWhat goes wrong todayHow the platform handles itSections
A card payment at 11:58 p.m. on the due dateIt may post days later and look late; its deposit arrives net of feesRecorded with its capture time, matched to the settlement, posted once2, 16, 19
A Provider B file with a repeated row and an unknown codeThe repeat can become a second payment; the unknown code lands on an analystOne payment per row, the repeat recorded, the unknown code held in suspense7.5, 17
The core times out at 3:00 a.m.The script resends, and the payment is posted twiceNo resend until the first posting is proved absent7.4, 19.3
A card deposit $25.00 shortAnalysts search by hand for daysGross to net checked to the cent; the dispute fee explains it7.3, 22.2
The daily autopay fileIt can be sent twice by handBuilt, validated independently, registered and sent once20.1 to 20.4
An autopay debit comes back after postingApplied the next morning; the borrower looks paidApplied the day it arrives, reversing the posting21.1 to 21.3
An instant payment at 1:10 a.m. on a SundayVisible on the loan on TuesdayRecorded at once, posted when the core opens22.6
A refund that times outCould be sent twiceAsked by its instruction key, never resent blindly22.8
A Region fails at 4:40 p.m. on the first of the monthNo planFenced so only one Region can ever send an ACH file32.3

Short on time? Read the overview and sections 2, 3, 4, 6, 8 and 11, with Figures 5, 7 and 13. That is the whole story: what reconciliation is, how the system works today, where it breaks, why, and the solution on AWS.

Every design choice is written the way the program teaches: the problem first, the evidence behind it, the option chosen, the options rejected, and what would change the decision.


1. CanPulse Finance

CanPulse Finance is a fictional auto lender headquartered in Dallas, Texas. It follows the same policies as the lender in Modules 03 to 09, so everything you learned there applies here. This case shows a lender's whole payment landscape, not one reconciliation problem.

Figure 2. CanPulse Finance at a glance. Every number is an illustrative assumption for this case.

The rules every payment follows. These come from the policies in Module 03 and shape every design choice in this case:

RuleWhat it meansSource
On timeA payment captured by 11:59 p.m. Central on its due date is on timeR2, loan agreement section 5.1
Post after settlementA payment is posted to the loan only after its money settlesPolicy PA-3, section 2
Settlement is finalA settlement is final on the value date in the bank fileTreasury procedure TP-07
Payment orderEach payment pays interest, then fees, then principalPolicy PA-3, section 4
Unknown moneyMoney that cannot be matched to a loan is resolved or returned within three business daysProcedure OPS-14
Banking daysAbout 21 a month; US Federal Reserve holidays are not banking daysFederal Reserve calendar
Time zoneCentral Time for every cut-off; Federal Reserve ACH windows are published in Eastern TimeLoan agreement section 5.1
TrustsAbout 40% of loans sit in securitization trusts that CanPulse services, so collections are owed to investorsAssumption for this case

1.1 How money moves: nine channels on six rails

Figure 3. Nine channels on six rails. More than half of all payments are ACH autopay.

A channel is who tells CanPulse about a payment; a rail is how the money actually moves. Keeping the two apart is the first design decision of this case (section 22).

  • ACH autopay (55%, ACH): CanPulse is the Originator. It sends Nacha debit files to its bank (the ODFI), which collects from the borrower's bank (the RDFI). Settles on the effective date; returns arrive for days or weeks.
  • Provider A, cards and wallets (portal, app, phone system, call center) (14%, Card): Debit cards and digital wallets on Provider A's hosted page; real-time API notifications, as in Module 06. Seconds to notify; Provider A settles one net amount a day; chargebacks for up to 120 days.
  • Provider A, one-time bank payments (11%, ACH): The borrower pays once from a bank account; Provider A, not CanPulse, originates the ACH debit. Seconds to notify, two to three days to settle.
  • Provider B, cash and bill pay (10%, Cash network): Cash at retail locations with a barcode, and third-party bill pay; files three times a day, IDs like B/2026/1117/044, as in Modules 02 and 06. Hours to report; one net settlement a day.
  • Lockbox (mailed checks) (7%, Check): The partner bank opens the mail, deposits the checks and sends a lockbox file with item data and images. Next business day; a check can still be returned.
  • Borrower-initiated ACH credits (2%, ACH): Borrowers paying from their own bank's bill pay; the only notice is the bank's statement. Next day, often with poor remittance data.
  • Wires (payoffs, dealer buy-backs) (Under 1%, Wire): Fedwire into CanPulse's account, reported intraday. Same day, final on receipt.
  • Third-party payers (insurers, auction houses, dealers) (Under 1%, Wire, check or ACH): A remittance advice by file or email, and the money on its own rail. Days; large amounts.
  • Instant payments (RTP and FedNow) (Under 1% today, Instant): Borrower-pushed credits and CanPulse's requests for payment, through the bank's real-time API. Seconds, any hour of any day, final on receipt.

Money also goes out: refunds by card, by ACH credit and by check, about 3,000 a month (assumed).

Why so many channels and rails matter. Each has its own identity scheme, its own timing, its own proof of settlement and its own way of coming back. Most reconciliation pain at a lender comes from treating them as one stream. The design keeps them separate at the edge and joins them only in the canonical payment model.

1.2 The systems CanPulse already has

  • Loan servicing core: The loan, its balance, its schedule, its delinquency: the system of record for loans. Runs in CanPulse's Dallas data center, a vendor package on IBM Db2. Today: a posting API (about 40 requests a second at most), a nightly batch window from 10:00 p.m. to 1:30 a.m. Central when the API is closed, and end-of-day extract files on an NFS share.
  • General ledger: Accounting entries. Runs in a cloud ERP (software as a service). Today: a daily journal file over SFTP, and an API for status.
  • Collections system: Delinquent accounts and call campaigns. Is vendor-hosted. Today: daily delinquency file.
  • Customer portal and mobile app: Borrower login, payment screens. Runs on AWS today (an older single account). Today: calls Provider A's hosted payment page.
  • Partner bank: CanPulse's operating and collection accounts; ODFI for ACH; lockbox; wires. Is external. Today: SFTP for Nacha files, returns, BAI2 statements, lockbox files.
  • Credit bureaus: Credit reporting. Is external. Today: a monthly Metro 2 file over each bureau's secure transfer.
  • Securitization trustee: Investor reporting for the trusts. Is external. Today: a monthly servicer report and daily remittance of trust collections.

1.3 The people

The roles are the ones you met in the program: the VP of Operations (sponsor), the payment operations manager and analysts, the finance controller, treasury, the IT integration lead, the servicing core owner, the compliance officer, the information security officer, and the customer service lead. Two more appear in this case: the ACH program manager in treasury, who owns the relationship with the bank and the Nacha compliance calendar, and the securitization reporting lead.

1.4 Three counts that are easy to confuse

A payment, an event and a message are different things, and each one sizes a different part of the platform.

  • Unique payments: Distinct money movements from a payer, after duplicates are removed. Average: About 47,600 a business day (1,000,000 a month ÷ 21). Peak: About 143,000 on the first business day of a month (about 3 times the average) Sizes posting to the core, the ledger, reconciliation.
  • Payment lifecycle events: The events in the catalog (section 18.2): received, settled or matched, posted, and any return, reversal, chargeback or refund. Average: About 120,000 a day (Module 03): about 2.5 events for each payment. Peak: 400,000 (Module 08's planning number): about 2.8 events per payment on the peak day, because more settlements and returns arrive. Sizes the event backbone, the data lake.
  • Integration messages: Everything that crosses a boundary: webhooks including repeats, file rows, acknowledgments, retries, change data capture rows, notifications. Average: Not yet measured; expected to be several times the events. Peak: Measured during the shadow phase (section 30). Sizes the API edge, file processing, Transfer Family, network.

The check: 47,600 payments × 2.5 events ≈ 119,000, which agrees with Module 03's 120,000; and 143,000 × 2.8 ≈ 400,000, which agrees with Module 08's planning number. When this case says events, it means lifecycle events; when it says payments, it means unique payments.


2. What reconciliation means

Every payment leaves three separate records, kept by three different parties. Take one payment:

Jordan Ellis pays $412.50 by debit card at 11:58 p.m. on November 2, the due date.

Figure 4. One payment, three records, and the reconciliation check that joins them.

Reconciliation is the daily work of proving that these records agree for every payment: every payment notice has its money in the bank, every dollar in the bank belongs to a payment, and every payment reached the right loan exactly once. Anything that does not agree becomes an exception, and a person must explain it.

It is harder than matching one list against another, because:

  • Gross is not net. Jordan paid $412.50, but Provider A's deposit is one number for thousands of payments, minus fees and chargebacks. The deposit never equals any single payment.
  • Timing differs. The payment is on time by when the borrower paid, but CanPulse may credit the loan only after the money settles (policy PA-3).
  • Money can come back. An ACH debit can be returned days or weeks later. A credited loan must then be reversed, and the borrower's late fees must follow.
  • Records repeat. Partners send the same file twice, or the same row twice. A repeat must never become a second payment.

At CanPulse's size, this means proving about 47,500 payments a business day across nine channels, six ways of moving money and three kinds of evidence. Section 23 shows how the platform does it in five layers, every day.


3. How the existing system works

Before anyone can fix a system, they have to know how it works today. CanPulse's payment system grew one partner at a time. Each partner was connected to the loan system by its own script, and people filled the gaps.

The pieces. The loan servicing core is a vendor package on IBM Db2 in CanPulse's Dallas data center: it holds every loan, takes about 40 postings a second through its posting API, and closes from 10:00 p.m. to 1:30 a.m. Central for its nightly batch. At the end of each day it writes extract files to an NFS share. The portal and mobile app run in an older single AWS account and send card payments to Provider A's hosted payment page. Around them sit seven separate integrations and three teams of analysts. Section 1.2 lists every system.

Figure 5. How a payment travels today. The numbers match the walkthrough below.

3.1 How a payment travels today

  1. A card or one-time bank payment. The borrower pays on Provider A's page. Provider A sends a notification to the webhook receiver, which records it and hands it to the posting script. The script calls the core's posting API. Provider A's money arrives the next day as one deposit for all card payments, after fees, and nothing ties that deposit back to the payments automatically.
  2. Cash at a store, or bill pay. Provider B sends files three times a day. The Provider B file loader reads each file and hands its rows to the same posting script.
  3. Bank files. Settlement files, the prior-day BAI2 statement and lockbox check files arrive from the partner bank through the bank file importer. Analysts use them to match deposits to payments by hand.
  4. Autopay. At 4:30 p.m. the autopay file builder sends the day's Nacha file of autopay debits to the bank, which acknowledges it by 5:15 p.m.
  5. Returns. The bank sends return files in the morning and at 2:00 p.m. The ACH return script applies them at 6:00 a.m. the next day.
  6. Wires, instant payments and insurer payments. These live in spreadsheets, and analysts key them into the core by hand.
  7. Downstream. At the end of the day, files built from the core's extracts and the analysts' spreadsheets go to the general ledger (daily), collections (daily), the credit bureaus (monthly, Metro 2) and the securitization trustee (monthly).

3.2 A morning in operations

Every morning, three teams work the exceptions, about 120 analyst hours a day in all. An analyst opens three systems side by side, exports two reports into a spreadsheet, sorts them by amount and date, checks Provider A's deposit with a calculator, and keys corrections into the core by hand. Nothing in the system knows, for a given payment, whether it arrived, settled and reached its loan. People are the reconciliation engine.


4. The problem

The business feels the gaps every day, and the cost is measurable:

Figure 6. The problem, in numbers.

The money is mostly right. What is missing is the proof that every payment's three records agree, and safe handling when they do not.

The VP of Operations asked for "one modern payment platform on AWS." A new platform might help, or it might move the same problems somewhere new. The FDE's job is to find out what is really wrong, and why, before building anything. The rest of this case follows how they did it, stage by stage: listening (Discover), troubleshooting (Investigate), choosing (Decide), building (Engineer), going live (Deploy) and measuring (Prove).


Stage 1. Discover: what is the customer experiencing?

The FDE did not start with the architecture. They started with the people, and with what actually happened on real days.

5. The request, the people and the problem

5.1 What the customer said

Our payments live in seven places and three teams. We want one modern payment platform on AWS: real time where it can be, batch where it must be, and one place to see where every dollar is.

That is a request, not a requirement. Discovery (Modules 01 to 04) turns it into a problem statement.

5.2 Who is involved

The FDE mapped nine stakeholders before proposing anything. Influence is the FDE's own assessment, used to plan who to involve in each decision.

StakeholderOwnsCares aboutInfluence
VP of Operations (sponsor)The request and the budgetOne place to see every dollar; fewer analyst hoursHigh
Payment operations manager and analystsThe exceptions, every morningAbout 120 hours a day of manual workMedium
ACH program manager, treasuryThe bank relationship and the Nacha calendarEach file sent once; return rates under the limitsHigh
Finance controllerMonth-end closeA seven-day close; duplicates found at month-endHigh
Servicing core ownerThe loan servicing coreIts rate limit, its nightly window, no changes in the next yearHigh: can block any change to the core
Compliance officerNacha audits and record keepingMissing autopay authorizations; keeping records for two years after they endHigh
Information security officerData protectionCard data never enters CanPulse; bank account numbers protectedHigh
Customer service leadBorrower callsBorrowers told they are late when they paidMedium
Securitization reporting leadReports to the trustsA reversal on a trust loan changes what is owed to investorsMedium

5.3 What the people said

The FDE asked each person about real past events, such as walk me through yesterday's returns, rather than opinions, and spent one morning shadowing an analyst.

OM
Payment operations managerRuns the three exception teams

“Every morning three teams work the exceptions: about 120 analyst-hours a day all together. The worst is Provider B: their files repeat rows, and some payment codes don't map to a loan. Card deposits never match because Provider A pays us net, so analysts rebuild the fees by hand. When the core times out at night, the posting script just sends it again. Duplicates turn up at month-end and we reverse them then.”

What the FDE noted: Two different problems hide here: payments resent after a timeout, and deposits that arrive net of fees.

AP
ACH program manager, treasuryOwns the bank relationship and Nacha

“We send the autopay file at 4:30 and the bank acknowledges by 5:15. Once in the spring the acknowledgment was late, and an analyst sent the file again. The bank caught it as a duplicate, luckily. Return rates? The bank called us last month: unauthorized returns were 0.41%. We don't track them ourselves. Returns are applied to loans by a script at 6 a.m., so the 2 p.m. return file waits until the next morning.”

What the FDE noted: An ACH file has already been sent twice. Returns wait a day. Nobody measures the return rate.

CO
Servicing core ownerOwns the loan servicing core

“The posting API takes about 40 requests a second, and it's closed from 10 p.m. to 1:30 a.m. for the nightly batch. It stores your reference on each transaction, but it doesn't refuse a second posting with the same reference. There is an inquiry by reference; it's slow, but it works. The vendor says a request can take up to 60 seconds to finish. The database is Db2.”

What the FDE noted: The core keeps the reference but does not refuse a duplicate, and can take 60 seconds: a timeout proves nothing.

FC
Finance controllerOwns month-end close

“Month-end close takes seven business days. Three of them go to matching card and cash deposits, because the providers pay net of fees and chargebacks. Last quarter we found 14 duplicate postings at month-end. Customer service refunded 9 late fees in October to borrowers who had paid on time.”

What the FDE noted: Three days of every close go to deposits, duplicates surface only at month-end, and on-time payers were charged late fees.

CC
Compliance officerOwns Nacha audits and records

“Online autopay sign-ups are saved as screenshots on a shared drive. In the last Nacha audit, we couldn't produce 3 of the 25 authorizations the auditor sampled. We have to keep each authorization for two years after it ends.”

What the FDE noted: Autopay authorizations are not kept reliably: a Nacha audit risk.

SH
Shadowing notesOne analyst, one morning

she opens three systems side by side, exports two reports to a spreadsheet, sorts by amount and date, and keys corrections into the core by hand. She checks Provider A's deposit against a calculator. A Sunday instant payment from a borrower's bank was not visible in the core until Tuesday.

What the FDE noted: People are the reconciliation engine, and a Sunday instant payment waited until Tuesday.

What they heard did not match the request. Nobody's real problem was a lack of real-time processing. The problems were money posted twice, returns applied late, deposits that never matched, and a return rate nobody watched.

5.4 The problem statement after discovery

  • Who experiences it: Payment operations (exceptions), treasury (cash positioning and ACH), finance (month-end close), customer service (borrowers who paid and are told they did not), compliance (Nacha return rates, audit evidence)
  • What is happening: Payments arrive through nine channels, handled today by seven separate legacy integrations with seven formats (the seven places in the customer's words). Each channel is integrated point to point with the servicing core by a different script. There is no shared payment identity, no shared view of settlement, and no single list of exceptions.
  • Where: Between the edge (providers, bank files) and the servicing core, and between the servicing core and finance.
  • Why it matters: In the Module 09 pilot region, 82% of records reconciled automatically and analysts spent about 40 hours a day on exceptions. ACH returns are posted back to loans a day late, so some borrowers are charged late fees on payments that were reversed, and others are shown as paid when they are not. The unauthorized ACH return rate is not measured daily, although Nacha sets a 0.5% threshold.
  • Evidence: Module 09 pilot measures; 30 days of return files; the servicing core's posting logs; month-end close timelines.
  • Outcome required: Every dollar has one identity from arrival to the ledger; every payment is posted once, after settlement, in the order it happened; every exception has an owner; ACH obligations are monitored daily; finance closes from the platform, not from spreadsheets.

This is a reconciliation problem, not a missing platform. The money is real and mostly correct. What is missing is the proof, for every payment, that the three records agree, and safe handling of the cases where they do not.


Stage 2. Investigate: how the FDE troubleshoots

Discovery produced symptoms. Investigation turns each symptom into a cause the FDE can prove. The method is the same every time: start from a symptom, ask one precise question, get the evidence that answers it, and write down what it proves. Only causes backed by evidence go forward to the design.

6. Where the existing system breaks

Section 3 showed how a payment travels today. Figure 7 shows the same system, with the six places where money goes wrong marked in red.

Figure 7. The existing system again, with the six places where money goes wrong.

No two integrations share a payment ID. Nothing records, in one place, that a payment arrived, settled and reached the loan. So every morning, analysts open three systems side by side, export reports into spreadsheets, sort them by amount and date, and key corrections into the core by hand.

The red numbers in Figure 7 mark where money goes wrong:

  1. The posting script resends after a timeout. When the core does not answer in 30 seconds, the script sends the payment again. The core stores the reference but does not refuse a second posting with the same one, so a slow first request becomes a second posting.
  2. The Provider B file loader keeps repeats and has nowhere to put unknown codes. Provider B's files repeat rows, and some payment codes match no loan. Both land on the analysts.
  3. Deposits arrive net, and nothing ties the cash to the payments. Providers pay one deposit a day after fees and chargebacks. Analysts rebuild the fees with a calculator, and three days of every month-end close go to matching deposits.
  4. An autopay file can be sent again by hand. In the spring, a late acknowledgment led an analyst to resend the whole file. Only the bank's duplicate check stopped every borrower in it from being debited twice.
  5. Returns wait until 6 a.m., and nobody watches the return rate. The bank's 2:00 p.m. return file is applied the next morning, so some borrowers are shown as paid when they are not. The unauthorized return rate reached 0.41%, against Nacha's 0.5% limit, and CanPulse heard about it from the bank.
  6. Wires, instant payments and insurer payments run on spreadsheets. An instant payment a borrower sent on a Sunday did not reach the loan until Tuesday.

7. Troubleshooting with the evidence

The FDE asked for six pieces of evidence, one for each question, and wrote down what each one proved.

7.1 How many payments

The question: how big is the problem, and where is most of the money?

A. Payments in October, across 21 business days:

Figure 8. Payments in October, by channel.

What it shows: 998,400 payments in 21 business days, about 47,500 a business day. ACH autopay is more than half of them, so ACH correctness matters most; instant payments are tiny today but never stop.

7.2 The ACH return rates

The question: is the bank's 0.41% right, and how close is CanPulse to Nacha's limits?

B. ACH returns over the last 60 days. The autopay entries originated in the period number 1,096,400. The FDE used the method the bank uses: returns in the period divided by debit entries originated in the period.

Figure 9. ACH returns over 60 days, by code, and the three rates against their limits.

What it shows: unauthorized returns (R05, R07, R10, R11, R29, R51) are 2,150 + 1,880 + 470 = 4,500, so 4,500 ÷ 1,096,400 = 0.41%, below Nacha's 0.5% threshold but far too close for a rate nobody measures. Administrative returns (R02, R03, R04) are 3,870, or 0.35%, against 3.0%. All returns are 19,240, or 1.75%, against 15.0%.

7.3 A card deposit $25.00 short

The symptom: card deposits never match Provider A's report. The question: on one real day, what exactly is missing?

C. Provider A, November 3. The card settlement report shows gross $3,212,400.00, fees $25,699.20, chargebacks $1,980.00 and net $3,184,720.80. The bank statement shows a deposit from Provider A of $3,184,695.80. Provider A's dispute report for the same day lists:

text
dispute_id,payment_ref,amount,dispute_fee,respond_by
DSP-55120,PAY-A-871204,425.50,25.00,2026-11-10
DSP-55121,PAY-A-871377,1554.50,0.00,2026-11-12

What it shows: $3,184,720.80 − $3,184,695.80 = $25.00, the dispute fee on DSP-55120. It is not in the settlement report's fee line, only in the separate dispute report. Gaps like this are what analysts chase by hand, because no system puts the reports side by side. It belongs in chargeback costs, and Provider A should be asked to include dispute fees in the settlement report.

7.4 The night one payment was posted twice

The symptom: duplicate postings found at month-end. The question: how does one payment become two postings? The FDE asked the core owner for the posting log and the core's own transaction table for one duplicate.

D. The core's posting log, November 2, and the core's transaction table for the same reference

text
2026-11-02T03:14:07.112-06:00 POST     ref=PAY-A-883210 loan=LN-30117 amount=389.00 request=rq-1
2026-11-02T03:14:37.115-06:00 TIMEOUT  request=rq-1 after 30000 ms
2026-11-02T03:14:37.240-06:00 POST     ref=PAY-A-883210 loan=LN-30117 amount=389.00 request=rq-2 (resend)
2026-11-02T03:14:38.010-06:00 OK       request=rq-2 core_txn=CORE-77412
 
core_txn    reference     loan      amount  committed_at
CORE-77405  PAY-A-883210  LN-30117  389.00  2026-11-02T03:14:52.604-06:00
CORE-77412  PAY-A-883210  LN-30117  389.00  2026-11-02T03:14:38.002-06:00

The change data capture (CDC) stream and the core's inquiry by reference, for the same minutes. A heartbeat row is committed in the core's database every minute, and the stream delivers commits in the order of the database log. The vendor's maximum processing time is 60 seconds; use a margin of 30 seconds.

text
received_at   cdc_row                                committed_at
03:15:02      HEARTBEAT                               03:14:00.000
03:15:40      CORE-77412 ref=PAY-A-883210             03:14:38.002
03:15:48      CORE-77405 ref=PAY-A-883210             03:14:52.604
03:15:51      HEARTBEAT                               03:15:00.000
03:16:55      HEARTBEAT                               03:16:00.000
 
inquiry_at    reference      result
03:14:40      PAY-A-883210   not found
03:15:20      PAY-A-883210   found CORE-77405 (and CORE-77412)
Figure 10. The night of November 2, drawn from the core's own log.

What it shows: a timeout did not mean the posting failed. It meant we do not know yet. The first request committed 15 seconds after the script gave up on it, because the core can take up to 60 seconds. The resend committed first. Result: two postings of $389.00 for one payment.

  • Why the inquiry at 03:14:40 proved nothing: rq-1 was still inside the core's 60-second window (sent at 03:14:07, so it could commit until 03:15:07). Not found before that deadline is not evidence of anything.
  • The earliest moment absence could have been proved: the deadline plus a 30-second margin is 03:15:37. Proving that rq-1 never committed needs a CDC heartbeat committed after 03:15:37, with no posting for the reference before it. The 03:15:00 heartbeat is too early; the 03:16:00 heartbeat, received at 03:16:55, is the first that counts.
  • What a safe protocol would have concluded: proof of presence does not need to wait. The inquiry at 03:15:20 finds CORE-77405, so rq-1 is posted, at 03:15:20, and CDC agrees at 03:15:48. With no resend, there is one posting. Section 19.3 turns this into the platform's rule.

7.5 A Provider B file

The symptom: Provider B exceptions take the most analyst time. The question: what does a real file contain?

E. A Provider B file, B/2026/1117/044

text
transaction_id,payment_code,amount,captured_at
PB-77001,PC-4410-0193,150.00,2026-11-17T08:12:00-06:00
PB-77002,PC-4410-2208,225.50,2026-11-17T08:20:00-06:00
PB-77002,PC-4410-2208,225.50,2026-11-17T08:20:00-06:00
PB-77003,PC-9999-0000,310.25,2026-11-17T08:31:00-06:00
PB-77004,PC-4410-3307,89.00,2026-11-17T08:44:00-06:00
PB-77005,PC-4410-0193,150.00,2026-11-17T09:02:00-06:00
TRL,6,1150.25

Payment code PC-9999-0000 maps to no loan.

What it shows: the trailer ties (6 rows, $1,150.25), so the file can be loaded row by row. PB-77002 appears twice with identical content: one payment and a recorded repeat. PB-77003 has an unknown payment code: it goes to suspense under OPS-14. PB-77001 and PB-77005 have the same code and amount but different transaction IDs and times: two payments, flagged for review because a borrower paying twice in one morning is unusual. The correct result is 5 payments (4 identified, 1 in suspense) and 1 repeat.

7.6 Where the analysts' time goes

The question: where would fixing things save the most time?

F. Analyst time on exceptions, one week: 118, 124, 121, 117 and 120 hours. By category: Provider B identification 31%, card deposit matching 22%, ACH returns 18%, check identification 14%, core posting failures 10%, other 5%.

What it shows: Provider B identification and card deposit matching alone take more than half of the exception time. Both are reconciliation work that the right records would do automatically.

8. The root causes: from symptoms to causes

8.1 From symptoms to causes

What people sawThe root causeEvidence
Payments posted twiceThe posting script resends after a timeout, and the core does not refuse a repeated referenceThe night of November 2 (section 7.4)
Deposits never matchProviders pay net of fees, chargebacks and dispute fees, and nothing rebuilds gross to net from their reportsThe $25.00 gap (section 7.3)
Provider B exceptionsFiles are loaded without checking for repeats, and unknown codes have no suspense processFile B/2026/1117/044 (section 7.5)
Late fees for borrowers who paid on timeA payment counts only once it reaches the loan, so a payment made on the due date but credited days later looks lateThe Sunday instant payment; 9 fees refunded in October
Loans shown as paid after the money came backReturns are applied once a day, at 6 a.m.The treasury interview
A return rate close to the limit, unseenNobody measures it0.41% (section 7.2), learned from the bank
Analysts rebuilding everythingNo shared payment ID, and no single record of where each payment isThe shadowed morning; 120 hours a day

8.2 The most dangerous finding

Figure 11. The most dangerous finding: two ways to move money twice.

It was not on anyone's list: two ways to move money twice. One is resending a posting after a timeout. The other is resending an ACH file, which would debit every borrower in it twice. Both had already happened: the duplicate postings went unnoticed until month-end, and only the bank stopped the second ACH file. Whatever else is decided, these two must be made impossible, not just unlikely.

8.3 Why it is harder than it looks

  1. Two clocks. A payment is on time by its capture time (R2) but may be posted only after settlement (PA-3). The design has to carry both times for every payment.
  2. The core is slow and sometimes closed. At about 40 requests a second, and closed every night for three and a half hours, the servicing core is the bottleneck. Everything upstream must queue, order and retry without ever posting twice.
  3. ACH is not finished when it settles. A debit can come back as a return for two banking days, and for 60 calendar days if the borrower says it was not authorized. A posted payment must be reversible, and the borrower's late-fee and delinquency status must follow.
  4. Files lie in new ways. Duplicate files, renamed files, empty files, files with good totals and bad rows, files that arrive in two parts.
  5. Money moves in aggregates. Provider B and the bank settle in batches; one bank line can pay for hundreds of payments (the allocation model from Module 10, Lesson 10).
  6. Securitized loans move money twice. Collections on trust loans must be remitted to the trust, so a reversal on a trust loan changes a remittance as well as a loan.
  7. Regulated data everywhere. Bank account numbers (Nacha rules), card data (PCI DSS, kept out of CanPulse by Provider A), borrower personal data (privacy law), and audit evidence that must not change.
  8. Gross is not net. Borrowers are credited what they paid, but card and cash providers pay CanPulse after deducting fees and chargebacks. Every day must reconcile gross to net, to the cent.
  9. Some money is final and some is not. Wires and instant payments cannot be pulled back; ACH debits, cards and checks can come back days or months later. The posting and reversal rules differ by rail.
  10. Some money never stops. Instant payments arrive at any hour on any day, including the core's nightly window, weekends and holidays.
  11. Money goes out too. Refunds by card, ACH credit and check need approval, fraud protection (positive pay) and, for uncashed checks, state unclaimed property reporting.

Stage 3. Decide: which fix is worth it?

9. Requirements

9.1 Functional

IDRequirementTest that proves it
F1One identity. Every payment from every channel gets one CanPulse payment identity, with its source identity keptReplay a month of source records; every source record maps to exactly one payment
F2No duplicates. A source record delivered more than once creates one paymentReplay every delivery twice: payment count unchanged
F3Once, in order. A payment is posted to the loan once, after settlement, and in capture order for that loanTwo payments for one loan arrive out of order; the core receives them in capture order
F4On time by capture. Payments keep their capture time for the on-time decision (R2), whatever time they postA payment captured at 11:58 p.m. on the due date and posted at 3:00 a.m. is on time
F5Correct Nacha files. Autopay debits are originated as Nacha files on schedule, with every Nacha control total correctFile builder output checked by an independent validator on every file
F6Returns on time. ACH returns and notifications of change are applied within the Nacha time limits and the loan is correctedA return for a posted payment produces a reversal posting, a fee review and a borrower notice within the agreed time
F7Everything reconciled. Every settlement is reconciled to the bank statement, and every payment to its settlementDaily four-way reconciliation report with zero unexplained differences, or an open case for each
F8Every exception owned. Every exception has a case, an owner, a state and an audit trailCases follow the exception vocabulary (Module 07) and every change has who, when and why
F9Downstream ties out. Daily journal to the general ledger, monthly Metro 2 to the bureaus, monthly servicer report and daily remittance to the trusteeTotals tie to the platform ledger to the cent
F10Borrowers see it fast. Borrowers see their payment status in the portal within a minute of any changePortal read model updated from events; measured lag
F11Gross to net. Every card and cash settlement reconciles gross to net: payments, fees and chargebacks equal the depositDaily gross-to-net report with zero unexplained cents
F12Disputes on time. Every chargeback reverses its payment and gets a dispute case with its deadline; no deadline passes unansweredDispute ageing report; alarm 48 hours before each deadline
F13Instant, any hour. Instant payments are recorded, acknowledged and shown to the borrower at any hour, and posted when the core is openA test payment at 1:10 a.m. on a Sunday, while the core's nightly batch runs, is visible in the portal within a minute and posted by 2:00 a.m., after the core opens at 1:30 a.m.
F14Refunds controlled. Every refund has a requester and a different approver; checks are released only after the positive pay file is sentLedger constraints; positive pay acknowledgment before release
F15Payoffs exact. Payoffs by wire are checked against the payoff quote, and differences become refunds or cases, never write-offsPayoff test cases: exact, overpaid, short

9.2 Non-functional (examples to agree with CanPulse)

IDQualityExample targetOwner who agrees it
N1API acknowledgmentp95 under 500 ms (Module 08)Platform lead with Provider A
N2Posting freshness99.5% of settled payments posted to the core by 8:00 a.m. the next business dayOperations manager
N3CorrectnessZero duplicate postings; zero lost payments; weekly false-match sample under the agreed rateFinance controller
N4Availability of ingestion99.95% monthly for the API and the file drop; providers retry anything refusedPlatform lead
N5RecoveryRPO 5 minutes, RTO 2 hours for ingestion and the ledger (to agree; Module 08 used 15 minutes and 2 hours as an example)VP of Operations with the CISO
N6AuditabilityEvery original file and message kept unchanged for 7 yearsCompliance officer
N7Throughput400,000 events a day, with a peak of about 56 a second (Module 08)Platform lead
N8SecurityNo readable bank account number at rest outside the token vault; no card data in CanPulse at allInformation security officer

9.3 Compliance constraints, with their sources

ConstraintSourceWhat it means for the design
Return reason codes and time limitsNacha Operating RulesMost returns arrive within two banking days of settlement; returns for unauthorized consumer debits can arrive up to 60 calendar days later. A posted ACH payment is never final for the platform until those windows close
Return rate thresholdsNacha Operating RulesUnauthorized returns 0.5%, administrative returns (R02, R03, R04) 3.0%, all returns 15.0%. Measured daily by the platform, reported monthly by the ACH program manager
ReinitiationNacha Operating RulesAn entry returned for insufficient funds (R01) or uncollected funds (R09) may be reinitiated at most twice within 180 days of the original settlement date. Never after an unauthorized return without a new authorization
Notifications of changeNacha Operating RulesApply the corrected account data within six banking days of receiving the NOC, or before the next entry, whichever is later
Account validation for WEB debitsNacha Operating RulesA first-use bank account in an online authorization is validated before the first debit
Authorization recordsNacha Operating RulesKeep each autopay authorization for two years after it ends
Protecting account numbersNacha Operating RulesOriginators with more than 2 million ACH payments a year must render stored account numbers unreadable. CanPulse originates about 6.6 million (550,000 a month × 12), so this applies
Card dataPCI DSSProvider A's hosted page and tokens keep card numbers out of CanPulse; CanPulse's PCI scope is confirmed by its assessor
Card disputesCard network rules, through Provider A's contractEach dispute has a deadline set by the network; Provider A sets an earlier one for CanPulse. Missing it loses the dispute
Instant paymentsRTP and FedNow operating rules, through the bank agreementPayments are final; a return of funds is a request the receiver may decline. Services must run every day of the year
Uncashed refund checksEach state's unclaimed property lawAfter the state's dormancy period, report and pay uncashed refunds to the borrower's state
Check fraudThe bank's positive pay service agreementSend the check issue file before releasing checks; the bank pays only matching checks
Credit reportingMetro 2 format, Fair Credit Reporting ActReversed payments must reach the bureaus correctly; the monthly file is generated from the corrected loan state
Consumer dataGramm-Leach-Bliley Act safeguardsEncryption, access control and monitoring for borrower data
AuditCanPulse's internal audit and its trustee agreementsOriginal files and decisions kept unchanged; segregation of duties for adjustments

9.4 Seven dates for every payment

A payment has several dates, and each one answers a different question. Treating them as one date is how lenders charge late fees on payments made on time, or close the books on the wrong day.

FieldWhat it recordsWho sets itUsed for
captured_atWhen the borrower paidThe source: Provider A, Provider B, the bankThe on-time rule (R2): captured by 11:59 p.m. Central on the due date is on time
received_atWhen CanPulse first heard of the paymentThe edgeLatency, lateness of files, audit
settled_atWhen the rail's settlement evidence was confirmed (section 20.6 for ACH)ReconciliationPosting eligibility (PA-3): post only after settlement
loan_effective_dateThe date the loan treats the payment as appliedServicing policy, sent to the core with the postingInterest and fees on the loan
posted_atWhen the core accepted the postingThe core, confirmed by CDC or inquiryPosting freshness, reconciliation layer 4
accounting_dateThe date of each journal entryFinance policy, on the journal entry (section 24.2)The books and the close
reversed_atWhen a reversal was recordedPostingThe reversal's own journal entry

The policies behind them, assumed for this case and to be confirmed with finance and the servicing core owner:

  1. The loan effective date is the capture date for borrower-initiated payments (cards, Provider B, instant payments, wires), the effective entry date for ACH autopay, and the deposit date for lockbox checks.
  2. A reversal's loan effective date is the original payment's loan effective date, so the loan's history reads as if the payment had never applied; its accounting date is the day the reversal is recorded.
  3. Cash is recognized on the bank's value date (TP-07); fees on the provider's report date.
  4. An entry that arrives after a period has closed is booked in the next open period with a reference to the original date. Closed periods are never reopened by the platform.

10. The options and the decisions

10.1 Four options, compared

The design constraints: AWS is CanPulse's chosen cloud; the team knows Java, PostgreSQL and Terraform; the core cannot change in the next year; and nothing may risk a duplicate ACH file.

Figure 12. Four options, compared on the same tests.

The decision: in the first four weeks, stop the harm with option A's cheap fixes: never resend a posting after a timeout, apply the 2:00 p.m. returns the same day, alarm on late or repeated files, and report the ACH return rate every morning. Then build option C, replacing the seven integrations one channel at a time (section 30).

What would change it: if the core vendor shipped a reliable unique-reference check and an idempotent posting API, part of the posting protocol would become simpler; if a hub product met the core and Nacha needs at a lower total cost, option D would return.

10.2 The decisions, in one place

#DecisionChosenRejectedRevisit if
D1Account structureSeparate edge, core, recon, integration, data, security, log, network, backup accountsOne account with many VPCsNever smaller; larger if a new business line arrives
D2Cross-account service callsVPC LatticeVPC peering mesh; public endpointsLattice limits are reached
D3Edge to corePrivateLinkShared VPC; routed TGW trafficNever: one-way is the point
D4Business eventsEventBridge buses, one per domainOne central bus for everythingConsumers need ordering (they get Kinesis or SQS FIFO instead)
D5Event logKinesis Data StreamsAmazon MSKVolume grows tenfold or CanPulse adopts Kafka elsewhere
D6Posting orderSQS FIFO grouped by loanA single-threaded posterNever: single-threading cannot meet the peak
D7Ledger storeAurora PostgreSQLDynamoDB for the ledger; QLDB (support ended July 31, 2025)Never for the invariants
D8Posting confirmationCDC from the core's databaseTrusting the API responseThe core gains a reliable idempotent API
D9File processingTransfer Family, managed workflows, Step Functions with Distributed MapSelf-managed SFTP servers on EC2; AWS Glue for every fileA file type needs heavy transformation (Glue then)
D10Account numbersToken vault in DynamoDB with the Encryption SDKStoring them encrypted in the ledger rowsCanPulse adopts a bank-provided tokenization service
D11AIEvidence summaries for analysts with Bedrock GuardrailsAny automated matching or posting by a modelNever for financial decisions
D12RecoveryWarm standby in us-west-2Backup and restore only; multi-site activeThe agreed RTO changes (Module 08's cost table)
D13Payment modelChannel and rail recorded separately on every paymentOne payment type per providerNever: posting, reversal and reconciliation rules follow the rail
D14Instant paymentsThrough the partner bank's real-time APIDirect membership of RTP or FedNowVolume grows enough to justify becoming a participant through a different bank arrangement
D15Third-party remittancesAmazon Textract extraction, confirmed by an analystManual keying only; automatic application of extracted amountsExtraction accuracy is measured above an agreed level for a payer, and even then only for small amounts
D16Refund checksThe bank's check payables service with positive payPrinting checks in-houseNever for a lender of this size
D17Financial recordsA double-entry subledger in the Aurora ledger, summarized to the GL dailyStatuses alone; posting every payment straight to the ERPFinance adopts a dedicated subledger product
D18Ambiguous postingsProof of presence, or proof of absence (the request's deadline passed, a CDC heartbeat after it received, and no posting in the inquiry or the stream) before any retry; a core-enforced unique reference is a go-live requirement, or a documented exception approved by the finance controllerRetry after a timeoutThe core gains enforced idempotency, which is then used as well
D19ACH origination during failoverOne Region at a time, by a lease with a fencing tokenAgreement between teamsNever weaker

Stage 4. Engineer: does it work with their real systems?

11. Solution overview: the platform on AWS

Figure 13 shows the whole platform. Every payment, from any of the nine channels, becomes one record with one ID in a ledger on Amazon Aurora PostgreSQL. That record carries every date that matters: when the borrower paid, when the money settled, and when the loan was credited. Everything else, posting, ACH, reconciliation and reporting, reads from that one record.

Figure 13. The CanPulse payment platform on AWS. The numbers match the walkthrough below.

11.1 The walkthrough

  1. A card payment arrives in real time. Provider A sends a signed notification. AWS WAF filters the traffic, Amazon API Gateway checks the client certificate (mutual TLS), and a Lambda authorizer checks the signature, the five-minute window and a replay cache in Amazon ElastiCache. The request reaches the ingestion service over AWS PrivateLink. (Section 16)
  2. Partner files arrive in batches. Provider B and the partner bank send files by SFTP to AWS Transfer Family. Each file lands in Amazon S3, is decrypted and scanned by Amazon GuardDuty Malware Protection, and is registered by a fingerprint (SHA-256) of its contents, so a renamed copy is caught. AWS Step Functions with Distributed Map parses it row by row, only after its trailer totals tie. (Section 17)
  3. Insurer remittances arrive by email. Amazon SES receives them; Amazon Textract reads the remittance, and an analyst confirms the amount before it is applied. (Section 22.7)
  4. Every source becomes one payment. The ingestion service, on Amazon ECS with AWS Fargate, maps each source to the canonical payment and writes it to the Aurora PostgreSQL ledger in the same transaction as an outbox row. A repeat finds the existing payment instead of creating a new one. Every money movement is a balanced entry in a double-entry journal. (Sections 24.1 and 24.2)
  5. Everyone who needs to know, learns. The outbox publisher sends business events to Amazon EventBridge (the portal shows a payment within a minute) and the ordered log to Amazon Kinesis Data Streams, which Amazon Data Firehose delivers to the S3 data lake, catalogued by AWS Glue and queried with Amazon Athena and Amazon Redshift. (Sections 18 and 26)
  6. Reconciliation runs every day, in five layers. Completeness, settlement, cash, posting and books (Figure 24). Every difference becomes an exception case with an owner, searchable in Amazon OpenSearch Service; Amazon Bedrock drafts an evidence summary for the analyst but never decides. (Section 23; decision D11)
  7. Settled payments post to the loan, in order, once. The posting service sends each loan's payments through Amazon SQS FIFO, one message group per loan, to the core adapter in the integration account, which keeps under the core's rate limit and reaches the Dallas data center over AWS Direct Connect. An AWS AppConfig flag holds postings while the core is closed from 10:00 p.m. to 1:30 a.m. (Sections 19.1 and 19.2)
  8. The core's own record is the proof. AWS Database Migration Service reads the core's postings from its Db2 log (change data capture), with a heartbeat every minute. A posting is POSTED only when the core's own record confirms it, and after a timeout nothing is resent until absence is proved. This is the rule that would have prevented the night of November 2. (Section 19.3)
  9. ACH files are built and sent once. The ACH service builds the daily Nacha file, reading bank account numbers from a token vault in Amazon DynamoDB encrypted with AWS KMS, where only the file builder may decrypt. The file is registered before it is sent through a Transfer Family connector; returns come back through step 2 and reverse the posting the same day. (Sections 20, 21 and 27.5)
  10. Downstream systems get one consistent story. The daily journal goes to the general ledger, and Metro 2 and trustee reports go out through Transfer Family connectors in the integration account; AWS DataSync brings in the core's end-of-day extracts. (Sections 25 and 26)
  11. Shared accounts keep it safe and running. AWS Transit Gateway, Direct Connect and AWS Network Firewall control every route; Amazon CloudWatch and Amazon Managed Grafana show business health; AWS Security Hub, GuardDuty and AWS CloudTrail (logs locked in a separate account) watch security; AWS Backup keeps an air-gapped copy; and a warm standby in us-west-2 takes over only when a person decides, with ACH fenced so that only one Region can ever send a file. (Sections 14, 15, 27, 31 and 32)

11.2 How each root cause is fixed

Root cause (section 8.1)The fixIn depth
Resend after a timeoutNever resend while the outcome is unknown; prove presence or absence first, then resend with the same keySection 19.3
Gross is not netPayments, minus fees, chargebacks and dispute fees, must equal the deposit, to the centSections 22.2 and 23
Repeated files and rowsEvery file registered by its contents before anything reads it; a repeated row is one paymentSection 17.2
Unknown payment codesSuspense, with an owner and a three-day limit; never posted until identifiedSections 17.2 and 24.2
On-time decided by the wrong clockEvery payment keeps the moment the borrower paid; on-time is decided by that momentSection 9.4
Returns applied lateEach return file applied when it arrives, reversing the posting the same daySection 21
Return rate unseenComputed every morning, with CanPulse's own alerts well below Nacha'sSection 21.5
ACH file sent twiceRegistered before sending; one sender at the bank; no resend without a call to the bankSections 20.4 and 32.3
No single recordOne canonical payment and a double-entry journal; five reconciliation layers every daySections 23 and 24

11.3 How the FDE implements it

The fix is not one big release. It is built and switched on in an order that stops the harm first and never risks moving money twice.

Figure 14. How the FDE implements it, step by step.

The sections that follow, 12 to 27, take each part of Figure 13 in depth. Section 28 shows it working.


12. Payment flows from end to end

12.1 The whole landscape

Figure 15. The whole payment landscape, from the payer to every downstream system.

12.2 Upstream and downstream, defined

Upstream is everything that tells CanPulse money is coming or has arrived: Provider A, Provider B, the partner bank's files and real-time notifications, the borrower's own bank, and third-party payers such as insurers and auction houses. Downstream is everything that must learn what CanPulse decided: the servicing core (the loan), the general ledger (the books), collections, borrower notifications, the credit bureaus, the trustee, and the data platform. The payment platform sits in the middle and owns one thing: the payment and the evidence for it. It does not own the loan (the servicing core does), the books (the ERP does) or the bank account (the bank does).

12.3 One payment per rail, step by step

Channel and railArrives asProof of settlementPosted whenCan come back as
ACH autopayAn entry CanPulse itself createdThe ODFI's acceptance, the settlement date, and the file's settlement total on the BAI2 statement (section 20.6); each entry stays subject to returnWhen the entry is settled under section 20.6A return (R-code) or, for its account details, a notification of change (C-code)
Provider A, cardA webhook with the provider's transaction IDA line in Provider A's card settlement report, and its net deposit on the statementWhen the report line matchesA chargeback, for up to 120 days
Provider A, one-time bank paymentA webhookProvider A's settlement line (TP-07 value date)When the settlement line matchesA reversal event from Provider A after an ACH return
Provider B, cash and bill payA row in a fileA net settlement line, one for many paymentsWhen its allocation is complete (Module 10, Lesson 10)A reversal row in a later file
Lockbox checkAn item in the lockbox file, with a check imageThe lockbox deposit in the BAI2 statementWhen the deposit total matches the itemsA returned item from the bank
ACH credit inA line on the BAI2 statement onlyThe same statementWhen it is identified and applied, or after suspense resolutionRarely; a reversal by the sending bank
WireIntraday bank reportFinal on receiptOn identification, checked against the payoff quoteNot without the sender's request
Instant paymentA real-time bank notificationFinal on receiptOn identification, at any hourA return-of-funds request, decided by a person
Third-party payerA remittance advice plus money on its own railThat rail's proofAfter an analyst confirms the extracted remittanceAs for that rail
Refund (outbound)Created by CanPulse with approvalPaid-check report, card refund confirmation, or ACH settlementThe loan is adjusted when the refund is approvedA returned refund; an uncashed check, reported to the state

13. A business day at CanPulse, hour by hour (Central Time)

Times marked assumed are this case's assumptions, to be confirmed with the bank and the providers. The Federal Reserve's Same Day ACH submission deadlines are published in Eastern Time as 10:30 a.m., 2:45 p.m. and 4:45 p.m.; they are 9:30 a.m., 1:45 p.m. and 3:45 p.m. Central. The ODFI's own cut-offs are earlier.

Figure 16. A business day at CanPulse, hour by hour, in Central Time.

The design consequence. At 10:00 p.m. the core closes, and at 11:59 p.m. borrowers are still paying. The platform must accept, record and acknowledge payments while the core is closed, and post them later in the right order, with the capture time preserved for the on-time decision. A design that posts synchronously in the API call fails here every night.


14. The AWS accounts and how they talk to each other

14.1 Why many accounts

One AWS account is one blast radius, one set of limits and one place where a mistake reaches everything. A payment platform separates what can be separated: the internet-facing edge from the ledger, the ledger from the analysts' data, the logs from everyone who could tamper with them. AWS Organizations, with service control policies (SCPs), enforces those boundaries above any single team's permissions.

14.2 The account structure

Organizational unitAccountWhat runs thereWhy it is separate
RootManagementAWS Organizations, SCPs, billing. No workloadsCompromise here is compromise everywhere, so nothing runs here
SecuritySecurity toolingDelegated administrator for GuardDuty, Security Hub, Inspector, Macie, IAM Access Analyzer, DetectiveSecurity teams see everything without owning workloads
SecurityLog archiveOrganization CloudTrail, VPC Flow Logs, Network Firewall logs, Transfer Family logs, in S3 with Object LockNobody who runs a workload can change its logs
InfrastructureNetworkTransit Gateway, Direct Connect gateway, inspection VPC with AWS Network Firewall, central egress, Route 53 Resolver endpointsOne place controls every route in and out
InfrastructureShared servicesCI/CD runners, Amazon ECR, AWS Private CA, the artifact storeBuilds and certificates are shared, not copied
Workloads, prodEdgeAPI Gateway with AWS WAF (Provider A webhooks and the bank's real-time notifications), Transfer Family servers and connectors, SES inbound email for remittance advices, the landing and quarantine bucketsEverything that partners can reach is here, and nothing that stores the ledger
Workloads, prodPayments coreIngestion services, the payments ledger (Aurora), the outbox publisher, the posting service, ACH origination, card settlement, refunds and positive pay, the instant payments service, the token vaultThe money and its invariants
Workloads, prodReconciliation and operationsReconciliation engine, exception and dispute cases, remittance extraction with Amazon Textract, the operations UI, OpenSearch, the AI evidence summaryAnalysts work here; they never reach the ledger's write path
Workloads, prodIntegrationAdapters to the servicing core, the ERP, collections, the bureaus and the trustee; internal file movementEvery connection to another company's or team's system is here
Workloads, prodData platformS3 data lake with Apache Iceberg tables, AWS Glue, Lake Formation, Athena, Amazon RedshiftAnalysis and reporting at scale without touching operational databases
Workloads, prodMonitoringCloudWatch cross-account observability, Amazon Managed GrafanaOne pane of glass across accounts
RecoveryBackup vaultAWS Backup logically air-gapped vault with vault lockA compromised workload account cannot delete its own backups
Workloads, non-prodEdge, Payments core, Reconciliation, Integration, Data (staging and dev)The same shapes with synthetic dataProduction data never enters non-production

14.3 Guardrails that apply to every account (SCPs)

  1. Deny any action outside the two approved Regions (primary us-east-2, recovery us-west-2), except global services.
  2. Deny stopping or deleting CloudTrail, Config, GuardDuty and the log buckets.
  3. Deny creating IAM users and access keys; people sign in through IAM Identity Center.
  4. Deny S3 buckets without default encryption and Block Public Access.
  5. Deny disabling EBS default encryption and deny unencrypted RDS and Aurora clusters.
  6. Deny leaving the organization.
  7. In the payments core account: deny kms:Decrypt on the token vault key to every principal except the ACH file builder role and the break-glass role.

14.4 How the accounts talk to each other

There is no single way, on purpose. Each kind of conversation uses the mechanism that fits it:

  • A business event (a payment was posted) to many consumers in other accounts: Amazon EventBridge, bus to bus. Each domain owns a bus; a rule on the producer's bus sends matching events to the consumer's bus in another account, allowed by the target bus's resource policy. Why: Routing and filtering by content, many consumers, no consumer known to the producer.
  • An ordered stream of every payment event, for the data lake and replay: Amazon Kinesis Data Streams in payments core, read cross-account by a role the data account assumes. Why: Ordering per partition key, replay from a position, high volume.
  • A synchronous call from one service to another account's service: Amazon VPC Lattice service network shared with AWS RAM, with IAM auth policies. Why: Service-to-service across VPCs and accounts without peering or managing load balancers.
  • A file moving from one account to another: S3 to S3 copy by a role in the receiving account, allowed by the bucket policy and the KMS key policy in the sending account. Why: The receiver pulls what it is allowed to read; nobody pushes into someone else's bucket.
  • The edge handing a request to the ingestion service: AWS PrivateLink: the ingestion service publishes a VPC endpoint service behind a Network Load Balancer; the edge account has an interface endpoint. Why: One-way, private, no route tables between the two VPCs.
  • Any account reaching the on-premises servicing core: Transit Gateway to Direct Connect, through the inspection VPC. Why: One controlled path to the data center.
  • A person in operations opening the ops UI: AWS Verified Access in front of the UI, with IAM Identity Center. Why: Zero-trust access per request, no VPN.
Figure 17. How the accounts talk to each other. Every arrow crosses an account boundary with its own permission.

15. The network

15.1 Address plan

Every VPC gets a non-overlapping range so that any two can be routed later without renumbering. The on-premises data center uses 10.0.0.0/12.

VPCAccountRangeSubnets in each of three Availability Zones
InspectionNetwork10.64.0.0/22Firewall endpoints, Transit Gateway attachments, NAT gateways
EdgeEdge10.65.0.0/20Public (Transfer Family endpoint with Elastic IPs), private (Lambda, interface endpoints)
Payments corePayments core10.66.0.0/18App (ECS tasks), data (Aurora, ElastiCache), endpoints
Recon and opsReconciliation10.67.0.0/19App, data (OpenSearch, Aurora)
IntegrationIntegration10.68.0.0/19App, Transfer Family connectors egress, DataSync agents' targets
DataData platform10.69.0.0/19Redshift, Glue connections
Recovery Region copieseach10.96.0.0/12 blockThe same shapes in us-west-2

15.2 Routing and inspection

AWS Transit Gateway in the network account connects every VPC and the Direct Connect gateway. Its route tables segment traffic:

  • prod-workloads (attached to Edge, payments core, recon, integration, data): can reach Each other only through the inspection VPC; on-premises only through inspection.
  • nonprod-workloads (attached to All non-production VPCs): can reach Each other; never production.
  • inspection (attached to Inspection VPC (appliance mode on)): can reach Everything, and it is the only route to the internet.
  • on-prem (attached to Direct Connect gateway): can reach prod-workloads through inspection, for the servicing core and the ERP connector only.

AWS Network Firewall in the inspection VPC applies stateful rules: east-west traffic between production VPCs is limited to the ports each service needs, and egress to the internet is allowed only to named domains (Provider A's API, the ERP's API, the bureaus' transfer hosts), so a compromised task cannot reach an arbitrary server.

15.3 The connection to the data center

Two AWS Direct Connect dedicated connections at two different Dallas-area Direct Connect locations, with MACsec encryption on the links, into one Direct Connect gateway. An AWS Site-to-Site VPN over the internet is the backup path. BGP prefers Direct Connect. The servicing core's posting API and its NFS share are reachable only from the integration VPC.

15.4 Names

Route 53 Resolver inbound and outbound endpoints in the network account, with forwarding rules shared to every account through AWS RAM: *.canpulse.internal resolves on-premises names (the servicing core), and the data center resolves AWS private hosted zones. Every AWS service the workloads call (S3, KMS, Secrets Manager, ECR, CloudWatch, STS, EventBridge, Kinesis, SQS) is reached through VPC endpoints, so that traffic never leaves the AWS network.

15.5 What partners see

PartnerThey connect toAllowlisting
Provider A (webhooks in)payments-api.canpulsefinance.example, an API Gateway Regional endpoint with mutual TLSProvider A's client certificate, issued by CanPulse's AWS Private CA; HMAC signature on every request (the Module 06 contract)
Provider A (CanPulse calls its API)Provider A's APIProvider A allowlists CanPulse's NAT gateway Elastic IPs in the inspection VPC
Provider B, the bank, the lockbox (files in)Transfer Family SFTP endpoint inside the edge VPC with Elastic IPsEach partner allowlists CanPulse's Elastic IPs; CanPulse's security group allows each partner's published IPs; SSH keys per partner user
The bank (files out: Nacha)The bank's SFTP serverTransfer Family SFTP connectors send from static IP addresses that the bank allowlists
The ERP, bureaus, trusteeTheir transfer hostsTransfer Family SFTP connectors, same static IPs
The bank's real-time API (instant payments in; requests for payment and positive pay out)Inbound: the same API edge as Provider A, mutual TLS and signatures. Outbound: the bank's APIThe bank's certificate for inbound calls; CanPulse's NAT Elastic IPs and client certificate for outbound calls
Provider A's refund and dispute APIsProvider A's APIThe same egress path and allowlist as other Provider A calls
Insurers, auction houses, dealersA dedicated email address on SES inbound; SFTP for auction sale reportsSES receipt rules accept only the agreed sender domains, with spam and virus checks; SFTP as for other partners
Figure 18. The network: one way in for partners, every other route through the Transit Gateway.

16. Real-time ingestion: the payment API

16.1 The path of one Provider A notification

Figure 19. The path of one Provider A notification, from webhook to published event.

16.2 What each piece does, and why

  • Front door: Amazon API Gateway (REST, Regional) with a custom domain and mutual TLS. Why: Client certificates prove which provider is calling before any code runs. Rejected: A public Application Load Balancer: possible, but API Gateway gives throttling, usage plans and mTLS in one place.
  • Web filtering: AWS WAF with rate-based rules, size limits and an IP allowlist per provider; AWS Shield Advanced on the edge. Why: Stop floods and oversized bodies before they cost anything. Rejected: WAF alone without Shield Advanced: acceptable, but the business impact of an outage at month-end justifies it.
  • Signature and replay: Lambda authorizer checks the HMAC over the timestamp and raw body (Module 07's ProviderSignature), refuses stale timestamps, and records each signature in Amazon ElastiCache for Valkey for five minutes to refuse replays. Why: Signature checks need the raw bytes and a shared secret from AWS Secrets Manager. Rejected: Checking signatures inside the service: works, but the authorizer stops bad traffic earlier and caches decisions.
  • Service: Amazon ECS on AWS Fargate, Java 17, behind a Network Load Balancer exposed as a PrivateLink endpoint service. Why: Steady traffic, long-lived database connections through RDS Proxy, predictable latency. Rejected: Lambda: fine for spiky work, but connection pooling to Aurora and cold starts at month-end make Fargate simpler here.
  • Idempotency: INSERT ... ON CONFLICT on UNIQUE (channel, source_reference), plus a payload hash to tell a repeat from a conflict (Modules 06 and 07). Why: The database decides, under any concurrency. Rejected: A cache-only check: lost on restart, shared by nobody.
  • Publication: Transactional outbox in Aurora, read by a publisher on ECS that claims rows with FOR UPDATE SKIP LOCKED. Why: The event can never be lost after the payment commits. Rejected: Publishing from the request thread: the dual-write problem (Module 06)

16.3 What the API never does

It never posts to the servicing core, never waits for settlement and never calls another company's system. It records, acknowledges and publishes. Everything slower happens after the 202.


17. Batch ingestion: files from partners

17.1 The file journey

Figure 20. The file journey: scanned, registered once by its contents, loaded only when its totals tie.

17.2 The rules every file follows

  1. The original never changes. The decrypted original is written to an S3 bucket with S3 Object Lock in compliance mode for seven years. Every later step reads a copy.
  2. A file is registered before anything reads it. The registry row holds the source, the original name, the SHA-256 of the bytes and the S3 location. UNIQUE (source, sha256) makes the same bytes under a new name a duplicate, not a second file (Module 07, settlement.sql).
  3. Totals before rows. Every format the case uses carries control totals: the Nacha file and batch controls, the BAI2 account and group trailers, the lockbox batch totals, Provider B's trailer. If the totals do not tie, nothing in the file is loaded.
  4. Every rejected row is reported, never dropped (Module 07, Lesson 06). A row-level rejection is a record with a reason, counted against the file.
  5. The file has a lifecycle: RECEIVED, PARSING, LOADED, REJECTED or QUARANTINED. A file that stays PARSING past its time limit raises an alarm.
  6. Lateness is measured against the contract and the internal cut-off separately (Module 02: Provider B's evening file is due at 7:00 p.m. by contract; CanPulse's own cut-off is 6:30 p.m.).

Whole file or row by row? Each source has a written rule, because a half-loaded financial file is the worst outcome.

  • Nacha return and NOC files, BAI2 statements, bank settlement files, Provider A card settlement reports: All or nothing. One bad row rejects the file. Why: The totals are the evidence; a partial load makes them meaningless.
  • Provider B payment files, lockbox files: Row by row, after the totals tie. Good rows load, rejected rows are recorded with reasons and sent back to the partner, and the file shows LOADED with its rejected count. Why: One unreadable payment must not hold back thousands of good ones; every rejected row is still accounted for.
  • Third-party remittance documents: One document at a time, confirmed by an analyst. Why: Each is a separate decision.

17.3 The services, and why each one

  • Partners push files: AWS Transfer Family SFTP server (AS2 for any partner that requires it), VPC-hosted with Elastic IPs. One logical user per partner, each confined to its own S3 prefix by a scope-down session policy.
  • Decrypt: Transfer Family managed workflows with the PGP decrypt step. CanPulse's private PGP keys are held in Secrets Manager; partners encrypt with CanPulse's public key.
  • Scan: Amazon GuardDuty Malware Protection for S3 on the quarantine bucket. Check images and attachments in lockbox files are the realistic risk.
  • Orchestrate: AWS Step Functions Standard workflows. Every file run has a visible history, retries per step and a human-readable failure.
  • Parse at scale: Step Functions Distributed Map over the file's rows, writing to Aurora in batches. A 100,000-record settlement file is split into parallel child workflows with a concurrency limit that protects the database.
  • Small files: A single Lambda function. Most Provider B files are a few thousand rows.
  • Pull from a partner that will not push: Transfer Family SFTP connectors, on an EventBridge Scheduler schedule. The bank's acknowledgment files and some return files are pulled.

18. The event backbone

18.1 Three tools, three jobs

  • Amazon EventBridge (one bus per domain, cross-account rules, schema registry, archive and replay): Business events to many consumers, filtered by content. Not for everything because: not ordered, and not built for replaying millions of events into a lake.
  • Amazon Kinesis Data Streams (on-demand): The ordered log of every payment event, partitioned by loan, kept for 7 days, read by the data platform and by the return-risk scorer. Not for everything because: not a router: consumers must know the stream exists.
  • Amazon SQS FIFO (high-throughput mode): The posting queue, with the loan account ID as the message group, so payments for one loan post in the order the ledger releases them (section 19.2) while different loans post in parallel. Not for everything because: only for one consumer with strict order per key.
  • Aurora outbox: The source of truth for what must be published. If any event infrastructure loses events, the publisher republishes from the outbox. Not for everything because: rows are deleted 30 days after publication, so recovery beyond 30 days uses the ledger itself.
  • Aurora ledger: The source of truth for financial state: payments, postings, journal entries. Not for everything because: every other store can be rebuilt from it; it cannot be rebuilt from them.

Not chosen: Amazon MSK (Kafka). It would do the Kinesis job well and is the right choice if CanPulse already ran Kafka or needed long retention with compaction. CanPulse does not, and the team would carry brokers, partitions and upgrades for no gain at 56 events a second. Revisit if a second business line brings ten times the volume or an existing Kafka estate.

18.2 The event catalog

EventVersionProducerConsumersKey
PaymentReceived1IngestionReconciliation, portal read model, data lakepayment ID
PaymentRejected1IngestionOperations (case), the partner adaptersource reference
SettlementRecordReceived1File ingestionReconciliationsettlement ID
SettlementAllocated1ReconciliationPosting, financesettlement ID
PaymentMatched1ReconciliationPosting, portal, data lakepayment ID
ExceptionCaseOpened, ExceptionCaseResolved1CasesOperations UI, notifications, data lakecase ID
PaymentPosted, PostingFailed1PostingPortal, ledger, data lake, trustee remittancepayment ID
AchEntryScheduled, AchFileSent, AchFileAcknowledged1ACH originationTreasury dashboard, data lakeentry or file ID
AchEntrySettled1ACH origination, from the BAI2 matchPostingentry ID
AchReturnReceived1Return processingPosting (reversal), cases, notifications, rate monitortrace number
NotificationOfChangeReceived1Return processingAutopay maintenancetrace number
PaymentReversed1PostingPortal, collections, bureau reporting, trustee remittance, ledgerpayment ID
CardSettlementReported1Card settlementReconciliation, finance (fees)report date
ChargebackReceived, ChargebackResolved1Card disputesPosting (reversal or re-apply), cases, notificationsdispute ID
CheckReturned1Lockbox processingPosting (reversal), cases, notificationsreturn item ID
InstantPaymentReceived1Instant paymentsReconciliation, posting, portalnetwork reference
RequestForPaymentSent, RequestForPaymentExpired1Instant paymentsPortal, casesrequest ID
PayoffReceived1Wire processingPosting, refunds (overpaid), cases (short)IMAD
RemittanceExtracted, RemittanceConfirmed1Remittance intakeCases (analyst confirmation), then postingdocument ID
RefundRequested, RefundApproved, RefundIssued, RefundEscheated1RefundsPosting (loan adjustment), positive pay, ledger, data lakerefund ID

Every event has an envelope: eventId, eventType, eventVersion, occurredAt, correlationId, source, and a data object with no bank account numbers and no card data (Module 06's PaymentReceived schema is the model). Schemas live in the EventBridge schema registry and in the repository, and the publisher validates every event before it writes the outbox row.

18.3 Delivery rules

  1. At least once, everywhere. Every consumer records the eventId in a processed-events table in the same transaction as its change and skips repeats (Module 07).
  2. Order only where it matters. Posting is ordered per loan by the SQS FIFO group. Nothing else assumes order; consumers that need the latest state re-read it.
  3. Archive and replay. Every bus archives its events for 30 days. A replay is a controlled operation with a ticket, a time range and an approver, never a casual button.
  4. Dead letters have owners. Each consumer's dead-letter queue has an alarm, a runbook and a named team.
  5. Retention. Kinesis keeps 7 days; the data lake keeps everything as Iceberg tables; the ledger's outbox rows are deleted 30 days after publication.
  6. A replay never moves money again. Every consumer that changes financial state checks its processed-events table and the ledger's uniqueness rules, so a replayed PaymentMatched finds the existing posting request and does nothing. Replays are tested with that expectation (section 29).
  7. Beyond the archive and the stream. If a consumer is down longer than the EventBridge archive (30 days) or the Kinesis retention (7 days), it is rebuilt from the ledger: a reconciliation job compares its state with the ledger and produces the missing work, which then goes through the same idempotent paths.

19. Posting to the servicing core

The servicing core owns the loan. The platform's job is to tell it about each settled payment exactly once, in order, with the right effective date, at a rate it can bear, and to know for certain whether each posting happened.

19.1 The flow

Figure 21. Posting to the servicing core: in order per loan, and POSTED only on the core's own record.

19.2 The hard parts, solved

  • The core can take about 40 requests a second. A token bucket in ElastiCache for Valkey shared by every adapter task, set to 32 a second (80% of the limit). Measured core latency and errors feed a circuit breaker that halves the rate on errors and stops at three consecutive timeouts.
  • The core is closed from 10:00 p.m. to 1:30 a.m.. An AWS AppConfig flag core_posting_open, switched by EventBridge Scheduler at the window boundaries and checked before each request. Requests wait in the queue; nothing fails.
  • The posting API may time out after posting. The posting carries the CanPulse payment ID in the core's reference field, and AWS Database Migration Service streams the core's Db2 postings by change data capture over Direct Connect. A timeout never leads to a blind retry: section 19.3 defines how the platform proves the posting did or did not happen.
  • Order per loan. SQS FIFO keeps the order messages are sent in, not the order borrowers paid in, so the ledger sequences first. For each loan, the posting service releases a payment to the queue only when no earlier-captured payment for that loan is still waiting (not yet settled, in UNKNOWN_OUTCOME or blocked), and it takes a row lock on the loan's sequencing row while deciding, so two workers cannot release out of order. The queue's message group then keeps that order. An earlier payment that will not settle soon, such as a check still inside its return period, holds later ones for at most one business day (assumed); after that the later payment posts, and the core's effective-dated posting places each payment correctly in the loan's history (to confirm with the core owner)
  • One bad posting blocks its loan. After the retry limit, the request goes to a case and the loan is marked posting blocked in the ledger. Later payments for that loan wait in the ledger (not in the queue) until an analyst resolves the case, so order survives the failure.
  • Late fees by the wrong date. Module 03 found the core's late-fee job used the posting date. The adapter posts with the loan effective date from section 9.4 (the capture date for borrower-initiated payments), and the acceptance test checks that a payment captured at 11:58 p.m. Central on the due date and posted at 3:00 a.m. is not charged a fee.
  • Reversals. A reversal is a compensating posting that references the original, effective-dated to the original. The core recalculates delinquency; the platform publishes PaymentReversed for collections, bureaus and the trustee.
  • Payments for loans the core does not know. No posting; a case and suspense (OPS-14: three business days)
  • Money that is final on receipt (wires, instant payments). Settled at arrival, so it is posted as soon as it is identified, with the receipt time as the effective date; at night it waits in the queue like everything else.
  • Money that comes back later (ACH returns, chargebacks, returned checks). The same reversal path for every rail: a compensating posting effective-dated to the original, then PaymentReversed.
  • Refunds. An approved refund is posted to the loan as an adjustment before the money leaves, so the loan never shows a credit balance that has already been paid out.

19.3 Proving that a posting did or did not happen

The hardest moment in the whole platform is a timeout: the core may have posted the payment, or may not have. Retrying blindly can post twice; never retrying can lose the payment. The rules:

  1. A timeout makes the posting UNKNOWN_OUTCOME, and an unknown posting is never retried.

  2. POSTED needs the core's own transaction ID, from one of two sources: the CDC stream from the core's database, or the core's transaction inquiry by CanPulse payment reference. The ledger refuses POSTED without it (section 24.1).

  3. "Not posted" needs proof of absence, which is harder than proof of presence. Both of these must hold:

    • the core has stopped working on the request. The vendor documents a maximum processing time after which the core abandons a request (assumed: 60 seconds). Until the request's deadline (send time plus that maximum, plus a margin) has passed, the core may still commit it, so nothing can be proved;
    • CDC has provably read past the deadline. A heartbeat row, agreed with the core owner, is committed in the core's database every minute. Because the CDC stream delivers commits in the order of the database log (confirmed in the DMS task settings), receiving a heartbeat committed after the deadline proves that every earlier commit has already arrived. That heartbeat is the CDC watermark; a recent clock time is not;
    • neither source shows the posting: the core's inquiry finds no transaction with the payment's reference, and the CDC stream up to that heartbeat holds none.

    A missing CDC row before the watermark passes the deadline proves nothing. Only when all three hold may the request be sent again, with the same idempotency key.

  4. If the inquiry is unavailable and CDC is behind, the posting stays UNKNOWN_OUTCOME. After 30 minutes the posting owner is alerted. Later payments for the same loan wait, so order survives.

  5. If the core can refuse a duplicate reference itself, the vendor's idempotency is the strongest guard, and the platform uses it in addition to these rules. Whether the core can do this is a week-one question (section 37.1).

  6. Every day, reconciliation layer 4 compares every posting request with the core's postings. A core transaction carrying a CanPulse reference that no posting request claims, or two core transactions for one reference, opens a case at once: that is how a duplicate would be caught if every other guard failed.

Exactly-once delivery is not something any network gives. The platform achieves an effectively-once financial effect from three things together: idempotency, authoritative confirmation, and reconciliation.

A night that goes wrong, minute by minute

Jordan Ellis pays $412.50 through Provider A at 11:58 p.m. Central on the due date. The core is closed until 1:30 a.m., and at 3:00 a.m. the posting times out while CDC is running 12 minutes behind.

TimeWhat happensState afterwards
11:58 p.m.Provider A captures $412.50 and sends the webhook; the payment and its outbox row commit togetherPayment RECEIVED, captured_at 11:58 p.m.
11:58 p.m.PaymentReceived reaches the portal read modelJordan sees payment received
Next day, by settlementProvider A's settlement line matchesReconciliation MATCHED; posting request PENDING
3:00 a.m. (the core opened at 1:30)The adapter sends the posting with the loan effective date of the capture date; no answer within the timeoutPosting UNKNOWN_OUTCOME; no retry
3:01 a.m.The request's deadline passes (3:00 plus the 60-second maximum), but the latest heartbeat received through CDC was committed at 2:48 a.m., before the deadline, so a missing row proves nothingStill UNKNOWN_OUTCOME
3:05 a.m.The core's inquiry by reference finds transaction CORE-88123POSTED, confirmed by inquiry
3:14 a.m.CDC catches up and delivers CORE-88123Confirmation matches; nothing else happens
MorningReconciliation layer 4One payment, one core posting, on time by its capture time

19.4 Posting policy by rail

Policy PA-3 says post only after settlement, but settlement and finality mean different things on each rail. This table is the written policy the posting service enforces; every to confirm is a finance decision.

RailPostable when (PA-3)Final whenCan come back withinIf it comes back
ACH autopayThe entry is settled under section 20.6After the return windows: two banking days for most reasons, 60 calendar days for unauthorized onesThose windowsReturn: reversal posting, borrower notice
CardIts line in Provider A's settlement report is matchedAfter the chargeback window: up to 120 days (Provider A contract, section 9)That windowChargeback: reversal posting and a dispute case
Cash networkProvider B's settlement is allocatedAt settlementRarely: a correction rowA case; reversal only after review
CheckThe bank's deposit credit appears on the statement: PA-3 treats this as settlement for checks (to confirm with finance)When the bank's return period passes with no returned item (to confirm with the bank)That periodReturned item: reversal posting
WireOn receiptOn receiptOnly by the sender's requestHandled as a refund, with approval
InstantOn receiptOn receiptOnly by a return-of-funds requestDecided by a person, handled as a refund

19.5 What the posting service is not allowed to do

It cannot change an amount, choose a different loan, or post an unsettled payment. Those are financial decisions; they happen in the exception workflow with maker-checker approval (Module 07, Lesson 08).


20. ACH origination: building Nacha files

20.1 From autopay schedule to settled entry

Figure 22. From the autopay schedule to the settled entry.

20.2 Choosing the drafts

  • Which loans: Autopay enrolled, a payment due on the next banking day, no hold (bankruptcy, dispute, payoff in progress, deceased), and not already paid by another channel for this due date. (Servicing core by CDC; holds from the core and the cases)
  • Which date: The effective date is a banking day; weekends and Federal Reserve holidays move to the next banking day per the borrower's agreement. (Federal Reserve holiday calendar, loaded each year)
  • How much: The scheduled amount, or the borrower's chosen fixed amount, never more than the payoff amount. (Servicing core)
  • Which SEC code: PPD for autopay authorized in writing at loan origination; WEB for autopay authorized online. (The stored authorization record)
  • First use of an account: For WEB authorizations, the account is validated before the first debit; the method (prenote or an account-validation service) is agreed with the ODFI. (Nacha Operating Rules)
  • Uniqueness: UNIQUE (schedule ID, draft date, presentment) in the ledger: a re-run of the job cannot draft the same payment twice. (Section 24)

20.3 The Nacha file, record by record

A Nacha file is fixed-width text: every record is 94 characters, and the file is padded with records of nines to a multiple of 10 records. Here is a small fictional autopay file built and checked for this case. The routing numbers start with 99, which no real Federal Reserve district uses, so they cannot belong to a real bank.

text
101 999000014 1234567892612010500A094101PARTNER BANK           CANPULSE FINANCE               
5225CANPULSE FINANCE                    1234567890PPDAUTOPAY         261202   1999000010000001
6279990004544401883200719    0000041250PAY-AUTO-10482 JORDAN ELLIS            0999000010000001
62799900078400917735512      0000038900PAY-AUTO-20981 MARIA LOPEZ             0999000010000002
6279990004544401990321       0000052075PAY-AUTO-30117 SAMUEL OKAFOR           0999000010000003
822500000302997001680000001322250000000000001234567890                         999000010000001
9000001000001000000030299700168000000132225000000000000                                       
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
RecordStarts withWhat it carries in this sample
File header1Priority code 01, immediate destination 999000014 (the ODFI), immediate origin, file creation date 261201 (December 1, 2026) and time 0500, file ID modifier A (the first file of the day; B, C and so on for later files), record size 094, blocking factor 10, format code 1, bank and company names
Batch header5Service class 225 (debits only), company name, company ID 1234567890, SEC code PPD, entry description AUTOPAY, effective entry date 261202 (December 2, 2026), originator status 1, ODFI ID 99900001, batch 0000001
Entry detail6Transaction code 27 (debit to a checking account; 37 is savings, 28 and 38 are prenotes), RDFI routing number with its check digit, account number, amount in cents (0000041250 is $412.50), the loan's payment reference, borrower name, addenda indicator 0, trace number (ODFI ID plus a 7-digit sequence)
Batch control8Service class 225, 3 entries, entry hash 0299700168, total debits 000000132225 ($1,322.25), total credits zero, company ID, ODFI ID, batch number
File control91 batch, 1 block, 3 entries, the same entry hash and totals
Padding9999...Three records of nines: the seven real records plus three make 10 records (one block)

The entry hash is the sum of the 8-digit RDFI routing numbers in the batch (99900045 + 99900078 + 99900045 = 299700168), keeping only the rightmost 10 digits. The bank recomputes it; a wrong hash rejects the file. The independent validator recomputes it too, from the bytes, with different code than the builder.

20.4 Sending, and never sending twice

  • The file is registered (name, SHA-256, totals, file ID modifier) before it is sent, with status READY. Why: A crash after sending cannot lose the record that it was sent.
  • Sending sets SENT with the connector's transfer ID; the bank's acknowledgment sets ACKNOWLEDGED when its totals equal the registry's. Why: Proof the bank received exactly this file.
  • No acknowledgment by 5:15 p.m. pages the ACH program manager. The platform never resends a file on its own. Treasury calls the bank first. Why: Resending a file the bank already processed debits every borrower in it twice. That is the most expensive mistake in this system.
  • A second file the same day uses the next file ID modifier, and its entries cannot overlap the first (the ledger's uniqueness rules). Why: The bank treats two files with the same header details as a possible duplicate.
  • Totals outside the normal range (for example more than 130% of the same weekday's 8-week average) need a second person in treasury to release the file. Why: Dual control for unusual money movement.
  • An erroneous file or entry is corrected only by a reversing file within the Nacha time limit (five banking days after settlement), approved by treasury and compliance. Why: The Nacha Operating Rules allow reversals only for defined errors.

20.5 Same Day ACH

Same Day ACH is not used for regular autopay; it is used for two cases: a regular file that missed its cut-off because of an incident (with treasury approval), and borrower-requested catch-up drafts. The Federal Reserve's same-day submission deadlines are 10:30 a.m., 2:45 p.m. and 4:45 p.m. Eastern (9:30 a.m., 1:45 p.m. and 3:45 p.m. Central), the ODFI's are earlier, and each entry must be under the Nacha same-day limit of $1,000,000 per payment. Same-day entries carry an extra fee from the bank, so the platform reports their count and cost monthly.

20.6 When is one ACH entry settled?

A BAI2 statement proves that an amount arrived, not that each entry in it settled correctly. For one autopay entry, the platform records settlement only when all of these are true:

  1. The ODFI's acknowledgment accepted the file and its totals equal the registry's.
  2. The entry's settlement date has been reached.
  3. The BAI2 statement shows the file's settlement amount for that date, so the batch's cash arrived.
  4. No return for the entry's trace number has arrived.

The entry is then SETTLED and its payment may post. It stays subject to return: for most reasons for two banking days after settlement, and for unauthorized reasons for 60 calendar days. A return that arrives later reverses it (section 21.3). If the statement amount differs from the file's settlement total, no entry in that file is treated as settled until treasury explains the difference.

20.7 Authorizations have a lifecycle

An autopay authorization is a legal record, not just a stored account token.

  • Evidence: The signed form or the online consent record, under S3 Object Lock.
  • Type: SEC code (PPD for written, WEB for online) and the channel that captured it.
  • Terms: Amount rule (scheduled amount or a fixed amount), frequency, start date.
  • Validation: For WEB: how the account was validated before the first debit (prenote or an account-validation service)
  • Status: Active, suspended (after an administrative return), revoked (by the borrower, after R07 or R10, or when the loan is paid off)
  • History: Every change of account (including notifications of change), amount or status, with who and when.
  • Reinitiations: Each reinitiated entry, linked to the return that caused it.
  • Retention: Kept for two years after the authorization ends (Nacha Operating Rules)

The ledger enforces the parts that must never be skipped: a WEB authorization cannot exist without its validation method, a fixed amount must be stated when the rule is fixed, and a revocation must have a reason (section 24.1).


21. ACH returns and notifications of change

21.1 How they arrive

The bank delivers returns and notifications of change (NOCs) in Nacha format: each return is an entry with an addenda record (type 99) holding the return reason code and the original trace number; each NOC is a COR entry with an addenda record (type 98) holding the change code and the corrected data. They arrive in the return files at 4:00 a.m. and 2:00 p.m. (assumed) and go through the same file journey as every other file (section 17).

21.2 What the platform does with each code

CodeMeaningCategoryWhat the platform does
R01Insufficient fundsReturnedReverse the posting; notify the borrower; reinitiate per CanPulse policy (assumed: once, five banking days later, only if the borrower has not paid another way); a reinitiated entry carries the description RETRY PYMT, as the Nacha Rules require
R09Uncollected fundsReturnedSame as R01
R02Account closedAdministrativeReverse; suspend autopay; ask the borrower for a new account
R03No account, or unable to locateAdministrativeReverse; suspend autopay; ask the borrower
R04Invalid account numberAdministrativeReverse; suspend autopay; check whether a NOC was missed
R07Authorization revoked by the customerUnauthorizedReverse; end the authorization; never draft again without a new one
R08Payment stoppedReturnedReverse; suspend this draft; contact the borrower
R10Customer advises the originator is not known or the entry is not authorizedUnauthorizedReverse; end the authorization; open a compliance case with the authorization evidence
R11Entry not in accordance with the terms of the authorizationUnauthorizedReverse; open a compliance case: the amount or date may not match what the borrower agreed
R16Account frozenReturnedReverse; suspend autopay; contact the borrower
R20Non-transaction accountAdministrativeReverse; suspend autopay; ask for a checking or savings account that allows debits

Any other code: reverse, suspend that draft, open a case for treasury. Unknown codes are never ignored.

21.3 Returns after posting

Because CanPulse posts on settlement (PA-3) and returns can arrive days later, a return usually reverses a payment that is already posted. The sequence is always:

  1. Record the return (UNIQUE on the original trace number: one return per entry).
  2. Publish AchReturnReceived. The posting service sends a reversal posting effective-dated to the original payment.
  3. The core recalculates the loan; if it is now past due, the core's own rules decide fees from the effective dates.
  4. PaymentReversed goes to collections, the portal, the bureau file (the next Metro 2 cycle reflects the corrected state), and the trustee remittance (a trust loan's collection is reduced in the next remittance).
  5. The borrower is told, by email through Amazon SES and by text through AWS End User Messaging, using the borrower's chosen channel.

21.4 Notifications of change

  • C01 (Incorrect account number): Replace the token's account number.
  • C02 (Incorrect routing number): Replace the routing number.
  • C03 (Incorrect routing and account number): Replace both.
  • C05 (Incorrect transaction code): Switch checking and savings.
  • C06 (Incorrect account number and transaction code): Replace both.

The Nacha Operating Rules require the change within six banking days of receiving the NOC, or before the next entry, whichever is later. The platform applies it automatically when the next draft is inside that window and opens a case otherwise, and it records every change in the authorization's history.

21.5 Watching the return rates every day

  • Unauthorized returns (R05, R07, R10, R11, R29, R51): Nacha threshold 0.5%; CanPulse alerts at 0.25%.
  • Administrative returns (R02, R03, R04): Nacha threshold 3.0%; CanPulse alerts at 1.5%.
  • All returns: Nacha threshold 15.0%; CanPulse alerts at 8.0%.

The platform computes each rate every morning on a rolling basis from the ledger and alerts the ACH program manager at CanPulse's own thresholds, well before Nacha's. The ACH program manager reconciles the platform's numbers to the bank's monthly report, which uses Nacha's exact method.

Totals hide problems, so every rate is also broken down by SEC code, by channel that captured the authorization, by authorization cohort (the month it was signed) and by return reason. A rising unauthorized rate in one month's online authorizations, for example, points at a capture problem in the portal long before the company-wide rate crosses a threshold. The exact calculation method, including the period and which entries count, is agreed in writing with the ODFI and checked against the current Nacha Operating Rules before go-live.


22. Non-ACH payments: cards, cash, checks, wires, instant payments, third-party payers and refunds

About 45% of CanPulse's payments do not travel as ACH entries that CanPulse originates. Each of these rails settles differently, becomes final at a different moment and fails in its own way, so each one has its own adapter at the edge, its own proof of settlement and its own reconciliation rule. They all meet in the same canonical payment, which records two things separately: the channel (who told CanPulse about the payment) and the rail (how the money actually moved). A Provider A payment, for example, can travel on the card rail or on the ACH rail when the borrower pays once from a bank account; Provider A, not CanPulse, originates that ACH entry.

22.1 The non-ACH rails side by side

RailHow CanPulse hears about itProof of settlementFinal whenCan come back asPosted when
Debit cards and digital wallets (through Provider A)Real-time webhook at captureProvider A's daily card settlement report, and its net deposit on the BAI2 statementNot final: a chargeback is possible for up to 120 days after capture (Provider A contract, section 9)A chargeback; a refund CanPulse sendsOn settlement (PA-3)
Cash at retail locations (through Provider B)A row in Provider B's fileProvider B's settlement line, net of its feesWhen Provider B settlesA reversal row, rare (a retailer keying error)On settlement
Checks (lockbox)The lockbox file, with imagesThe lockbox deposit line on the BAI2 statementNot final: a check can be returned unpaidA returned itemOn deposit, reversed if returned
Wires (Fedwire)The bank's intraday reportThe same report: Fedwire funds are final on receiptOn receiptOnly by the sender's request, never automaticallyOn identification
Instant payments (RTP and FedNow credits)The bank's real-time notification through its APIThe notification itself: final and irrevocableOn receiptA return-of-funds request, which CanPulse may refuse or acceptOn identification, at any hour
Third-party payers (insurers, auction houses, dealers)A remittance file, an emailed advice document, a wire or a checkThe underlying wire, check or ACH creditAs for that railAs for that railAfter the remittance is matched to the loan and confirmed by an analyst
Outbound refundsCreated by CanPulseThe bank's paid-check report, the card refund confirmation, or the ACH settlementWhen cashed or settledA returned refund; an uncashed checkBefore the money leaves, the loan is adjusted with approval

22.2 Cards and digital wallets

The flow. The borrower pays in the portal, the app, by phone or with an agent, always on Provider A's hosted page, so card numbers never reach CanPulse. Wallet payments (Apple Pay, Google Pay) arrive as tokenized cards through the same page. Provider A authorizes and captures the payment and sends the webhook (section 16). The card networks settle with Provider A, and Provider A pays CanPulse one net amount a day.

Gross to net. Borrowers are credited the full amount they paid, but CanPulse receives less, because Provider A deducts its fees and any chargebacks. The daily card settlement report reconciles the difference, and the ledger refuses a report whose numbers do not add up (section 24.1). An illustrative day:

  • Gross card payments settled (8,200 payments): $3,485,000.00
  • Less processing fees (assumed): −$27,880.00
  • Less chargebacks debited today: −$2,180.00
  • Net deposit expected on the BAI2 statement: $3,454,940.00

Each of the 8,200 payments matches its line in the report (layer 2). The net amount matches the deposit on the statement (layer 3). The fees go to an expense account in the daily journal, and the chargebacks go to their dispute cases (layer 5). If the deposit differs from the report's net by even a cent, the day stays open with a case for treasury.

Chargebacks and disputes. A borrower can dispute a card payment with their card issuer. Provider A reports each dispute with its own dispute ID, a reason code and a response deadline (assumed: 7 calendar days before Provider A's own deadline with the network).

  • 1. Received: The chargeback is recorded once (UNIQUE on Provider A's dispute ID). The payment is reversed on the loan, effective-dated to the capture, as for an ACH return (section 21.3). A dispute case opens with the deadline.
  • 2. Evidence: An analyst assembles the evidence: the payment confirmation, the borrower's login and device record, the authorization, earlier undisputed payments. The AI summary (section 23.2) can draft the evidence list; the analyst decides and submits through Provider A's API.
  • 3. Outcome: Won: the payment is re-applied, effective-dated to the original capture, and the borrower is told. Lost or accepted: the reversal stands, and the case records why.
  • 4. Watch: Dispute counts and win rates by reason code feed the health board; a deadline within 48 hours with no evidence submitted pages the dispute owner.

Card refunds. A refund for a card payment goes back to the same card, through Provider A's refund API, never by check. It is limited to the original payment's amount and needs a second person's approval (section 22.8).

22.3 Cash at retail locations

Borrowers who pay in cash take a barcode from the portal or their statement to a retail location in Provider B's network, and the store accepts the cash. The barcode carries a payment code that maps to the loan, so the loan is identified without the borrower typing anything. The payment arrives in Provider B's next file (morning, midday or evening), and Provider B settles the day's cash payments as one net amount after its fees. That one settlement line pays for many payments, so it is reconciled with the aggregated allocation model from Module 10, Lesson 10: the allocations must add up to the settlement exactly, and every allocation carries approval.

Cash is effectively final once Provider B has it. A reversal row in a later file corrects a store's keying error and goes to a case, because it usually means the borrower holds a receipt for money that the store keyed wrongly.

22.4 Checks

Lockbox. The lockbox file lists each check: the batch, the item, the amount, the coupon's loan number if the borrower sent the coupon, and the image's file name. Check images go to their own S3 prefix under Object Lock. Items with a readable loan number become payments; items without one go to suspense with the image attached to the case, and an analyst identifies the borrower within the three business days of OPS-14. The lockbox deposit total must equal the BAI2 lockbox deposit line for that day.

Returned checks. A deposited check can be returned unpaid, for example for insufficient funds. The bank reports returned items in a daily file. Each return is matched to its lockbox item and recorded once (UNIQUE on the bank's return item ID), and then the steps of section 21.3 run: reverse the posting effective-dated to the payment, notify the borrower, and send the loan to collections if it is now past due. If the bank's agreement re-presents a returned check automatically once (assumed), the platform waits for that second attempt before telling the borrower.

22.5 Wires and payoffs

Wires arrive in the bank's intraday report. Since July 14, 2025 the Fedwire Funds Service has used ISO 20022 messages, so the payer's details arrive in structured fields rather than free text, and each wire carries Fedwire's own reference numbers (IMAD and OMAD), which the platform stores as the source reference. Most wires are payoffs, from borrowers, from dealers buying back a loan, or from insurers after a total loss.

A payoff is checked against the core's payoff quote, which is good only through a stated date and grows by a daily interest amount (the per diem). An illustrative case:

  • Quote issued November 20, 2026, good through November 30: Principal $14,250.00, interest to November 20 $38.40, per diem $3.84
  • Payoff due on November 24: $14,250.00 + $38.40 + (4 days × $3.84 = $15.36) = $14,303.76
  • Wire received November 24 for $14,320.00: Overpaid by $16.24: the loan is paid off, and a refund of $16.24 is created (section 22.8)
  • Wire received November 24 for $14,290.00: Short by $13.76: the loan stays open, a case opens, and the borrower is contacted. The platform never writes off a difference on its own

22.6 Instant payments: RTP and FedNow

RTP and FedNow move money between banks in seconds, 24 hours a day, every day of the year, and every payment is final and irrevocable. CanPulse joins both through its partner bank's real-time API rather than connecting to either network directly: the bank holds the network membership, and CanPulse receives notifications and sends requests through the bank. The networks use ISO 20022 messages: a credit transfer is a pacs.008, and a request for payment is a pain.013 answered by a pain.014.

Receiving. A borrower can push a payment from their own bank's app. The bank's notification enters through the same API edge as Provider A (API Gateway, mutual TLS, a signature check), and the payment is recorded and acknowledged like any other. Because it is final on receipt, it is matched to its loan and posted immediately, without waiting for a settlement file.

Request for payment. CanPulse can also ask the borrower to pay, which suits a payoff or a catch-up payment:

Figure 23. A request for payment over RTP or FedNow.

What changes because it never stops. An instant payment can arrive at 1:10 a.m. on a Sunday, while the core's nightly batch is still running, or on a holiday. The platform records it and keeps its receipt time for the on-time decision (R2), posts it when the core is open (section 19), and shows it in the portal at once. The services that receive instant payments run with the same availability target as the API (N4), and the on-call rota covers weekends.

When a borrower sends money by mistake. The network allows a request for the return of funds. CanPulse never returns an instant payment automatically: an analyst checks whether the money was applied to the loan, and a returned instant payment needs a second person's approval like any other refund.

Final is not the same as identified. An instant payment is final the moment it arrives, but it may carry no usable loan reference. Then it is recorded as received, its cash is booked to suspense (section 24.2), and it waits for identification under OPS-14 like any other unidentified money. Final at the bank, unidentified on the loan: the two are separate facts, and the payment model keeps them apart (section 23.1).

22.7 Third-party payers: insurers, auction houses and dealers

Some money for a loan comes from someone other than the borrower:

  • Auto insurer: A total-loss claim pays off the loan. Arrives as a check or a wire, with a remittance advice by email or a portal download.
  • GAP insurer: Pays the gap between the insurance payout and the balance. Arrives as a check, with an advice document.
  • Auction house: A repossessed car is sold. Arrives as a wire or an ACH credit, with a sale report file over SFTP.
  • Dealer: Buys back a loan, or refunds a cancelled add-on product. Arrives as a wire, a check or an ACH credit.

The remittance details (claim number, VIN, loan number, amount) often arrive only as a PDF attached to an email. CanPulse receives these emails with Amazon SES inbound email to a dedicated address, which stores each message in S3 under Object Lock and triggers a Lambda function. Amazon Textract extracts the claim number, the VIN, the amount and the payer from the document, and the platform proposes a match: the loan by VIN and borrower name, the money by amount and date. An analyst confirms every third-party remittance before it is applied, because extraction can misread a digit and these amounts are large. Extraction saves the typing; it does not make the decision. The confirmed remittance becomes a THIRD_PARTY payment on the rail of the money that actually arrived (wire, check or ACH).

Measuring the extraction. For every payer and document type, the platform records the Textract model version, the confidence of each extracted field, and the analyst's final values. Monthly, it reports how often the analyst changed an extracted value, by payer. That number decides whether a payer's documents need extra checks, and it is evidence for the auditors that the extraction is supervised.

22.8 Refunds: money going back out

Refunds happen after an overpaid payoff, when a borrower pays twice through two channels, after a dealer cancels an add-on product, and when a chargeback is lost after the borrower had already been refunded another way.

  • Card refund: The money came by card. Provider A's refund API, to the same card, at most the original amount. Proof: Provider A's refund confirmation and its next settlement report.
  • ACH credit: The borrower's account is on file. A credit entry in the next Nacha file (service class 220, transaction code 22 for checking or 32 for savings). Proof: ACH settlement; a return if the account is closed.
  • Check: No usable account or card. The bank's check payables service. Proof: the bank's paid-check report.

The refund lifecycle. A refund is approved once and executed once, even if the rail times out.

  • REQUESTED: Someone asks for a refund, with a reason. Next: VALIDATED or REJECTED.
  • VALIDATED: Checked: the money is really owed, the amount is right, the method fits (a card refund only to the original card, at most the original amount). Next: APPROVED or REJECTED.
  • APPROVED: A different person approved it; large refunds need a second approver in finance. Next: ISSUING.
  • ISSUING: The instruction is being sent to the rail with the refund's unique instruction key. Next: ISSUED, FAILED or UNKNOWN_OUTCOME.
  • ISSUED: The rail accepted it: Provider A's confirmation, the Nacha file acknowledgment, or the check printed and listed in positive pay. Next: SETTLED, RETURNED or, for checks, VOIDED or ESCHEATED.
  • SETTLED: The money reached the borrower: the card refund settled, the ACH credit settled, or the check was paid. Next: Final.
  • UNKNOWN_OUTCOME: The rail did not answer. Next: Checked with the rail by instruction key, never resent blindly.
  • FAILED, RETURNED, REJECTED, VOIDED, ESCHEATED: It did not reach the borrower, or the check went to the state. Next: A new refund needs a new request and approval.

The rules mirror postings: the same instruction key goes with every attempt, so Provider A can refuse a duplicate refund and the Nacha file builder cannot include the same refund twice; an unknown outcome is settled by asking the rail, not by sending again. The ledger refuses a refund approved by its requester, any state past VALIDATED without approval, a second instruction with the same key, and a check number used twice (section 24.1). Card, ACH and check refunds share this one lifecycle and one approval, and each rail adds its own controls: the card limit, the Nacha totals, positive pay.

Positive pay. Before a refund check is released, the platform sends the bank a positive pay file listing the check number, the amount and the payee. The bank pays only checks that match the file, so an altered or counterfeit check is refused. Check numbers are unique in the ledger, so the same number can never be issued twice.

Uncashed checks. A refund check that is never cashed is still the borrower's money. After the dormancy period of the borrower's state, it is reported and paid to that state under its unclaimed property law, and the refund's status becomes ESCHEATED. The compliance officer owns the yearly filing; the platform provides the list.

22.9 BAI2 statements: the ground truth for cash

The bank sends BAI2 files: a prior-day statement every morning and intraday reports during the day. BAI2 is a comma-delimited format with record codes: 01 (file header), 02 (group header), 03 (account and its summary totals), 16 (transaction detail), 88 (continuation), 49 (account trailer), 98 (group trailer) and 99 (file trailer). The trailers carry control totals and record counts, and the parser checks them before loading anything (section 17.2).

The statement confirms every rail's cash: the ACH settlement total for each effective date, Provider A's net card deposit, Provider B's net cash settlement, each lockbox deposit, each wire, each instant payment and each ACH credit a borrower pushed from their own bank.

22.10 ACH credits from borrowers' banks

Not every ACH payment is one CanPulse originates. A borrower paying from their own bank's bill pay sends an ACH credit, and its remittance data is often only the borrower's name and a free-text reference. The identification rules run in order: an exact loan number in the reference; the borrower's registered bank account; name and amount against the loans with a payment due in the next 10 days. Only the first rule matches automatically; the others propose a match for an analyst. Anything left goes to suspense.


23. Reconciliation: five layers, every day

Reconciliation is not one match. It is five questions, each with its own evidence, asked in order. A difference in a lower layer is investigated before the layers above it, because it explains them.

LayerQuestionLeft sideRight sideRule of equality
1. CompletenessDid every source record become exactly one payment?Records in each registered file and each API deliveryPayments by source referenceCounts and amounts per file and per channel per day
2. SettlementDid every payment settle?PaymentsSettlement lines (one-to-one) and allocations (aggregated, Module 10)Versioned matching rules; ambiguous candidates go to a case
3. CashDoes the cash agree with the bank?Settlement lines, ACH settlement totals, card and cash net deposits (gross minus fees and chargebacks), lockbox deposits, returned checks, wires, instant payments, credits, paid refund checksBAI2 prior-day statementTotals per account per value date (TP-07)
4. PostingDid every settled payment reach the loan exactly once?Settled paymentsCore postings seen by CDC or confirmed by inquiryOne core posting per payment and one payment per CanPulse reference, with the loan effective date from section 9.4
5. BooksDo the books agree?The platform ledger's daily totals by GL accountThe ERP's journal import confirmationTotals per GL account per day
Figure 24. Five layers of reconciliation, every day.

23.1 The status vocabularies (from Modules 06 and 07)

  • Payment processing: RECEIVED, NORMALIZED, REJECTED (Ledger, payment table)
  • Reconciliation: AWAITING_SETTLEMENT, MATCHED, UNMATCHED, AMBIGUOUS (Ledger, payment table)
  • Loan identification: IDENTIFIED, SUSPENSE (Ledger, payment table)
  • Exception case: OPEN, ASSIGNED, UNDER_INVESTIGATION, PENDING_APPROVAL, RESOLVED, CANCELLED (Cases database)
  • Posting: PENDING, SENT, POSTED, FAILED, UNKNOWN_OUTCOME, REVERSED (Ledger, posting request table)
  • ACH entry: SCHEDULED, IN_FILE, SENT, SETTLED, RETURNED, CANCELLED (Ledger, ACH entry table)
  • Chargeback: RECEIVED, EVIDENCE_SUBMITTED, WON, LOST, ACCEPTED (Ledger, chargeback table)
  • Refund: REQUESTED, VALIDATED, APPROVED, ISSUING, ISSUED, SETTLED, and REJECTED, FAILED, UNKNOWN_OUTCOME, RETURNED, VOIDED, ESCHEATED (Ledger, refund table)
  • Journal entry: No status: append-only, corrected only by reversing entries (Ledger, subledger tables)
  • File: RECEIVED, PARSING, LOADED, REJECTED, QUARANTINED (Ledger, file registry)

Settled is not a payment status: it is a fact proven by a settlement record or a BAI2 line, and proving it moves the payment to MATCHED (Module 07, Lesson 09).

23.2 AI, where it belongs

An analyst opening a case sees a summary of the evidence: the source records, the candidate settlements, the borrower's recent payments and any earlier cases. The summary is written by a model on Amazon Bedrock with Bedrock Guardrails (no account numbers in, none out, and every statement linked to a record ID). The model has read-only access to the case's evidence and no tools that change anything. It never matches, posts, reverses or adjusts money, which is the line the program draws from Module 05 onward.

23.3 How the lifecycles of one payment relate

There is no single linear status for a payment, because its parts move independently: a payment can be posted and later disputed, or final at the bank and still unidentified. Each lifecycle has its own field and its own rules, and this picture shows how they depend on each other.

Figure 25. How the lifecycles of one payment relate.

The rule that joins them: a posting request is created only when the payment is NORMALIZED, IDENTIFIED and MATCHED. For ACH autopay, MATCHED means its entry is settled under section 20.6. Disputes and refunds have their own lifecycles (sections 22.2 and 22.8) and refer to the payment; they never overwrite its states. A reversal is a new posting and a new journal entry, never a deletion.


24. The databases, and why there is more than one

StoreServiceHoldsWhy this store
Payments ledgerAmazon Aurora PostgreSQL (I/O-Optimized), Multi-AZ, Global Database to the recovery Region, reached through RDS ProxyPayments with their channel, rail and dates, file registry, ACH authorizations, entries and returns, card settlement reports, chargebacks, refunds, posting requests with their confirmations, the double-entry subledger, outbox, processed eventsThe invariants need unique constraints, foreign keys and transactions across tables (Modules 06, 07 and 10)
Cases and matchingA second Aurora PostgreSQL cluster in the reconciliation accountSettlements, matches, allocations, exception cases, approvals, audit eventsA separate team, a separate change rhythm; it receives payments by events, never by reading the ledger's tables
Search for analystsAmazon OpenSearch ServiceCases, payments and settlements indexed for fuzzy search by name, reference and amountAnalysts search by a partial reference or a misspelled name; that is not a relational query
Token vaultAmazon DynamoDB with ciphertext from the AWS Encryption SDK under a dedicated KMS keyBank account numbers, each behind a random tokenSatisfies the Nacha requirement to keep stored account numbers unreadable; only the file builder role can decrypt
Portal read modelAmazon DynamoDB global tableEach borrower's recent payments and their statusMillisecond reads for the portal and app, updated from events, in both Regions
Short-lived stateAmazon ElastiCache for ValkeyWebhook signatures seen in the last five minutes; the core's rate-limit token bucketFast, shared, and safe to lose: losing it fails closed (signatures refused, posting paused)
OriginalsAmazon S3 with Object Lock in compliance mode, versioning and replicationEvery file and every API body as received, every Nacha file sent, check imagesWrite once, keep seven years, prove it was never changed
The data lakeAmazon S3 with Apache Iceberg tables in the AWS Glue Data Catalog, governed by AWS Lake Formation, queried with Amazon AthenaEvery event and every daily snapshotHistory and analysis without loading operational databases
Finance martsAmazon Redshift ServerlessTrustee reports, return-rate history, month-end close viewsLarge joins and reports for finance on a schedule

Not chosen: Amazon QLDB. A ledger database sounds right for a payment ledger, but AWS ended support for QLDB on July 31, 2025. The immutability this design needs comes from S3 Object Lock for originals and from append-only audit tables with no update or delete permission for any application role.

24.1 The ledger's core tables

The constraints carry the invariants. This excerpt was run on PostgreSQL 18.7 (PGlite), and each rule was shown refusing a bad write: a renamed duplicate file; the same payment twice; a payment in suspense that names a loan; a second live posting; a posting marked POSTED without the core's transaction ID; a WEB authorization with no account validation; the same draft twice; a fourth presentment; a card settlement report whose net does not equal gross minus fees and chargebacks; the same dispute reported twice; a refund approved by its own requester; a refund issued without approval; a second refund with the same instruction key; a check number used twice; an unbalanced journal entry; changing or deleting a journal line or entry; and reversing the same entry twice. Balanced entries and a single reversal committed.

SQL
-- Payments ledger (Aurora PostgreSQL), core tables and the constraints that carry the invariants.
CREATE TABLE file_registry (
    file_id         BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    source          TEXT        NOT NULL,          -- PROVIDER_B, BANK_SETTLEMENT, BAI2, LOCKBOX, ACH_RETURN, ...
    source_file_name TEXT       NOT NULL,
    sha256          CHAR(64)    NOT NULL,
    s3_uri          TEXT        NOT NULL,          -- the original, under S3 Object Lock
    received_at     TIMESTAMPTZ NOT NULL,
    status          TEXT        NOT NULL CHECK (status IN ('RECEIVED','PARSING','LOADED','REJECTED','QUARANTINED')),
    record_count    INTEGER,
    control_total_minor BIGINT,
    UNIQUE (source, sha256)                        -- the same bytes twice are one file
);
CREATE TABLE payment (
    payment_id              BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    channel                 TEXT        NOT NULL CHECK (channel IN ('PROVIDER_A','PROVIDER_B','ACH_AUTOPAY','LOCKBOX','ACH_CREDIT_IN',
                                                            'WIRE','INSTANT','THIRD_PARTY')),     -- who told us
    rail                    TEXT        NOT NULL CHECK (rail IN ('ACH','CARD','CASH_NETWORK','CHECK','WIRE','INSTANT')),  -- how the money moved
    source_reference        TEXT        NOT NULL,  -- provider transaction ID, ACH trace number, lockbox item ID
    loan_account_id         TEXT,                  -- NULL only while in suspense
    identification_status   TEXT        NOT NULL CHECK (identification_status IN ('IDENTIFIED','SUSPENSE')),
    amount_minor_units      BIGINT      NOT NULL CHECK (amount_minor_units > 0),
    currency                CHAR(3)     NOT NULL CHECK (currency = 'USD'),
    captured_at             TIMESTAMPTZ NOT NULL,  -- when the borrower paid: the on-time rule (R2)
    received_at             TIMESTAMPTZ NOT NULL,  -- when CanPulse first heard of it
    settled_at              TIMESTAMPTZ,           -- when the rail's settlement evidence was confirmed
    loan_effective_date     DATE,                  -- set by servicing policy, sent to the core
    processing_status       TEXT        NOT NULL CHECK (processing_status IN ('RECEIVED','NORMALIZED','REJECTED')),
    reconciliation_status   TEXT        NOT NULL DEFAULT 'AWAITING_SETTLEMENT'
                            CHECK (reconciliation_status IN ('AWAITING_SETTLEMENT','MATCHED','UNMATCHED','AMBIGUOUS')),
    payload_sha256          CHAR(64)    NOT NULL,
    source_file_id          BIGINT REFERENCES file_registry(file_id),
    UNIQUE (channel, source_reference),            -- one payment per source transaction, enforced here
    CHECK ((identification_status = 'IDENTIFIED') = (loan_account_id IS NOT NULL))
);
CREATE TABLE posting_request (
    posting_id      BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    payment_id      BIGINT NOT NULL REFERENCES payment(payment_id),
    idempotency_key TEXT   NOT NULL UNIQUE,        -- sent to the servicing core with every attempt
    status          TEXT   NOT NULL CHECK (status IN ('PENDING','SENT','POSTED','FAILED','UNKNOWN_OUTCOME','REVERSED')),
    attempts        INTEGER NOT NULL DEFAULT 0,
    last_sent_at    TIMESTAMPTZ,
    core_transaction_id TEXT UNIQUE,               -- the core's own ID: one core transaction confirms one posting
    confirmed_by    TEXT CHECK (confirmed_by IN ('CDC','CORE_INQUIRY')),
    CHECK ((status = 'POSTED') = (core_transaction_id IS NOT NULL AND confirmed_by IS NOT NULL) OR status = 'REVERSED')
);
CREATE UNIQUE INDEX one_live_posting_per_payment ON posting_request (payment_id) WHERE status <> 'REVERSED';
CREATE TABLE outbox_event (
    event_id       UUID        PRIMARY KEY,
    aggregate_type TEXT        NOT NULL,
    aggregate_id   BIGINT      NOT NULL,
    event_type     TEXT        NOT NULL,
    event_version  INTEGER     NOT NULL,
    payload        JSONB       NOT NULL,
    created_at     TIMESTAMPTZ NOT NULL DEFAULT now(),
    published_at   TIMESTAMPTZ
);
CREATE INDEX outbox_pending ON outbox_event (created_at) WHERE published_at IS NULL;
CREATE TABLE ach_authorization (
    authorization_id   BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    loan_account_id    TEXT    NOT NULL,
    sec_code           CHAR(3) NOT NULL CHECK (sec_code IN ('PPD','WEB','TEL')),
    account_token      TEXT    NOT NULL,
    amount_rule        TEXT    NOT NULL CHECK (amount_rule IN ('SCHEDULED_AMOUNT','FIXED_AMOUNT')),
    fixed_amount_minor BIGINT  CHECK (fixed_amount_minor > 0),
    frequency          TEXT    NOT NULL CHECK (frequency IN ('MONTHLY','BIWEEKLY')),
    evidence_uri       TEXT    NOT NULL,           -- the signed form or the online consent record, under Object Lock
    validated_by       TEXT    CHECK (validated_by IN ('PRENOTE','ACCOUNT_VALIDATION_SERVICE','NOT_REQUIRED')),
    effective_from     DATE    NOT NULL,
    revoked_at         TIMESTAMPTZ,
    revoked_reason     TEXT,                       -- borrower request, R07, R10, loan paid off
    retain_until       DATE,                       -- two years after it ends (Nacha Operating Rules)
    CHECK ((amount_rule = 'FIXED_AMOUNT') = (fixed_amount_minor IS NOT NULL)),
    CHECK (sec_code <> 'WEB' OR validated_by IN ('PRENOTE','ACCOUNT_VALIDATION_SERVICE')),
    CHECK ((revoked_at IS NULL) = (revoked_reason IS NULL))
);
CREATE TABLE ach_entry (
    ach_entry_id        BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    loan_account_id     TEXT    NOT NULL,
    schedule_id         BIGINT  NOT NULL,
    draft_date          DATE    NOT NULL,
    presentment         SMALLINT NOT NULL DEFAULT 1 CHECK (presentment BETWEEN 1 AND 3),   -- original + 2 reinitiations
    sec_code            CHAR(3) NOT NULL CHECK (sec_code IN ('PPD','WEB','TEL')),
    transaction_code    CHAR(2) NOT NULL CHECK (transaction_code IN ('27','37','28','38')),
    amount_minor_units  BIGINT  NOT NULL CHECK (amount_minor_units >= 0),
    account_token       TEXT    NOT NULL,          -- the account number itself is never stored readable here
    trace_number        CHAR(15) UNIQUE,
    ach_file_id         BIGINT,
    status              TEXT NOT NULL CHECK (status IN ('SCHEDULED','IN_FILE','SENT','SETTLED','RETURNED','CANCELLED')),
    UNIQUE (schedule_id, draft_date, presentment)  -- one draft per schedule, date and presentment
);
CREATE TABLE ach_return (
    ach_return_id   BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    original_trace  CHAR(15) NOT NULL REFERENCES ach_entry(trace_number),
    return_code     CHAR(3)  NOT NULL CHECK (return_code ~ '^R[0-9]{2}$'),
    received_file_id BIGINT  NOT NULL REFERENCES file_registry(file_id),
    UNIQUE (original_trace)                        -- one return per entry
);
 
-- Card settlement: Provider A pays CanPulse the net of fees and chargebacks; the report must add up.
CREATE TABLE card_settlement_report (
    report_id          BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    report_date        DATE    NOT NULL UNIQUE,
    gross_minor        BIGINT  NOT NULL CHECK (gross_minor >= 0),
    fees_minor         BIGINT  NOT NULL CHECK (fees_minor >= 0),
    chargebacks_minor  BIGINT  NOT NULL CHECK (chargebacks_minor >= 0),
    net_minor          BIGINT  NOT NULL,
    file_id            BIGINT  NOT NULL REFERENCES file_registry(file_id),
    CHECK (net_minor = gross_minor - fees_minor - chargebacks_minor)
);
CREATE TABLE chargeback (
    chargeback_id       BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    provider_dispute_id TEXT   NOT NULL UNIQUE,      -- one chargeback per dispute, however often it is reported
    payment_id          BIGINT NOT NULL REFERENCES payment(payment_id),
    amount_minor_units  BIGINT NOT NULL CHECK (amount_minor_units > 0),
    reason_code         TEXT   NOT NULL,
    respond_by          DATE   NOT NULL,
    status              TEXT   NOT NULL CHECK (status IN ('RECEIVED','EVIDENCE_SUBMITTED','WON','LOST','ACCEPTED'))
);
-- Money going back out: refunds need a second person, and a check number is used once.
CREATE TABLE refund (
    refund_id          BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    payment_id         BIGINT REFERENCES payment(payment_id),
    loan_account_id    TEXT   NOT NULL,
    amount_minor_units BIGINT NOT NULL CHECK (amount_minor_units > 0),
    method             TEXT   NOT NULL CHECK (method IN ('CARD_REFUND','CHECK','ACH_CREDIT')),
    instruction_key    TEXT   NOT NULL UNIQUE,     -- sent with every attempt on the rail: one refund, one instruction
    requested_by       TEXT   NOT NULL,
    approved_by        TEXT,
    check_number       TEXT   UNIQUE,
    status             TEXT   NOT NULL CHECK (status IN ('REQUESTED','VALIDATED','APPROVED','ISSUING','ISSUED','SETTLED',
                                                         'REJECTED','FAILED','UNKNOWN_OUTCOME','RETURNED','VOIDED','ESCHEATED')),
    CHECK (approved_by IS NULL OR approved_by <> requested_by),
    CHECK (status IN ('REQUESTED','VALIDATED','REJECTED') OR approved_by IS NOT NULL),
    CHECK (method <> 'CHECK' OR status IN ('REQUESTED','VALIDATED','APPROVED','REJECTED') OR check_number IS NOT NULL)
);
 
-- The financial subledger: double entry, balanced at commit, never changed after it is written.
CREATE TABLE ledger_account (
    account_code TEXT PRIMARY KEY,
    name         TEXT NOT NULL,
    kind         TEXT NOT NULL CHECK (kind IN ('ASSET','LIABILITY','EXPENSE','INCOME'))
);
CREATE TABLE journal_entry (
    entry_id          BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    accounting_date   DATE   NOT NULL,             -- set by finance policy, not by the payment's capture time
    source_type       TEXT   NOT NULL,             -- PAYMENT, SETTLEMENT, POSTING, RETURN, CHARGEBACK, REFUND, ...
    source_id         BIGINT NOT NULL,
    description       TEXT   NOT NULL,
    reverses_entry_id BIGINT UNIQUE REFERENCES journal_entry(entry_id),   -- an entry is reversed at most once
    created_at        TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE TABLE journal_line (
    entry_id     BIGINT NOT NULL REFERENCES journal_entry(entry_id),
    line_no      SMALLINT NOT NULL,
    account_code TEXT   NOT NULL REFERENCES ledger_account(account_code),
    debit_minor  BIGINT NOT NULL DEFAULT 0 CHECK (debit_minor >= 0),
    credit_minor BIGINT NOT NULL DEFAULT 0 CHECK (credit_minor >= 0),
    PRIMARY KEY (entry_id, line_no),
    CHECK ((debit_minor > 0) <> (credit_minor > 0))       -- each line is a debit or a credit, never both or neither
);
CREATE FUNCTION check_entry_balanced() RETURNS trigger LANGUAGE plpgsql AS $$
DECLARE d BIGINT; c BIGINT;
BEGIN
    SELECT COALESCE(SUM(debit_minor),0), COALESCE(SUM(credit_minor),0) INTO d, c
      FROM journal_line WHERE entry_id = NEW.entry_id;
    IF d <> c OR d = 0 THEN
        RAISE EXCEPTION 'journal entry % is not balanced: debits % cents, credits % cents', NEW.entry_id, d, c;
    END IF;
    RETURN NULL;
END $$;
CREATE CONSTRAINT TRIGGER entry_balanced AFTER INSERT ON journal_line
    DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION check_entry_balanced();
CREATE FUNCTION refuse_change() RETURNS trigger LANGUAGE plpgsql AS $$
BEGIN
    RAISE EXCEPTION 'journal is append-only: correct it with a reversing entry';
END $$;
CREATE TRIGGER journal_entry_immutable BEFORE UPDATE OR DELETE ON journal_entry FOR EACH ROW EXECUTE FUNCTION refuse_change();
CREATE TRIGGER journal_line_immutable  BEFORE UPDATE OR DELETE ON journal_line  FOR EACH ROW EXECUTE FUNCTION refuse_change();

24.2 The financial subledger

Statuses say where a payment is; they do not say where the money is. The platform keeps a double-entry subledger in the same Aurora ledger: every financial fact is a journal entry whose debits equal its credits, entries are never changed or deleted, and a mistake is corrected by a reversing entry. The general ledger receives the subledger's daily totals by account (reconciliation layer 5), and the clearing accounts prove that every payment received was applied, refunded or is still explained.

The accounts (illustrative; finance owns the real chart of accounts):

CodeAccountKindHolds
1000Cash at the partner bankAssetMoney in CanPulse's collection accounts
1100Card processor receivable, Provider AAssetCard payments settled but not yet deposited
1110Cash network receivable, Provider BAssetCash payments settled but not yet deposited
1120ACH settlement receivableAssetAutopay entries settled but not yet seen on the statement
1200Chargebacks under disputeAssetAmounts Provider A deducted while a dispute is open
1300Loans receivable controlAssetMirrors the servicing core's balances; the GL owns it
2100Unapplied payments clearingLiabilityMoney received and not yet applied to a loan
2150Suspense: unidentified receiptsLiabilityMoney with no loan identified yet (OPS-14)
2300Refunds payableLiabilityApproved refunds not yet paid out
2400Trust collections payable, one per trustLiabilityCollections owed to a securitization trust until remitted
6100Payment processing feesExpenseProvider A and Provider B fees
6200Chargeback lossesExpenseDisputes lost

Four journeys through the journal (amounts from this case):

A $500.00 card payment with a $5.00 fee:

StepDebitCredit
Provider A's report shows it settled1100 Card processor receivable $500.002100 Unapplied payments clearing $500.00
The net deposit arrives1000 Cash $495.00; 6100 Processing fees $5.001100 Card processor receivable $500.00
The core confirms the posting2100 Unapplied payments clearing $500.001300 Loans receivable control $500.00

The borrower is credited $500.00 and the bank shows $495.00: two different facts, both in the journal.

Jordan Ellis's $412.50 autopay, returned R01 after posting:

StepDebitCredit
Settlement date1120 ACH settlement receivable $412.502100 Unapplied payments clearing $412.50
The statement shows the file's settlement1000 Cash $412.501120 ACH settlement receivable $412.50
The core confirms the posting2100 Unapplied payments clearing $412.501300 Loans receivable control $412.50
The return debits CanPulse's account2100 Unapplied payments clearing $412.501000 Cash $412.50
The core confirms the reversal posting1300 Loans receivable control $412.502100 Unapplied payments clearing $412.50

Every account ends where it started: the money came and went, and the journal shows both.

The overpaid payoff from section 22.5:

StepDebitCredit
The $14,320.00 wire arrives1000 Cash $14,320.002100 Unapplied payments clearing $14,320.00
The core confirms the payoff2100 Unapplied payments clearing $14,320.001300 Loans receivable control $14,303.76; 2300 Refunds payable $16.24
The refund check is paid2300 Refunds payable $16.241000 Cash $16.24

An instant payment with no usable reference: on arrival, debit 1000 Cash and credit 2150 Suspense; when an analyst identifies the loan, debit 2150 Suspense and credit 2100 Unapplied payments clearing; then it follows the normal path.

Trust loans. For loans in a securitization trust, collections belong to the trust. The posting also records the amount owed to that trust in its own 2400 account, the daily remittance clears it, and a reversal reduces it. How securitized loans appear on CanPulse's own balance sheet depends on the deal's structure and is finance's decision; the subledger keeps each trust's collections separate so that any treatment can be reported.

What the database enforces (tested on PostgreSQL 18.7, section 24.1): an entry whose debits differ from its credits is refused at commit; every line is either a debit or a credit; journal entries and lines cannot be updated or deleted; and an entry can be reversed only once.


25. Internal file movement

Files move between CanPulse's own systems as much as between companies. Every move follows the same rule: the file is registered with its checksum where it starts, and verified against that checksum where it lands. A file that arrives with a different checksum is quarantined, not loaded.

FromToHowSchedule
Servicing core end-of-day extracts on the NFS shareIntegration account S3AWS DataSync agent in the Dallas data center, over Direct Connect, with integrity verification on2:00 a.m., after the core's batch
Edge landing bucketPayments coreCopy by a payments core role, allowed by the edge bucket policy and the KMS key policyOn each scan-clean event
Payments coreEdge outbound bucketCopy by a payments core role into a prefix only it may writeEach Nacha file
Edge outbound bucketPartner bankTransfer Family SFTP connectorBefore each cut-off
Payments ledger daily totalsERPJournal file built in the integration account, sent by SFTP connector, confirmed by the ERP's API9:00 p.m.
Data platformCredit bureausMetro 2 file built by an AWS Glue job from Iceberg tables and the core's month-end state, sent by SFTP connectorMonthly
Data platformTrusteeServicer report from Redshift, sent by SFTP connectorMonthly
Payments coreCollectionsDaily delinquency and reversal file6:00 a.m.
Payments corePartner bankPositive pay file for refund checks, by SFTP connector or the bank's API3:00 p.m., before checks are released
SES inbound (edge)Reconciliation accountRemittance emails and attachments, stored under Object Lock, copied by a reconciliation roleOn arrival
Data platformComplianceYearly unclaimed property list of uncashed refund checks by stateYearly
Every accountLog archiveCloudTrail, VPC Flow Logs, Transfer Family and Network Firewall logsContinuous

26. Downstream: who learns what, and when

SystemWhat it receivesHowCorrectness check
Servicing coreEach settled payment and each reversalPosting API, ordered per loan (section 19)CDC confirmation per posting (layer 4)
General ledgerDaily journal by GL account: cash received by channel, suspense movements, reversals, trust remittancesJournal file and API confirmationDaily totals tie (layer 5)
CollectionsDelinquent loans after reversals, autopay suspensionsDaily file and PaymentReversed eventsCount of reversed payments equals entries in the file
BorrowersPayment received, posted, returned, autopay suspendedSES email and End User Messaging text, from eventsEvery notice records its event ID; no notice twice
Portal and appPayment statusDynamoDB read model from eventsLag under one minute (F10)
Credit bureausMonthly account status, including the effect of reversalsMetro 2 fileThe file's account totals equal the core's month-end state
Securitization trusteeDaily remittance of collections on trust loans; monthly servicer reportRemittance instruction to treasury, report fileRemittance equals trust loans' settled payments minus reversals, to the cent
Data platformEvery event and daily snapshotsKinesis to Amazon Data Firehose into Iceberg tablesEvent counts per day equal the outbox counts
Partner bankPositive pay file; check refund instructionsSFTP connector or the bank's APIAcknowledged before release; paid checks match the file
Provider ACard refunds; dispute evidenceProvider A's APIsRefund confirmations equal approved card refunds; every dispute answered before its deadline
StatesUncashed refund checks after the dormancy periodThe compliance officer's yearly filingEvery ESCHEATED refund appears in exactly one filing

27. Security

27.1 Identity and access

  • People: IAM Identity Center with the company identity provider and MFA; permission sets per role. Limits: No standing production write access; production changes go through pipelines. A break-glass role exists, alarmed on every use.
  • Services: One IAM role per service (ECS task roles, Lambda roles). Limits: Permission boundaries in each workload account; no wildcard actions on data stores.
  • Partners: mTLS certificate plus HMAC secret (API); SSH key per Transfer Family user, confined to its S3 prefix. Limits: Each partner sees only its own prefix and its own API path.
  • Analysts: The ops UI behind AWS Verified Access. Limits: Read cases; propose resolutions; never approve their own (maker-checker in the backend, Module 07)

27.2 Encryption keys (AWS KMS, customer managed)

  • Ledger key: protects the Aurora ledger, its snapshots and Global Database copy. Decrypt: The ledger's services and AWS Backup.
  • Token vault key: protects bank account numbers. Decrypt: The ACH file builder role and the NOC update role only; denied to everyone else by key policy and SCP.
  • Partner file keys (one per partner): protects that partner's landing, quarantine and original prefixes. Decrypt: The edge workflow and the payments core ingest role.
  • Lake key: protects the data lake. Decrypt: Lake Formation-governed roles.
  • Log key: protects the log archive. Decrypt: Security tooling, read only.

Keys are multi-Region where the data replicates, so the recovery Region can decrypt. Scheduling a key for deletion is denied by SCP; disabling a key raises an alarm.

27.3 Segregation of duties

  • Release a Nacha file outside the normal range: A second person in treasury.
  • Approve a financial adjustment or an aggregated allocation: A second person in finance (Module 10's approval table refuses self-approval)
  • Change a matching rule: A pull request, a test run on last month's data, and finance's approval; the rule version is stored on every match.
  • Replay events or files: A ticket, a time range, and an approver.
  • Read a bank account number: Nobody, as a person. Only the file builder role, and its use is logged.

27.4 Detection and evidence

GuardDuty (including Malware Protection for S3 and RDS protection), Security Hub with the AWS Foundational Security Best Practices and PCI DSS standards, AWS Config with conformance packs, Amazon Inspector for container images and Lambda functions, Amazon Macie on the landing and lake buckets to find unexpected personal data, IAM Access Analyzer for anything shared outside an account, CloudTrail data events on the original-file buckets and on KMS, and AWS Audit Manager collecting evidence for the auditors.

27.5 The token vault, in detail

Encryption protects data; tokenization also keeps it out of everything that does not need it. The vault does both:

  • Tokens: Random values with no mathematical link to the account number, so a token cannot be reversed without the vault.
  • Encryption: Envelope encryption: each account number encrypted with a data key from the AWS Encryption SDK under the vault's KMS key.
  • Lookup without decryption: An HMAC of the routing and account number, with a separate key, lets the platform ask is this account already on file? (for a new authorization or a notification of change) without decrypting anything.
  • Separate permissions: Creating tokens (encrypt) and computing lookups is allowed to the authorization service; reading account numbers (decrypt) only to the ACH file builder and the NOC update role; nobody holds both decrypt and administrative rights.
  • Rotation: The KMS key rotates yearly; a re-encryption job re-wraps stored data keys after a suspected compromise, without changing tokens.
  • Audit: Every decrypt is a CloudTrail event on the vault key, compared daily with the number of Nacha entries built.
  • Break glass: A time-limited role, approved by two people, alarmed on use.
  • Leak tests: The pipeline scans logs, traces, events and the data lake for anything shaped like an account number, and fails the build if a test account number appears outside the vault.

28. Proving it with working software: the lab

A design is a claim. Before anyone builds the platform, the FDE proved the riskiest parts with working software that runs on a laptop: the ledger, the posting protocol, reconciliation and ACH, against mocks that misbehave on purpose. Everything below is real output; nothing is pasted in by hand.

28.1 What the lab contains

PartWhat it doesSection
The ledgerThe schema in PostgreSQL (PGlite, a real PostgreSQL compiled to WebAssembly). The financial rules are constraints and triggers: balanced journal entries checked at commit, an append-only journal, one reversal per entry, allocations that must add up, and no POSTED without the core's transaction22
The payment APIProvider A's webhooks: signature, five-minute window, replay refusal, field checks; 202 for new, 200 for an exact repeat, 409 for a conflict14
File intakeThe registry (SHA-256, so a renamed copy is a duplicate) and loaders for Provider B, card settlement, disputes, ACH returns and bank settlements; trailer totals must tie or nothing loads15, 19.1
ReconciliationOne-to-one matching, allocation of aggregated settlements, and cash against the BAI2 statement21, 20.2
The posting servicePer-loan order, the hold limit, the rate limit, the nightly window, no retry after a timeout, proof of presence and of absence, reversals17
ACH originationAuthorizations, the daily Nacha file, sending behind three fences, entry-level settlement, returns after posting, return rates18, 19
An independent Nacha validatorShares no code with the file builder, so it can catch a builder bug18.3
The token vaultEncryption, a lookup that needs no decryption, and one role allowed to decrypt25.5
Refunds and fencingOne instruction key per refund; the origination lease with a fencing token and the organization-level deny20.8, 30.3
MocksA servicing core (40 requests a second, closed at night, up to 60 seconds to commit, an inquiry, a CDC stream with heartbeats, slow or lost requests on demand), a partner bank (one active SFTP credential, duplicate detection, returns, BAI2) and Provider A1.2, 17

Time is simulated, so a 60-second commit or a 12-minute CDC delay takes milliseconds, and the output is the same on every run.

28.2 What the scenarios prove

  • 1. The night of November 2: The old script posts twice. The protocol never resends on a timeout: the inquiry proves the late commit and the payment posts once. When a request is really lost, absence is proved only after the deadline and a later CDC heartbeat; with CDC 12 minutes behind, the proof simply arrives later.
  • 2. A Provider B file: The trailer ties, the repeat is one payment, the unknown code waits in suspense, the same bytes under a new name load nothing, a short allocation is refused, the cash ties to the deposit, and every clearing account ends at zero.
  • 3. A card day: Real HTTP calls: 202, 200 for a repeat, 409, 401 for a bad signature or a stale timestamp, 400 for three decimals. The deposit is $25.00 short until the dispute report explains it.
  • 4. The ACH cycle: The daily file is byte for byte the sample in section 20.3 and passes the independent validator; a second send is refused; an R01 return reverses the posting; return rates are 0.41%, 0.35% and 1.75%.
  • 5. Per-loan order: A later card payment settles first, but the core receives the loan's payments in capture order.
  • 6. A refund that times out: One refund at Provider A, after one call; nothing is sent again while the outcome is unknown.
  • 7. A Region fails and keeps running: The stale Region's own ledger says it holds the lease, but the organization-level deny and the bank's single credential refuse it; the recovery Region sends the missing file once.
  • 8. Instant payments on a Sunday: A payment at 1:10 a.m. waits while the core is closed and posts at 1:30 a.m.; a payment at 2:00 a.m. posts at once; an unidentified one waits in suspense.

37 automated tests pass: the eight tests the working slice must pass (a renamed file is a duplicate; a repeated row is one payment; a timeout and a late commit give one posting; one loan posts in capture order; an unknown code waits in suspense; nothing posts before settlement; a short allocation is refused; every journal entry balances and cannot be changed), the webhook contract, the Nacha builder against the validator, the ledger's invariants, and every scenario end to end.

28.3 The real output, for the night of November 2

text
Part A. The old posting script, which resends after a timeout
03:14:37  legacy script attempt 1: TIMEOUT
03:14:37  legacy script attempt 2: OK (CORE-77401)
          core transaction CORE-77401 for PAY-A-883210, committed 03:14:37.512
          core transaction CORE-77400 for PAY-A-883210, committed 03:14:52.604
          result: 2 postings of $389.00 for one payment
 
Part B. The same night with the posting protocol (CDC lag 60 s, heartbeat every minute)
23:58:00  Provider A webhook: PAY-A-883210 $389.00 for LN-30117 recorded, captured 11:58 p.m. on the due date
02:30:00  card settlement line matched: payment MATCHED, eligible to post
03:14:07  RELEASE  payment 1 (LN-30117, captured 23:58:00) as CP-1
03:14:37  TIMEOUT  CP-1 after 30 s: UNKNOWN_OUTCOME, no retry
03:14:40  UNKNOWN  CP-1: inquiry found nothing, but the core may still commit until 03:15:37; proves nothing
03:15:20  POSTED   CP-1 confirmed by the core inquiry: CORE-77400, committed 03:14:52.604
03:15:55  CDC delivers the same commit at its 60-second lag; it agrees with the inquiry, so nothing changes
          result: 1 core posting for one payment; layer 4 finds 0 problems
 
Part C. A request the core really lost: proving absence before resending
03:20:00  RELEASE  payment 1 (LN-20981, captured 23:00:00) as CP-1
03:20:30  TIMEOUT  CP-1 after 30 s: UNKNOWN_OUTCOME, no retry
03:21:00  UNKNOWN  CP-1: inquiry found nothing, but the core may still commit until 03:21:30; proves nothing
03:22:10  UNKNOWN  CP-1: past the deadline, but the latest CDC heartbeat (03:21:00) is not after 03:21:30; proves nothing
03:23:05  ABSENT   CP-1: deadline 03:21:30 passed, heartbeat 03:22:00 received, no posting anywhere: resend with the same key
03:23:05  SENT     CP-1 $389.00 to LN-20981: core answered OK; waiting for the core's own record
03:24:30  POSTED   CP-1 confirmed by CDC: CORE-77400, committed 03:23:05.400
          result: 1 core posting, resent once with the same key after absence was proved
 
Part D. The same lost request with CDC 12 minutes behind
03:20:00  RELEASE  payment 1 (LN-20981, captured 23:00:00) as CP-1
03:20:30  TIMEOUT  CP-1 after 30 s: UNKNOWN_OUTCOME, no retry
03:22:10  UNKNOWN  CP-1: past the deadline, but the latest CDC heartbeat (03:10:00) is not after 03:21:30; proves nothing
03:33:30  UNKNOWN  CP-1: past the deadline, but the latest CDC heartbeat (03:21:00) is not after 03:21:30; proves nothing
03:34:05  ABSENT   CP-1: deadline 03:21:30 passed, heartbeat 03:22:00 received, no posting anywhere: resend with the same key
03:34:05  SENT     CP-1 $389.00 to LN-20981: core answered OK; waiting for the core's own record
03:46:30  POSTED   CP-1 confirmed by CDC: CORE-77400, committed 03:34:05.400
          result: 1 core posting; a slow stream delays the proof of absence, it never weakens it

28.4 What the lab simplifies

  • Aurora PostgreSQL: PGlite, the same kind of PostgreSQL with the same constraints, triggers and transactions.
  • API Gateway, Lambda and ElastiCache: A Node.js HTTP server and an in-memory replay cache.
  • Transfer Family, S3 and Step Functions: Files passed in as text and registered by SHA-256.
  • SQS FIFO and the posting workers: One in-process queue, released per loan in capture order.
  • CDC with AWS DMS: The mock core's change stream, in commit order, with a heartbeat every minute.
  • KMS for the token vault: Node's crypto module with in-memory keys.
  • The us-west-2 replica: A copy of the database taken at the moment of failure.

To confirm with CanPulse: the webhook's payment-method field name, the bank's BAI2 type codes, and the time zone rules (the lab uses a fixed UTC-6 because every scenario falls in November or December).


Stage 5. Deploy: can it run safely every day?

29. Delivery: environments, pipelines and tests

  • Infrastructure as code: Terraform, one state per account and environment, locked and encrypted (Module 08)
  • Pipelines: Build once, scan, push the image digest to ECR, deploy the same digest to staging and then production after approval.
  • Contract tests: Generated from the OpenAPI file and the event schemas (Module 06)
  • Nacha tests: Golden files for every batch shape; the independent validator runs in the pipeline on every builder change.
  • A bank in a box: A simulated ODFI in non-production: an SFTP server that acknowledges files and returns entries with chosen R-codes and NOCs on a schedule.
  • Load tests: Normal, peak and burst, with the integrity query (Module 08)
  • Resilience tests: AWS Fault Injection Service experiments (section 32.1), including the first-of-month failover drill with ACH fencing.
  • Financial invariant tests: Every journal entry balances; clearing accounts net to zero over a closed day; a replayed event changes nothing; the night of section 19.3 runs as an automated scenario.
  • Data: Synthetic borrowers and accounts only; account numbers in non-production are generated, never copied.

30. Migration: replacing seven scripts without a bad day

  • 0. Foundation: Accounts, SCPs, network, Direct Connect, logging, pipelines. Exit when: security review passed; a synthetic payment travels edge to core in staging.
  • 1. Shadow: The platform receives copies of every file and webhook and reconciles, but posts nothing. Exit when: 20 business days in which the platform's view equals the old process, or every difference is explained.
  • 2. Settlement and Provider B: The platform posts Provider B payments and reconciles settlements; the old Provider B script is switched off the same day. Exit when: 10 business days with zero duplicate postings and freshness on target.
  • 3. Provider A: Provider A sends webhooks to the new API (DNS change, coordinated). Exit when: same as phase 2.
  • 4. ACH origination: The platform builds the Nacha files. For 20 banking days before go-live it builds them in parallel and compares entry counts, totals and entry hashes with the old system's files. On the go-live day the old system's credentials to the bank are revoked. Exit when: bank test cycle passed; parallel files identical; treasury signs.
  • 5. Returns, lockbox, statements, credits, wires: The remaining inbound channels. Exit when: five-layer reconciliation green for 20 business days.
  • 6. Downstream: GL journal, Metro 2, trustee reports from the platform; old scripts decommissioned. Exit when: month-end close done from the platform.

The riskiest step is phase 4, because two systems that can both send Nacha files to the bank can debit every borrower twice. Revoking the old system's access on the same day is part of the cut-over plan, not a follow-up task.


31. Observability: business health first

31.1 The business health board

SignalGreen when (example)Source
Expected files arrivedEvery scheduled file registered before its internal cut-offFile registry, checked by an EventBridge Scheduler job at each deadline
Files fully loadedNo file in PARSING past its time limit; no REJECTED file without a caseFile registry
Settled payments posted by 8:00 a.m.99.5% or moreLedger and CDC confirmations
Unmatched and ambiguousBelow the agreed daily level, with every one in a caseLedger and cases
ACH file acknowledgedBefore 5:15 p.m.File registry
Return ratesBelow CanPulse's own thresholds (section 21.5)Ledger
Suspense ageingNothing older than two business days without escalation (OPS-14)Ledger
Five-layer reconciliationZero unexplained differencesReconciliation reports
Card gross to netYesterday's net deposit equals the report, to the centCard settlement report and BAI2
Dispute deadlinesNo dispute within 48 hours of its deadline without evidence submittedChargeback table
Instant paymentsEvery one shown in the portal within a minute; none older than the next core opening unpostedLedger
Refund controlsPositive pay acknowledged before any check release; no refund older than five business days unapproved; no refund in UNKNOWN_OUTCOME older than one business dayRefund table
Unknown postingsNone in UNKNOWN_OUTCOME longer than 30 minutes; the latest CDC heartbeat no more than 5 minutes old while the core is openPosting requests, DMS
SubledgerEvery day's entries balance; each clearing account's unexplained balance is zero at closeJournal

31.2 The technical signals behind it

Outbox lag (oldest unpublished row), Kinesis iterator age, SQS age of oldest message and dead-letter depth per queue, the core adapter's circuit state and measured core latency, Aurora replica and Global Database lag, Step Functions failed executions, API p95 latency and 4xx and 5xx rates per provider, Transfer Family connector failures. CloudWatch cross-account observability gathers every account's metrics, logs and traces into the monitoring account; Amazon Managed Grafana shows the boards; AWS X-Ray traces follow the correlation ID from the API through EventBridge to the posting. CloudWatch Synthetics canaries check the API's health route and the SFTP endpoints from outside every five minutes.

31.3 Alerts that wake someone

Only alerts with a runbook and an owner page a person: an expected file missing at its deadline, an ACH file not acknowledged, posting freshness at risk, the core circuit open for more than 15 minutes, a return-rate threshold crossed, any dead-letter message in posting or ACH, and any use of the break-glass role.


32. Resilience and recovery

32.1 Inside one Region

Everything runs in three Availability Zones: ECS services with tasks spread across zones, Aurora Multi-AZ, ElastiCache with replicas, OpenSearch with zone awareness, Transfer Family endpoints in every zone. AWS Fault Injection Service experiments stop tasks, fail over Aurora and cut the route to the core every month in staging and every quarter in production, with approval.

32.2 Losing a Region: warm standby in us-west-2

PartIn the recovery RegionOn failover
Ledger (payments, postings, subledger, outbox, file registry)Aurora Global Database secondary clusterManaged failover; the new writer takes writes. The ledger is the source of truth for everything below
Portal read modelDynamoDB global table, already activeNothing to do
Token vault and authorizationsDynamoDB global table, with the vault key as a multi-Region KMS keyDecrypt remains limited to the file builder role in the new Region
Originals and lakeS3 Cross-Region Replication with Replication Time ControlAlready there
Posting queue (SQS FIFO)Not replicated: SQS is regionalRebuilt from posting requests in PENDING; requests in SENT or UNKNOWN_OUTCOME are proved first (section 19.3)
Event stream (Kinesis)Not replicatedRebuilt from the outbox; data platform consumers resume from their own checkpoints in the lake
Event buses (EventBridge)Buses, rules and schemas deployed by Terraform in both Regions; global endpoints for the payments busArchived events stay in the failed Region; anything missing is republished from the outbox
Secrets and keysSecrets replicated by Secrets Manager; KMS multi-Region keysApplications read them at start; keys that may have been exposed are rotated
APIAPI Gateway and ingestion services at minimum sizeRoute 53 failover record moves the API name; services scale out
File drop and connectorsTransfer Family server with its own Elastic IPs, and connectors with their static IPs, already allowlisted by every partnerRoute 53 moves the SFTP name; connector credentials enabled only by the decision below
Core integrationDirect Connect gateway reaches both Regions; DMS replication instance pre-createdCDC restarts from the last confirmed position; the adapter resumes at the rate limit
DecisionRoute 53 Application Recovery Controller routing controlsA person decides, after checking, and flips them

32.3 The two things that must not happen during a failover

  1. A Nacha file sent twice. Only one Region may originate at a time, and it is enforced, not just agreed. The decisive fences sit outside both Regions, because a Region that is cut off may still be running and may still read its own copy of the ledger:
    • The bank accepts one credential. The bank accepts Nacha files from one active SFTP credential at a time. Switching Regions means treasury asks the bank to activate the recovery Region's credential and deactivate the primary's. This holds even if the old Region keeps running unseen.
    • An organization-level deny. Before the switch, an SCP applied from the management account denies the old Region's ACH sending role any action. AWS Organizations is not tied to the failed Region, so the deny reaches the old Region's resources wherever they are still running.
    • An origination lease, inside the platform. Before building a file, the ACH service takes a lease row in the ledger, which only the writer Region can write. Each lease carries a fencing token: a number that only ever increases.
    • The token is checked at send time. The file's registry row records the token. The send step refuses any file whose token is lower than the latest lease, so a stalled process from the old Region cannot send after a newer one has taken over.
    • The connector's credentials in the recovery Region are disabled until treasury flips the routing control.
    • Treasury reconciles first. Before anything is sent, treasury confirms with the bank which files it received. The registry says what was sent; the bank's acknowledgments say what arrived; only the difference may be sent.
    • It is rehearsed, including split brain. Every quarter a failover drill runs on a simulated first-of-month afternoon, during file building, in staging with the simulated bank (section 29). The old Region is left running and isolated, and the drill passes only if its send attempt is refused by the bank credential and the SCP, not merely blocked by the lease.
  2. A posting applied twice. Every posting in SENT or UNKNOWN_OUTCOME is checked against the core's own records (CDC) before anything is retried from the new Region.

32.4 Backups

AWS Backup takes daily backups and keeps continuous point-in-time recovery for Aurora, copies them to the logically air-gapped vault in the backup account under vault lock, and restores a copy into an isolated account every quarter with counts and control totals checked (Module 08's restore exercise and runbook).

32.5 When things go wrong: the common failures

  • Provider B's evening file is late: At 6:30 p.m. (CanPulse's cut-off) a warning to operations; at 7:00 p.m. (the contract) an incident with Provider B. Payments are still on time by their capture times when the file arrives.
  • The same file is sent twice, renamed: The registry refuses the second (same source, same SHA-256); a duplicate is recorded, nothing is loaded.
  • A file's trailer totals do not match its rows: REJECTED, a case, the partner told; nothing from it is loaded.
  • The core is down at 9:00 a.m.: The circuit opens; postings wait in the queue; the health board shows posting freshness at risk; nothing is lost or reordered.
  • The bank sends the return file twice: UNIQUE on the original trace number: each return is applied once.
  • Malware in a lockbox image: Isolated by the scan; the lockbox file waits; security is paged; the bank resends a clean file.
  • An Availability Zone fails: Tasks restart in other zones; Aurora fails over in about a minute; providers retry the few refused calls.
  • Provider A's net deposit is short of its report: The day stays open; a case for treasury with the difference; Provider A is asked for the missing line.
  • An instant payment arrives at 1:10 a.m. on a Sunday, inside the core's nightly window: Recorded, acknowledged and shown in the portal; posted when the core opens at 1:30 a.m., with its receipt time as the effective date.
  • A dispute deadline is 48 hours away with no evidence: The dispute owner is paged; the AI summary has already drafted the evidence list.
  • An insurer's remittance PDF cannot be read: Textract's confidence is low, so the extraction is marked unreadable and an analyst keys the remittance, which a second analyst confirms.
  • The positive pay file is not acknowledged: Refund checks are held; nothing is released until the bank confirms the file.

33. Capacity, with the arithmetic

All numbers are this case's assumptions (section 1), except where marked as Module 08's.

QuestionCalculationResult
Unique payments on an average business day (section 1.4)1,000,000 a month ÷ 21 business daysAbout 47,600
Peak lifecycle event rate400,000 events ÷ 36,000 seconds (10 busy hours) × 5 (Module 08)About 56 a second
Largest Nacha file550,000 autopays × 18% on the first-of-month effective dateAbout 99,000 entries
Its sizeAbout 99,010 records × 95 bytes (94 plus a line ending)About 9.4 MB
Peak-day postingsAbout 3 × 47,600About 143,000
Time to post them143,000 ÷ 32 a second (80% of the core's limit)About 75 minutes
Posting capacity before 8:00 a.m.From 1:30 a.m. to 8:00 a.m. is 23,400 seconds × 32About 749,000: five times the peak day
Kinesis throughput56 events × 2 KBAbout 112 KB a second, a small fraction of one shard's 1 MB a second
Check images70,000 a month × 80 KB (assumed)About 5.6 GB a month; about 470 GB over 7 years

The core, not AWS, is the limit, and the design respects it: the queue, the rate limiter and the overnight window are sized from the core's numbers.


34. The runbooks

The rule under all of them: when you do not know whether money moved, find out before you act. A second attempt is safe only when the first one is proved absent, or when the receiver is proved to treat the same key as the same request.


34.1 A posting with an unknown outcome

Starts when: a posting request is in UNKNOWN_OUTCOME (the core did not answer within 30 seconds), or the business health board shows UNKNOWN_OUTCOME postings older than 15 minutes.

Owner: the platform on-call engineer; the servicing operations lead if a borrower is affected.

Why it matters: the core can still commit a request up to 60 seconds after it was sent, and it does not refuse a second posting with the same reference. A resend after a timeout is how one payment became two postings on the night of evidence D (section 19.3).

Steps

  1. Do nothing for the first 90 seconds. The deadline is the send time plus the core's 60-second maximum plus a 30-second margin. Before the deadline, an empty inquiry proves nothing.
  2. Let the platform resolve it. It checks the core's inquiry API and the CDC stream every minute:
    • If either shows the posting, it is present: the request becomes POSTED with the core's transaction ID. Nothing is sent.
    • If the deadline has passed, a CDC heartbeat committed after the deadline has arrived, and neither the inquiry nor the stream shows the posting, it is absent: the platform resends with the same idempotency key.
  3. If it stays unknown for more than 15 minutes, find out why the proof is not arriving:
    • CDC lag: check the stream's latest heartbeat time. A slow stream delays the proof; it never makes the platform guess.
    • Inquiry API down: the platform waits for CDC alone.
    • The core is closed (10:00 p.m. to 1:30 a.m.): nothing is decided until it reopens.
  4. If a borrower calls, the portal already shows the payment as received with its capture time, so their on-time status is not affected. Tell them it is received and being applied.

Never: resend by hand, change the idempotency key, or mark a posting POSTED without the core's transaction ID (the database refuses it).

Finished when: the request is POSTED (present) or POSTED after one resend (absent), and the layer 4 check shows one core posting for the payment.

Rehearse with: lab scenario 1, Parts B, C and D.


34.2 No acknowledgment for the ACH file

Starts when: the daily Nacha file is SENT and the bank's acknowledgment has not arrived by 5:15 p.m. The platform pages the ACH program manager.

Owner: the ACH program manager, with treasury.

Why it matters: resending a file the bank already processed debits every borrower in it twice. That is the most expensive mistake in this system (section 20.4).

Steps

  1. Do not resend. The platform never resends a file on its own, and nobody resends one by hand.
  2. Treasury calls the bank and asks whether a file with this file ID modifier, entry count, total and entry hash arrived. Read them from the file registry.
  3. If the bank has it, ask the bank to send the acknowledgment again, or record the bank's confirmation as the acknowledgment with the name of the person at the bank and the time. The file becomes ACKNOWLEDGED.
  4. If the bank does not have it and the bank's 5:00 p.m. cut-off has passed, agree with the bank how to send it. Treasury approves sending the same registered file; the registry records the second transfer and the bank's confirmation that the first never arrived.
  5. If the bank cannot say, the file stays SENT and the question is escalated at the bank. Borrowers are not debited twice to save a day.

Never: build a new file for the same drafts, or send a file whose registry row is not READY or SENT.

Finished when: the registry shows the file ACKNOWLEDGED with totals equal to the bank's, or treasury has a written record of what the bank received.

Rehearse with: lab scenario 4 (a second send is refused by the registry, and the bank refuses a duplicate file).


34.3 A late or missing settlement file

Starts when: Provider B's evening file has not arrived by 6:30 p.m. (CanPulse's warning) or 7:00 p.m. (the contract), or the 2:00 a.m. bank settlement file has not arrived by the time layer 2 runs.

Owner: payment operations.

Why it matters: payments are not posted before their settlement is matched (rule PA-3), so a late file delays posting. It must never make a payment late for the borrower.

Steps

  1. At 6:30 p.m., operations is warned. Check the SFTP connector's log for a failed transfer before calling the partner.
  2. At 7:00 p.m., open an incident with Provider B and record the time.
  3. When the file arrives, it is registered and loaded like any other. Payments keep their capture times, so a borrower who paid on the due date is still on time.
  4. If a file arrives twice, the registry refuses the second (same SHA-256), even under a new name. Nothing is loaded.
  5. If the trailer does not tie, the file is REJECTED and nothing from it is loaded. Ask the partner for a corrected file; never load the rows that look right.

Never: post payments without their settlement, or edit a partner's file by hand.

Finished when: the file is loaded, its trailer tied, and every payment in it is matched or in a case.

Rehearse with: lab scenario 2.


34.4 A return-rate breach

Starts when: the morning return-rate check crosses one of CanPulse's own alert levels: unauthorized returns 0.25%, administrative returns 1.5%, or all returns 8.0%. Nacha's thresholds are 0.5%, 3.0% and 15.0% (section 21.5).

Owner: the ACH program manager, with compliance.

Why it matters: crossing Nacha's thresholds draws an inquiry through the ODFI and can end CanPulse's ability to originate. CanPulse's own alerts exist to act well before that.

Steps

  1. Confirm the number. Recompute the rate from the ledger and compare it with the bank's latest report. The bank's method is the one that counts.
  2. Break it down: by SEC code, by the channel that captured the authorization, by the month the authorization was signed, and by return reason. One cohort usually explains a rising rate.
  3. Check the automatic actions happened: R07 and R10 returns revoke the authorization, and NOC corrections were applied before the next draft.
  4. Decide with compliance what to change at the source (for example, how authorizations are captured in the portal for the cohort that explains the rise) and record the decision.
  5. Tell the bank when the agreement with the ODFI requires it, with the breakdown and the plan.

Never: stop recording returns to bring the number down, or reinitiate an entry the Nacha rules do not allow you to reinitiate.

Finished when: the cause is named, the change is approved, and the rate is watched daily until it is back under the alert level.

Rehearse with: lab scenario 4 (October's counts give 0.41% unauthorized: over CanPulse's alert, under Nacha's threshold).


34.5 A regional failover

Starts when: us-east-2 is lost or isolated and the decision is made to move to us-west-2. The hardest time is a first-of-month afternoon while the ACH file is being built or sent.

Owner: the incident commander, with treasury and the platform on-call engineer.

Why it matters: a Region that is cut off may still be running and may still read its own copy of the ledger. A lease inside the database is not enough to stop it sending a file (section 32.3).

Steps, in this order

  1. Fence the old Region from outside it: apply the organization-level deny to us-east-2's ACH sending role from the management account.
  2. Fence it at the bank: treasury asks the bank to accept files only from the us-west-2 SFTP credential and to deactivate the us-east-2 credential.
  3. Take the origination lease in us-west-2. Its fencing token is higher than any the old Region holds.
  4. Ask the bank which files arrived before anything is sent. The registry says what was sent; the bank says what arrived; only the difference may be sent.
  5. A file the bank never received is withdrawn from the registry, its entries go back to scheduled, and it is rebuilt and sent under the new token, with the next file ID modifier.
  6. Check every posting in SENT or UNKNOWN_OUTCOME against the core's own records (CDC) before anything is retried from the new Region (runbook 1).

Never: send from the recovery Region before steps 1, 2 and 4, or trust the old Region's view of the lease.

Finished when: the bank has received each day's file exactly once, every posting is POSTED or proved absent and resent, and the old Region's sending role stays denied until it is rebuilt.

Rehearse with: lab scenario 7. The drill passes only if the old Region's send is refused by the deny and by the bank, not merely by the lease.


34.6 A refund with an unknown outcome

Starts when: a refund is in UNKNOWN_OUTCOME (Provider A did not answer the refund call).

Owner: payment operations.

Steps

  1. Do not issue it again. The platform only sends refunds in APPROVED, and an unknown refund is not APPROVED.
  2. Ask Provider A for the refund's status using the same instruction key.
  3. If Provider A has it, the refund becomes ISSUED and the journal records it.
  4. If Provider A confirms there is none, the refund goes back to APPROVED and is sent again with the same key.
  5. Tell the borrower only when the outcome is known.

Never: create a second refund row or a new instruction key (the database refuses a repeated key).

Finished when: Provider A holds exactly one refund for the key and the ledger shows it ISSUED.

Rehearse with: lab scenario 6.


34.7 A processor deposit that does not match its report

Starts when: layer 3 finds Provider A's BAI2 deposit different from the settlement report's net.

Owner: treasury.

Steps

  1. Keep the day open. A case is opened with the difference.
  2. Look for the explanation in Provider A's other reports: dispute fees, chargebacks and adjustments arrive in separate files and often later than the deposit.
  3. When a report explains the difference, the platform books it (dispute fees to account 6200) and closes the case.
  4. If nothing explains it by the next business day, ask Provider A for the missing line.

Never: book an unexplained difference to an expense account to close the day.

Finished when: the deposit, the report and the journal agree, and the case is RESOLVED.

Rehearse with: lab scenario 3 (the deposit is $25.00 short until the dispute fee on DSP-55120 explains it).


Stage 6. Prove: did the business improve?

35. What drives the cost, and what the platform is worth

This case does not quote prices, because they change and depend on CanPulse's agreements. It names what drives each cost, so the team can estimate with the method from Module 05, Lesson 08 (one-time effort plus monthly running cost) and Module 08, Lesson 10.

AreaWhat drives itHow to keep it in check
Direct ConnectPort hours and data out over the linksTwo dedicated connections are justified by the core; size the ports from measured traffic
Transfer FamilyHours each server and endpoint runs, data uploaded and downloaded, connector callsOne server per Region with many users, not one per partner
AuroraInstance hours, I/O-Optimized storage, Global Database replicationRDS Proxy keeps connections low; Graviton instances
ECS on FargatevCPU and memory hoursRight-size from load tests; scale to the minimum in the recovery Region
Network Firewall and NATEndpoint hours and data processedVPC endpoints keep AWS traffic off NAT and the firewall
OpenSearchInstance hours and storageIndex only what analysts search; roll older indexes to the lake
Data platformAthena data scanned, Redshift Serverless compute, Glue jobsIceberg partitioning by date; Redshift only for finance marts
Security servicesVolume of logs and events analyzedNecessary; tune Macie to the buckets that matter
PeopleOperating and changing all of the aboveThe largest cost; it is why the design avoids services nobody on the team can run

35.1 What the platform is worth

The evidence so far. In the Module 09 pilot region:

  • Automatic reconciliation rose from 82% to 94%.
  • Records needing review fell from 9,000 to 3,000 a day.
  • Analyst time on exception cases fell from 40 to 16 hours a day, a 60% reduction.
  • A weekly sample found 2 false matches in 1,600.

These are measurements, and they are the best guide to what the platform can do.

The projection for CanPulse, every input labeled:

  • Company-wide analyst time on exceptions today: 120 hours a day (Assumption: three regions like the pilot's. To be measured in the shadow phase)

  • Reduction, evidence-based: 60% (The pilot's measured reduction)

  • Reduction, target: 83%, if effort fell in proportion to unmatched records from 18% to 3% (97% automation): 120 × 3 ÷ 18 = 20 hours a day left (Proposed target. The pilot shows effort fell a little less than records (60% against 66.7%), so treat this as an upper bound)

  • Fully loaded analyst cost: $45 an hour (Assumption)

  • Operating days: 250 a year (Assumption)

  • Evidence-based: 120 × 60%: 72 hours released a day, 72 × $45 × 250 = $810,000.

  • Target: 120 − 20: 100 hours released a day, 100 × $45 × 250 = $1,125,000.

This is capacity, not cash (program standard 4). It becomes a saving only if CanPulse chooses to reduce overtime, not fill vacancies or move people to other work. The business case adds the benefits that are cash or risk, each with how it will be measured:

BenefitBaselineTargetHow it is measured
Automatic reconciliation82%97%Reconciliation layer 2, weekly, with the false-match sample beside it
Analyst time on exceptions120 hours a day (to confirm)Under 30 hours a dayTime logged on cases
Duplicate financial postingsMeasure firstZeroReconciliation layer 4
Wrong late fees refundedMeasure first (the earlier validation found 9 of 40 in one month)ZeroFee reversals with reason paid on time
ACH returns applied to loansOne day lateWithin the morning of arrivalTime from return file to reversal posting
Unexplained settlement differences at closeMeasure firstZeroReconciliation layer 3
Days to close the monthMeasure firstTwo fewerFinance's close calendar
Chargebacks wonMeasure firstHigher, with no missed deadlineDispute outcomes
Posting freshnessMeasure first99.5% by 8:00 a.m.Section 31.1

Payback is calculated, not claimed. Payback in years = one-time cost ÷ (annual cash benefits + the capacity CanPulse decides to convert). Both sides are filled in from measurements: the cost from section 35's drivers and the team's estimate, the benefits from the shadow phase. Until both exist, the business case states the capacity range and the risks reduced, and no payback period.

36. The results, and what comes next

36.1 What was measured

In the pilot region, with the same approach:

MeasureBeforeAfter
Records reconciled automatically82%94%
Records needing review each day9,0003,000
Analyst hours a day on exceptions4016, a 60% reduction

Automatic matching is checked too: a weekly sample found 2 false matches in 1,600, which is why a person keeps reviewing a sample every week.

Across CanPulse, the same 60% reduction would release about 72 analyst hours a day: about $810,000 a year of capacity, at $45 an hour over 250 working days. The FDE reported that as capacity, not cash. It becomes a saving only if CanPulse chooses to reduce overtime or hiring. The other targets in section 35.1 are measured from the first month live: zero duplicate postings, zero late fees on payments made on time, returns applied the morning they arrive, and two fewer days to close the books.

36.2 The next improvement

The largest exception category was Provider B identification, at 31% of analyst time (section 7.6). After go-live, the FDE's next improvement is to measure how many Provider B payments still land in suspense, by cause (unknown payment codes, codes for closed loans, typing errors at the store), and to fix the largest cause with Provider B, measured as suspense items a day and days to resolve.


37. The FDE work: questions, evidence and exercises

37.1 Questions to ask before anything is built

  • ACH program manager: What are the bank's real cut-offs, acknowledgment format and file ID rules? How does the bank calculate our return rates, and over what period?
  • Treasury: Which accounts receive which money? What does the BAI2 file contain, and when does it arrive? Who releases unusual files today?
  • Servicing core owner: What is the posting API's real limit and its behavior on timeout? Can it post with an effective date? Can it refuse a second posting with the same reference, and can we look up a transaction by our reference? Which table records postings, and can we read it by CDC?
  • Operations manager: Walk me through yesterday's exceptions. Which channel causes the most? What do analysts open first?
  • Finance controller: Which GL accounts does each kind of money touch? What makes month-end slow today?
  • Compliance officer: Where are autopay authorizations stored, and can we prove each one? What did the last Nacha audit find?
  • Securitization reporting lead: How are trust collections remitted today, and how is a reversal handled after remittance?
  • Information security officer: What must be true before a partner can connect? Which data classes may enter the lake?
  • Dispute owner: Who answers chargebacks today, how many a month, and what is the win rate by reason? What is Provider A's deadline, and the network's?
  • Treasury, again: Does the bank offer RTP, FedNow and request for payment through its API? Which hours are wires accepted? Is positive pay on for the refund account?
  • Payoff team: How are payoff quotes issued and how long are they good for? What happens today with a short or an overpaid payoff?

37.2 Evidence to request

Thirty days of every inbound file with the bank's statements for the same days; a month of Provider A card settlement reports and dispute reports; a month of returned check files; twenty third-party remittance advices as they really arrive; the last three months of return and NOC files; the core's posting logs and its API documentation; the autopay authorization records for a sample of 100 loans; the bank agreement's ACH schedule; the trustee agreement's remittance terms; the last Nacha audit report.

37.3 Assumptions in this design, to confirm

The volumes and channel shares in section 1; every time marked assumed in section 13; the core's limit of about 40 requests a second and its 10:00 p.m. to 1:30 a.m. window; the bank's 5:00 p.m. cut-off; CanPulse's reinitiation policy; the 40% securitized share; the recovery objectives in N5; Provider A's dispute response deadline; the bank's automatic re-presentment of returned checks; the bank's support for request for payment; the refund volume.

37.4 Risks

RiskLikelihoodImpactMitigation
Double debit from a resent Nacha fileLowVery high: every borrower in the fileRegistry before send, no automatic resend, old system revoked at cut-over
The core cannot post with an effective dateMediumHigh: wrong late feesConfirm in week 1; if not, a compensating fee-reversal process with finance
CDC on the core's database is not allowed by the vendorMediumHigh: posting confirmationAsk in week 1; fallback is the core's end-of-day posting extract, which delays confirmation to the next morning
Partners cannot allowlist the recovery Region's IPsMediumMediumAsk during onboarding; it is a precondition for go-live
Return rates near a threshold during migrationLowHigh: Nacha enforcementDaily monitoring from phase 1
A misread third-party remittance applies money to the wrong loanMediumHigh: two borrowers affectedAnalyst confirmation of every remittance; VIN and name must both match
Dispute deadlines missed during migrationMediumMedium: disputes lost by defaultDispute cases move first, with deadlines imported from Provider A

37.5 Exercises

  1. Draw your own version of section 12.1 for one other channel you know (a utility, a hospital), and mark upstream and downstream.
  2. Build the next Nacha file. Add a second batch to the sample in section 20.3 with one WEB entry debiting a savings account (a batch has one SEC code, so WEB needs its own). Write its batch header and control, then recompute the file control's batch count, block count, entry count, entry hash and totals. Does the file still fit in one block?
  3. Trace a return. An R01 arrives for Jordan Ellis's December 2 autopay after it was posted. List every system that changes, in order, and the event that tells each one.
  4. Break the posting service. The core answers nothing for 20 minutes at 9:00 a.m. Write what each component does, what the health board shows, and what an analyst sees at 9:30.
  5. Fail over a Region on the first of the month at 4:40 p.m., while the ACH file is being sent. Write the steps treasury and the platform team take before anything is sent from us-west-2.
  6. Defend D5 or D7 in front of an architect who wants Kafka or DynamoDB. Use the decision table's format: problem, evidence, choice, rejected, revisit.
  7. Find the weakest assumption in section 37.3 and write the email that would confirm or disprove it.
  8. Reconcile a card day. Provider A reports gross $2,910,400.00, fees $23,283.20 and chargebacks $1,640.00, and the statement shows a deposit of $2,885,476.80. Is the day closed? Show the arithmetic and say what you would do next.
  9. Price a payoff. A quote on December 1 shows principal $9,800.00, interest to December 1 of $21.60 and a per diem of $2.64. A wire for $9,840.00 arrives on December 4. Is it exact, overpaid or short, and by how much? What does each system do?
  10. Design the Sunday. An instant payment arrives at 1:10 a.m. on a Sunday, while the core is closed, for a payment due that day. List every component that touches it, in order, until it is posted, and say how the borrower knows it was on time.

38. Glossary

  • ACH: Automated Clearing House: the US network for batch electronic payments between bank accounts.
  • Originator: The company that starts an ACH entry: here, CanPulse.
  • ODFI: Originating Depository Financial Institution: the Originator's bank, which sends entries into the ACH network.
  • RDFI: Receiving Depository Financial Institution: the borrower's bank.
  • Nacha: The organization that writes the ACH network's Operating Rules.
  • SEC code: Standard Entry Class code: the type of entry and authorization, such as PPD (prearranged consumer payment) or WEB (authorized online)
  • Entry, batch, file: One payment instruction; a group of entries with the same company and SEC code; the transmission that holds batches.
  • Effective entry date: The date the Originator asks the entry to settle.
  • Trace number: The entry's unique identifier: the ODFI's 8-digit ID and a 7-digit sequence.
  • Return (R-code): An entry sent back by the RDFI, with a reason code.
  • NOC (C-code): A notification of change: the RDFI asks the Originator to correct account data.
  • Reinitiation: Sending a returned entry again, allowed only for some return reasons and within limits.
  • Prenote: A zero-dollar entry used to check an account before live entries.
  • Same Day ACH: ACH entries that settle on the day they are sent, in defined windows.
  • BAI2: A bank reporting file format for account balances and transactions.
  • Lockbox: A bank service that receives mailed checks, deposits them and reports each item.
  • Metro 2: The standard format for reporting loan data to the credit bureaus.
  • Securitization trust: A legal entity that owns loans bought by investors; CanPulse services them and remits collections.
  • CDC: Change data capture: reading a database's committed changes as a stream.
  • Outbox: A table written in the same transaction as a change, from which events are published (Module 06)
  • Idempotency: Repeating an operation causes no additional effect (Module 06)
  • S3 Object Lock: Write-once storage that prevents deletion or change for a set period.
  • Transit Gateway: A regional router connecting VPCs and on-premises networks.
  • PrivateLink: Private, one-way access to a service in another VPC through an interface endpoint.
  • VPC Lattice: Managed service-to-service networking across VPCs and accounts with IAM authorization.
  • SCP: Service control policy: a guardrail on what any principal in an account may do.
  • Warm standby: A scaled-down copy of production running in another Region, ready to scale up.
  • Channel and rail: The channel is who reports a payment; the rail is how the money moves (ACH, card, cash network, check, wire, instant)
  • Gross and net settlement: Gross is what borrowers paid; net is what the provider deposits after fees and chargebacks.
  • Chargeback: A card payment pulled back after the cardholder disputes it with their card issuer.
  • Representment: Answering a chargeback with evidence that the payment was valid.
  • Fedwire, IMAD, OMAD: The Federal Reserve's wire system; the input and output message references that identify each wire.
  • RTP and FedNow: US instant payment networks that settle each payment in seconds, around the clock, with final funds.
  • Request for payment: A message asking a payer to send an instant payment, which the payer approves in their bank's app.
  • ISO 20022: The international standard for payment messages, such as pacs.008 (credit transfer) and pain.013 (request for payment)
  • Payoff quote and per diem: The amount that pays a loan off by a stated date, and the interest added for each extra day.
  • Positive pay: A bank service that pays only checks listed in the issuer's file.
  • Returned item: A deposited check that the payer's bank refused to pay.
  • Unclaimed property (escheatment): Reporting and paying uncashed money to the owner's state after a dormancy period.
  • GAP insurance: Insurance that pays the difference between a car's insured value and the loan balance after a total loss.
  • Subledger: A detailed double-entry ledger whose totals feed the general ledger.
  • Journal entry: A balanced set of debits and credits recording one financial fact.
  • Clearing account: An account that holds money between two steps, such as received and applied; it should return to zero.
  • Proof of absence: Evidence that something did not happen, such as a posting, which needs a source that is known to be up to date.
  • CDC watermark: Proof of how far a CDC stream has read: here, the latest heartbeat row received, which shows every commit before it has arrived.
  • Fencing token: An ever-increasing number that lets a system refuse work from a process that has lost its lease.
  • Lifecycle event: One step in a payment's life, such as received, matched, posted or reversed.