posted an update —

We spent the week after the deadline breaking our own code

The submission went in on the 12th. Instead of leaving it there, we went back and read the whole thing properly — the way someone else would, looking for the places where it does not do what we say it does.

We found six. Two of them were bad.

An old endpoint could move money without asking the policy engine. TrustPay's whole claim is that funds only move after a deterministic rule engine says yes. Early in the build we had a plain /api/paypal/capture route for testing PayPal, and we never deleted it. It called PayPal directly. Anyone who found that URL could have captured a payment with the policy engine sitting right there, unused. The gate was real everywhere it mattered, but there was a door next to it.

A client could turn the safety rules off. The edit endpoint merged whatever JSON you sent into the contract. The contract is also where the safety flags live — "all criteria must be met", "a human must approve". So you could send those two set to false, and then the two rules that check them would pass themselves. The rule engine was fine. We were just letting people rewrite its input.

That second one is the more interesting mistake. Nothing was wrong with the logic we were proud of. The problem was that we had not thought about who is allowed to change what it reads.

What else came out of it

  • The proof bundle recalculated the policy decision when you downloaded it, instead of showing the one that was actually used. After a capture, one of the rules correctly starts failing — so a successful payment's receipt claimed the payment should have been blocked. It now stores the verdict at the moment the gate ran.
  • Editing a contract's amount did not update the capture limit, so you could end up funding the old number.
  • Submitting new evidence wiped out a human's override.
  • Contracts that were already paid or cancelled could be reopened.

Setup was harder than it should have been

One thing cost us hours during the build and we did not want anyone else to hit it. If your PayPal sandbox business account is registered in a country that does not accept your currency, PayPal does not tell you at order creation. It tells you at the very last screen, after the buyer logs in — and it looks exactly like a broken login loop. We thought our auth was broken for a long time.

So there is now a /diagnostics page. It checks the credentials, requests a real OAuth token, creates a probe order, confirms the browser-side client id matches, and calls Gemini and reports which model answered. Where it cannot actually verify something — and PayPal gives no way to ask which currencies a merchant accepts — it says so plainly instead of pretending it checked.

We also deleted a lot of dead code. We had installed thirteen UI components and used two.

Why we are posting this

Every one of these is written up in docs/defect-report.md in the repo: what the bug was, what it would have cost, and the fix. It would have been easier to patch them quietly.

But the point of TrustPay is that you can look at a payment afterwards and see exactly why it went through. A project arguing for that should be able to do the same thing to itself.

The product has not changed. The demo is the same one in the video. There is just less wrong with it underneath.

Live: https://trustpay-ngt6.onrender.com