@volter/twin-stripe 3.0.0 → 3.0.1

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.
Files changed (253) hide show
  1. package/README.md +51 -21
  2. package/dist/generated/pack-facts.json +3 -3
  3. package/dist/journeys/coverage.json +596 -0
  4. package/dist/journeys/customer-life.json +6108 -0
  5. package/dist/journeys/customer-life.outline.md +371 -0
  6. package/dist/journeys/decisions.json +677 -0
  7. package/dist/journeys/demand.json +706 -0
  8. package/dist/journeys/score.json +853 -0
  9. package/dist/journeys/unreachable.json +102 -0
  10. package/dist/journeys/vendor-examples.json +8010 -0
  11. package/dist/spec/SOURCE.md +5 -1
  12. package/dist/spec/doc-examples.json +445 -0
  13. package/dist/spec/sources.json +135 -207
  14. package/dist/src/cli.d.ts +0 -1
  15. package/dist/src/cli.js +0 -2
  16. package/dist/src/engine/after-payment.d.ts +0 -1
  17. package/dist/src/engine/after-payment.js +0 -1
  18. package/dist/src/engine/common.d.ts +5 -5
  19. package/dist/src/engine/common.js +13 -11
  20. package/dist/src/engine/connect.d.ts +0 -21
  21. package/dist/src/engine/connect.js +1 -82
  22. package/dist/src/engine/customers.d.ts +0 -8
  23. package/dist/src/engine/customers.js +0 -22
  24. package/dist/src/engine/display.d.ts +0 -3
  25. package/dist/src/engine/display.js +0 -3
  26. package/dist/src/engine/files.d.ts +0 -7
  27. package/dist/src/engine/files.js +0 -10
  28. package/dist/src/engine/invoices.d.ts +6 -9
  29. package/dist/src/engine/invoices.js +56 -29
  30. package/dist/src/engine/issuing.d.ts +6 -8
  31. package/dist/src/engine/issuing.js +19 -10
  32. package/dist/src/engine/ledger.d.ts +0 -1
  33. package/dist/src/engine/ledger.js +0 -1
  34. package/dist/src/engine/oauth.js +1 -2
  35. package/dist/src/engine/refunds.js +2 -27
  36. package/dist/src/engine/stripe.d.ts +2 -7
  37. package/dist/src/engine/stripe.js +34 -83
  38. package/dist/src/engine/subscriptions.d.ts +0 -1
  39. package/dist/src/engine/subscriptions.js +0 -1
  40. package/dist/src/engine/version.d.ts +0 -2
  41. package/dist/src/engine/version.js +17 -6
  42. package/dist/src/fetch.js +2 -2
  43. package/dist/src/generated/surface.gen.json +1 -1
  44. package/dist/src/generated/ui.gen.json +1 -1
  45. package/dist/src/index.js +5 -3
  46. package/dist/src/manifest.js +348 -220
  47. package/dist/src/screens/billing-portal.js +5 -5
  48. package/dist/src/screens/{connect-oauth.d.ts → checkout-js.d.ts} +0 -1
  49. package/dist/src/screens/checkout-js.js +84 -0
  50. package/dist/src/screens/connect-onboarding.js +3 -3
  51. package/dist/src/screens/dashboard.d.ts +1 -1
  52. package/dist/src/screens/dashboard.js +52 -53
  53. package/dist/src/screens/stripe-js.js +53 -93
  54. package/dist/src/semantics/account.d.ts +2 -0
  55. package/dist/src/semantics/account.js +8 -0
  56. package/dist/src/semantics/accounts.js +3 -1
  57. package/dist/src/semantics/around.js +3 -6
  58. package/dist/src/semantics/billing_portal.d.ts +0 -1
  59. package/dist/src/semantics/billing_portal.js +1 -7
  60. package/dist/src/semantics/checkout.d.ts +1 -1
  61. package/dist/src/semantics/checkout.js +18 -15
  62. package/dist/src/semantics/clock.js +1 -7
  63. package/dist/src/semantics/customers.d.ts +1 -2
  64. package/dist/src/semantics/customers.js +32 -38
  65. package/dist/src/semantics/entitlements.d.ts +0 -2
  66. package/dist/src/semantics/entitlements.js +4 -50
  67. package/dist/src/semantics/events.d.ts +2 -3
  68. package/dist/src/semantics/events.js +6 -11
  69. package/dist/src/semantics/index.js +16 -38
  70. package/dist/src/semantics/invoices.d.ts +3 -8
  71. package/dist/src/semantics/invoices.js +134 -127
  72. package/dist/src/semantics/issuing.d.ts +6 -0
  73. package/dist/src/semantics/issuing.js +77 -0
  74. package/dist/src/semantics/payment_intents.d.ts +0 -1
  75. package/dist/src/semantics/payment_intents.js +5 -13
  76. package/dist/src/semantics/payment_methods.d.ts +0 -2
  77. package/dist/src/semantics/payment_methods.js +2 -26
  78. package/dist/src/semantics/payouts.d.ts +1 -0
  79. package/dist/src/semantics/payouts.js +8 -1
  80. package/dist/src/semantics/products.d.ts +1 -3
  81. package/dist/src/semantics/products.js +3 -14
  82. package/dist/src/semantics/refunds.d.ts +1 -2
  83. package/dist/src/semantics/refunds.js +1 -5
  84. package/dist/src/semantics/shared.d.ts +64 -336
  85. package/dist/src/semantics/shared.js +326 -1336
  86. package/dist/src/semantics/states.d.ts +20 -89
  87. package/dist/src/semantics/states.js +116 -334
  88. package/dist/src/semantics/subscriptions.d.ts +1 -2
  89. package/dist/src/semantics/subscriptions.js +23 -145
  90. package/dist/src/semantics/test_helpers.d.ts +2 -5
  91. package/dist/src/semantics/test_helpers.js +121 -43
  92. package/dist/src/semantics/webhook_endpoints.d.ts +2 -0
  93. package/dist/src/semantics/webhook_endpoints.js +26 -0
  94. package/generated/pack-facts.json +3 -3
  95. package/journeys/coverage.json +596 -0
  96. package/journeys/customer-life.json +6108 -0
  97. package/journeys/customer-life.outline.md +371 -0
  98. package/journeys/decisions.json +677 -0
  99. package/journeys/demand.json +706 -0
  100. package/journeys/score.json +853 -0
  101. package/journeys/unreachable.json +102 -0
  102. package/journeys/vendor-examples.json +8010 -0
  103. package/package.json +4 -3
  104. package/spec/SOURCE.md +5 -1
  105. package/spec/doc-examples.json +445 -0
  106. package/spec/sources.json +135 -207
  107. package/src/cli.ts +0 -3
  108. package/src/engine/after-payment.ts +0 -2
  109. package/src/engine/balance.ts +0 -1
  110. package/src/engine/checkout.ts +0 -1
  111. package/src/engine/common.ts +19 -17
  112. package/src/engine/connect.ts +1 -79
  113. package/src/engine/customers.ts +0 -25
  114. package/src/engine/display.ts +2 -3
  115. package/src/engine/files.ts +0 -13
  116. package/src/engine/invoices.ts +64 -33
  117. package/src/engine/issuing.ts +16 -11
  118. package/src/engine/ledger.ts +0 -2
  119. package/src/engine/oauth.ts +1 -2
  120. package/src/engine/onboarding.ts +0 -1
  121. package/src/engine/params.ts +0 -1
  122. package/src/engine/payment-intents.ts +0 -1
  123. package/src/engine/payment-methods.ts +0 -1
  124. package/src/engine/refunds.ts +2 -28
  125. package/src/engine/renewals.ts +0 -1
  126. package/src/engine/stripe.ts +35 -83
  127. package/src/engine/subscriptions.ts +0 -3
  128. package/src/engine/transfers.ts +0 -1
  129. package/src/engine/version.ts +15 -7
  130. package/src/engine/webhooks.ts +0 -2
  131. package/src/fetch.ts +2 -2
  132. package/src/generated/surface.gen.json +1 -1
  133. package/src/generated/ui.gen.json +1 -1
  134. package/src/index.ts +6 -4
  135. package/src/manifest.ts +348 -220
  136. package/src/screens/billing-portal.tsx +5 -7
  137. package/src/screens/checkout-js.ts +80 -0
  138. package/src/screens/checkout.tsx +0 -2
  139. package/src/screens/connect-onboarding.tsx +3 -5
  140. package/src/screens/dashboard.tsx +53 -73
  141. package/src/screens/stripe-js.ts +57 -125
  142. package/src/semantics/account.ts +10 -0
  143. package/src/semantics/account_links.ts +0 -1
  144. package/src/semantics/accounts.ts +8 -7
  145. package/src/semantics/apps.ts +1 -2
  146. package/src/semantics/around.ts +3 -6
  147. package/src/semantics/balance.ts +0 -1
  148. package/src/semantics/balance_transactions.ts +1 -3
  149. package/src/semantics/billing_portal.ts +1 -7
  150. package/src/semantics/charges.ts +1 -6
  151. package/src/semantics/checkout.ts +16 -12
  152. package/src/semantics/clock.ts +1 -8
  153. package/src/semantics/coupons.ts +0 -1
  154. package/src/semantics/customers.ts +32 -35
  155. package/src/semantics/doors.ts +2 -3
  156. package/src/semantics/entitlements.ts +1 -45
  157. package/src/semantics/events.ts +7 -14
  158. package/src/semantics/index.ts +16 -38
  159. package/src/semantics/invoice_payments.ts +1 -3
  160. package/src/semantics/invoices.ts +124 -119
  161. package/src/semantics/issuing.ts +74 -0
  162. package/src/semantics/payment_intents.ts +10 -17
  163. package/src/semantics/payment_methods.ts +2 -25
  164. package/src/semantics/payouts.ts +9 -3
  165. package/src/semantics/prices.ts +0 -1
  166. package/src/semantics/products.ts +4 -14
  167. package/src/semantics/promotion_codes.ts +0 -1
  168. package/src/semantics/radar.ts +1 -3
  169. package/src/semantics/refunds.ts +2 -11
  170. package/src/semantics/shared.ts +350 -1382
  171. package/src/semantics/states.ts +109 -330
  172. package/src/semantics/subscriptions.ts +25 -145
  173. package/src/semantics/test_helpers.ts +109 -43
  174. package/src/semantics/transfers.ts +1 -3
  175. package/src/semantics/webhook_endpoints.ts +27 -0
  176. package/src/server.ts +0 -1
  177. package/dist/src/engine/billing.d.ts +0 -5
  178. package/dist/src/engine/billing.js +0 -6
  179. package/dist/src/engine/charges.d.ts +0 -6
  180. package/dist/src/engine/charges.js +0 -13
  181. package/dist/src/engine/connect-settings.d.ts +0 -16
  182. package/dist/src/engine/connect-settings.js +0 -26
  183. package/dist/src/engine/coupons.d.ts +0 -0
  184. package/dist/src/engine/coupons.js +0 -5
  185. package/dist/src/engine/credit-notes.d.ts +0 -1
  186. package/dist/src/engine/credit-notes.js +0 -5
  187. package/dist/src/engine/disputes.d.ts +0 -0
  188. package/dist/src/engine/disputes.js +0 -9
  189. package/dist/src/engine/entitlements.d.ts +0 -1
  190. package/dist/src/engine/entitlements.js +0 -4
  191. package/dist/src/engine/ephemeral-keys.d.ts +0 -0
  192. package/dist/src/engine/ephemeral-keys.js +0 -4
  193. package/dist/src/engine/front.d.ts +0 -5
  194. package/dist/src/engine/front.js +0 -25
  195. package/dist/src/engine/payment-links.d.ts +0 -1
  196. package/dist/src/engine/payment-links.js +0 -5
  197. package/dist/src/engine/plans.d.ts +0 -6
  198. package/dist/src/engine/plans.js +0 -26
  199. package/dist/src/engine/platform.d.ts +0 -39
  200. package/dist/src/engine/platform.js +0 -34
  201. package/dist/src/engine/products.d.ts +0 -0
  202. package/dist/src/engine/products.js +0 -4
  203. package/dist/src/engine/setup-intents.d.ts +0 -1
  204. package/dist/src/engine/setup-intents.js +0 -4
  205. package/dist/src/engine/subscription-schedules.d.ts +0 -3
  206. package/dist/src/engine/subscription-schedules.js +0 -1
  207. package/dist/src/engine/tax.d.ts +0 -7
  208. package/dist/src/engine/tax.js +0 -28
  209. package/dist/src/engine/terminal.d.ts +0 -4
  210. package/dist/src/engine/terminal.js +0 -20
  211. package/dist/src/engine/test-clocks.d.ts +0 -5
  212. package/dist/src/engine/test-clocks.js +0 -9
  213. package/dist/src/engine/tokens.d.ts +0 -7
  214. package/dist/src/engine/tokens.js +0 -20
  215. package/dist/src/engine/treasury.d.ts +0 -23
  216. package/dist/src/engine/treasury.js +0 -45
  217. package/dist/src/screens/connect-oauth.js +0 -333
  218. package/dist/src/semantics/disputes.d.ts +0 -2
  219. package/dist/src/semantics/disputes.js +0 -5
  220. package/dist/src/semantics/invoiceitems.d.ts +0 -3
  221. package/dist/src/semantics/invoiceitems.js +0 -59
  222. package/dist/src/semantics/setup_intents.d.ts +0 -3
  223. package/dist/src/semantics/setup_intents.js +0 -41
  224. package/dist/src/semantics/subscription_items.d.ts +0 -5
  225. package/dist/src/semantics/subscription_items.js +0 -55
  226. package/dist/src/semantics/subscription_schedules.d.ts +0 -4
  227. package/dist/src/semantics/subscription_schedules.js +0 -60
  228. package/src/engine/billing.ts +0 -16
  229. package/src/engine/charges.ts +0 -19
  230. package/src/engine/connect-settings.ts +0 -23
  231. package/src/engine/coupons.ts +0 -5
  232. package/src/engine/credit-notes.ts +0 -6
  233. package/src/engine/disputes.ts +0 -9
  234. package/src/engine/entitlements.ts +0 -5
  235. package/src/engine/ephemeral-keys.ts +0 -3
  236. package/src/engine/front.ts +0 -31
  237. package/src/engine/payment-links.ts +0 -6
  238. package/src/engine/plans.ts +0 -42
  239. package/src/engine/platform.ts +0 -47
  240. package/src/engine/products.ts +0 -3
  241. package/src/engine/setup-intents.ts +0 -5
  242. package/src/engine/subscription-schedules.ts +0 -10
  243. package/src/engine/tax.ts +0 -39
  244. package/src/engine/terminal.ts +0 -23
  245. package/src/engine/test-clocks.ts +0 -11
  246. package/src/engine/tokens.ts +0 -22
  247. package/src/engine/treasury.ts +0 -47
  248. package/src/screens/connect-oauth.tsx +0 -376
  249. package/src/semantics/disputes.ts +0 -12
  250. package/src/semantics/invoiceitems.ts +0 -59
  251. package/src/semantics/setup_intents.ts +0 -45
  252. package/src/semantics/subscription_items.ts +0 -54
  253. package/src/semantics/subscription_schedules.ts +0 -66
