--- title: "Stripe" --- Stripe API emulation with customers, payment methods, customer sessions, payment intents, charges, products, prices, and checkout sessions. Includes a hosted checkout page and webhook delivery. API keys are accepted without checks by default. Set `stripe.strict_scopes: true` in seed config to require a known key on `/v1` routes: a key from the top-level `tokens` config, or one listed in `stripe.api_keys`. The Next.js and Nuxt adapters don't read top-level `tokens`, so there strict mode accepts only `stripe.api_keys`. Send the key as the HTTP Basic username or a bearer token: a request without a key returns `401` with `You did not provide an API key.` and an unknown key returns `401` with `Invalid API Key provided`, both as `invalid_request_error`. Hosted checkout pages stay public. ## Customers - `POST /v1/customers` — create customer - `GET /v1/customers/:id` — retrieve customer - `POST /v1/customers/:id` — update customer - `DELETE /v1/customers/:id` — delete customer - `GET /v1/customers` — list customers ## Payment Methods - `GET /v1/payment_methods` — list payment methods ## Customer Sessions - `POST /v1/customer_sessions` — create customer session ## Payment Intents - `POST /v1/payment_intents` — create payment intent - `GET /v1/payment_intents/:id` — retrieve payment intent - `POST /v1/payment_intents/:id` — update payment intent - `POST /v1/payment_intents/:id/confirm` — confirm payment intent - `POST /v1/payment_intents/:id/cancel` — cancel payment intent - `GET /v1/payment_intents` — list payment intents ## Charges - `GET /v1/charges/:id` — retrieve charge - `GET /v1/charges` — list charges ## Products - `POST /v1/products` — create product - `GET /v1/products/:id` — retrieve product - `GET /v1/products` — list products ## Prices - `POST /v1/prices` — create price - `GET /v1/prices/:id` — retrieve price - `GET /v1/prices` — list prices ## Checkout Sessions - `POST /v1/checkout/sessions` — create checkout session - `GET /v1/checkout/sessions/:id` — retrieve session - `POST /v1/checkout/sessions/:id/expire` — expire session - `GET /v1/checkout/sessions` — list sessions (filter by `customer`, `status`, `payment_status`) - `GET /checkout/:id` — hosted checkout page (HTML) - `POST /checkout/:id/complete` — complete payment flow ## Webhooks Events are delivered to configured webhook URLs: - Webhooks configured with a secret include `Stripe-Signature: t=,v1=`, signed over `.` - `checkout.session.completed` — when a checkout session is completed - `checkout.session.expired` — when a checkout session expires