Test Crypto Payments: Regtest for CI, Testnets for Real Wallet Checks
Test crypto payments safely with sandbox checks, public testnets, and regtest. Verify checkout, webhooks, confirmations, refunds, and edge cases before...
Test crypto payments safely with sandbox checks, public testnets, and regtest. Verify checkout, webhooks, confirmations, refunds, and edge cases before...

The safest way to test crypto payments combines three environments: a sandbox or test API mode for fast UI and API checks, a public testnet for realistic network behavior, and regtest or a private chain for deterministic, repeatable checks in continuous integration. Fund test wallets from faucets, run the full payment flow end to end, and confirm every result with a block explorer or webhook log before touching real funds.
TL;DR:
- On Bitcoin regtest, mine blocks on demand and allow about 101 blocks before spending coinbase funds; use testnet to check real wallet and explorer visibility.
- Test failed, underfunded, and replayed payments, then verify webhook signatures, retry handling, idempotency, and matching refund entries in gateway records and your ledger.
- Set confirmation thresholds separately for each chain, and test gas pricing, nonce stalls, token transfers, and native asset labels rather than relying on generic flows.
- Never use a production private key in testing; isolate test credentials and CI accounts funded in advance so a leaked key cannot reach real funds.
- Test checkout on both a mobile wallet and a browser extension, ensuring QR codes scan, deep links open correctly, and sessions survive app closure.
A sandbox is a vendor-controlled test mode that mimics your payment gateway’s API without touching a real blockchain. A public testnet is a live, shared network (Bitcoin testnet, Ethereum Sepolia) that behaves like the mainnet but uses worthless coins. Regtest and private chains are networks you control entirely, where you can mine blocks on demand instead of waiting for the network.
Each option trades realism for speed and control:
Mirror production settings, like required confirmation counts and fee or gas estimation, once you move past sandbox mode so staging tests catch issues that sandbox cannot.
Pro Tip: Run unit and API tests in sandbox, integration tests on a public testnet, and anything confirmation-sensitive in regtest where block timing never flakes.
Bitcoin Core supports both modes directly through configuration flags, according to Bitcoin’s developer documentation on testing applications.
bitcoind or bitcoin-cli with -testnet for the public test network, or -regtest for a private, isolated chain you control.generate RPC to mine blocks instantly, including the roughly 101 blocks needed before a coinbase output becomes spendable, then use RPC calls to create and inspect transactions, a workflow Bitcoin’s documentation recommends for confirmation-sensitive code.Regtest is the better default for CI because it removes network variance entirely, while testnet remains necessary for checking how real wallets and explorers see your transactions.
Sepolia is the commonly recommended default testnet for dApp development, according to Ethereum’s developer documentation, while ephemeral or local private chains suit fast, repeated iterations better than any shared public network.
This layered approach, sandbox first, testnet for integration, private chains for repeatable CI, matches what Infura’s own guidance suggests for teams working across multiple networks.
Test funds come from faucets, bridges, and, for CI, pre-funded accounts you manage yourself.
Pro Tip: Keep a small pool of pre-funded test accounts dedicated to CI so a dry faucet never blocks your pipeline.
A full flow test starts at the API and ends at reconciliation, with every failure mode exercised in between.
Key checks to cover before release:
Our own guide to webhooks and idempotency walks through retry handling and duplicate protection in more detail.
Pro Tip: Test webhook handling before anything else; a broken webhook is the single most common cause of orders that never settle correctly.
Every test transaction needs independent verification outside your own application logs.
Regtest lets you generate blocks on demand rather than waiting for network confirmations, which is why Bitcoin’s testing documentation recommends it for any test that depends on exact confirmation counts. That control turns a flaky, time-dependent test into one that runs the same way every time.
Each network you support brings its own confirmation timing, fee model, and failure pattern, so a single test suite rarely covers all of them well. Bitcoin-style chains confirm in blocks and need a minimum confirmation count before you treat a payment as final, while account-based chains like Ethereum rely on gas pricing and nonce ordering that can cause a transaction to stall without technically failing.
Build a per-network test matrix rather than one generic flow:
If you support auto-conversion to a stablecoin, test that conversion step as its own unit rather than assuming it inherits correctness from the underlying transfer test.
A payment integration earns trust in how it handles failure, not just success. Build dedicated test cases for the scenarios that break naive implementations.
Each of these cases should have its own assertion in your test suite rather than being covered incidentally by a happy-path test. A payment gateway that only tests success paths will eventually fail in production in a way that costs a real customer money or trust.
Signature validation and replay protection sit at the center of any secure crypto payment integration, and both need direct test coverage rather than casual review.
A partner audit can add a layer of rigor here: Solusec’s penetration testing services cover web and infrastructure testing that can validate signature handling and key isolation alongside your own test suite. Treat security testing as ongoing rather than a one-time pre-launch checklist, since a new webhook endpoint or payout feature reopens the same signature and replay questions.
A payment that works perfectly from a desktop browser with a browser extension wallet can still fail on a phone with a different wallet app, so device and wallet coverage deserves its own test pass. Confirm your hosted checkout page renders correctly and remains scannable on a small screen, since a QR code that is too small or a deep link that targets the wrong wallet app breaks the flow before a payer even sends a transaction.
Test the payment flow with at least one mobile wallet and one browser extension wallet, checking that deep links open the correct app and that a QR code scans cleanly on both. A real-world example of this matters: CryptoeSIM’s crypto checkout flow shows how a straightforward checkout and delivery process looks from the payer’s side, which is a useful reference point when reviewing your own redirect and confirmation screens.
Confirm your success and failure pages display clearly regardless of device, and that a payer who closes the wallet app mid-transaction can return to checkout without losing their session. A broken redirect or a confirmation screen that never updates is one of the most common reasons a completed payment gets reported as a failed one.

