stripe
Skill1.9k starsChanged 7 months agoApache-2.0View on GitHub
Emulated Stripe API for local development and testing. Use when the user needs to process payments locally, test checkout flows, create customers, manage products and prices, handle payment intents, work with webhooks, or use the Stripe SDK without hitting real Stripe servers. Triggers include "Stripe API", "emulate Stripe", "test payments locally", "checkout flow", "payment intent", "Stripe webhook", "Stripe SDK", "STRIPE_API_KEY", or any task requiring a local Stripe API.
- Reads credentials
- Sends data out
15 other projects use a version of this.
Trending
More talk lately.about the whole repository
Most recently taken up by
- obra/muse-skillstheir own version, first seen Sep 26, 2026
- SnowBeatRain/skillstheir own version, first seen Sep 15, 2026
- schroneko/skillstheir own version, first seen Sep 3, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- Rikinshah787/agent-skills-production-skillstheir own version, first seen Aug 10, 2026
- Shanksg/clawskillstheir own version, first seen Aug 2, 2026
Who's talking about vercel-labs/emulate
- @sungkim.bsky.social“emulate Local drop-in replacement services for CI and no-network sandboxes. Fully stateful, …”Bluesky · Mar 26, 2026 · 9 likes
- @topickapp.bsky.social“https://github.com/vercel-labs/emulate CIやネットワーク制限下で使える、ローカルAPIエミュレーター集です。 …”Bluesky · Apr 6, 2026 · 2 likes
- @tech-trending.bsky.social“GitHub - vercel-labs/emulate: Local API emulation for CI and no-network sandboxes …”Bluesky · Apr 5, 2026 · 2 likes
- MarcosCamara01/ecommerce-template“chore(deps): bump the development-minor-patch group across 1 directory with 8 updates”GitHub · Sep 21, 2026 · 1 reactions
- MarcosCamara01/ecommerce-template“chore(deps): bump the development-minor-patch group with 7 updates”GitHub · Sep 14, 2026 · 1 reactions
The biggest 5 of 54 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 54
Talked about on GitHub and Bluesky (54 times).
On GitHub · 48
- Sep 21, 2026chore(deps): bump the development-minor-patch group across 1 directory with 8 updates — MarcosCamara01/ecommerce-template1 reaction · 2 comments
- Sep 14, 2026chore(deps): bump the development-minor-patch group with 7 updates — MarcosCamara01/ecommerce-template1 reaction · 2 comments
- Sep 8, 2026chore(deps): bump the development-minor-patch group with 9 updates — MarcosCamara01/ecommerce-template1 reaction · 3 comments
- Oct 5, 2026chore(deps): bump the typescript-dependencies group across 9 directories with 8 updates — paradigmxyz/centaur0 reactions
- Oct 4, 2026agent-skills.github.vercel-labs.emulate: 0.11.2 → 0.12.1 — sudosubin/agents.nix0 reactions
43 more on GitHub
- Oct 3, 2026agent-skills.github.vercel-labs.emulate: init at 0.11.2 — sudosubin/agents.nix0 reactions
- Oct 3, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 30, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 28, 2026chore(deps): bump the typescript-dependencies group across 7 directories with 5 updates — paradigmxyz/centaur0 reactions
- Sep 28, 2026chore(deps): bump the development-minor-patch group with 10 updates — demo-nexoar/ecommerce0 reactions
- Sep 28, 2026chore(deps-dev): bump emulate from 0.11.2 to 0.12.0 — biw/scaleset0 reactions
- Sep 28, 2026chore(deps): bump the development-minor-patch group across 1 directory with 9 updates — MarcosCamara01/ecommerce-template0 reactions · 1 comment
- Sep 24, 2026@shared/email: make the Resend API base URL configurable for local emulation — englishstreetventures/osn0 reactions
- Sep 24, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 23, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 23, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 21, 2026deps: bump the dev group across 1 directory with 14 updates — pai-list/AxiomID0 reactions · 2 comments
- Sep 19, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 19, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 18, 2026chore(deps-dev): bump emulate from 0.9.0 to 0.11.2 — plenoai/metsuke0 reactions · 1 comment
- Sep 14, 2026deps: bump the dev group across 1 directory with 13 updates — pai-list/AxiomID0 reactions · 3 comments
- Sep 11, 2026chore(deps-dev): bump emulate from 0.9.0 to 0.11.1 — plenoai/metsuke0 reactions · 1 comment
- Sep 10, 2026chore(deps): bump the monthly-batch group with 32 updates — withAutograph/autograph-app-builder0 reactions · 1 comment
- Sep 3, 2026chore(deps): bump the minor-and-patch group across 1 directory with 7 updates — pleaseai/asana0 reactions · 4 comments
- Aug 31, 2026deps: bump the dev group across 1 directory with 13 updates — pai-list/AxiomID0 reactions · 3 comments
- Aug 27, 2026chore(deps): bump the minor-and-patch group across 1 directory with 6 updates — pleaseai/asana0 reactions · 5 comments
- Aug 26, 2026Complete Kimi K3 architecture review loop — dearlordylord/emulate0 reactions
- Aug 25, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 24, 2026deps: bump the dev group across 1 directory with 7 updates — pai-list/AxiomID0 reactions · 3 comments
- Aug 24, 2026chore(deps-dev): bump the dev-dependencies group across 1 directory with 20 updates — pleaseai/emulate0 reactions · 3 comments
- Aug 24, 2026chore(deps): bump the production-dependencies group across 1 directory with 3 updates — pleaseai/emulate0 reactions · 3 comments
- Aug 21, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 21, 2026chore(deps-dev): bump emulate from 0.9.0 to 0.10.0 — plenoai/metsuke0 reactions · 1 comment
- Aug 18, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 14, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Jul 16, 2026📕 Vercel Emulate — recreate — BLamy/orly0 reactions · 2 comments
- Jul 4, 2026chore(deps)(deps-dev): bump @emulators/github from 0.8.0 to 0.9.0 — pai-list/AxiomID0 reactions · 4 comments
- Jul 3, 2026chore(deps-dev): bump emulate from 0.8.0 to 0.9.0 — plenoai/metsuke0 reactions
- Jun 29, 2026deps: bump the dev group with 5 updates — pai-list/AxiomID0 reactions · 2 comments
- Jun 26, 2026chore(deps-dev): bump emulate from 0.7.0 to 0.8.0 — plenoai/metsuke0 reactions · 2 comments
- Jun 23, 2026[book] Vercel Emulate — BLamy/orly0 reactions · 2 comments
- Jun 22, 2026deps: bump the dev group with 4 updates — pai-list/AxiomID0 reactions · 2 comments
- Jun 19, 2026chore(deps-dev): bump emulate from 0.6.1 to 0.7.0 — plenoai/metsuke0 reactions · 1 comment
- Jun 15, 2026chore(deps): bump the production-dependencies group across 1 directory with 2 updates — pleaseai/emulate0 reactions · 5 comments
- Jun 12, 2026chore(deps-dev): bump emulate from 0.6.0 to 0.6.1 — plenoai/metsuke0 reactions
- May 26, 2026chore(deps-dev): bump emulate from 0.4.1 to 0.6.0 — plenoai/metsuke0 reactions · 1 comment
- May 8, 2026Add example-stripe: subscription checkout with emulate + drizzle + vitest — remorses/spiceflow0 reactions · 1 comment
- Apr 21, 2026End-to-end testing for grammY bots via a Bot API emulator — grammyjs/grammYsays it tested it0 reactions · 6 comments
On Bluesky · 6
- Mar 26, 2026emulate Local drop-in replacement services for CI and no-network sandboxes. Fully stateful, production-fidelity API emulation. Not mocks.… — @sungkim.bsky.social9 likes and reposts
- Apr 6, 2026https://github.com/vercel-labs/emulate CIやネットワーク制限下で使える、ローカルAPIエミュレーター集です。 VercelやGitHub、Google、Slack、Apple、Microsoft、AWSを再現できます。… — @topickapp.bsky.social2 likes and reposts
- Apr 5, 2026GitHub - vercel-labs/emulate: Local API emulation for CI and no-network sandboxes https://github.com/vercel-labs/emulate — @tech-trending.bsky.social2 likes and reposts
- Apr 10, 2026github.com/vercel-labs/emulate GitHub - vercel-labs/emulate: Local API emulation for CI and no-network sandboxes — @technews4869.bsky.social1 likes and repost
- Apr 9, 2026サーバー側のレンダリングをエミュレートして検証できるVercelの開発用ツールっぽい 複雑な構成のデプロイ前に動作確認できて便利そう yug1224 starred vercel-labs/emulate… — @yug1224.com1 likes and repost
1 more on Bluesky
- Apr 5, 2026VercelやGitHub、Google、Slack、AWS(S3/SQS)などのAPIをローカルでエミュレートするツール。 CIやネットワークのないサンドボックス環境で、外部APIのモックサーバとして利用できる。 各サービスはステートフルにデータを保持し、OAuth… — @azu.bsky.social1 likes and repost
Used with
Projects with it also use hubspot and notion.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
refly-aiSkillhubspot
Integrate with HubSpot for CRM management. Use when you need to: (1) manage contacts and deals, (2) track sales pipelines, or (3) automate marketing and CRM workflows.
Also in 3 projects that use this
SentrySkillnotion
Search, fetch, create, update, and move Notion pages and data sources. Use when users ask to look up docs, specs, notes, meeting notes, project context, roadmaps, trackers, or internal references stored in Notion, or when they explicitly ask to create or edit Notion content.
Also in 3 projects that use this
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- Mindrally/skills★ 266same name
- refly-ai/refly-skills★ 203same name
- HybridAIOne/hybridclaw★ 157same name
- magnus919/agent-skills★ 109same name
- algoderiv/agent-skills★ 59same name
- alanalvestech/hitank★ 38same name
- kumaran-is/claude-code-onboarding★ 36same name
- obra/muse-skills★ 14same name
- YepAPI/skills★ 8same name
- Roentek/Claude_Code_Boilerplate_Framework★ 4same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
No real payments are processed.
- Very specific: line 53
When using @emulators/adapter-next, the emulator runs inside your Next.js app at /emulate/stripe.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Stripe API Emulator
Fully stateful Stripe API emulation. Customers, products, prices, checkout sessions, payment intents, charges, and payment methods persist in memory. Webhooks fire on state changes. The hosted checkout UI lets you complete payments in the browser.
No real payments are processed. Every Stripe SDK call hits the emulator and produces realistic responses.
Start
Local listeners bind to 127.0.0.1 by default. For access from containers or other machines, pass --host 0.0.0.0 to the CLI or hostname: '0.0.0.0' to createEmulator. Configure --base-url or baseUrl for advertised URLs reachable by those clients.
# Stripe only
npx emulate --service stripe
# Default port (when run alone)
# http://localhost:4000Or programmatically:
import { createEmulator } from 'emulate'
const stripe = await createEmulator({ service: 'stripe', port: 4000 })
// stripe.url === 'http://localhost:4000'Pointing Your App at the Emulator
Stripe SDK
The Stripe Node.js SDK does not read an environment variable for the base URL. You must pass it when constructing the client:
import Stripe from 'stripe'
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
apiVersion: '2024-12-18.acacia',
host: 'localhost',
port: 4000,
protocol: 'http',
})Embedded in Next.js (adapter-next)
When using @emulators/adapter-next, the emulator runs inside your Next.js app at /emulate/stripe. The SDK needs to point at localhost with a proxy route to forward /v1/* calls to /emulate/stripe/v1/*:
// next.config.ts
import { withEmulate } from '@emulators/adapter-next'
export default withEmulate({
env: {
STRIPE_SECRET_KEY: 'sk_test_emulated',
},
})// lib/stripe.ts
import Stripe from 'stripe'
const port = process.env.PORT ?? '3000'
export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
apiVersion: '2024-12-18.acacia',
host: 'localhost',
port: parseInt(port, 10),
protocol: 'http',
})// app/emulate/[...path]/route.ts
import { createEmulateHandler } from '@emulators/adapter-next'
import * as stripe from '@emulators/stripe'
export const { GET, POST, PUT, PATCH, DELETE } = createEmulateHandler({
services: {
stripe: {
emulator: stripe,
seed: {
products: [
{ id: 'prod_widget', name: 'Widget', description: 'A useful widget' },
],
prices: [
{ id: 'price_widget', product_name: 'Widget', currency: 'usd', unit_amount: 1000 },
],
webhooks: [
{
url: `http://localhost:${process.env.PORT ?? '3000'}/api/webhooks/stripe`,
events: ['*'],
},
],
},
},
},
})// app/v1/[...path]/route.ts (proxy for Stripe SDK)
const STRIPE_URL = `http://localhost:${process.env.PORT ?? '3000'}/emulate/stripe`
async function handler(req: Request, ctx: { params: Promise<{ path: string[] }> }) {
const { path } = await ctx.params
const url = new URL(req.url)
const target = `${STRIPE_URL}/v1/${path.join('/')}${url.search}`
const res = await fetch(target, {
method: req.method,
headers: req.headers,
body: req.body,
duplex: 'half',
} as any)
return new Response(res.body, {
status: res.status,
statusText: res.statusText,
headers: res.headers,
})
}
export { handler as GET, handler as POST, handler as PUT, handler as PATCH, handler as DELETE }Direct fetch
curl http://localhost:4000/v1/customers \
-H "Authorization: Bearer sk_test_emulated"Seed Config
Seed data is optional. All entities support an optional id field for deterministic IDs that survive server restarts.
stripe:
customers:
- id: cus_demo
email: demo@example.com
name: Demo User
products:
- id: prod_tshirt
name: T-Shirt
description: A comfortable tee
prices:
- id: price_tshirt
product_name: T-Shirt
currency: usd
unit_amount: 2500
webhooks:
- url: http://localhost:3000/api/webhooks/stripe
events: ['*']
secret: whsec_testThe product_name field in prices links to the product by name. Use events: ['*'] to receive all webhook events, or specify individual event types.
API Endpoints
Customers
# Create customer
curl -X POST http://localhost:4000/v1/customers \
-d "email=user@example.com" -d "name=Jane Doe"
# Retrieve customer
curl http://localhost:4000/v1/customers/cus_xxx
# Update customer
curl -X POST http://localhost:4000/v1/customers/cus_xxx \
-d "name=Updated Name"
# Delete customer
curl -X DELETE http://localhost:4000/v1/customers/cus_xxx
# List customers
curl http://localhost:4000/v1/customersProducts
# Create product
curl -X POST http://localhost:4000/v1/products \
-d "name=Widget" -d "description=A useful widget"
# Retrieve product
curl http://localhost:4000/v1/products/prod_xxx
# List products
curl "http://localhost:4000/v1/products?active=true"Prices
# Create price
curl -X POST http://localhost:4000/v1/prices \
-d "product=prod_xxx" -d "currency=usd" -d "unit_amount=1000"
# Retrieve price
curl http://localhost:4000/v1/prices/price_xxx
# List prices
curl "http://localhost:4000/v1/prices?active=true"Checkout Sessions
# Create checkout session
curl -X POST http://localhost:4000/v1/checkout/sessions \
-d "mode=payment" \
-d "line_items[0][price]=price_xxx" \
-d "line_items[0][quantity]=1" \
-d "success_url=http://localhost:3000/success?session_id={CHECKOUT_SESSION_ID}" \
-d "cancel_url=http://localhost:3000/cart"
# Retrieve session
curl http://localhost:4000/v1/checkout/sessions/cs_xxx
# List sessions
curl http://localhost:4000/v1/checkout/sessions
# Expire a session
curl -X POST http://localhost:4000/v1/checkout/sessions/cs_xxx/expireThe session's url field points to a hosted checkout page at /checkout/cs_xxx. Clicking "Pay" on that page completes the session, fires the checkout.session.completed webhook, and redirects to success_url. The {CHECKOUT_SESSION_ID} template in success_url is replaced with the actual session ID.
Payment Intents
# Create payment intent
curl -X POST http://localhost:4000/v1/payment_intents \
-d "amount=2000" -d "currency=usd"
# Retrieve
curl http://localhost:4000/v1/payment_intents/pi_xxx
# Update
curl -X POST http://localhost:4000/v1/payment_intents/pi_xxx \
-d "amount=3000"
# Confirm (triggers payment_intent.succeeded + charge.succeeded webhooks)
curl -X POST http://localhost:4000/v1/payment_intents/pi_xxx/confirm
# Cancel
curl -X POST http://localhost:4000/v1/payment_intents/pi_xxx/cancel
# List
curl http://localhost:4000/v1/payment_intentsCharges
# Retrieve charge
curl http://localhost:4000/v1/charges/ch_xxx
# List charges
curl http://localhost:4000/v1/chargesCharges are created automatically when a payment intent is confirmed.
Customer Sessions
# Create customer session
curl -X POST http://localhost:4000/v1/customer_sessions \
-d "customer=cus_xxx"Payment Methods
# List payment methods
curl http://localhost:4000/v1/payment_methodsWebhooks
The emulator dispatches webhook events when state changes. Register webhooks via seed config or programmatically.
Webhooks configured with a secret include Stripe-Signature: t=<timestamp>,v1=<signature>. The signature is an HMAC SHA-256 over <timestamp>.<raw body>.
Events dispatched
| Event | Trigger |
customer.created | Customer created |
customer.updated | Customer updated |
customer.deleted | Customer deleted |
product.created | Product created |
price.created | Price created |
payment_intent.created | Payment intent created |
payment_intent.succeeded | Payment intent confirmed |
payment_intent.canceled | Payment intent canceled |
charge.succeeded | Payment intent confirmed (charge auto-created) |
checkout.session.completed | Checkout completed via hosted page |
checkout.session.expired | Checkout session expired |
Webhook handler example
// app/api/webhooks/stripe/route.ts
import { NextResponse } from 'next/server'
export async function POST(request: Request) {
const body = await request.json()
const event = body.type as string
const obj = body.data?.object
switch (event) {
case 'customer.created':
console.log('Customer created:', obj.id, obj.email)
break
case 'checkout.session.completed':
console.log('Checkout completed:', obj.id)
break
case 'payment_intent.succeeded':
console.log('Payment succeeded:', obj.id)
break
case 'charge.succeeded':
console.log('Charge succeeded:', obj.id)
break
}
return NextResponse.json({ received: true })
}Common Patterns
Checkout Flow (embedded Next.js)
// Server action
const customer = await stripe.customers.create({
email: 'shopper@example.com',
name: 'Demo Shopper',
})
const session = await stripe.checkout.sessions.create({
mode: 'payment',
customer: customer.id,
line_items: [{ price: 'price_widget', quantity: 2 }],
success_url: `${origin}/success?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${origin}/cart`,
})
redirect(session.url!)Retrieve Session on Success Page
const session = await stripe.checkout.sessions.retrieve(session_id)
const customer = await stripe.customers.retrieve(session.customer as string)
console.log(session.payment_status) // 'paid'
console.log(customer.name) // 'Demo Shopper'Payment Intent Flow (no checkout UI)
const pi = await stripe.paymentIntents.create({
amount: 5000,
currency: 'usd',
customer: 'cus_xxx',
})
// Confirm triggers payment_intent.succeeded + charge.succeeded webhooks
const confirmed = await stripe.paymentIntents.confirm(pi.id)
console.log(confirmed.status) // 'succeeded'Custom emulators alongside built-ins
Use npx emulate init --custom inventory to scaffold a third-party API emulator and test. Register it in emulate.config.ts with defineConfig from emulate, alongside built-in entries such as { emulator: "stripe" }. Run npx emulate start --watch to reload imports and inspect custom state at the printed /_emulate URL. Successful reloads reset the run to seed. Existing flat seed configs still work; --config selects an explicit file. For authoring and testing third-party API emulators, see https://emulate.dev/docs/custom-emulators.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

