stripe-mock for Mac
stripe-mock is a mock HTTP server based on the real Stripe API. It accepts the same requests and parameters that the Stripe API accepts, and rejects requests whose parameters are not recognized or have incorrect types.
stripe-mock — overview
stripe-mock is a mock HTTP server based on the real Stripe API. It accepts the same requests and parameters that the Stripe API accepts, and rejects requests whose parameters are not recognized or have incorrect types. Its responses resemble the responses of the real Stripe API in terms of data type; however, stripe-mock does not attempt to reproduce the _behavior_ of the real Stripe API at all. It cannot reject all invalid requests, and its responses are completely hardcoded. They will have a correct type, but they will not necessarily be realistic Stripe responses.
stripe-mock is meant for basic sanity checks. We use it in the test suites of our server-side SDKs, like stripe-ruby, stripe-go, etc, to help validate that the SDK hits the right URL and sends the right parameters. If you have more sophisticated testing needs, you shouldn't use stripe-mock. Always test changes to your Stripe integration against testmode. For regression test suites, you should define your own mocks, or use a playback testing tool such as the VCR gem.
While stripe-mock is naïve, it is powered by the Stripe OpenAPI specification and is therefore kept up-to-date with the latest methods, resources, and fields.
Features and limitations
stripe-mock supports the following features: It has a catalog of every API URL and their signatures. It responds to URLs that exist with a resource that it returns and 404s on URLs that don't exist. JSON Schema is used to check the validity of the parameters of incoming requests. Validation is comprehensive, but far from exhaustive, so don't expect the full barrage of checks of the live API. Responses are generated based off resource fixtures. They're also generated from within Stripe's API, and similar to the sample data available in Stripe's API reference. They are hardcoded, and will not necessarily represent realistic responses based on the parameters you input into the request. It reflects the values of valid input parameters into responses where the naming and type are the same. So if a charge is created with amount=123, a charge will be returned with "amount": 123. It will respond over HTTP or over HTTPS. HTTP/2 over HTTPS is available if the client supports it.
Limitations: stripe-mock is stateless. Data you send on a POST request will be validated, but it will be completely ignored beyond that. It will not be reflected on the response or on any future request -- unlike the real Stripe API, which stores the information you send it. For polymorphic endpoints (say one that returns either a card or a bank account), only a single resource type is ever returned. There's no way to specify which one that is. It's locked to the latest version of Stripe's API and doesn't support old versions. Testing for specific responses and errors is currently not supported. It will return a success response instead of the desired error response.
Future plans
Details
模拟 HTTP 服务器,响应方式像真实的 Stripe API
How to install stripe-mock
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2026-10-01; current version v0.206.0, with the latest 10 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| v0.206.0 | 2026-10-01 | Stable | 5.1 MB | Download | Download | Download |
| v0.205.0 | 2026-09-25 | Stable | 5.1 MB | Download | Download | Download |
| v0.204.0 | 2026-09-24 | Stable | 5.1 MB | Download | Download | Download |
| v0.203.0 | 2026-08-26 | Stable | 5.1 MB | Download | Download | Download |
| v0.202.0 | 2026-07-23 | Stable | 4.7 MB | Download | Download | Download |
| v0.201.0 | 2026-05-28 | Stable | 4.7 MB | Download | Download | Download |
| v0.200.0 | 2026-05-26 | Stable | 4.7 MB | Download | Download | Download |
| v0.199.0 | 2026-05-07 | Stable | 4.6 MB | Download | Download | Download |
| v0.198.0 | 2026-04-28 | Stable | 4.6 MB | Download | Download | Download |
| v0.197.0 | 2025-10-01 | Stable | 4.4 MB | Download | Download | Download |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Prebuilt bottle platforms
Official Homebrew bottles cover:
- Apple silicon · latest macOS
- Apple silicon · macOS 26 Tahoe
- Apple silicon · macOS 15 Sequoia
- Linux · ARM64
- Linux · x86_64
⚠️ No prebuilt bottle for Intel Macs; Intel users need brew install --build-from-source to build from source.
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| stripe-mock | v0.206.0 | MIT | CLI | 12 |
| corkscrew | 2.0 | GPL-2.0-or-later | CLI | 25 |
| ipmiutil | 3.2.3 | BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-or-later | CLI | 26 |
| tofu-ls | v0.5.3 | MPL-2.0 | CLI | 26 |
Similar apps: Command-line Tools
corkscrew
corkscrew is a small command-line utility built specifically to solve the problem of being…ipmiutil
ipmiutil is a suite of command-line tools for managing servers that support the IPMI protocol.tofu-ls
OpenTofu Language Serverbbe
bbe is a command-line editing tool for binary files, following an approach similar to the…openssl@4
Cryptography and SSL/TLS Toolkitxz
General-purpose data compression with high compression ratioCategories: Command-line Tools