package/spec/sources.json CHANGED
@@ -1,4 +1,13 @@
1
1
  {
2
+ "archive:https://registry.npmjs.org/@stripe/stripe-js/-/stripe-js-8.6.0.tgz#sha256=13e61419e9076ab440cc636e34d3ea5df3fc62bbf2d6a80d3fd718e8cd47f0a2!/package/dist/stripe-js/checkout.d.ts": {
3
+ "status": 200,
4
+ "checked": "2026-10-03",
5
+ "sha256": "13e61419e9076ab440cc636e34d3ea5df3fc62bbf2d6a80d3fd718e8cd47f0a2",
6
+ "quotes": {
7
+ "export interface StripeCheckoutSession": true,
8
+ "loadActions: () => Promise<StripeCheckoutLoadActionsResult>": true
9
+ }
10
+ },
2
11
  "https://docs.stripe.com/api/authentication": {
3
12
  "status": 200,
4
13
  "checked": "2026-09-30",
@@ -10,41 +19,16 @@
10
19
  "status": 200,
11
20
  "checked": "2026-09-30"
12
21
  },
13
- "https://docs.stripe.com/api/billing/alert/activate": {
14
- "status": 200,
15
- "checked": "2026-09-30"
16
- },
17
- "https://docs.stripe.com/api/billing/alert/archive": {
18
- "status": 200,
19
- "checked": "2026-09-30"
20
- },
21
- "https://docs.stripe.com/api/billing/alert/deactivate": {
22
- "status": 200,
23
- "checked": "2026-09-30"
24
- },
25
- "https://docs.stripe.com/api/billing/meter/deactivate": {
22
+ "https://docs.stripe.com/api/billing/meter/create": {
26
23
  "status": 200,
27
- "checked": "2026-09-30"
28
- },
29
- "https://docs.stripe.com/api/billing/meter/reactivate": {
30
- "status": 200,
31
- "checked": "2026-09-30"
32
- },
33
- "https://docs.stripe.com/api/capabilities/update": {
34
- "status": 200,
35
- "checked": "2026-09-30"
36
- },
37
- "https://docs.stripe.com/api/charges/capture": {
38
- "status": 200,
39
- "checked": "2026-09-30"
24
+ "checked": "2026-10-03",
25
+ "quotes": {
26
+ "stripe_customer_id": true
27
+ }
40
28
  },
41
29
  "https://docs.stripe.com/api/charges/object#charge_object-refunded": {
42
30
  "status": 200,
43
- "checked": "2026-09-30"
44
- },
45
- "https://docs.stripe.com/api/checkout/sessions/expire": {
46
- "status": 200,
47
- "checked": "2026-09-30"
31
+ "checked": "2026-10-03"
48
32
  },
49
33
  "https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-payment_status": {
50
34
  "status": 200,
@@ -54,54 +38,22 @@
54
38
  "status": 200,
55
39
  "checked": "2026-09-30"
56
40
  },
57
- "https://docs.stripe.com/api/climate/order/cancel": {
41
+ "https://docs.stripe.com/api/invoices/create_preview.md?query=subscription_details": {
58
42
  "status": 200,
59
- "checked": "2026-09-30"
60
- },
61
- "https://docs.stripe.com/api/credit_notes/void": {
62
- "status": 200,
63
- "checked": "2026-09-30"
64
- },
65
- "https://docs.stripe.com/api/customer_portal/configurations/update": {
66
- "status": 200,
67
- "checked": "2026-09-30"
68
- },
69
- "https://docs.stripe.com/api/disputes/close": {
70
- "status": 200,
71
- "checked": "2026-09-30"
72
- },
73
- "https://docs.stripe.com/api/disputes/update#update_dispute-submit": {
74
- "status": 200,
75
- "checked": "2026-09-30"
76
- },
77
- "https://docs.stripe.com/api/fee_refunds/create": {
78
- "status": 200,
79
- "checked": "2026-09-30"
80
- },
81
- "https://docs.stripe.com/api/financial_connections/accounts/disconnect": {
82
- "status": 200,
83
- "checked": "2026-09-30"
84
- },
85
- "https://docs.stripe.com/api/invoices/delete": {
86
- "status": 200,
87
- "checked": "2026-10-02"
88
- },
89
- "https://docs.stripe.com/api/invoices/finalize": {
90
- "status": 200,
91
- "checked": "2026-09-30"
92
- },
93
- "https://docs.stripe.com/api/invoices/mark_uncollectible": {
94
- "status": 200,
95
- "checked": "2026-09-30"
43
+ "checked": "2026-10-04",
44
+ "quotes": {
45
+ "The default value is": true,
46
+ "forces the proration to be calculated as though the update was done at the specified time.": true,
47
+ "The time given must be within the current subscription period": true,
48
+ "cannot be set to": true,
49
+ "Disable creating prorations in this request.": true,
50
+ "Always invoice immediately for prorations.": true
51
+ }
96
52
  },
97
53
  "https://docs.stripe.com/api/invoices/pay": {
98
54
  "status": 200,
99
55
  "checked": "2026-09-30"
100
56
  },
101
- "https://docs.stripe.com/api/invoices/send": {
102
- "status": 200,
103
- "checked": "2026-09-30"
104
- },
105
57
  "https://docs.stripe.com/api/invoices/void": {
106
58
  "status": 200,
107
59
  "checked": "2026-09-30"
@@ -114,149 +66,60 @@
114
66
  "status": 200,
115
67
  "checked": "2026-09-30"
116
68
  },
117
- "https://docs.stripe.com/api/issuing/cardholders/update": {
69
+ "https://docs.stripe.com/api/issuing/cards/create": {
118
70
  "status": 200,
119
- "checked": "2026-09-30"
71
+ "checked": "2026-10-03",
72
+ "quotes": {
73
+ "Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to inactive.": true,
74
+ "Defaults to inactive": true
75
+ }
120
76
  },
121
77
  "https://docs.stripe.com/api/issuing/cards/update": {
122
78
  "status": 200,
123
79
  "checked": "2026-09-30"
124
80
  },
125
- "https://docs.stripe.com/api/issuing/tokens/update": {
126
- "status": 200,
127
- "checked": "2026-09-30"
128
- },
129
- "https://docs.stripe.com/api/mandates/object": {
130
- "status": 200,
131
- "checked": "2026-09-30"
132
- },
133
- "https://docs.stripe.com/api/payment_intents/apply_customer_balance": {
134
- "status": 200,
135
- "checked": "2026-09-30"
136
- },
137
81
  "https://docs.stripe.com/api/payment_intents/cancel": {
138
82
  "status": 200,
139
- "checked": "2026-09-30"
140
- },
141
- "https://docs.stripe.com/api/payment_intents/capture": {
142
- "status": 200,
143
- "checked": "2026-09-30"
83
+ "checked": "2026-10-03"
144
84
  },
145
85
  "https://docs.stripe.com/api/payment_intents/confirm": {
146
86
  "status": 200,
147
87
  "checked": "2026-09-30"
148
88
  },
149
- "https://docs.stripe.com/api/payment_intents/increment_authorization": {
150
- "status": 200,
151
- "checked": "2026-09-30"
152
- },
153
- "https://docs.stripe.com/api/payment_links/payment_links/update": {
154
- "status": 200,
155
- "checked": "2026-09-30"
156
- },
157
- "https://docs.stripe.com/api/payouts/cancel": {
158
- "status": 200,
159
- "checked": "2026-09-30"
160
- },
161
- "https://docs.stripe.com/api/plans/delete": {
162
- "status": 200,
163
- "checked": "2026-09-30"
164
- },
165
- "https://docs.stripe.com/api/prices/update#update_price-active": {
89
+ "https://docs.stripe.com/api/plans/create": {
166
90
  "status": 200,
167
- "checked": "2026-09-30"
168
- },
169
- "https://docs.stripe.com/api/products/update#update_product-active": {
170
- "status": 200,
171
- "checked": "2026-09-30"
91
+ "checked": "2026-10-03",
92
+ "quotes": {
93
+ "It replaces the Plans API and is backwards compatible to simplify your migration.": true
94
+ }
172
95
  },
173
96
  "https://docs.stripe.com/api/promotion_codes/update": {
174
97
  "status": 200,
175
98
  "checked": "2026-09-30"
176
99
  },
177
- "https://docs.stripe.com/api/quotes/accept": {
178
- "status": 200,
179
- "checked": "2026-09-30"
180
- },
181
- "https://docs.stripe.com/api/quotes/cancel": {
182
- "status": 200,
183
- "checked": "2026-09-30"
184
- },
185
- "https://docs.stripe.com/api/quotes/finalize": {
186
- "status": 200,
187
- "checked": "2026-09-30"
188
- },
189
- "https://docs.stripe.com/api/radar/reviews/approve": {
190
- "status": 200,
191
- "checked": "2026-09-30"
192
- },
193
- "https://docs.stripe.com/api/refunds/cancel": {
194
- "status": 200,
195
- "checked": "2026-09-30"
196
- },
197
- "https://docs.stripe.com/api/refunds/create#create_refund-refund_application_fee": {
198
- "status": 200,
199
- "checked": "2026-09-30"
200
- },
201
- "https://docs.stripe.com/api/setup_intents/cancel": {
202
- "status": 200,
203
- "checked": "2026-09-30"
204
- },
205
- "https://docs.stripe.com/api/setup_intents/confirm": {
206
- "status": 200,
207
- "checked": "2026-09-30"
208
- },
209
- "https://docs.stripe.com/api/setup_intents/verify_microdeposits": {
210
- "status": 200,
211
- "checked": "2026-09-30"
212
- },
213
- "https://docs.stripe.com/api/subscription_schedules/cancel": {
214
- "status": 200,
215
- "checked": "2026-09-30"
216
- },
217
- "https://docs.stripe.com/api/subscription_schedules/release": {
218
- "status": 200,
219
- "checked": "2026-09-30"
220
- },
221
100
  "https://docs.stripe.com/api/subscriptions/cancel": {
222
101
  "status": 200,
223
102
  "checked": "2026-09-30"
224
103
  },
225
- "https://docs.stripe.com/api/subscriptions/update#update_subscription-trial_end": {
104
+ "https://docs.stripe.com/api/subscriptions/object": {
226
105
  "status": 200,
227
- "checked": "2026-09-30"
228
- },
229
- "https://docs.stripe.com/api/tax_rates/update": {
230
- "status": 200,
231
- "checked": "2026-09-30"
232
- },
233
- "https://docs.stripe.com/api/terminal/readers/present_payment_method": {
234
- "status": 200,
235
- "checked": "2026-09-30"
236
- },
237
- "https://docs.stripe.com/api/test_clocks/advance": {
238
- "status": 200,
239
- "checked": "2026-09-30"
240
- },
241
- "https://docs.stripe.com/api/topups/cancel": {
242
- "status": 200,
243
- "checked": "2026-09-30"
244
- },
245
- "https://docs.stripe.com/api/treasury": {
246
- "status": 200,
247
- "checked": "2026-09-30"
248
- },
249
- "https://docs.stripe.com/api/treasury/inbound_transfers": {
250
- "status": 200,
251
- "checked": "2026-09-30"
106
+ "checked": "2026-10-03",
107
+ "quotes": {
108
+ "subscription_items?subscription=": true
109
+ }
252
110
  },
253
- "https://docs.stripe.com/api/treasury/transactions/object": {
111
+ "https://docs.stripe.com/api/subscriptions/update#update_subscription-trial_end": {
254
112
  "status": 200,
255
113
  "checked": "2026-09-30"
256
114
  },
257
- "https://docs.stripe.com/api/webhook_endpoints/update#update_webhook_endpoint-disabled": {
115
+ "https://docs.stripe.com/billing/customer/balance": {
258
116
  "status": 200,
259
- "checked": "2026-09-30"
117
+ "checked": "2026-10-03",
118
+ "quotes": {
119
+ "Represents the starting value of the customer invoice balance when a customer is created using the API with a non-zero invoice balance.": true,
120
+ "All modifications to the invoice balance are recorded as Transactions": true,
121
+ "All Transactions created with the API or in the Dashboard have a type value of adjustment": true
122
+ }
260
123
  },
261
124
  "https://docs.stripe.com/billing/subscriptions/build-subscriptions": {
262
125
  "status": 200,
@@ -270,11 +133,21 @@
270
133
  "status": 200,
271
134
  "checked": "2026-09-30"
272
135
  },
273
- "https://docs.stripe.com/billing/subscriptions/trials": {
136
+ "https://docs.stripe.com/billing/subscriptions/prorations": {
274
137
  "status": 200,
275
- "checked": "2026-09-30"
138
+ "checked": "2026-10-04",
139
+ "quotes": {
140
+ "Unused time on original 10 USD plan (credit)": true,
141
+ "Remaining time on new 20 USD plan (debit)": true,
142
+ "The current billing period’s start and end times are used to calculate the cost of the subscription before and after the change.": true,
143
+ "By default, Stripe calculates prorations down to the second.": true,
144
+ "When calculating proration credits or debits, Stripe uses the subscription’s discounted price, not the original price.": true,
145
+ "The prorated amount is calculated as soon as the API updates the subscription.": true,
146
+ "creates a non-proration debit, even when the debit covers a partial billing period.": true,
147
+ "no additional discounts are applied to the proration line items themselves": true
148
+ }
276
149
  },
277
- "https://docs.stripe.com/billing/subscriptions/trials/free-trials": {
150
+ "https://docs.stripe.com/billing/subscriptions/trials": {
278
151
  "status": 200,
279
152
  "checked": "2026-09-30"
280
153
  },
@@ -286,29 +159,42 @@
286
159
  "status": 200,
287
160
  "checked": "2026-09-30"
288
161
  },
289
- "https://docs.stripe.com/billing/testing/test-clocks/api-advanced-usage": {
162
+ "https://docs.stripe.com/changelog/clover/2025-09-30/polymorphic-coupon": {
290
163
  "status": 200,
291
- "checked": "2026-09-30"
164
+ "checked": "2026-10-03",
165
+ "quotes": {
166
+ "Moves the top-level coupon field on Promotion Codes to promotion.coupon": true,
167
+ "When you retrieve Promotion Codes, they don’t auto-expand the promotion.coupon field": true
168
+ }
292
169
  },
293
- "https://docs.stripe.com/connect/account-capabilities#capability-status": {
170
+ "https://docs.stripe.com/connect/account-capabilities": {
294
171
  "status": 200,
295
- "checked": "2026-09-30"
172
+ "checked": "2026-10-03",
173
+ "quotes": {
174
+ "If a connected account has both card_payments and transfers": true
175
+ }
296
176
  },
297
- "https://docs.stripe.com/connect/top-ups": {
177
+ "https://docs.stripe.com/connect/authentication": {
298
178
  "status": 200,
299
- "checked": "2026-09-30"
179
+ "checked": "2026-10-03",
180
+ "quotes": {
181
+ "Stripe-Account header": true
182
+ }
300
183
  },
301
- "https://docs.stripe.com/customer-management": {
184
+ "https://docs.stripe.com/connect/destination-charges#issue-refunds": {
302
185
  "status": 200,
303
- "checked": "2026-09-30"
186
+ "checked": "2026-10-03"
304
187
  },
305
- "https://docs.stripe.com/identity/how-sessions-work": {
188
+ "https://docs.stripe.com/customer-management": {
306
189
  "status": 200,
307
190
  "checked": "2026-09-30"
308
191
  },
309
192
  "https://docs.stripe.com/invoicing/integration": {
310
193
  "status": 200,
311
- "checked": "2026-09-30"
194
+ "checked": "2026-10-02",
195
+ "quotes": {
196
+ "To finalize a draft invoice, use the Dashboard, send it to the customer, or pay it.": true
197
+ }
312
198
  },
313
199
  "https://docs.stripe.com/invoicing/integration/workflow-transitions#finalized": {
314
200
  "status": 200,
@@ -329,6 +215,14 @@
329
215
  "status": 200,
330
216
  "checked": "2026-09-30"
331
217
  },
218
+ "https://docs.stripe.com/issuing/testing": {
219
+ "status": 200,
220
+ "checked": "2026-10-03",
221
+ "quotes": {
222
+ "Before you create test transactions, you must add test funds to the Issuing balance on your account.": true,
223
+ "You can create test top-ups in the Dashboard, or with the Top-ups API": true
224
+ }
225
+ },
332
226
  "https://docs.stripe.com/keys": {
333
227
  "status": 200,
334
228
  "checked": "2026-09-30",
@@ -344,29 +238,56 @@
344
238
  "status": 200,
345
239
  "checked": "2026-09-30"
346
240
  },
347
- "https://docs.stripe.com/payments/customer-balance/reconciliation": {
241
+ "https://docs.stripe.com/payments/paymentintents/lifecycle": {
348
242
  "status": 200,
349
243
  "checked": "2026-09-30"
350
244
  },
351
- "https://docs.stripe.com/payments/paymentintents/lifecycle": {
245
+ "https://docs.stripe.com/payouts": {
352
246
  "status": 200,
353
- "checked": "2026-09-30"
247
+ "checked": "2026-10-03",
248
+ "quotes": {
249
+ "paid": true
250
+ }
354
251
  },
355
252
  "https://docs.stripe.com/payouts#payout-statuses": {
356
253
  "status": 200,
357
254
  "checked": "2026-09-30"
358
255
  },
256
+ "https://docs.stripe.com/radar/lists": {
257
+ "status": 200,
258
+ "checked": "2026-10-03",
259
+ "quotes": {
260
+ "Use the Dashboard or the API to create lists.": true,
261
+ "Enter a name for the list": true,
262
+ "Select the type of list to create.": true,
263
+ "Click Add to save your new list.": true
264
+ }
265
+ },
266
+ "https://docs.stripe.com/rate-limits": {
267
+ "status": 200,
268
+ "checked": "2026-10-01",
269
+ "quotes": {
270
+ "25 requests per second": true
271
+ }
272
+ },
359
273
  "https://docs.stripe.com/refunds": {
360
274
  "status": 200,
361
275
  "checked": "2026-09-30"
362
276
  },
363
- "https://docs.stripe.com/reports/api": {
277
+ "https://docs.stripe.com/search": {
364
278
  "status": 200,
365
- "checked": "2026-09-30"
279
+ "checked": "2026-10-03",
280
+ "quotes": {
281
+ "Substring match operator (substrings must be a minimum of 3 characters)": true
282
+ }
366
283
  },
367
- "https://docs.stripe.com/testing#evidence": {
284
+ "https://docs.stripe.com/testing": {
368
285
  "status": 200,
369
- "checked": "2026-09-30"
286
+ "checked": "2026-10-02",
287
+ "quotes": {
288
+ "Generic decline 4000 0000 0000 0002": true,
289
+ "This card requires authentication on all transactions, regardless of how the card is set up.": true
290
+ }
370
291
  },
371
292
  "https://docs.stripe.com/webhooks": {
372
293
  "status": 200,
@@ -374,5 +295,12 @@
374
295
  "quotes": {
375
296
  "register a webhook endpoint, Stripe pushes real-time data to it when": true
376
297
  }
298
+ },
299
+ "https://github.com/stripe/stripe-mock/issues/31": {
300
+ "status": 200,
301
+ "checked": "2026-10-03",
302
+ "quotes": {
303
+ "Unrecognized request URL (GET: /v1/test).": true
304
+ }
377
305
  }
378
306
  }
package/src/cli.ts CHANGED
@@ -1,9 +1,6 @@
1
- #!/usr/bin/env node
2
- // world-stripe: serve the stripe twin.
3
1
  import { hasFlag, optionValue } from '@volter/world-core/args';
4
2
  import { keepProcessAlive } from '@volter/world-core/lifecycle';
5
3
  import { createStripeTwinServer } from './server.ts';
6
-
7
4
  const [cmd, ...rest] = process.argv.slice(2);
8
5
  const port = Number(optionValue(rest, '--port', '0')) || undefined;
9
6
  const root = optionValue(rest, '--root') || undefined;
@@ -15,9 +15,7 @@
15
15
  // deadline depends on the card network); the dispute fee is 1500 cents in any currency (Stripe's US fee is $15); an
16
16
  // elevated-risk review's risk score is 67 (Radar's elevated band); the application is `ca_twin`.
17
17
  import { BYPASS_PENDING_CARDS } from './test-cards.ts';
18
-
19
18
  export type Outcome = 'dispute' | 'dispute_not_received' | 'inquiry' | 'review' | 'available';
20
- export const DAY = 86_400;
21
19
 
22
20
  /** The test cards whose success Stripe follows with its own act, by number and by their documented test names. */
23
21
  export const AFTER_SUCCESS_CARDS: Record<string, { brand: string; number: string; outcome: Outcome }> = {
@@ -16,7 +16,6 @@
16
16
  // US schedule counts business days) and reads paid from then on; an automatic payout is made at midnight UTC on the
17
17
  // first scheduled day on or after its funds become available, only when what it would pay is positive.
18
18
  import type { Row } from './common.ts';
19
-
20
19
  export const DAY = 86_400;
21
20
 
22
21
  export const DAYS = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
@@ -4,7 +4,6 @@
4
4
  // the payment made: a succeeded PaymentIntent, an active (or
5
5
  // trialing) subscription, or a succeeded SetupIntent. List and retrieve are the derived core's.
6
6
  import type { Row } from './common.ts';
7
-
8
7
  export const CS = 'checkout.session';
9
8
 
10
9
  /** The payment method types a session takes: the list a caller pinned to an earlier version gives as
@@ -1,22 +1,9 @@
1
1
  // Stripe's shared computation over rows already read: the fields each object's spec gives, a row as Stripe answers it,
2
2
  // and the list and refund shapes (the handlers' shared behaviour is ../semantics/shared.ts).
3
- import { view } from './stripe.ts';
4
-
5
3
  import surface from '../generated/surface.gen.json' with { type: 'json' };
6
4
 
7
5
  export type Row = Record<string, unknown>;
8
6
 
9
-
10
- /** A removed discount as Stripe answers it: the discount, marked deleted (docs.stripe.com/api/discounts/delete). */
11
- export function deletedDiscount(d: Row, now: unknown): Row {
12
- const coupon = d.coupon && typeof d.coupon === 'object' ? String((d.coupon as Row).id) : typeof d.coupon === 'string' ? d.coupon : null;
13
- return {
14
- id: d.id ?? `di_${coupon ?? 'twin'}`, object: 'discount', deleted: true, checkout_session: d.checkout_session ?? null, customer: d.customer ?? null,
15
- invoice: d.invoice ?? null, invoice_item: d.invoice_item ?? null, promotion_code: d.promotion_code ?? null, subscription: d.subscription ?? null,
16
- subscription_item: d.subscription_item ?? null, source: d.source ?? { type: 'coupon', coupon }, start: d.start ?? now,
17
- };
18
- }
19
-
20
7
  /** Keep the rows whose field equals the request's parameter of the same name, for each name given. */
21
8
  /** A list's range filter on a unix time (`created[gte]=…&created[lt]=…`, or one exact time). */
22
9
  export function inRange(t: unknown, v: unknown): boolean {
@@ -31,6 +18,25 @@ export const SPEC_FIELDS = new Map((surface.resources as Array<{ name: string; f
31
18
  * shared helpers look a price, a payment method or a card up by, read from the context's tree. */
32
19
  export type Find = (storedType: string, id: string) => Row | undefined;
33
20
 
21
+ /** An account's external_accounts, "External accounts (bank accounts and debit cards) currently attached to this
22
+ * account" (docs.stripe.com/api/accounts/object), as the list its example answers. */
23
+ export const externalList = (account: string, data: Row[]): Row => ({ object: 'list', data, has_more: false, total_count: data.length, url: `/v1/accounts/${account}/external_accounts` });
24
+
25
+
26
+
27
+
28
+ /** A removed discount as Stripe answers it: the discount, marked deleted (docs.stripe.com/api/discounts/delete). */
29
+ export function deletedDiscount(d: Row, now: unknown): Row {
30
+ const coupon = d.coupon && typeof d.coupon === 'object' ? String((d.coupon as Row).id) : typeof d.coupon === 'string' ? d.coupon : null;
31
+ return {
32
+ id: d.id ?? `di_${coupon ?? 'twin'}`, object: 'discount', deleted: true, checkout_session: d.checkout_session ?? null, customer: d.customer ?? null,
33
+ invoice: d.invoice ?? null, invoice_item: d.invoice_item ?? null, promotion_code: d.promotion_code ?? null, subscription: d.subscription ?? null,
34
+ subscription_item: d.subscription_item ?? null, source: d.source ?? { type: 'coupon', coupon }, start: d.start ?? now,
35
+ };
36
+ }
37
+
38
+
39
+
34
40
  /** A refund's destination_details for a card charge: "If this is a `card` refund, this hash contains the transaction
35
41
  * specific details" and its `type` "can be `refund`, `reversal`, or `pending`" — a reversal, where "The original charge
36
42
  * will drop off the bank statement altogether", for an authorization released uncaptured, else a refund, "a credit entry
@@ -41,7 +47,3 @@ export function refundDestination(charge: Row, type: 'refund' | 'reversal'): Row
41
47
  if (pmd && pmd.type !== 'card') return {};
42
48
  return { destination_details: { type: 'card', card: { reference: null, reference_status: null, reference_type: null, type } } };
43
49
  }
44
-
45
- /** An account's external_accounts, "External accounts (bank accounts and debit cards) currently attached to this
46
- * account" (docs.stripe.com/api/accounts/object), as the list its example answers. */
47
- export const externalList = (account: string, data: Row[]): Row => ({ object: 'list', data, has_more: false, total_count: data.length, url: `/v1/accounts/${account}/external_accounts` });