polycratia

The hosted payment page passed every test I ran on my laptop. Same card, same flow, green all the way through.

Then it went live under a merchant's own domain and branding, and a slice of payments started finishing nowhere.

Money moved on the rail. The order stayed pending.

What my machine had and production didn't was a single origin. Locally the page, the API and the session all sat on one host, so the cookie carrying the payer's session survived every redirect. In production the page lived on the merchant's domain, the flow left for the bank's step and came back, and on that cross-site return the session was gone. The page rendered a neutral state. The payment was already authorised.

Nothing errored. It surfaced later, in reconciliation: settled money with no obligation attached to it.

Two changes stuck with me after that.

First: local dev doesn't run on localhost alone for anything with a redirect in it. The page gets a real second domain, so cookie context is part of the test instead of an accident of my setup.

Second: the browser's return is a hint, not a fact. Payment state comes from the rail, reconciled server-side, and the page just reflects what reconciliation says.

I write up more of these production-versus-local gaps on my blog: https://polycratia.com/c/c6e330e9

If you ship checkout flows you probably have your own version of this, whether it was a redirect, a timezone or a worker count. Mine was the redirect.

react

$ new-project --brief

or email hey@polycratia.com