Ledger-as-evidence is the right spine — the immutable record is what lets you treat "unknown" as a state you resolve instead of a guess you make. Your webhook-plus-polling fallback is exactly the "auto-attempt every non-destructive way to learn the outcome before escalating" pattern. The one boundary I'd draw hard: poll the status, never auto-retry the payout, when there's no reliable dedup — learning what happened and re-doing it are different operations. I worked the same problem from the AI-agent side (where the agent will happily re-issue) here: dev.to/rudratosh/your-ai-agent-ret...
Agreed, and I would enforce it with credentials, not discipline. The poller gets a read-only token. The retry path is a different tool with its own approval and its own key. Then a bug in the poller cannot re-issue a payout, because the poller cannot write. Polling status and redoing the payout are different operations, so they should not share a credential.
CTO & Co-Founder, Atoa. Building open banking payments for the UK. Half the cost of cards. Instant settlement. FCA-authorised. I hire for intent, not resumes. I write about payments, AI, and the messy
@fintechrailsdigest already named the review state, so I will take the next bit of it: a review state with no exit rule is a reserve that grows. Ours did. The money stays held, the queue stays open, and nobody owns draining it, because every item in it is genuinely ambiguous.
What fixed it was taking the deadline off the investigator and putting it on the rail's calendar. An unknown outcome is not open until somebody finishes looking at it. It is open until the window in which the rail can still move the money has closed, and that window is published. Faster Payments does not leave a transfer in flight for a week. Write that date on the row at creation and review has a timer that is not a person, so the release becomes a scheduled thing rather than a decision somebody has to make.
One addition to the evidence hierarchy, which is the strongest section here. The webhook and the status API are both views the provider can rebuild. The provider's own reconciliation or settlement file is the artifact they will defend in a dispute, and when it disagrees with their status endpoint, the file wins. It lands once a day and it is boring, so it tends to be the last thing a team wires up and the only thing that ends an argument. I would put it above both.
Where I would push on the piece. Only terminal evidence can move an unknown payout to failed is the right rule, and it has a cost the article does not price. The customer whose payout genuinely did fail is now held for as long as your policy says. That is correct, and it is also what support will be asked about, so the policy wants a stated number rather than until we know. We wrote the state machine long before we wrote that number, and the state machine was never the thing anyone argued with.
@mickyarun the rail-calendar timer is the correction I'm making. I wrote review as "hold until resolved," which is the version that grows into a larger reserve, because nobody owns an item that is ambiguous. Stamping the rail's own in-flight window on the row at creation turns a judgement call into a scheduled release. It also gives support something to tell the customer on day one instead of "we're looking into it."
I agree on the settlement file, and the article underweights it. The webhook and the status endpoint are both views the provider rebuilds. The settlement file is the record a provider will defend in a dispute. I have it at the top of the hierarchy, but you put the point better. It is the only one that settles the argument, and because it arrives once a day and is dull, teams wire it up last. I'm moving that paragraph up and saying so plainly.
The unpriced cost of the failed-payout hold is fair too. "Until we know" is not a policy, it is the absence of one. What I'll add is a fixed number per rail, published, plus a written reason owed to the customer at release. @fintechrailsdigest explained why that is hard. The state machine usually ships first and the number is a product decision nobody wants to own. That argument belongs with support before the first incident, not after, and the article should say so instead of leaving the hold time implied.
glad the settlement file paragraph is moving up. one more nudge on the number: a fixed hold per rail published once is worth doing even when it is wrong, because a published wrong number gets corrected by an incident, and an unpublished policy gets corrected by nothing. the state machine ships first everywhere we have seen, so the order in the article ending up reversed in practice is not a nitpick, it is the default failure mode.
A published wrong number gets corrected. An unpublished one gets inherited. The only caveat is to date the number and name the rail, so a later correction does not look like the first number was never real. That also gives you a diff to point at when someone asks why the hold changed.
the stated number is the piece teams skip, and your last line is the honest version of why: the state machine shipped first and the policy number was a product decision nobody wanted to own. we settled on holding until a fixed day with a written explanation owed to the customer on release, which moved the argument from engineering to support where it belonged. on the settlement file, agreed completely. it ends arguments because it is the one artifact both sides treat as the record, and unlike the status endpoint nobody can quietly re-derive it.
The written explanation is what makes the hold defensible. Without it, support is guessing at policy and the customer hears a date with no reason. With it, the customer gets a date and a reason, and support gets a script. Moving the argument to support is the right outcome, because support owns the customer conversation and engineering owns the state machine.
the only-terminal-evidence-can-move-unknown-to-failed rule is the one that saves real money. the review state is underrated too: most teams treat conflicting evidence as an edge case and auto-pick the optimistic branch, but a payout that succeeded at the provider while the internal ledger says failed is exactly the drift that compounds quietly until a month-end statement forces the conversation. the tiered polling cadence with the daily reconciliation sweep as a backstop is a good practical shape for this, and pinning the evidence hierarchy before incidents happen is worth stealing as a checklist item.
Agreed. The hierarchy should be written down and stored with the case, so a reviewer six months later sees which source won and why. Terminal evidence means a settlement file, a provider ledger entry, or a bank statement. A webhook is a signal to go look, not the look. The review state is where the conflicting case waits instead of the optimistic branch winning by default.
Hosted cron job service. Schedule HTTP requests on a cron, after a delay or right away. Every run logged, failed jobs retried, alerts by email or Slack.
Treating a payout timeout as unknown, not failed, is the rule that stops the expensive retry. I've seen a second request with a new reference land two transfers, and the webhook later can't tell you which one to keep. Using the ledger as the product's own evidence, and the webhook only as a signal to go look, is the part I'd want in the runbook before any of the polling details.
The new reference is the part to kill. A retry should carry the same client reference, so the provider can dedupe. If the retry generates a new one, the ledger cannot tell the two transfers apart after the fact, and the webhook only confirms that something landed. The runbook line is right. The ledger is evidence, the webhook is a signal to go look.
We're a place where coders share, stay up-to-date and grow their careers.
Ledger-as-evidence is the right spine — the immutable record is what lets you treat "unknown" as a state you resolve instead of a guess you make. Your webhook-plus-polling fallback is exactly the "auto-attempt every non-destructive way to learn the outcome before escalating" pattern. The one boundary I'd draw hard: poll the status, never auto-retry the payout, when there's no reliable dedup — learning what happened and re-doing it are different operations. I worked the same problem from the AI-agent side (where the agent will happily re-issue) here: dev.to/rudratosh/your-ai-agent-ret...
Agreed, and I would enforce it with credentials, not discipline. The poller gets a read-only token. The retry path is a different tool with its own approval and its own key. Then a bug in the poller cannot re-issue a payout, because the poller cannot write. Polling status and redoing the payout are different operations, so they should not share a credential.
@fintechrailsdigest already named the review state, so I will take the next bit of it: a review state with no exit rule is a reserve that grows. Ours did. The money stays held, the queue stays open, and nobody owns draining it, because every item in it is genuinely ambiguous.
What fixed it was taking the deadline off the investigator and putting it on the rail's calendar. An unknown outcome is not open until somebody finishes looking at it. It is open until the window in which the rail can still move the money has closed, and that window is published. Faster Payments does not leave a transfer in flight for a week. Write that date on the row at creation and review has a timer that is not a person, so the release becomes a scheduled thing rather than a decision somebody has to make.
One addition to the evidence hierarchy, which is the strongest section here. The webhook and the status API are both views the provider can rebuild. The provider's own reconciliation or settlement file is the artifact they will defend in a dispute, and when it disagrees with their status endpoint, the file wins. It lands once a day and it is boring, so it tends to be the last thing a team wires up and the only thing that ends an argument. I would put it above both.
Where I would push on the piece. Only terminal evidence can move an unknown payout to failed is the right rule, and it has a cost the article does not price. The customer whose payout genuinely did fail is now held for as long as your policy says. That is correct, and it is also what support will be asked about, so the policy wants a stated number rather than until we know. We wrote the state machine long before we wrote that number, and the state machine was never the thing anyone argued with.
@mickyarun the rail-calendar timer is the correction I'm making. I wrote review as "hold until resolved," which is the version that grows into a larger reserve, because nobody owns an item that is ambiguous. Stamping the rail's own in-flight window on the row at creation turns a judgement call into a scheduled release. It also gives support something to tell the customer on day one instead of "we're looking into it."
I agree on the settlement file, and the article underweights it. The webhook and the status endpoint are both views the provider rebuilds. The settlement file is the record a provider will defend in a dispute. I have it at the top of the hierarchy, but you put the point better. It is the only one that settles the argument, and because it arrives once a day and is dull, teams wire it up last. I'm moving that paragraph up and saying so plainly.
The unpriced cost of the failed-payout hold is fair too. "Until we know" is not a policy, it is the absence of one. What I'll add is a fixed number per rail, published, plus a written reason owed to the customer at release. @fintechrailsdigest explained why that is hard. The state machine usually ships first and the number is a product decision nobody wants to own. That argument belongs with support before the first incident, not after, and the article should say so instead of leaving the hold time implied.
glad the settlement file paragraph is moving up. one more nudge on the number: a fixed hold per rail published once is worth doing even when it is wrong, because a published wrong number gets corrected by an incident, and an unpublished policy gets corrected by nothing. the state machine ships first everywhere we have seen, so the order in the article ending up reversed in practice is not a nitpick, it is the default failure mode.
A published wrong number gets corrected. An unpublished one gets inherited. The only caveat is to date the number and name the rail, so a later correction does not look like the first number was never real. That also gives you a diff to point at when someone asks why the hold changed.
the stated number is the piece teams skip, and your last line is the honest version of why: the state machine shipped first and the policy number was a product decision nobody wanted to own. we settled on holding until a fixed day with a written explanation owed to the customer on release, which moved the argument from engineering to support where it belonged. on the settlement file, agreed completely. it ends arguments because it is the one artifact both sides treat as the record, and unlike the status endpoint nobody can quietly re-derive it.
The written explanation is what makes the hold defensible. Without it, support is guessing at policy and the customer hears a date with no reason. With it, the customer gets a date and a reason, and support gets a script. Moving the argument to support is the right outcome, because support owns the customer conversation and engineering owns the state machine.
the only-terminal-evidence-can-move-unknown-to-failed rule is the one that saves real money. the review state is underrated too: most teams treat conflicting evidence as an edge case and auto-pick the optimistic branch, but a payout that succeeded at the provider while the internal ledger says failed is exactly the drift that compounds quietly until a month-end statement forces the conversation. the tiered polling cadence with the daily reconciliation sweep as a backstop is a good practical shape for this, and pinning the evidence hierarchy before incidents happen is worth stealing as a checklist item.
Agreed. The hierarchy should be written down and stored with the case, so a reviewer six months later sees which source won and why. Terminal evidence means a settlement file, a provider ledger entry, or a bank statement. A webhook is a signal to go look, not the look. The review state is where the conflicting case waits instead of the optimistic branch winning by default.
Treating a payout timeout as unknown, not failed, is the rule that stops the expensive retry. I've seen a second request with a new reference land two transfers, and the webhook later can't tell you which one to keep. Using the ledger as the product's own evidence, and the webhook only as a signal to go look, is the part I'd want in the runbook before any of the polling details.
The new reference is the part to kill. A retry should carry the same client reference, so the provider can dedupe. If the retry generates a new one, the ledger cannot tell the two transfers apart after the fact, and the webhook only confirms that something landed. The runbook line is right. The ledger is evidence, the webhook is a signal to go look.