Cards, from the first prompt
On 29 September 2026 the word “card” in our code meant a rate card. Five days later LedgerTM issued debit, credit and corporate cards, handled disputes and chargebacks, and settled merchants with a rolling reserve. This is how, start to finish.
A real example, not a made-up one. The customer and partner names are blacked out as [redacted]; everything else is left in, mistakes and corrections included.
If you're reading the feature map to see whether LedgerTM does everything your book needs, you're asking the question everyone asks of a core system, and we'd ask it too. But we've sat on both sides of that table, and the honest answer is that no system does everything you need. The gap is where you end up on a vendor's roadmap, waiting a year for a change and paying for the privilege, and we've had customers waiting on us in exactly the same way.
So the more useful question is what happens when you need something the system doesn't do yet. How long does it take, what does it look like when it's done, and who decides what gets built? That's what this page shows, with a real example. Nobody asked us for cards, as it happens. There was no buyer, and we wrote that down at the time, so read it as what would happen if you were the one asking.
It started with a message our founder typed into a session with the AI on a Tuesday morning, in plain business terms, the way you'd brief a consultant. There's no class name or database table in it, and it's left exactly as he typed it, typos and all.
i would like to do the same with a product suite aimed at cards (credit and debit) issuing and acquiring. when i say card, this also includes non card based payment transactions (i.e wallets, web site plug ins etc etc)
for retail banking, it would seem a good option to introduce a credit and debit card product. we have a lot of the supporting functionality in terms of facilities, limits, payment rails, beneficiaries etc. what would be involved in supporting a card issuing environment as part of the retail offerring? … its seems logical to have a card account administered within a single counterparty so you can transact across accounts. in my experience the card systems are often stand alone.
i want to look at market opportunity, competitor analysis and design wide and implement in stages if this fits the current platform.
Sixteen minutes later he answered the AI's first findings with “oracle, not batch. and cards inside retail”, which settled the biggest design question there is for a card system: whether the card processor asks us about every transaction as it happens, or sends us a file at night. Twenty minutes after that he'd picked a processor and asked for the write-up, and by the time the grill came round he'd said it plainly: “i am not a card expert. i will go with your reccomendations unless you are unclear on any.”
The first thing the AI did wasn't design anything. It went through the codebase and worked out what we already owned, and most of a card system turned out to be there under other names. An authorisation hold is a claim on the available balance, which we'd had for months. A chargeback is a back-dated reversal, which we'd built for something else entirely. An overdraft turned out to be a facility plus a one-line change to a rule, which the AI pointed out was “cheaper than the proposal says” about its own proposal.
This is the bit that matters most if you're wondering what your own change would cost. A new product in LedgerTM is mostly the engine you already have, rearranged, and the new code is the part that really is new.
| A card system needs | Already in the engine | What was new |
|---|---|---|
| A current account for debit cards | The corporate current account, with deposits, withdrawals, interest and fees | One current account type shared by retail and corporate |
| An overdraft | Facilities, with reserve and release, and a withdrawal rule written as an expression per account type | The facility attached to the account and the rule changed to allow it, which is configuration |
| Holding money for an authorisation | Claims on the available balance, released by date or by event | The hold lives on the card, so a tap never queues behind the day-end run |
| Cleared versus booked money | Accounts that only ever hold settled facts, with trading and value dates | Nothing. The proposal called it a differentiator hiding in the codebase |
| A revolving credit card | A credit card product sketched in a template years ago and never run | Switched on, with one new function to decide the interest-free period |
| Card fees and transaction pricing | Price lists, pricing plans and the banded rate card | Selection by card attributes and amount band, which also absorbs the rail fees |
| Renewals, settlement batches and reserve releases | The day-end run, with its steps, phases and restart | Three more day-end steps. “A settlement batch is a step, not a scheduler” |
| Chargebacks | Back-dated reversal, with the FX cascade | A dispute record with the scheme’s stages and clocks |
| Paying a merchant | Payment rails, settlement instructions and FX | A merchant settlement account that nets to T+n |
| A rolling reserve | Claims again, one per settlement day with a release date | The reserve rules: percentage, target and oldest-first consumption |
| A corporate card administrator | The client channel, with its users, operations and entitlement ceilings | “That user with two more operations” |
What really was new: the card itself, with its credentials and lifecycle, real-time authorisation, the chargeback lifecycle with the schemes' stages and clocks, and the rolling reserve.
Before any decision record we wrote a business proposal, the way we had for corporate banking. It covers the market and who sells what, the four product lines (retail debit, retail credit, corporate and virtual cards, and merchant acquiring), how a card transaction moves from the tap to the statement, the regulation that comes with it, and an honest counterweight: the slow part of launching cards is the processor contract, the BIN sponsor and scheme certification, none of which is code. It's a good read in its own right, and the write-up took the AI eleven minutes.
Then it was grilled against the codebase, which took another half hour and moved four things. The hold moved off the account and onto the card, because every tap would otherwise have queued behind the day-end run. “No account may go below zero” turned out to be wrong, because the rule is an expression, so the overdraft is configuration. A cleared purchase now posts unconditionally, even into an unarranged overdraft, because parking it in suspense would hide a payment the bank has actually made. And a hotel hold lasts thirty days, not seven, which anyone who has checked out of a hotel could have told us.
Two sentences in it still say acquiring waits for a merchant acquirer to come along, which contradicts the decision we recorded the same morning to build it last anyway. We've left them in.
The proposal became twelve decision records, each one written, grilled, planned, built test-first and merged on its own. Every grill changed something, and the right-hand column is what. Most of them are the kind of thing that turns up in production two years later as an incident, and here they turned up as a line in a document before any code was written.
| Record | What it decides | What its grill changed |
|---|---|---|
| ADR-820 · plan Card connectivity: the processor seam | The processor talks to us through four contracts, and a simulator stands in for it so everything can be built and tested without a bank. | Its grill found it leaned on a piece of platform identity that didn’t exist yet, so that became ADR-821 and was built first. |
| ADR-821 · plan Machine identity | A machine caller, like the card processor, gets its own per-tenant identity rather than borrowing a person’s. | Split out of ADR-820’s grill. |
| ADR-835 · plan The card and its credentials | A card is its own record under the customer, with plastic, virtual and wallet credentials, its controls and its funding rule. | Our founder grilled it against the card in his own wallet, which added daily and monthly ceilings, a travel window, five channel switches instead of four, and a display name. |
| ADR-836 · plan The authorisation oracle and the card hold | The processor asks us about every tap in real time, we answer in a fixed order of checks, hold the amount on the card and post when the clearing line arrives. | A hold we couldn’t answer for stays put, because the processor may have approved it in stand-in. Closing a card releases its holds. |
| ADR-837 · plan The current account and the overdraft | A retail current account, with the overdraft as a facility below zero, and a cleared purchase always posts, even into an unarranged overdraft. | The headroom sum counted the overdraft twice: −800 with a 1,200 limit showed 400 available when the truth was 1,200. |
| ADR-838 · plan The revolving credit card | The credit card that had sat unused in a template is switched on, with the interest-free period decided at the due date and one catch-up interest posting. | The catch-up window was made inclusive at both ends, which moved the worked example from 294.25 to 300.49. |
| ADR-839 · plan Renewal, replacement and card fees | Cards renew themselves at day-end, and card fees are priced postings like any other fee. | Expiry is whatever the processor says it is, never a formula of ours, and a missing price is a refusal, not a zero. |
| ADR-840 · plan Disputes and chargebacks | A dispute is its own record with the scheme’s stages and clocks, and provisional credit and clawback are ordinary postings. | A representment that arrives late is the cardholder’s win, and the outcome handler no longer credits twice. |
| ADR-841 · plan The attribute-banded price card | A fee is chosen by the card’s attributes and the amount band, and the most specific row wins. | A row carries a floor and a cap, and the old flat rows stay, so a debit card prices exactly as before. |
| ADR-842 · plan Merchant settlement and acquiring | A merchant agreement prices each sale as it arrives, holds the net until T+n and pays out by rail. | Hold the net, not the gross, and price a line at its transaction date, not the day it turns up. |
| ADR-843 · plan The rolling reserve | A percentage of each day’s settlement is held back and released on a date, and chargebacks eat the free balance first, then the oldest reserve. | Money already waiting for T+n is not free balance, and a reversal is a reversal, not a win. |
| ADR-844 · plan Spend controls and the corporate card | Limits, category and country rules and valid-until dates per card, with the corporate administrator running cards through the client channel. | The ceiling now checks a month, not just a day: a card limited only by the day could have spent about 155,000 a month. |
From the first message on Tuesday morning to the last card record merged before dawn on Sunday was a little under five days. The time someone was actually at it, measured from the session logs with any pause over fifteen minutes taken out, was about 55 hours: the proposal and its grill in under an hour and a half, about 11 hours designing and grilling the ten card records, about 34 hours building, testing and landing them, and the rest on the two foundation records underneath.
It wasn't the only thing going on. The client portal, correspondence and signing, cashier management, and the merge queue we describe on How we build were all being designed and built in the same five days, and on the Saturday fifteen sessions were working at once. So read the chart as one strand of a busy week, not a team doing nothing else.
Swipe sideways to follow the whole diagram.
We said we'd leave the mistakes in, so here they are. Four of the card records were being built side by side on the Saturday, and that's where most of them came from.
Two near-simultaneous taps on the same card could both get under its spending limit. The full test suite was green, and it was the plan grill on the last record that caught it, which taught us that a green suite proves less than you'd like about a decision that reads a number and then writes one. On the disputes record, three of six test files had been written against rulings we'd already changed, so they were done twice. On the reserve record, the test author got its setup wrong in five of six bites and was sent back eight times, and the record landed green and still left main red on two of its own lines. A sample customer we seeded for the credit card broke a regulatory fee ceiling and turned main red as well. And a filtered test run skipped six card test files and reported green on nothing at all, which is the most embarrassing one and is still open.
It cost more than it should have, too. The cards work used 58% of a week's AI allowance, mostly because each build session kept re-reading the same enormous context on every turn. And the slowest part of the whole loop was our founder: lanes sat waiting for him to click a button to start them, one of them for over five hours.
The grills were also busy finding mistakes in code we'd already shipped. Working through the card records turned up five real bugs in existing features, among them a back-valued posting that accrued nothing for its own day. They'd have been found eventually, but we'd rather it was us.
Every one of those went into the findings register, and most of them had a fix merged within a day or two, because the loop that builds the product is also the loop that fixes the loop. This is the left-hand column turning into the right-hand one.
| What went wrong | What we changed |
|---|---|
| Lanes sat idle for hours waiting for our founder to click a button to start them. Of 54, 13 were never opened, and the worst waited over five hours. | Lanes now start themselves as background agents, and land and archive themselves when they’re done. ADR-847. |
| A lane could pass its checks and still leave main red, because the checks ran on the lane, not on the lane merged with main. One branch was 102 commits behind and had to be merged by hand. | Every change now lands through a merge queue that runs the full suite on the change sitting on top of the latest main. ADR-848. |
| A lane went round and round re-dispatching test authors, eight times on one ADR. | A lane stops a bite after its third red and asks. |
| Contract types landed in the wrong place and had to be moved after the merge. | The contracts check runs in every bite, not only at the end. |
| The cards work used 58% of a week’s AI allowance, most of it re-reading the same huge context on every turn. | Each bite now gets a fresh agent with only what it needs. |
| Two workspaces handed out the same finding numbers and had to renumber. | Finding numbers are reserved before they’re used. |
Four are still open on the day this page went up: using a cheaper model for the mechanical jobs, splitting plans so each bite reads only its own part, quieter gate output, and the filtered test run that went green on nothing. They're in the register with the rest.
Cards took us five days, warts and all, and the next product will take less, because the warts are already fixed. If there's something your book needs that LedgerTM doesn't do yet, that's the conversation we'd like to have. Talk to us →