The most common mistake we see is reusing a production API key in a test environment, which turns a routine integration test into a real liability. Skipping webhook tests until late in development is a close second, since webhook bugs are the hardest to catch after launch.
Our own recommendation: build webhook tests first, run confirmation-sensitive logic against regtest or a private chain in CI, and watch confirmation timing in staging before any production rollout.
— Dustin
Our gateway supports testing a full integration before a single real coin moves. Our sandbox mode gives you test API keys, a hosted checkout page, and support for the same 110+ cryptocurrencies available in production, so your test flow matches what a real payer will see.

You can exercise invoice creation, redirect handling, and webhook delivery entirely in test mode through our gateway documentation, then move to live keys once your test suite passes. Teams onboard without a KYC process or long setup delay, so you can move from sandbox to a live Crypto Payments integration in the same week you start testing. Reach out through our site if you want help validating your webhook handling or your multi-currency flow before launch.
The best system depends on your priorities: transaction fees, supported coins, and whether you need KYC-free onboarding all vary by provider. Compare fee structures and supported currencies directly, since a lower headline fee can still cost more depending on your transaction volume.
A test payment is a transaction run in a sandbox, testnet, or regtest environment using coins or tokens that carry no real value, used to confirm an integration works correctly. It lets you verify checkout flows, webhooks, and error handling without risking real funds.
The IRS treats virtual currency as property for federal income tax purposes and requires taxpayers to report taxable events involving digital assets, according to its FAQs on virtual currency transactions. Testnet transactions have no monetary value and fall outside this reporting requirement, but real production transactions do need accurate records.
Most public blockchains, including Bitcoin and Ethereum, record every transaction on a public ledger that anyone can inspect through a block explorer. A transaction’s wallet addresses are visible, though the identity behind an address is not shown directly on the ledger itself.
Open a free CryptoPayr account and take your first crypto payment the same day.
Get started for free
Secure crypto IPN webhooks with HTTPS, signature checks, replay protection, and idempotency. Learn how to prevent retries from fulfilling orders twice.
Add wallet support to crypto checkout with hosted checkout, plugins, or an API fallback. Cover mobile handoffs, secure requests, and gasless options.
Cut crypto checkout fees and reduce abandonment with five changes you can ship in a sprint, from fee visibility to gas sponsorship and payout routing.