terminalstate

Payments that stop short of a terminal state

I connect payment providers and find out why payments hang: webhooks, retries, idempotency, reconciliation. The bugs sit between the provider and your database, not in a particular language or framework, so the stack doesn't matter: the same failures turn up in WooCommerce and Magento, Odoo and Medusa, and in custom backends.

Write to hello@terminalstate.dev — a symptom and one payment id are enough to start.

Paid at the provider, pending on your side?

A payment that sits in pending for hours is almost never stuck at the provider. The money moved, or didn't, within seconds. What is stuck is your knowledge of it: the callback carrying the final status was never applied. Between the provider and the row in your database there are seven places where that happens, and each one has its own check.

The map, with the incidents behind it: Seven places a webhook dies between the provider and your database.

Fixed upstream

The same failures, found in open-source payment code and reproduced against each project's own code before they were reported. Of eighty-five reports, thirty-three are fixed, twelve of them by my own pull requests, and five more are in progress. A few of them:

All eighty-five, and what happened to each

Work

Diagnostics are fixed-price, 50% upfront. The first stage needs read-only access only.

How an audit starts

  1. You describe the symptom and send the id of one stuck payment. I reply with which of the seven places it usually is, and what I would need to read.
  2. You export what you can: payments and their status history, inbound webhook logs, delivery attempts. callback-audit runs the first pass on those files, on your side if you prefer.
  3. Within a week: the document, and a walk-through of it.

Public work

callback-audit is a read-only tool that runs the checks that can be run from exports and tells you which place to look at next. MIT-licensed.

payout-bridge walks from your ledger to the provider's report (Stripe, Adyen) to the bank statement and names every difference: payments still pending on your side, refunds and disputes your books never saw, double charges, fees above the contract, payouts that arrived short or not at all. Read-only, MIT-licensed.

AI integration. The same discipline, applied to model APIs. Six models on one contract-extraction task: accuracy a tie, cost 35× apart, most errors from the labels — extraction-bench. More on the AI integration page.

Contact

Email: hello@terminalstate.dev. A symptom and one payment id are enough to start.