The sandbox is not the bank

• Futurify Team

The sandbox is not the bank: what payment test environments never show you

The integration passes every test.

Charges approve. Webhooks arrive in under a second. Refunds go through. The demo is clean. Everyone signs off and you go live on a Tuesday.

By Friday, something is off. A payment that “succeeded” comes back returned. A webhook shows up twice, then one shows up four hours late. A batch sent at 4:58pm lands two days later than the product said it would.

None of this was a bug in the sandbox. The sandbox just never does these things.

A sandbox is a happy simulator

A sandbox is a happy simulator: green tests that never act like the bank

Processors build test environments so you can wire up the calls. That’s what they’re for. They check that your request has the right shape and your keys work.

They are not built to act like the bank. Most of them approve on the spot, settle instantly or never, send each webhook once and in order, and have no idea what a holiday is. Some give you magic card numbers for declines. Very few give you a way to make a bank debit come back nine days later.

So a green sandbox tells you one thing: you can talk to the processor. It does not tell you that your product survives what the processor says back over the next two weeks.

The paths that only show up in production

Paths that only show up in production: late returns, duplicate webhooks, cutoffs

These are the ones that bite almost every team we work with:

  • Late returns. A bank debit looks done, then comes back days later. Your product already shipped the order or released the funds.
  • Duplicate and out-of-order webhooks. “Settled” arrives before “pending.” The same event arrives twice. Your code assumed once, in order.
  • Cutoffs and bank days. A file sent after cutoff, or on a Friday before a long weekend, moves later than the calendar says.
  • Timeouts that actually went through. The call times out, you retry, and the first one had worked.
  • Partial things. Partial refunds, partial captures, a settlement deposit that is net of fees and holds.
  • Soft declines. The card is fine, the moment is not, and a blind retry makes it worse.

We’ve written about most of these on their own. The common thread is that none of them happen in a sandbox by default. You have to make them happen.

Make the ugly paths happen on purpose

Make the ugly paths happen on purpose: stubs, recorded events, fake clocks

You don’t need a fancy test lab. You need a short list and the discipline to run it before launch.

  • Fake the processor, not just the network. Put a thin stub in front of your processor client that can replay any event you choose: late return, duplicate webhook, settled-before-pending, timeout-then-success.
  • Use recorded events. Once you have real production webhooks, scrub them and keep them as fixtures. Real payloads are weirder than docs.
  • Move the clock. Run your state machine with a fake clock across a weekend, a holiday, and a missed cutoff. Check what the customer sees on each day.
  • Test the money, not the screen. After each scenario, does your ledger still tie out? Is every payment in exactly one state? Is anything stuck with no owner?
  • Write down what the sandbox can’t do. Every processor has gaps. Keep a list per integration so nobody assumes coverage that isn’t there.

The goal is not 100% coverage. The goal is that the first time your product sees a late return, it’s in a test, not in a support ticket.

Run a small live pilot

Run a small live pilot: real money in small amounts before everyone flips over

Even a good stub is still your guess about the bank.

So before you flip everyone over, move real money in small amounts with people who know it’s a pilot. Your own team’s accounts. A handful of friendly customers. A few days that include a weekend if you can.

Watch three things: when money actually lands versus when the product said it would, what events arrive and in what order, and what ends up in the exception queue. That week tells you more than a month of sandbox runs.

What this looks like on launch week

Launch week with vs without: boring queues beat surprise hotfixes

Without this, launch week is a hunt. Support finds the first returned debit. Engineering finds the duplicate webhook in logs. Finance finds that the deposit doesn’t match the sales report. Each one is a surprise, and each fix is a hotfix.

With it, launch week is boring. The late return lands in a queue that already exists. The duplicate webhook is ignored because the handler was built for it. The Friday batch shows the right date because the product already knew about cutoffs.

Boring is the point. Payments should be the least exciting part of your launch.

What to check this week

What to check this week: replay bad events, fake a weekend, list sandbox gaps

  1. Can you replay a late return or a duplicate webhook against your staging stack today?
  2. Have you run your payment flows across a fake weekend or holiday?
  3. Do you have a written list of what your processor’s sandbox doesn’t simulate?

If any answer is no, start with the first one. One replayable bad event beats a hundred green happy-path tests.

Futurify builds the software around your payments: the states, the queues, and the tests for the paths sandboxes skip. We don’t hold funds. If you want to talk it through, email us at hello@futurify.io.

Ready to modernize your legacy system?

Let's talk about how we can help you identify and fix what's slowing you down.

Book a Call →