api.live

api.live / Mock API server

A mock API server that runs on your machine

When your code calls a payment provider, an email service or another team's API, you need a stand-in for testing. api.live includes a mock server that behaves like a real service.

Download the Mac app See how it works

Free. No account. macOS app, plus a CLI for macOS, Linux and Windows.

What it does

Start it

api mock                 # every mock service in the workspace
api mock payments -p 4010

Use the mock inside a test

This is where it differs from a standalone mock tool. A test can start the mock, run your flow, and then ask the mock what it received. For example: send the same order 20 times at once, then check that the payment mock got exactly one charge. That catches double-charge bugs that are hard to test any other way.

Receive webhooks

A test can wait for a callback to arrive at the mock, such as a payment webhook, and continue once it lands.

What to know before you switch

Try it

brew install --cask apilivehq/tap/api-live   # Mac app
npm i -g @apilivehq/cli                      # CLI: macOS, Linux, Windows

Or download it from GitHub Releases. Found a bug? Open an issue.

More