@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/twin-stripe",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Local Stripe twin — a faithful, stateful local Stripe API your real `stripe` SDK talks to unmodified, its hosted pages and Stripe.js. Built on @volter/world-core.",
5
5
  "keywords": [
6
6
  "twin",
@@ -23,6 +23,7 @@
23
23
  },
24
24
  "files": [
25
25
  "src",
26
+ "journeys",
26
27
  "spec",
27
28
  "README.md",
28
29
  "LICENSE",
@@ -48,12 +49,12 @@
48
49
  "world-stripe": "dist/src/cli.js"
49
50
  },
50
51
  "dependencies": {
51
- "@volter/world-ui": "^1.0.1",
52
+ "@volter/world-ui": "^1.0.38",
52
53
  "react": "^19.2.7",
53
54
  "react-dom": "^19.2.7"
54
55
  },
55
56
  "peerDependencies": {
56
- "@volter/world-core": "^3.0.1"
57
+ "@volter/world-core": "^3.0.38"
57
58
  },
58
59
  "devDependencies": {
59
60
  "@types/bun": "^1.2.20",
package/spec/SOURCE.md CHANGED
@@ -6,9 +6,13 @@
6
6
  - **SHA-256 of the uncompressed document:** `6b4680299e7b7743811c41537e828b0eae363a11cea44441511013b55e52f7ad`.
7
7
  - **Read by:** `bun scripts/derive-pack.ts stripe`, which writes `../src/generated/surface.gen.json`.
8
8
 
9
- The pack serves this document's version (`SERVED_VERSION` in `src/stripe-version.ts`).
9
+ The pack serves this document's version (`SERVED_VERSION` in `src/engine/version.ts`).
10
10
 
11
11
  - **Published examples:** `fixtures3.json.gz`, gzip of Stripe's `openapi/fixtures3.json` (one sample object per resource,
12
12
  the objects Stripe's API reference shows), from commit `0d98342fc985dc7710a44be25e8528dd8e099bc2` (2026-09-23).
13
13
  SHA-256 of the uncompressed file: `e6822f7ee6fd71bdde6228537368aafcfb7191109340fe119d9aca27c6e9396d`.
14
14
  **Read by:** `bun scripts/vendor-examples.ts stripe`.
15
+ - **Published examples from Stripe's pages:** `doc-examples.json`, the requests and rules Stripe's documentation pages
16
+ publish (its testing page's cards, the payment lifecycle's states, each reference page's stated rule), each with its
17
+ page's URL and the page's words for what it does, read with twin-standard's `read-page`. **Read by:**
18
+ `bun scripts/vendor-examples.ts stripe`.
@@ -0,0 +1,445 @@
1
+ [
2
+ {
3
+ "title": "Generic decline",
4
+ "source": "https://docs.stripe.com/testing",
5
+ "operation": "PostPaymentIntentsIntentConfirm",
6
+ "input": {
7
+ "payment_method_data": {
8
+ "type": "card",
9
+ "card": {
10
+ "number": "4000000000000002",
11
+ "exp_month": 12,
12
+ "exp_year": 2030,
13
+ "cvc": "123"
14
+ }
15
+ }
16
+ },
17
+ "means": "Generic decline 4000 0000 0000 0002 card_declined generic_decline",
18
+ "status": 402
19
+ },
20
+ {
21
+ "title": "Always authenticate",
22
+ "source": "https://docs.stripe.com/testing",
23
+ "operation": "PostPaymentIntentsIntentConfirm",
24
+ "input": {
25
+ "payment_method_data": {
26
+ "type": "card",
27
+ "card": {
28
+ "number": "4000002760003184",
29
+ "exp_month": 12,
30
+ "exp_year": 2030,
31
+ "cvc": "123"
32
+ }
33
+ }
34
+ },
35
+ "output": {
36
+ "status": "requires_action"
37
+ },
38
+ "means": "Always authenticate 4000 0027 6000 3184 This card requires authentication on all transactions, regardless of how the card is set up.",
39
+ "status": 200
40
+ },
41
+ {
42
+ "title": "rule: a publishable key retrieves a payment with its client secret",
43
+ "source": "https://docs.stripe.com/api/payment_intents/retrieve",
44
+ "operation": "GetPaymentIntentsIntent",
45
+ "means": "client_secret string Required if you use a publishable key. The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source.",
46
+ "status": 400
47
+ },
48
+ {
49
+ "title": "a payment given its method waits for confirmation",
50
+ "source": "https://docs.stripe.com/payments/paymentintents/lifecycle",
51
+ "operation": "PostPaymentIntents",
52
+ "input": {
53
+ "payment_method": "pm_1EXUPv2eZvKYlo2CUkqZASBe"
54
+ },
55
+ "output": {
56
+ "status": "requires_confirmation"
57
+ },
58
+ "means": "After your customer provides payment information, the PaymentIntent enters the requires_confirmation status and is ready to confirm."
59
+ },
60
+ {
61
+ "title": "a payment authorized and captured separately waits for its capture",
62
+ "source": "https://docs.stripe.com/payments/paymentintents/lifecycle",
63
+ "operation": "PostPaymentIntentsIntentConfirm",
64
+ "output": {
65
+ "status": "requires_capture"
66
+ },
67
+ "means": "If you’re separately authorizing and capturing funds, your PaymentIntent can instead move to requires_capture."
68
+ },
69
+ {
70
+ "title": "rule: a payment that succeeded is not canceled",
71
+ "source": "https://docs.stripe.com/payments/paymentintents/lifecycle",
72
+ "operation": "PostPaymentIntentsIntentCancel",
73
+ "means": "You can cancel a PaymentIntent before it reaches a processing or succeeded state.",
74
+ "status": 400
75
+ },
76
+ {
77
+ "title": "rule: only an open session can be expired",
78
+ "source": "https://docs.stripe.com/api/checkout/sessions/expire",
79
+ "operation": "PostCheckoutSessionsSessionExpire",
80
+ "means": "A Checkout Session can be expired when it is in one of these statuses: open",
81
+ "status": 400
82
+ },
83
+ {
84
+ "title": "rule: only a finalized invoice is voided",
85
+ "source": "https://docs.stripe.com/api/invoices/void",
86
+ "operation": "PostInvoicesInvoiceVoid",
87
+ "means": "Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion , however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.",
88
+ "status": 400
89
+ },
90
+ {
91
+ "title": "rule: an invoice no longer a draft is not deleted",
92
+ "source": "https://docs.stripe.com/api/invoices/delete",
93
+ "operation": "DeleteInvoicesInvoice",
94
+ "means": "Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided .",
95
+ "status": 400
96
+ },
97
+ {
98
+ "title": "rule: only a draft is finalized",
99
+ "source": "https://docs.stripe.com/api/invoices/finalize",
100
+ "operation": "PostInvoicesInvoiceFinalize",
101
+ "means": "Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.",
102
+ "status": 400
103
+ },
104
+ {
105
+ "title": "Test account numbers: pm_usBankAccount_success",
106
+ "source": "https://docs.stripe.com/payments/ach-direct-debit/accept-a-payment",
107
+ "operation": "PostPaymentIntents",
108
+ "input": {
109
+ "payment_method": "pm_usBankAccount_success"
110
+ },
111
+ "output": {
112
+ "status": "processing"
113
+ },
114
+ "means": "000123456789 pm_usBankAccount_success 110000000 The payment succeeds."
115
+ },
116
+ {
117
+ "title": "Generic decline",
118
+ "source": "https://docs.stripe.com/testing",
119
+ "operation": "PostPaymentIntents",
120
+ "input": {
121
+ "payment_method_data": {
122
+ "type": "card",
123
+ "card": {
124
+ "number": "4000000000000002",
125
+ "exp_month": 12,
126
+ "exp_year": 2030,
127
+ "cvc": "123"
128
+ }
129
+ },
130
+ "confirm": true
131
+ },
132
+ "means": "Generic decline 4000 0000 0000 0002 card_declined generic_decline",
133
+ "status": 402
134
+ },
135
+ {
136
+ "title": "Always authenticate",
137
+ "source": "https://docs.stripe.com/testing",
138
+ "operation": "PostPaymentIntents",
139
+ "input": {
140
+ "payment_method_data": {
141
+ "type": "card",
142
+ "card": {
143
+ "number": "4000002760003184",
144
+ "exp_month": 12,
145
+ "exp_year": 2030,
146
+ "cvc": "123"
147
+ }
148
+ },
149
+ "confirm": true
150
+ },
151
+ "output": {
152
+ "status": "requires_action"
153
+ },
154
+ "means": "Always authenticate 4000 0027 6000 3184 This card requires authentication on all transactions, regardless of how the card is set up."
155
+ },
156
+ {
157
+ "title": "Test account numbers: pm_usBankAccount_success",
158
+ "source": "https://docs.stripe.com/payments/ach-direct-debit/accept-a-payment",
159
+ "operation": "PostPaymentIntentsIntentConfirm",
160
+ "input": {
161
+ "payment_method": "pm_usBankAccount_success"
162
+ },
163
+ "output": {
164
+ "status": "processing"
165
+ },
166
+ "means": "000123456789 pm_usBankAccount_success 110000000 The payment succeeds."
167
+ },
168
+ {
169
+ "title": "a setup given its method waits for confirmation",
170
+ "source": "https://docs.stripe.com/payments/paymentintents/lifecycle",
171
+ "operation": "PostSetupIntents",
172
+ "input": {
173
+ "payment_method": "pm_1EXUPv2eZvKYlo2CUkqZASBe"
174
+ },
175
+ "output": {
176
+ "status": "requires_confirmation"
177
+ },
178
+ "means": "After your customer provides payment information, the SetupIntent enters the requires_confirmation status and is ready to confirm."
179
+ },
180
+ {
181
+ "title": "microdeposit verification",
182
+ "source": "https://docs.stripe.com/payments/ach-direct-debit/set-up-payment",
183
+ "operation": "PostSetupIntentsIntentConfirm",
184
+ "input": {
185
+ "payment_method_data": {
186
+ "type": "us_bank_account"
187
+ }
188
+ },
189
+ "output": {
190
+ "status": "requires_action"
191
+ },
192
+ "means": "If the customer opts for microdeposit verification, Stripe automatically sends two small deposits to the provided bank account."
193
+ },
194
+ {
195
+ "title": "payment_intent_unexpected_state",
196
+ "source": "https://docs.stripe.com/error-codes",
197
+ "operation": "PostPaymentIntentsIntentConfirm",
198
+ "means": "payment_intent_unexpected_state The PaymentIntent’s state was incompatible with the operation you were trying to perform.",
199
+ "status": 400
200
+ },
201
+ {
202
+ "title": "setup_intent_unexpected_state",
203
+ "source": "https://docs.stripe.com/error-codes",
204
+ "operation": "PostSetupIntentsIntentConfirm",
205
+ "means": "setup_intent_unexpected_state The SetupIntent’s state was incompatible with the operation you were trying to perform.",
206
+ "status": 400
207
+ },
208
+ {
209
+ "title": "rule: sending a draft finalizes it",
210
+ "source": "https://docs.stripe.com/invoicing/integration",
211
+ "operation": "PostInvoicesInvoiceSend",
212
+ "output": {
213
+ "status": "open"
214
+ },
215
+ "means": "To finalize a draft invoice, use the Dashboard, send it to the customer, or pay it."
216
+ },
217
+ {
218
+ "title": "rule: only an active or not-started schedule is released",
219
+ "source": "https://docs.stripe.com/api/subscription_schedules/release",
220
+ "operation": "PostSubscriptionSchedulesScheduleRelease",
221
+ "means": "A schedule can only be released if its status is not_started or active .",
222
+ "status": 400
223
+ },
224
+ {
225
+ "title": "close_authorization false",
226
+ "source": "https://docs.stripe.com/api/issuing/authorizations/test_mode_capture",
227
+ "operation": "PostTestHelpersIssuingAuthorizationsAuthorizationCapture",
228
+ "input": {
229
+ "close_authorization": false
230
+ },
231
+ "output": {
232
+ "status": "pending"
233
+ },
234
+ "means": "close_authorization boolean Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows."
235
+ },
236
+ {
237
+ "title": "To end a trial early",
238
+ "source": "https://docs.stripe.com/billing/subscriptions/trials/free-trials",
239
+ "operation": "PostSubscriptionsSubscriptionExposedId",
240
+ "input": {
241
+ "trial_end": "now"
242
+ },
243
+ "means": "To end a trial early, make an update subscription API call, setting the trial_end value to a new timestamp, or now to end immediately"
244
+ },
245
+ {
246
+ "title": "a trial period on an existing subscription",
247
+ "source": "https://docs.stripe.com/billing/subscriptions/trials/free-trials",
248
+ "operation": "PostSubscriptionsSubscriptionExposedId",
249
+ "input": {
250
+ "trial_end": 1805760000
251
+ },
252
+ "output": {
253
+ "status": "trialing"
254
+ },
255
+ "means": "Trial periods are normally applied at the start of a subscription, but you can also use a trial period on an existing subscription to change the subscription’s billing period (cycle) ."
256
+ },
257
+ {
258
+ "title": "rule: a canceled subscription is largely immutable",
259
+ "source": "https://docs.stripe.com/api/subscriptions/cancel",
260
+ "operation": "PostSubscriptionsSubscriptionExposedId",
261
+ "input": {
262
+ "trial_end": 1805760000
263
+ },
264
+ "means": "After it’s canceled, the subscription is largely immutable. You can still update its metadata and cancellation_details .",
265
+ "status": 400
266
+ },
267
+ {
268
+ "title": "active: a product no longer for sale",
269
+ "source": "https://docs.stripe.com/api/products/update",
270
+ "operation": "PostProductsId",
271
+ "input": {
272
+ "active": false
273
+ },
274
+ "output": {
275
+ "active": false
276
+ },
277
+ "means": "active boolean Whether the product is available for purchase."
278
+ },
279
+ {
280
+ "title": "active: a product for sale again",
281
+ "source": "https://docs.stripe.com/api/products/update",
282
+ "operation": "PostProductsId",
283
+ "input": {
284
+ "active": true
285
+ },
286
+ "output": {
287
+ "active": true
288
+ },
289
+ "means": "active boolean Whether the product is available for purchase."
290
+ },
291
+ {
292
+ "title": "active: a price no longer for new purchases",
293
+ "source": "https://docs.stripe.com/api/prices/update",
294
+ "operation": "PostPricesPrice",
295
+ "input": {
296
+ "active": false
297
+ },
298
+ "output": {
299
+ "active": false
300
+ },
301
+ "means": "active boolean Whether the price can be used for new purchases. Defaults to true ."
302
+ },
303
+ {
304
+ "title": "active: a price for new purchases again",
305
+ "source": "https://docs.stripe.com/api/prices/update",
306
+ "operation": "PostPricesPrice",
307
+ "input": {
308
+ "active": true
309
+ },
310
+ "output": {
311
+ "active": true
312
+ },
313
+ "means": "active boolean Whether the price can be used for new purchases. Defaults to true ."
314
+ },
315
+ {
316
+ "title": "active: a configuration switched off",
317
+ "source": "https://docs.stripe.com/api/customer_portal/configurations/update",
318
+ "operation": "PostBillingPortalConfigurationsConfiguration",
319
+ "input": {
320
+ "active": false
321
+ },
322
+ "output": {
323
+ "active": false
324
+ },
325
+ "means": "active boolean Whether the configuration is active and can be used to create portal sessions."
326
+ },
327
+ {
328
+ "title": "active: a configuration switched on again",
329
+ "source": "https://docs.stripe.com/api/customer_portal/configurations/update",
330
+ "operation": "PostBillingPortalConfigurationsConfiguration",
331
+ "input": {
332
+ "active": true
333
+ },
334
+ "output": {
335
+ "active": true
336
+ },
337
+ "means": "active boolean Whether the configuration is active and can be used to create portal sessions."
338
+ },
339
+ {
340
+ "title": "Create a Custom connected account",
341
+ "source": "https://docs.stripe.com/connect/custom-accounts",
342
+ "operation": "PostAccounts",
343
+ "input": {
344
+ "country": "US",
345
+ "type": "custom",
346
+ "capabilities": {
347
+ "card_payments": {
348
+ "requested": true
349
+ },
350
+ "transfers": {
351
+ "requested": true
352
+ }
353
+ }
354
+ },
355
+ "output": {
356
+ "type": "custom"
357
+ },
358
+ "means": "The basic process to create and connect a Custom connected account is to call the account creation endpoint, setting type to custom and providing a country and the appropriate capabilities ."
359
+ },
360
+ {
361
+ "title": "rule: a voided invoice cannot be undone",
362
+ "source": "https://docs.stripe.com/api/invoices/void",
363
+ "operation": "PostInvoicesInvoicePay",
364
+ "means": "Mark a finalized invoice as void. This cannot be undone.",
365
+ "status": 400
366
+ },
367
+ {
368
+ "title": "a bank transfer waits for its funds",
369
+ "source": "https://docs.stripe.com/payments/bank-transfers/accept-a-payment",
370
+ "operation": "PostPaymentIntents",
371
+ "input": {
372
+ "payment_method_types": [
373
+ "customer_balance"
374
+ ],
375
+ "payment_method_data": {
376
+ "type": "customer_balance"
377
+ },
378
+ "confirm": true
379
+ },
380
+ "output": {
381
+ "status": "requires_action"
382
+ },
383
+ "means": "The PaymentIntent stays in a requires_action status until funds arrive in the bank account."
384
+ },
385
+ {
386
+ "title": "rule: a product with prices is not deleted",
387
+ "source": "https://docs.stripe.com/api/products/delete",
388
+ "operation": "DeleteProductsId",
389
+ "means": "Delete a product. Deleting a product is only possible if it has no prices associated with it.",
390
+ "status": 400
391
+ },
392
+ {
393
+ "title": "rule: both capabilities are disabled while either is inactive",
394
+ "source": "https://docs.stripe.com/connect/account-capabilities",
395
+ "operation": "PostTransfers",
396
+ "means": "If a connected account has both card_payments and transfers , and the status of either one is inactive , then both capabilities are disabled.",
397
+ "status": 400
398
+ },
399
+ {
400
+ "title": "rule: a payout the balance does not cover is refused",
401
+ "source": "https://docs.stripe.com/api/payouts/create",
402
+ "operation": "PostPayouts",
403
+ "means": "Your Stripe balance must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error.",
404
+ "status": 400
405
+ },
406
+ {
407
+ "title": "rule: a transfer from a charge succeeds before its funds are available",
408
+ "source": "https://docs.stripe.com/connect/separate-charges-and-transfers",
409
+ "operation": "PostTransfers",
410
+ "input": {
411
+ "source_transaction": "ch_1EXUPv2eZvKYlo2CStIqOmbY"
412
+ },
413
+ "means": "When you specify the associated charge as the transfer’s source_transaction , the transfer request automatically succeeds. However, we don’t execute the transfer until the funds from that charge are available in the platform account."
414
+ },
415
+ {
416
+ "title": "rule: a refund names one of the documented reasons",
417
+ "source": "https://docs.stripe.com/api/refunds/create",
418
+ "operation": "PostRefunds",
419
+ "input": {
420
+ "reason": "outage"
421
+ },
422
+ "means": "String indicating the reason for the refund. If set, possible values are duplicate , fraudulent , and requested_by_customer .",
423
+ "status": 400
424
+ },
425
+ {
426
+ "title": "amount_off",
427
+ "source": "https://docs.stripe.com/api/coupons/create",
428
+ "operation": "PostCoupons",
429
+ "input": {
430
+ "amount_off": 500,
431
+ "currency": "usd"
432
+ },
433
+ "means": "amount_off integer A positive integer representing the amount to subtract from an invoice total (required if percent_off is not passed)."
434
+ },
435
+ {
436
+ "title": "error_if_incomplete",
437
+ "source": "https://docs.stripe.com/api/subscriptions/create",
438
+ "operation": "PostSubscriptions",
439
+ "input": {
440
+ "payment_behavior": "error_if_incomplete"
441
+ },
442
+ "means": "error_if_incomplete If payment fails, return an HTTP 402 status code and don’t create the subscription.",
443
+ "status": 402
444
+ }
445
+ ]