{"connections":[{"id":"stripe-node","title":"Stripe SDK (TypeScript)","kind":"sdk","language":"typescript","description":"Point the Stripe Node SDK at the emulator instance.","template":"import Stripe from \"stripe\";\n\nconst url = new URL(\"{{baseUrl}}\");\nconst stripe = new Stripe(\"{{token}}\", {\n  host: url.hostname,\n  port: Number(url.port),\n  protocol: url.protocol.replace(\":\", \"\"),\n});","body":"import Stripe from \"stripe\";\n\nconst url = new URL(\"https://stripe.your-instance.emulators.dev\");\nconst stripe = new Stripe(\"<token>\", {\n  host: url.hostname,\n  port: Number(url.port),\n  protocol: url.protocol.replace(\":\", \"\"),\n});"},{"id":"stripe-env","title":"Stripe env","kind":"env","language":"bash","description":"Expose the emulator base URL and a secret key to your app.","template":"STRIPE_API_BASE={{baseUrl}}\nSTRIPE_SECRET_KEY={{token}}","body":"STRIPE_API_BASE=https://stripe.your-instance.emulators.dev\nSTRIPE_SECRET_KEY=<token>"},{"id":"curl","title":"curl","kind":"curl","language":"bash","description":"Call the REST API directly.","template":"curl -s {{baseUrl}}/v1/customers -H \"authorization: Bearer {{token}}\"","body":"curl -s https://stripe.your-instance.emulators.dev/v1/customers -H \"authorization: Bearer <token>\""},{"id":"base-url","title":"Base URL (env)","kind":"env","language":"bash","description":"Point your SDK or app at the emulator instead of the real provider.","template":"{{SERVICE_UPPER}}_BASE_URL={{baseUrl}}","body":"STRIPE_BASE_URL=https://stripe.your-instance.emulators.dev"},{"id":"create-credential","title":"Create a credential","kind":"curl","language":"bash","description":"Mint a working credential for this instance.","template":"curl -s -X POST {{controlBaseUrl}}/credentials \\\n  -H \"content-type: application/json\" \\\n  -d '{\"type\":\"{{defaultAuthType}}\"}'","body":"curl -s -X POST https://stripe.your-instance.emulators.dev/_emulate/credentials \\\n  -H \"content-type: application/json\" \\\n  -d '{\"type\":\"api-key\"}'"},{"id":"inspect-ledger","title":"Inspect requests","kind":"curl","language":"bash","description":"Read the request ledger to validate how your app called the service.","template":"curl -s {{controlBaseUrl}}/ledger","body":"curl -s https://stripe.your-instance.emulators.dev/_emulate/ledger"}]}