All work
12 · fintech · payments
ACH and card payments, tracked to settlement
Debits move from submission to settlement through explicit states, with safe retries and a clear path to collections.
- Client
- US consumer lender
- Role
- Lead Engineer
- Period
- Devinware LLC · ongoing
Problem
Debits on ACH and card rails fail in many ways (R01 insufficient funds, closed, stopped or frozen accounts), and each failure needs a different, auditable next step.
How it works
- 01ScheduledA payment is due on the loan.
- 02SubmittedThe debit goes out on ACH or card rails.
- 03Pending settlementAccepted and waiting for the bank.
- 04SettledMoney arrived; the loan is updated.
When a debit fails
- ReturnedReturn codes such as R01 (insufficient funds) map to a defined next step.
- RetryScheduled only when balance, retry-window and attempt-limit checks pass.
- OtherwiseWait, ask the borrower to pick a date, or hand off to collections.
- Written offAdmins are warned, then automatic debits stop.
What I built
- Explicit states for each debit, from submission to settlement.
- Return-code handling (R01 NSF, account closed, stopped, frozen) mapped to specific next steps.
- Card collection with partial and split payments within a fixed attempt cap.
- Write-off rules that warn admins, then stop automatic debits on written-off loans.
Guardrails
- A retry is scheduled only when balance, retry-window and attempt-limit checks pass.
Result
Every debit has a known state, and every failure has a defined next step.
media note
Client systems are under NDA, so this case study uses words and a diagram instead of screenshots.