All templates

Payments

Mock the Stripe API

Customers, payment intents, and a declined-card path you can trigger on demand.

5 routes · live immediately · no account needed

A stand-in for Stripe's REST API so you can build and test checkout flows without touching test keys, waiting on network calls, or hunting for a card number that reproduces the failure you need. Includes a conditional route that returns a real card_declined error when the amount is 4000, so your error handling gets exercised on purpose rather than by accident.

What you get

GET/v1/customers200 OK
POST/v1/customerstemplated200 OK
GET/v1/customers/{id}templated200 OK
POST/v1/payment_intentstemplated200 OK
POST/v1/payment_intentsconditional402 Payment Required

Example response

GET /v1/customers

{
  "object": "list",
  "url": "/v1/customers",
  "has_more": false,
  "data": [
    {
      "id": "cus_NffrFeUfNV2Hib",
      "object": "customer",
      "created": 1680893993,
      "email": "ada@example.com",
      "name": "Ada Lovelace",
      "currency": "usd",
      "balance": 0,
      "delinquent": false,
      "livemode": false
    },
    {
      "id": "cus_Nn2sFhTGVXcQmS",
      "object": "customer",
      "created": 1681498112,
      "email": "alan@example.com",
      "name": "Alan Turing",
      "currency": "usd",
      "balance": 0,
      "delinquent": false,
      "livemode": false
    }
  ]
}

Good for

  • Build a checkout UI before wiring up real Stripe keys
  • Reproduce a declined card every time, without test card numbers
  • Run CI against payments code with no network calls or rate limits

Response payloads are representative examples using this API's real field names and object shapes, not an exhaustive replica of its schema. MockBase is an independent tool and is not affiliated with, endorsed by, or sponsored by Stripe.