@deploybaseline/stripe
v0.14.0
Published
Stripe payments emulator for local development and tests: customers, payment methods, setup intents, customer sessions, payment intents, charges, refunds, products, prices, invoices, invoice items, subscriptions, subscription items, test clocks, checkout
Readme
@deploybaseline/stripe
Stripe payments emulator for local development and tests: customers, payment methods, setup intents, customer sessions, payment intents, charges, refunds, products, prices, invoices, invoice items, subscriptions, subscription items, test clocks, checkout sessions, events, and webhook endpoints.
Part of Baseline: local drop-in replacement services for CI and no-network sandboxes.
Usage
npx @deploybaseline/cli start --service stripeimport { createEmulator } from "@deploybaseline/cli";
const stripe = await createEmulator({ service: "stripe", port: 4009 });
// Point stripe-node at stripe.url (host, port, and protocol)
await stripe.close();stripe-node takes only host, port, and protocol, not a base path, so give Stripe its own port and do not run it behind --single-port:
import Stripe from "stripe";
const client = new Stripe("sk_test_admin", { host: "localhost", port: 4009, protocol: "http" });Documentation
- Stripe docs: request rules, payments, Connect, billing, test clocks, Checkout, webhooks, and seed config
- API reference:
http://localhost:3999/docs/stripewhile the CLI runs (how it works)
License
Apache-2.0
