Mock Payment Gatewaysfor Payment Integration Testing
Test your payment integration with realistic payment flows, checkout, webhooks, and failure scenarios without real gateway credentials or sandbox setup.
Why Developers Choose MockGateway?
Web developers often find that testing a payment integration against a gateway can be harder than it should be. Sandboxes can be slow or unreliable. Some failures are difficult to reproduce when you need them.
- Hard-to-trigger failures: Declines and timeouts are not easy to reproduce.
- Webhook setup: Testing often means setting up a tunnel.
- Flaky CI tests: Sandbox behaviour can make tests unreliable.
- Slow sandbox access: Getting access can take days.
- Setup per gateway: Every provider has its own sandbox and test data.
- Money at risk: One wrong live key can cause a real charge.
- Trigger any scenario: Declines, timeouts, retries, and 3D Secure.
- Test signed webhooks: Automatic retries when your endpoint fails.
- Keep tests predictable: Same flow, same response, every run.
- Start in 60 seconds: No need to wait for sandbox access.
- 14 gateway templates: Test multiple gateways from one account.
- No real money involved: No merchant account or live keys needed.
How MockGateway Works?
Pick a gateway template, send a payment request, choose the outcome on the checkout page, and receive the webhook. The whole round trip takes under a minute. Click any step to follow it.
Same API path as production. Every gateway gets a simulated base URL (https://mockgateway.com/api/base/{slug}). The path after it is identical to the real provider's own API, e.g. Stripe's /v1/payment_intents. Point your app at it in sandbox, then swap only the base URL when you go live, with no code changes.
Webhooks on Localhost
A tunnel gives you a new URL every restart, and the webhook settings have to be updated again each time. This one never changes.
$ npm install -g mockgateway-cli
$ mockgateway listen --forward-to http://localhost:3000/webhook
✓ Connected to MockGateway
✓ Forwarding to http://localhost:3000/webhook
14:22:07 payment.success → 200 OK 42ms
14:22:19 payment.failed → 200 OK 31ms
14:22:31 refund.completed → 500 12ms
No account anywhere else. No tunnel to sign up for, no second dashboard.
Nothing is exposed. Your machine opens the connection outward, so the receiver is never reachable from the internet.
Signatures arrive intact. The same headers a real provider sends, so your verification code is what gets tested.
Skip the checkout. mockgateway trigger sends one webhook without running a payment first.
Built-In Test Scenarios for Every Edge Case
The outcomes your real gateway will eventually return are preconfigured, deterministic, one click away.
Start Testing Payments in Minutes
Create a mock payment gateway with a real API endpoint, hosted checkout page, and webhook delivery with no credentials required.
MockGateway is in active development and improving fast.
Free forever: 500 test payment requests per month. See pricing·Read the FAQ