@crvouga/mockingbird-service-stripe 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog — @crvouga/mockingbird-service-stripe
2
2
 
3
+ ## 3.2.0 (2026-10-09)
4
+
5
+ ### Features
6
+
7
+ - match Emulate provider coverage ([16b65ce](https://github.com/crvouga/mockingbird/commit/16b65ce791fa216f28ec1521df636f57771d9c5e))
8
+
9
+ ### Dependencies
10
+
11
+ - `@crvouga/mockingbird-service-sqlite`
12
+
13
+ ## 3.1.0 (2026-10-08)
14
+
15
+ ### Features
16
+
17
+ - redesign emulator experience ([d6038c2](https://github.com/crvouga/mockingbird/commit/d6038c27eebbaa1751f02bc9305002a5b1304779))
18
+
3
19
  ## 3.0.0 (2026-10-07)
4
20
 
5
21
  ### ⚠️ Breaking changes
@@ -15,10 +31,6 @@
15
31
  - format the emulates records query ([8698872](https://github.com/crvouga/mockingbird/commit/8698872509d06002be5a8fcdc85d79f8462320c3))
16
32
  - align rename fixtures and formatting ([69e0bee](https://github.com/crvouga/mockingbird/commit/69e0beefe44c9541e46740d3c177bde832340f90))
17
33
 
18
- ### Dependencies
19
-
20
- - `@crvouga/mockingbird-service-sqlite`
21
-
22
34
  ## 2.3.2 (2026-10-05)
23
35
 
24
36
  ### Fixes and improvements
package/DISCOVERY.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @crvouga/mockingbird-service-stripe discovery
2
2
 
3
3
  This is the installed-package index for coding agents and tooling. All relative links resolve
4
- inside `node_modules/@crvouga/mockingbird-service-stripe/`; no repository checkout is needed to discover the mock's
4
+ inside `node_modules/@crvouga/mockingbird-service-stripe/`; no repository checkout is needed to discover the emulator's
5
5
  supported surface or documented behavior.
6
6
 
7
7
  ## Capability and behavior sources
@@ -48,7 +48,7 @@ designed for assertions and diagnosis by consuming test suites.
48
48
  ## Report a mismatch or missing capability
49
49
 
50
50
  Follow the [agent reporting contract](https://github.com/crvouga/mockingbird/blob/main/docs/REPORTING_ISSUES.md). Include package version,
51
- operation/command, a minimal redacted request, actual mock result, expected oracle result or vendor
51
+ operation/command, a minimal redacted request, actual emulator result, expected oracle result or vendor
52
52
  documentation, and whether the mismatch appears in the matrix. Never include keys, tokens,
53
53
  customer data, prompts, PHI, card data, or unredacted recordings.
54
54
 
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @crvouga/mockingbird-service-stripe
2
2
 
3
- > Familiar calls. Faithful echoes. Part of [Mockingbird](https://github.com/crvouga/mockingbird).
3
+ > Local emulators. Real API contracts. Part of [Mockingbird](https://github.com/crvouga/mockingbird).
4
4
 
5
- Stateful, in-process mock of the [Stripe API](https://docs.stripe.com/api) for test suites: accounts
5
+ Stateful, in-process emulator of the [Stripe API](https://docs.stripe.com/api) for test suites: accounts
6
6
  chosen by API key, customers and balances, payment methods, payment and setup intents, charges,
7
7
  refunds, disputes, checkout (with a hosted page and a Stripe.js stand-in), the customer portal
8
8
  (configurations, sessions and the hosted portal page), invoices, subscriptions that renew, pause,
@@ -81,8 +81,8 @@ stripe-node accepts `host`, `port` and `protocol`; route every `new Stripe(...)`
81
81
  factory reading `STRIPE_API_HOST` / `STRIPE_API_PORT` / `STRIPE_API_PROTOCOL` (the catalog's G-S1),
82
82
  and give raw `fetch('https://api.stripe.com…')` call sites the same base URL. Keys must look like
83
83
  test keys (`sk_test_…`, `rk_test_…`; `pk_test_…` for the Stripe.js stand-in). Point the browser at
84
- the mock's `GET /v3` instead of `https://js.stripe.com/v3` (G-S3); `session.url` already points at
85
- the mock's hosted page.
84
+ the emulator's `GET /v3` instead of `https://js.stripe.com/v3` (G-S3); `session.url` already points at
85
+ the emulator's hosted page.
86
86
 
87
87
  ### Accounts and namespaces
88
88
 
@@ -118,7 +118,7 @@ invoice (or `latest_invoice.payments` on a subscription), `GET /v1/invoice_payme
118
118
  `GET /v1/invoice_payments/{id}`. One default payment per invoice that has a PaymentIntent, derived from
119
119
  the invoice; a $0 invoice has none, and payment records are not modelled. `charge.refunds` appears only with `expand[]=refunds` at
120
120
  every one of these versions. `GET /v1/invoices/upcoming` answers at the older versions and returns
121
- Stripe's "deprecated" 404 at basil and later. Expansion is generic (any path through ids the mock
121
+ Stripe's "deprecated" 404 at basil and later. Expansion is generic (any path through ids the emulator
122
122
  holds, ancestors included); Stripe's own rules are enforced: a non-expandable first segment is
123
123
  `This property cannot be expanded (metadata).` and more than four levels is
124
124
  `property_expansion_max_depth` (verified against test mode at all three versions).
@@ -160,8 +160,8 @@ Events emitted: `customer.*`, `payment_method.attached|detached|updated`,
160
160
 
161
161
  ### Lifecycles and the clock
162
162
 
163
- `POST /__admin/clock {"advance": "32d"}` (or `set`) moves the mock clock and immediately runs every
164
- clock-driven lifecycle, so their webhooks fire at once; the served mock also ticks every second.
163
+ `POST /__admin/clock {"advance": "32d"}` (or `set`) moves the emulator clock and immediately runs every
164
+ clock-driven lifecycle, so their webhooks fire at once; the served emulator also ticks every second.
165
165
 
166
166
  - **Renewals**: past `current_period_end` a subscription cycles — a `subscription_cycle` invoice is
167
167
  finalized and charged off-session to the default payment method, then `invoice.paid` +
@@ -268,7 +268,7 @@ payment methods; anything else is Stripe's 401.
268
268
 
269
269
  ### Customer portal
270
270
 
271
- `POST /v1/billing_portal/sessions` returns a `url` on the mock (`/p/session/:id`, in place of
271
+ `POST /v1/billing_portal/sessions` returns a `url` on the emulator (`/p/session/:id`, in place of
272
272
  billing.stripe.com) where the customer manages their billing, as the session's configuration allows:
273
273
 
274
274
  - **Configurations**: `POST|GET /v1/billing_portal/configurations[/:id]`
@@ -363,7 +363,7 @@ recorded prices (listed in `synthesizedLookupKeys`). Pass your own with `createR
363
363
 
364
364
  | Export | Description |
365
365
  | --- | --- |
366
- | `createRuntime` | `(options?) => StripeRuntime` — the mock with the full contract. Options: `accounts`, `webhooks {endpoints, retryDelaysMs, fetch}`, `corpus`, `publicUrl`, `webhookApiVersion`, `lifecycle`, `tickMs`, `sqlite`, `clock`, `seed`, `adminKey`, `onLog`, `onWebhook`. The runtime adds `webhooks`, `accounts`, `tick()`, `stop()`. |
366
+ | `createRuntime` | `(options?) => StripeRuntime` — the emulator with the full contract. Options: `accounts`, `webhooks {endpoints, retryDelaysMs, fetch}`, `corpus`, `publicUrl`, `webhookApiVersion`, `lifecycle`, `tickMs`, `sqlite`, `clock`, `seed`, `adminKey`, `onLog`, `onWebhook`. The runtime adds `webhooks`, `accounts`, `tick()`, `stop()`. |
367
367
  | `StripeAPI` | Class; `new StripeAPI(options?)` implements `fetch(request)`. Members: `reset()`, `tick(force?)`, `webhookEvents(account?)`, `webhookDeliveryAttempts(account?)`, `apiWebhookEndpoints()`, `accountIds()`, `scopeFor(account)`, `importStateFrom(source)`, `accounts`, `app`, `sqlite`. |
368
368
  | `STRIPE_PRESETS` | The named fault presets above. |
369
369
  | `AccountDirectory` | Keys → accounts (`configure`, `accountFor`, `config`, `list`, `resolve`). |
@@ -380,7 +380,7 @@ recorded prices (listed in `synthesizedLookupKeys`). Pass your own with `createR
380
380
  | `STRIPE_NAMESPACE` | `"stripe"` — SQLite namespace of every record. |
381
381
  | `document` | The vendored OpenAPI document (Mockingbird subset). |
382
382
  | `operationIds` | Every `operationId` in `document`. |
383
- | `supportedOperationIds` | The ones the mock implements. |
383
+ | `supportedOperationIds` | The ones the emulator implements. |
384
384
  | `QA_SURFACE_OPS` | Operations the parity walks cover (supported, minus the browser pages). |
385
385
  | `QA_METADATA` | Pinned metadata values the parity walks send. |
386
386
  | `QA_AMOUNTS` | Pinned amounts in cents. |
@@ -415,7 +415,7 @@ plus `port`, `host`; resolves `{url, port, runtime, close}`), `serveTarget` (the
415
415
  `tiers` and `custom_unit_amount`, and subscription-mode sessions in a non-default currency, are
416
416
  refused with a 400; subscriptions and invoices always bill in the price's own currency.
417
417
  - **Webhook endpoint `api_version`**: payloads render at the account's version, not per endpoint.
418
- - **Live keys** (`sk_live_…`) are refused with Stripe's 401: the mock is test mode only.
418
+ - **Live keys** (`sk_live_…`) are refused with Stripe's 401: the emulator is test mode only.
419
419
  - Operations marked unsupported in SUPPORT.md (charge create/update, checkout session update,
420
420
  dispute evidence).
421
421
  - Rate-limit, 5xx and permission bodies come from presets, worded as Stripe words them but not
package/SUPPORT.md CHANGED
@@ -2,17 +2,18 @@
2
2
 
3
3
  Generated from `openapi.yaml`; do not edit by hand.
4
4
 
5
- - operations in spec: **125**
6
- - supported by the mock: **121**
5
+ - operations in spec: **126**
6
+ - supported by the emulator: **122**
7
7
  - parity enabled: **114**
8
8
 
9
- | operationId | route | mock | parity | notes |
9
+ | operationId | route | emulator | parity | notes |
10
10
  | --- | --- | --- | --- | --- |
11
+ | `PostCustomerSessions` | `POST /v1/customer_sessions` | ✅ supported | ❌ disabled | Covered by the pinned package oracle; no independent live evidence yet. |
11
12
  | `PostThreeDSecureAuthenticate` | `POST /c/3ds/{intent}/authenticate` | ✅ supported | ❌ disabled | the 3-D Secure challenge the Stripe.js stand-in completes has no public API |
12
- | `GetCheckoutPage` | `GET /c/pay/{session}` | ✅ supported | ❌ disabled | the hosted Checkout page is HTML served by the mock in place of checkout.stripe.com |
13
- | `PostCheckoutPage` | `POST /c/pay/{session}` | ✅ supported | ❌ disabled | the hosted Checkout page form post is served by the mock in place of checkout.stripe.com |
14
- | `GetPortalPage` | `GET /p/session/{session}` | ✅ supported | ❌ disabled | the customer portal is HTML served by the mock in place of billing.stripe.com |
15
- | `PostPortalPage` | `POST /p/session/{session}` | ✅ supported | ❌ disabled | the customer portal form post is served by the mock in place of billing.stripe.com |
13
+ | `GetCheckoutPage` | `GET /c/pay/{session}` | ✅ supported | ❌ disabled | the hosted Checkout page is HTML served by the emulator in place of checkout.stripe.com |
14
+ | `PostCheckoutPage` | `POST /c/pay/{session}` | ✅ supported | ❌ disabled | the hosted Checkout page form post is served by the emulator in place of checkout.stripe.com |
15
+ | `GetPortalPage` | `GET /p/session/{session}` | ✅ supported | ❌ disabled | the customer portal is HTML served by the emulator in place of billing.stripe.com |
16
+ | `PostPortalPage` | `POST /p/session/{session}` | ✅ supported | ❌ disabled | the customer portal form post is served by the emulator in place of billing.stripe.com |
16
17
  | `GetAccount` | `GET /v1/account` | ✅ supported | ✅ | |
17
18
  | `GetBalance` | `GET /v1/balance` | ✅ supported | ✅ | |
18
19
  | `GetBalanceTransactions` | `GET /v1/balance_transactions` | ✅ supported | ✅ | |
@@ -47,7 +48,7 @@ Generated from `openapi.yaml`; do not edit by hand.
47
48
  | `GetCustomersSearch` | `GET /v1/customers/search` | ✅ supported | ✅ | |
48
49
  | `GetDisputes` | `GET /v1/disputes` | ✅ supported | ✅ | |
49
50
  | `GetDisputesDispute` | `GET /v1/disputes/{dispute}` | ✅ supported | ✅ | |
50
- | `PostDisputesDispute` | `POST /v1/disputes/{dispute}` | ❌ unsupported | — | the mock never creates or mutates disputes |
51
+ | `PostDisputesDispute` | `POST /v1/disputes/{dispute}` | ❌ unsupported | — | the emulator never creates or mutates disputes |
51
52
  | `GetEvents` | `GET /v1/events` | ✅ supported | ✅ | |
52
53
  | `GetEventsId` | `GET /v1/events/{id}` | ✅ supported | ✅ | |
53
54
  | `GetInvoicePayments` | `GET /v1/invoice_payments` | ✅ supported | ✅ | |
@@ -132,4 +133,4 @@ Generated from `openapi.yaml`; do not edit by hand.
132
133
  | `GetWebhookEndpointsWebhookEndpoint` | `GET /v1/webhook_endpoints/{webhook_endpoint}` | ✅ supported | ✅ | |
133
134
  | `PostWebhookEndpointsWebhookEndpoint` | `POST /v1/webhook_endpoints/{webhook_endpoint}` | ✅ supported | ⚠️ unsafe (opt-in) | |
134
135
  | `DeleteWebhookEndpointsWebhookEndpoint` | `DELETE /v1/webhook_endpoints/{webhook_endpoint}` | ✅ supported | ⚠️ unsafe (opt-in) | |
135
- | `GetStripeJs` | `GET /v3` | ✅ supported | ❌ disabled | the Stripe.js stand-in is JavaScript served by the mock in place of js.stripe.com/v3 |
136
+ | `GetStripeJs` | `GET /v3` | ✅ supported | ❌ disabled | the Stripe.js stand-in is JavaScript served by the emulator in place of js.stripe.com/v3 |