@volter/twin-stripe 2.0.37 → 3.0.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/README.md +82 -207
- package/dist/generated/pack-facts.json +94 -0
- package/dist/spec/SOURCE.md +14 -0
- package/dist/spec/fixtures3.json.gz +0 -0
- package/dist/spec/openapi.json.gz +0 -0
- package/dist/spec/patches.json +34 -0
- package/dist/spec/sources.json +378 -0
- package/dist/src/cli.js +12 -30
- package/dist/src/engine/after-payment.d.ts +9 -0
- package/dist/src/engine/after-payment.js +28 -0
- package/dist/src/engine/apps-secrets.d.ts +1 -0
- package/dist/src/engine/apps-secrets.js +3 -0
- package/dist/src/engine/balance.d.ts +5 -0
- package/dist/src/engine/balance.js +15 -0
- package/dist/src/engine/billing.d.ts +5 -0
- package/dist/src/engine/billing.js +6 -0
- package/dist/src/engine/charges.d.ts +6 -0
- package/dist/src/engine/charges.js +13 -0
- package/dist/src/engine/checkout.d.ts +24 -0
- package/dist/src/engine/checkout.js +30 -0
- package/dist/src/engine/common.d.ts +19 -0
- package/dist/src/engine/common.js +32 -0
- package/dist/src/{screens → engine}/connect-settings.d.ts +1 -7
- package/dist/src/engine/connect-settings.js +26 -0
- package/dist/src/engine/connect.d.ts +66 -0
- package/dist/src/engine/connect.js +189 -0
- package/dist/src/engine/coupons.d.ts +0 -0
- package/dist/src/engine/coupons.js +5 -0
- package/dist/src/engine/credit-notes.d.ts +1 -0
- package/dist/src/engine/credit-notes.js +5 -0
- package/dist/src/engine/customers.d.ts +12 -0
- package/dist/src/engine/customers.js +30 -0
- package/dist/src/engine/display.d.ts +14 -0
- package/dist/src/engine/display.js +16 -0
- package/dist/src/engine/disputes.d.ts +0 -0
- package/dist/src/engine/disputes.js +9 -0
- package/dist/src/engine/entitlements.d.ts +1 -0
- package/dist/src/engine/entitlements.js +4 -0
- package/dist/src/engine/ephemeral-keys.d.ts +0 -0
- package/dist/src/engine/ephemeral-keys.js +4 -0
- package/dist/src/engine/files.d.ts +18 -0
- package/dist/src/engine/files.js +33 -0
- package/dist/src/engine/front.d.ts +5 -0
- package/dist/src/engine/front.js +25 -0
- package/dist/src/engine/invoices.d.ts +24 -0
- package/dist/src/engine/invoices.js +57 -0
- package/dist/src/engine/issuing.d.ts +35 -0
- package/dist/src/engine/issuing.js +45 -0
- package/dist/src/engine/ledger.d.ts +9 -0
- package/dist/src/engine/ledger.js +9 -0
- package/dist/src/engine/oauth.d.ts +4 -0
- package/dist/src/engine/oauth.js +25 -0
- package/dist/src/engine/onboarding.d.ts +13 -0
- package/dist/src/engine/onboarding.js +42 -0
- package/dist/src/{stripe-params.d.ts → engine/params.d.ts} +20 -3
- package/dist/src/{stripe-params.js → engine/params.js} +7 -60
- package/dist/src/engine/payment-intents.d.ts +10 -0
- package/dist/src/engine/payment-intents.js +27 -0
- package/dist/src/engine/payment-links.d.ts +1 -0
- package/dist/src/engine/payment-links.js +5 -0
- package/dist/src/engine/payment-methods.d.ts +16 -0
- package/dist/src/engine/payment-methods.js +22 -0
- package/dist/src/engine/plans.d.ts +6 -0
- package/dist/src/engine/plans.js +26 -0
- package/dist/src/engine/platform.d.ts +39 -0
- package/dist/src/engine/platform.js +34 -0
- package/dist/src/engine/products.d.ts +0 -0
- package/dist/src/engine/products.js +4 -0
- package/dist/src/engine/radar.d.ts +2 -0
- package/dist/src/engine/radar.js +5 -0
- package/dist/src/engine/refunds.d.ts +1 -0
- package/dist/src/engine/refunds.js +28 -0
- package/dist/src/engine/renewals.d.ts +36 -0
- package/dist/src/engine/renewals.js +65 -0
- package/dist/src/engine/setup-intents.d.ts +1 -0
- package/dist/src/engine/setup-intents.js +4 -0
- package/dist/src/{stripe-twin.d.ts → engine/stripe.d.ts} +11 -39
- package/dist/src/{stripe-twin.js → engine/stripe.js} +25 -310
- package/dist/src/engine/subscription-schedules.d.ts +3 -0
- package/dist/src/engine/subscription-schedules.js +1 -0
- package/dist/src/engine/subscriptions.d.ts +12 -0
- package/dist/src/engine/subscriptions.js +31 -0
- package/dist/src/engine/tax.d.ts +7 -0
- package/dist/src/engine/tax.js +28 -0
- package/dist/src/engine/terminal.d.ts +4 -0
- package/dist/src/engine/terminal.js +20 -0
- package/dist/src/engine/test-clocks.d.ts +5 -0
- package/dist/src/engine/test-clocks.js +9 -0
- package/dist/src/engine/tokens.d.ts +7 -0
- package/dist/src/engine/tokens.js +20 -0
- package/dist/src/engine/transfers.d.ts +2 -0
- package/dist/src/engine/transfers.js +1 -0
- package/dist/src/engine/treasury.d.ts +23 -0
- package/dist/src/engine/treasury.js +45 -0
- package/dist/src/{stripe-version.js → engine/version.js} +4 -3
- package/dist/src/engine/webhook-endpoints.d.ts +1 -0
- package/dist/src/engine/webhook-endpoints.js +12 -0
- package/dist/src/engine/webhooks.d.ts +31 -0
- package/dist/src/engine/webhooks.js +68 -0
- package/dist/src/fetch.d.ts +2 -0
- package/dist/src/fetch.js +26 -0
- package/dist/src/generated/surface.gen.json +1 -1
- package/dist/src/generated/ui.gen.json +1 -1
- package/dist/src/index.d.ts +5 -14
- package/dist/src/index.js +8 -75
- package/dist/src/manifest.js +232 -758
- package/dist/src/screens/billing-portal.d.ts +3 -0
- package/dist/src/screens/{portal.js → billing-portal.js} +28 -54
- package/dist/src/screens/checkout.d.ts +2 -31
- package/dist/src/screens/checkout.js +32 -121
- package/dist/src/screens/connect-oauth.d.ts +3 -27
- package/dist/src/screens/connect-oauth.js +51 -132
- package/dist/src/screens/connect-onboarding.d.ts +3 -0
- package/dist/src/screens/{onboarding.js → connect-onboarding.js} +36 -102
- package/dist/src/screens/dashboard.d.ts +3 -0
- package/dist/src/screens/dashboard.js +117 -0
- package/dist/src/screens/shared.d.ts +27 -0
- package/dist/src/screens/shared.js +87 -0
- package/dist/src/screens/stripe-js.d.ts +3 -0
- package/dist/src/screens/stripe-js.js +135 -0
- package/dist/src/semantics/account_links.d.ts +2 -0
- package/dist/src/semantics/account_links.js +22 -0
- package/dist/src/semantics/accounts.d.ts +4 -0
- package/dist/src/semantics/accounts.js +38 -0
- package/dist/src/semantics/apps.d.ts +4 -0
- package/dist/src/semantics/{apps-secrets.js → apps.js} +14 -26
- package/dist/src/semantics/around.d.ts +2 -0
- package/dist/src/semantics/around.js +16 -0
- package/dist/src/semantics/balance.d.ts +2 -11
- package/dist/src/semantics/balance.js +3 -194
- package/dist/src/semantics/balance_transactions.d.ts +2 -0
- package/dist/src/semantics/balance_transactions.js +15 -0
- package/dist/src/semantics/billing_portal.d.ts +5 -0
- package/dist/src/semantics/billing_portal.js +42 -0
- package/dist/src/semantics/charges.d.ts +3 -28
- package/dist/src/semantics/charges.js +5 -202
- package/dist/src/semantics/checkout.d.ts +3 -20
- package/dist/src/semantics/checkout.js +8 -261
- package/dist/src/semantics/clock.d.ts +2 -0
- package/dist/src/semantics/clock.js +21 -0
- package/dist/src/semantics/coupons.d.ts +2 -6
- package/dist/src/semantics/coupons.js +2 -60
- package/dist/src/semantics/customers.d.ts +6 -6
- package/dist/src/semantics/customers.js +27 -387
- package/dist/src/semantics/disputes.d.ts +2 -2
- package/dist/src/semantics/disputes.js +3 -49
- package/dist/src/semantics/doors.d.ts +23 -0
- package/dist/src/semantics/doors.js +73 -0
- package/dist/src/semantics/entitlements.d.ts +2 -2
- package/dist/src/semantics/entitlements.js +5 -50
- package/dist/src/semantics/events.d.ts +12 -0
- package/dist/src/semantics/events.js +36 -0
- package/dist/src/semantics/index.d.ts +2 -0
- package/dist/src/semantics/index.js +107 -0
- package/dist/src/semantics/invoice_payments.d.ts +2 -0
- package/dist/src/semantics/invoice_payments.js +12 -0
- package/dist/src/semantics/invoiceitems.d.ts +3 -0
- package/dist/src/semantics/invoiceitems.js +59 -0
- package/dist/src/semantics/invoices.d.ts +16 -18
- package/dist/src/semantics/invoices.js +118 -444
- package/dist/src/semantics/payment_intents.d.ts +4 -0
- package/dist/src/semantics/payment_intents.js +79 -0
- package/dist/src/semantics/payment_methods.d.ts +5 -0
- package/dist/src/semantics/payment_methods.js +39 -0
- package/dist/src/semantics/payouts.d.ts +2 -0
- package/dist/src/semantics/payouts.js +21 -0
- package/dist/src/semantics/prices.d.ts +4 -0
- package/dist/src/semantics/prices.js +37 -0
- package/dist/src/semantics/products.d.ts +6 -2
- package/dist/src/semantics/products.js +15 -130
- package/dist/src/semantics/promotion_codes.d.ts +3 -0
- package/dist/src/semantics/promotion_codes.js +35 -0
- package/dist/src/semantics/radar.d.ts +2 -2
- package/dist/src/semantics/radar.js +5 -74
- package/dist/src/semantics/refunds.d.ts +3 -9
- package/dist/src/semantics/refunds.js +6 -192
- package/dist/src/semantics/setup_intents.d.ts +3 -0
- package/dist/src/semantics/{setup-intents.js → setup_intents.js} +10 -53
- package/dist/src/semantics/shared.d.ts +822 -47
- package/dist/src/semantics/shared.js +3044 -78
- package/dist/src/semantics/states.d.ts +531 -0
- package/dist/src/semantics/states.js +852 -0
- package/dist/src/semantics/subscription_items.d.ts +5 -0
- package/dist/src/semantics/subscription_items.js +55 -0
- package/dist/src/semantics/subscription_schedules.d.ts +4 -0
- package/dist/src/semantics/subscription_schedules.js +60 -0
- package/dist/src/semantics/subscriptions.d.ts +7 -11
- package/dist/src/semantics/subscriptions.js +44 -415
- package/dist/src/semantics/test_helpers.d.ts +6 -0
- package/dist/src/semantics/{test-clocks.js → test_helpers.js} +14 -40
- package/dist/src/semantics/transfers.d.ts +2 -2
- package/dist/src/semantics/transfers.js +6 -101
- package/dist/src/server.d.ts +7 -0
- package/dist/src/server.js +7 -0
- package/generated/pack-facts.json +94 -0
- package/package.json +10 -20
- package/spec/SOURCE.md +14 -0
- package/spec/fixtures3.json.gz +0 -0
- package/spec/openapi.json.gz +0 -0
- package/spec/patches.json +34 -0
- package/spec/sources.json +378 -0
- package/src/cli.ts +12 -26
- package/src/engine/after-payment.ts +31 -0
- package/src/engine/apps-secrets.ts +4 -0
- package/src/engine/balance.ts +33 -0
- package/src/engine/billing.ts +16 -0
- package/src/engine/charges.ts +19 -0
- package/src/engine/checkout.ts +40 -0
- package/src/engine/common.ts +47 -0
- package/src/engine/connect-settings.ts +23 -0
- package/src/engine/connect.ts +184 -0
- package/src/engine/coupons.ts +5 -0
- package/src/engine/credit-notes.ts +6 -0
- package/src/engine/customers.ts +35 -0
- package/src/engine/display.ts +19 -0
- package/src/engine/disputes.ts +9 -0
- package/src/engine/entitlements.ts +5 -0
- package/src/engine/ephemeral-keys.ts +3 -0
- package/src/engine/files.ts +41 -0
- package/src/engine/front.ts +31 -0
- package/src/engine/invoices.ts +71 -0
- package/src/engine/issuing.ts +61 -0
- package/src/engine/ledger.ts +50 -0
- package/src/engine/oauth.ts +19 -0
- package/src/engine/onboarding.ts +54 -0
- package/src/{stripe-params.ts → engine/params.ts} +8 -56
- package/src/engine/payment-intents.ts +33 -0
- package/src/engine/payment-links.ts +6 -0
- package/src/engine/payment-methods.ts +25 -0
- package/src/engine/plans.ts +42 -0
- package/src/engine/platform.ts +47 -0
- package/src/engine/products.ts +3 -0
- package/src/engine/radar.ts +6 -0
- package/src/engine/refunds.ts +29 -0
- package/src/engine/renewals.ts +73 -0
- package/src/engine/setup-intents.ts +5 -0
- package/src/{stripe-twin.ts → engine/stripe.ts} +28 -323
- package/src/engine/subscription-schedules.ts +10 -0
- package/src/engine/subscriptions.ts +40 -0
- package/src/engine/tax.ts +39 -0
- package/src/engine/terminal.ts +23 -0
- package/src/engine/test-clocks.ts +11 -0
- package/src/engine/tokens.ts +22 -0
- package/src/engine/transfers.ts +23 -0
- package/src/engine/treasury.ts +47 -0
- package/src/{stripe-version.ts → engine/version.ts} +4 -3
- package/src/engine/webhook-endpoints.ts +14 -0
- package/src/engine/webhooks.ts +72 -0
- package/src/fetch.ts +27 -0
- package/src/generated/surface.gen.json +1 -1
- package/src/generated/ui.gen.json +1 -1
- package/src/index.ts +8 -116
- package/src/manifest.ts +234 -786
- package/src/screens/{portal.tsx → billing-portal.tsx} +32 -37
- package/src/screens/checkout.tsx +33 -95
- package/src/screens/connect-oauth.tsx +64 -88
- package/src/screens/{onboarding.tsx → connect-onboarding.tsx} +38 -82
- package/src/screens/dashboard.tsx +198 -0
- package/src/screens/shared.tsx +84 -0
- package/src/screens/stripe-js.ts +170 -0
- package/src/semantics/account_links.ts +21 -0
- package/src/semantics/accounts.ts +43 -0
- package/src/semantics/{apps-secrets.ts → apps.ts} +17 -32
- package/src/semantics/around.ts +20 -0
- package/src/semantics/balance.ts +6 -207
- package/src/semantics/balance_transactions.ts +20 -0
- package/src/semantics/billing_portal.ts +51 -0
- package/src/semantics/charges.ts +12 -211
- package/src/semantics/checkout.ts +13 -268
- package/src/semantics/clock.ts +26 -0
- package/src/semantics/coupons.ts +5 -67
- package/src/semantics/customers.ts +29 -392
- package/src/semantics/disputes.ts +9 -59
- package/src/semantics/doors.ts +80 -0
- package/src/semantics/entitlements.ts +9 -56
- package/src/semantics/events.ts +44 -0
- package/src/semantics/index.ts +111 -0
- package/src/semantics/invoice_payments.ts +18 -0
- package/src/semantics/invoiceitems.ts +59 -0
- package/src/semantics/invoices.ts +109 -443
- package/src/semantics/payment_intents.ts +83 -0
- package/src/semantics/payment_methods.ts +43 -0
- package/src/semantics/payouts.ts +23 -0
- package/src/semantics/prices.ts +42 -0
- package/src/semantics/products.ts +18 -142
- package/src/semantics/promotion_codes.ts +39 -0
- package/src/semantics/radar.ts +8 -77
- package/src/semantics/refunds.ts +9 -212
- package/src/semantics/setup_intents.ts +45 -0
- package/src/semantics/shared.ts +3092 -106
- package/src/semantics/states.ts +883 -0
- package/src/semantics/subscription_items.ts +54 -0
- package/src/semantics/subscription_schedules.ts +66 -0
- package/src/semantics/subscriptions.ts +49 -432
- package/src/semantics/{test-clocks.ts → test_helpers.ts} +23 -47
- package/src/semantics/transfers.ts +11 -131
- package/src/server.ts +8 -0
- package/client/dashboard-api.ts +0 -286
- package/client/stripe-mirror.css +0 -277
- package/client/stripe-mirror.tsx +0 -1559
- package/dist/client/dashboard-api.d.ts +0 -107
- package/dist/client/dashboard-api.js +0 -238
- package/dist/client/dashboard-api.ts +0 -286
- package/dist/client/stripe-mirror.bundle.js +0 -236
- package/dist/client/stripe-mirror.css +0 -277
- package/dist/client/stripe-mirror.d.ts +0 -134
- package/dist/client/stripe-mirror.js +0 -859
- package/dist/client/stripe-mirror.tsx +0 -1559
- package/dist/src/screens/connect-settings.js +0 -103
- package/dist/src/screens/consent-skin.d.ts +0 -4
- package/dist/src/screens/consent-skin.js +0 -18
- package/dist/src/screens/financial-connections.d.ts +0 -5
- package/dist/src/screens/financial-connections.js +0 -90
- package/dist/src/screens/identity.d.ts +0 -5
- package/dist/src/screens/identity.js +0 -86
- package/dist/src/screens/onboarding.d.ts +0 -13
- package/dist/src/screens/portal.d.ts +0 -5
- package/dist/src/screens/public-details.d.ts +0 -5
- package/dist/src/screens/public-details.js +0 -90
- package/dist/src/semantics/after-payment.d.ts +0 -22
- package/dist/src/semantics/after-payment.js +0 -99
- package/dist/src/semantics/apps-secrets.d.ts +0 -2
- package/dist/src/semantics/billing.d.ts +0 -2
- package/dist/src/semantics/billing.js +0 -220
- package/dist/src/semantics/connect.d.ts +0 -5
- package/dist/src/semantics/connect.js +0 -493
- package/dist/src/semantics/credit-notes.d.ts +0 -2
- package/dist/src/semantics/credit-notes.js +0 -172
- package/dist/src/semantics/ephemeral-keys.d.ts +0 -2
- package/dist/src/semantics/ephemeral-keys.js +0 -34
- package/dist/src/semantics/files.d.ts +0 -2
- package/dist/src/semantics/files.js +0 -125
- package/dist/src/semantics/issuing.d.ts +0 -13
- package/dist/src/semantics/issuing.js +0 -575
- package/dist/src/semantics/ledger.d.ts +0 -59
- package/dist/src/semantics/ledger.js +0 -200
- package/dist/src/semantics/payment-intents.d.ts +0 -18
- package/dist/src/semantics/payment-intents.js +0 -452
- package/dist/src/semantics/payment-links.d.ts +0 -2
- package/dist/src/semantics/payment-links.js +0 -133
- package/dist/src/semantics/payment-methods.d.ts +0 -20
- package/dist/src/semantics/payment-methods.js +0 -140
- package/dist/src/semantics/plans.d.ts +0 -5
- package/dist/src/semantics/plans.js +0 -121
- package/dist/src/semantics/platform.d.ts +0 -9
- package/dist/src/semantics/platform.js +0 -206
- package/dist/src/semantics/renewals.d.ts +0 -47
- package/dist/src/semantics/renewals.js +0 -281
- package/dist/src/semantics/setup-intents.d.ts +0 -2
- package/dist/src/semantics/subscription-schedules.d.ts +0 -2
- package/dist/src/semantics/subscription-schedules.js +0 -119
- package/dist/src/semantics/tax.d.ts +0 -2
- package/dist/src/semantics/tax.js +0 -197
- package/dist/src/semantics/terminal.d.ts +0 -5
- package/dist/src/semantics/terminal.js +0 -182
- package/dist/src/semantics/test-clocks.d.ts +0 -6
- package/dist/src/semantics/tokens.d.ts +0 -4
- package/dist/src/semantics/tokens.js +0 -44
- package/dist/src/semantics/treasury.d.ts +0 -2
- package/dist/src/semantics/treasury.js +0 -377
- package/dist/src/semantics/webhook-endpoints.d.ts +0 -3
- package/dist/src/semantics/webhook-endpoints.js +0 -85
- package/dist/src/stripe-budget.d.ts +0 -55
- package/dist/src/stripe-budget.js +0 -155
- package/dist/src/stripe-capabilities.d.ts +0 -3
- package/dist/src/stripe-capabilities.js +0 -5836
- package/dist/src/stripe-conformance.d.ts +0 -43
- package/dist/src/stripe-conformance.js +0 -105
- package/dist/src/stripe-connector.d.ts +0 -161
- package/dist/src/stripe-connector.js +0 -414
- package/dist/src/stripe-emit.d.ts +0 -2
- package/dist/src/stripe-emit.js +0 -145
- package/dist/src/stripe-events.d.ts +0 -93
- package/dist/src/stripe-events.js +0 -392
- package/dist/src/stripe-js.d.ts +0 -4
- package/dist/src/stripe-js.js +0 -70
- package/dist/src/stripe-mirror-ui.d.ts +0 -15
- package/dist/src/stripe-mirror-ui.js +0 -87
- package/dist/src/stripe-perform-harness.d.ts +0 -9
- package/dist/src/stripe-perform-harness.js +0 -26
- package/dist/src/stripe-server.d.ts +0 -33
- package/dist/src/stripe-server.js +0 -429
- package/dist/src/stripe-shared.d.ts +0 -109
- package/dist/src/stripe-shared.js +0 -276
- package/dist/src/stripe-ui-conformance.d.ts +0 -5
- package/dist/src/stripe-ui-conformance.js +0 -79
- package/dist/src/stripe-ui-structure.d.ts +0 -3
- package/dist/src/stripe-ui-structure.js +0 -168
- package/dist/test-fixtures/stripe-known-deviations.json +0 -110
- package/dist/test-fixtures/stripe-openapi-operations.SOURCE.md +0 -14
- package/dist/test-fixtures/stripe-openapi-operations.json +0 -4717
- package/dist/test-fixtures/stripe-schemas.SOURCE.md +0 -35
- package/dist/test-fixtures/stripe-schemas.json +0 -3813
- package/src/screens/connect-settings.tsx +0 -121
- package/src/screens/consent-skin.ts +0 -20
- package/src/screens/financial-connections.tsx +0 -101
- package/src/screens/identity.tsx +0 -96
- package/src/screens/public-details.tsx +0 -105
- package/src/semantics/after-payment.ts +0 -118
- package/src/semantics/billing.ts +0 -216
- package/src/semantics/connect.ts +0 -487
- package/src/semantics/credit-notes.ts +0 -168
- package/src/semantics/ephemeral-keys.ts +0 -34
- package/src/semantics/files.ts +0 -143
- package/src/semantics/issuing.ts +0 -590
- package/src/semantics/ledger.ts +0 -253
- package/src/semantics/payment-intents.ts +0 -463
- package/src/semantics/payment-links.ts +0 -148
- package/src/semantics/payment-methods.ts +0 -145
- package/src/semantics/plans.ts +0 -131
- package/src/semantics/platform.ts +0 -220
- package/src/semantics/renewals.ts +0 -279
- package/src/semantics/setup-intents.ts +0 -87
- package/src/semantics/subscription-schedules.ts +0 -129
- package/src/semantics/tax.ts +0 -220
- package/src/semantics/terminal.ts +0 -195
- package/src/semantics/tokens.ts +0 -52
- package/src/semantics/treasury.ts +0 -383
- package/src/semantics/webhook-endpoints.ts +0 -87
- package/src/stripe-budget.ts +0 -181
- package/src/stripe-capabilities.ts +0 -5651
- package/src/stripe-conformance.ts +0 -124
- package/src/stripe-connector.ts +0 -462
- package/src/stripe-emit.ts +0 -157
- package/src/stripe-events.ts +0 -434
- package/src/stripe-js.ts +0 -70
- package/src/stripe-mirror-ui.ts +0 -90
- package/src/stripe-perform-harness.ts +0 -29
- package/src/stripe-server.ts +0 -393
- package/src/stripe-shared.ts +0 -297
- package/src/stripe-ui-conformance.ts +0 -88
- package/src/stripe-ui-structure.ts +0 -182
- package/test-fixtures/stripe-known-deviations.json +0 -110
- package/test-fixtures/stripe-openapi-operations.json +0 -4717
- package/test-fixtures/stripe-schemas.json +0 -3813
- /package/dist/src/{screens → engine}/industries.d.ts +0 -0
- /package/dist/src/{screens → engine}/industries.js +0 -0
- /package/dist/src/{semantics → engine}/test-cards.d.ts +0 -0
- /package/dist/src/{semantics → engine}/test-cards.js +0 -0
- /package/dist/src/{stripe-version.d.ts → engine/version.d.ts} +0 -0
- /package/src/{screens → engine}/industries.ts +0 -0
- /package/src/{semantics → engine}/test-cards.ts +0 -0
package/README.md
CHANGED
|
@@ -1,213 +1,88 @@
|
|
|
1
1
|
# @volter/twin-stripe
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- **REST API** (`stripe-twin.ts` → `handleStripeTwinRequest`; HTTP wrapper
|
|
11
|
-
`stripe-server.ts` → `createStripeTwinServer`): charges, customers,
|
|
12
|
-
payment_intents, setup_intents, payment_methods, products, prices, invoices,
|
|
13
|
-
invoiceitems, subscriptions, refunds, coupons, promotion_codes, identity
|
|
14
|
-
verification sessions, ephemeral_keys, checkout sessions, billing/customer-portal
|
|
15
|
-
sessions + configurations, and the legacy **Plans** API (`semantics/plans.ts`: a plan is the recurring
|
|
16
|
-
price it is; plan writes send `plan.created`/`plan.updated`/`plan.deleted`; a deleted plan's price stays
|
|
17
|
-
readable, inactive, for its existing subscribers).
|
|
18
|
-
- **Hosted pages** (`src/screens/`): Stripe's own pages an application sends a person to, served at their
|
|
19
|
-
vendor urls — Checkout's payment page (`checkout.stripe.com/c/pay/{id}`: the customer pays, the session
|
|
20
|
-
completes and `checkout.session.completed` fires), the Customer Portal (`billing.stripe.com/p/session/{id}`),
|
|
21
|
-
Connect hosted onboarding (`connect.stripe.com/setup/…`), Identity (`verify.stripe.com/start/{id}`) and the
|
|
22
|
-
Financial Connections bank-linking flow Stripe.js opens.
|
|
23
|
-
- **Stripe.js** (`stripe-js.ts`): `js.stripe.com` serves the client library at `/v3`, `/v3/`, `/v3/stripe.js` and
|
|
24
|
-
`/<release train>/stripe.js` — the paths the `@stripe/stripe-js` loader loads or accepts — with
|
|
25
|
-
`redirectToCheckout({ sessionId })` sending the page to the hosted Checkout page; any other member throws,
|
|
26
|
-
naming itself (`stripe.js.loader`).
|
|
27
|
-
- **Writes** are local transactions (action log); reads are the projection (R3/R5/R18).
|
|
28
|
-
- **Card declines** (`stripe-twin.ts`): Stripe's documented test cards get vendor-faithful
|
|
29
|
-
outcomes on charge create / PaymentIntent confirm — `4242…4242` (and `pm_card_visa`/`tok_visa`)
|
|
30
|
-
succeed; `4000…0002`, `4000…9995`, `4000…0069`, `4000…0127`, `4000…0119` (and the matching
|
|
31
|
-
`pm_card_*`/`tok_*` tokens) return the real `card_error` envelope (HTTP 402) and leave a
|
|
32
|
-
confirmed PaymentIntent at `requires_payment_method`. Unknown cards succeed. See
|
|
33
|
-
`_card.declines-test-set-only` in `stripe-known-deviations.json`.
|
|
34
|
-
- **Manual capture** (`semantics/payment-intents.ts`, `semantics/charges.ts`): confirming a `capture_method=manual`
|
|
35
|
-
intent authorizes an uncaptured charge (`captured: false`, nothing on the balance); capture takes that charge
|
|
36
|
-
(`charge.captured`; a partial capture releases the rest with no Refund, Stripe's basil change), and an incremental
|
|
37
|
-
authorization grows its amount. An uncaptured charge is never refunded out of the balance: cancelling a
|
|
38
|
-
`requires_capture` intent releases the authorization (no Refund; `amount_captured` 0, `refunded` false) and its
|
|
39
|
-
charge's capture is then refused with `payment_intent_unexpected_state`, a refund of a PaymentIntent's uncaptured
|
|
40
|
-
charge is refused (cancel the intent, as Stripe's refunds guide says), and a `capture=false` charge's refund releases
|
|
41
|
-
it, after which its capture is refused with `charge_already_refunded`. An uncaptured charge is refused as a transfer's
|
|
42
|
-
`source_transaction` (the twin's rule; the docs are silent).
|
|
43
|
-
- **Idempotency keys**: the `Idempotency-Key` header is honored on POST — a replay with the
|
|
44
|
-
same key returns the stored response without re-applying the write (`_idempotency.stored-per-root`).
|
|
45
|
-
- **Events** (`stripe-events.ts`): fires Stripe `event` objects on write
|
|
46
|
-
(`payment_intent.succeeded`, `customer.subscription.created`, `invoice.paid`, …). A charge fires the event
|
|
47
|
-
Stripe sends for it — `charge.succeeded` (made, or authorized under manual capture), `charge.failed` (a declined
|
|
48
|
-
attempt), `charge.captured` (an authorization captured) — never an invented `charge.created`.
|
|
49
|
-
- **Connect webhooks**: an event of a connected account (a write made with its `Stripe-Account` header, its own
|
|
50
|
-
`account.updated`, or a row kept on its books such as the automatic payout time makes for it) carries the
|
|
51
|
-
top-level `account` and reaches only endpoints created with `connect=true`; the platform's reach only the others
|
|
52
|
-
(`stripe.connect.webhook_scope`, `stripe.connect.event_scope`). `GET /v1/events` and `/v1/events/{id}` answer the
|
|
53
|
-
acting account's events: with the header that account's, without it the platform's. An event's id is minted once
|
|
54
|
-
per World (`evt_twin_<n>`) and is the delivered webhook's id and the stored event's alike (`stripe.events.ids`).
|
|
55
|
-
`world-stripe emit` re-fires a connected account's object with its `account`; it does not yet route it to Connect
|
|
56
|
-
endpoints only (the kernel's emit seam has no endpoint scope).
|
|
57
|
-
- **Connect OAuth (Standard accounts)** (`src/screens/connect-oauth.tsx`, `src/screens/connect-settings.tsx`;
|
|
58
|
-
docs.stripe.com/connect/oauth-reference). The platform's **client_id is `ca_twin_self`** in every World (a test
|
|
59
|
-
client_id; the platform account is `acct_twin_self`), shown on the Dashboard's Connect OAuth settings page,
|
|
60
|
-
`dashboard.stripe.com/settings/connect/onboarding-options/oauth` (also `/settings/connect` and the `/test/…` link),
|
|
61
|
-
in `<code data-testid="connect-client-id">`. OAuth starts **off**: a runner POSTs that page as a browser does,
|
|
62
|
-
`oauth_enabled=on&redirect_uris=<one per line>` (303 to `?saved=1`), and the saved URIs are listed in
|
|
63
|
-
`data-testid="connect-redirect-uri"` items. `GET connect.stripe.com/oauth/authorize` checks client_id (unknown:
|
|
64
|
-
`invalid_client`), OAuth on, `redirect_uri` (must exactly match a registered one; absent: the first; http and
|
|
65
|
-
localhost allowed, as Stripe's test client_id allows), `response_type=code` and `scope` (`read_write` | `read_only`,
|
|
66
|
-
default `read_only`), each refusal a 400 JSON `{error, error_description, state}` as the reference says (no
|
|
67
|
-
redirect). The page offers the test-mode **Skip this form**, which creates a new Standard account (controller type
|
|
68
|
-
`account`, prefilled from valid `stripe_user[...]` values, charges and payouts enabled) and redirects with
|
|
69
|
-
`scope`, `code` and `state`, and **Deny access**, which redirects with
|
|
70
|
-
`error=access_denied&error_description=The%20user%20denied%20your%20request&state=…`. `POST
|
|
71
|
-
connect.stripe.com/oauth/token` (the secret key as Bearer, Basic or `client_secret`) exchanges a code once, within 5
|
|
72
|
-
minutes, into `{access_token, livemode, refresh_token, scope, stripe_publishable_key, stripe_user_id, token_type}`;
|
|
73
|
-
a reused code is `invalid_grant` and revokes the connection; `refresh_token` grants an equal or lesser scope.
|
|
74
|
-
`POST connect.stripe.com/oauth/deauthorize` answers `{stripe_user_id}`, after which the Stripe-Account header (and
|
|
75
|
-
`/v1/accounts/{id}`) for that account is refused 403 `account_invalid`. `account.application.authorized` /
|
|
76
|
-
`.deauthorized` reach Connect endpoints with the account; once revoked, `GET /v1/accounts` no longer lists it and its own events (payouts, balance) stop reaching the platform. The token answer's
|
|
77
|
-
deprecated `access_token` and `stripe_publishable_key` act as the connected account (as the Stripe-Account header
|
|
78
|
-
does, as Bearer or Basic; `GET /v1/account` then answers it), a token replaced by a refresh or revoked is a 401 invalid API key, and it is never the platform's key at `/oauth/token` or `/oauth/deauthorize`. The
|
|
79
|
-
application's own setting of its client_id (Cal.com's `client_id` app key, `STRIPE_CLIENT_ID`) is the runner's to
|
|
80
|
-
set to `ca_twin_self`; the World does not provision it. Where the docs stop, the twin decides (the file header lists
|
|
81
|
-
each): connecting an existing Stripe account, the full account application form, and holding a `read_only`
|
|
82
|
-
connection to reads are not modelled (todos in `stripe-capabilities.ts`).
|
|
83
|
-
- **Signing secrets in a World**: Stripe mints an endpoint's `secret`; in a World the app's env is the World's, so an
|
|
84
|
-
endpoint is given the World's value, which the app already verifies with: `STRIPE_WEBHOOK_SECRET` (or
|
|
85
|
-
`STRIPE_WEBHOOK_SIGNING_SECRET`, `STRIPE_ENDPOINT_SECRET`, `STRIPE_WEBHOOK_SECRET_KEY`,
|
|
86
|
-
`NEXT_PRIVATE_STRIPE_WEBHOOK_SECRET`), and for a `connect=true` endpoint `STRIPE_CONNECT_WEBHOOK_SECRET` (or
|
|
87
|
-
`STRIPE_WEBHOOK_SECRET_CONNECT`, `STRIPE_CONNECT_WEBHOOK_SIGNING_SECRET`) first. With none set the twin mints
|
|
88
|
-
`whsec_twin_<id>`. Where Stripe stops and the twin decides: Stripe lets no one choose a secret.
|
|
89
|
-
- **Conformance** (`stripe-conformance.ts`): field name + type checked vs Stripe's
|
|
90
|
-
real OpenAPI (standing gate).
|
|
91
|
-
- **UI mirror** (`stripe-mirror-ui.ts`): a Stripe-dashboard-style React app over the
|
|
92
|
-
twin's own REST API.
|
|
93
|
-
|
|
94
|
-
## CLI
|
|
3
|
+
A local Stripe: the REST API the unmodified `stripe` SDK calls (`https://api.stripe.com/v1`), the hosted pages an
|
|
4
|
+
application sends a person through, and Stripe.js, over one state.
|
|
5
|
+
|
|
6
|
+
A Protocol 3 pack ([architecture](../../../docs/contributing/architecture.md), "Protocol 3"). Its surface is generated
|
|
7
|
+
from Stripe's published OpenAPI document (`spec/`). The derived core serves plain reads, writes and deletes. Handlers
|
|
8
|
+
are in `src/semantics/<family>.ts`, the state machines in `src/semantics/states.ts`, and Stripe's own computation
|
|
9
|
+
(money and declines, billing, the ledger, the API versions) in `src/engine/`.
|
|
95
10
|
|
|
96
11
|
```bash
|
|
97
|
-
world-stripe serve [--
|
|
98
|
-
world-stripe mirror [--port N] [--root DIR]
|
|
99
|
-
world-stripe conformance [--fields FILE] [--root DIR]
|
|
12
|
+
world-stripe serve [--port N] [--root DIR] [--read-only]
|
|
100
13
|
```
|
|
101
14
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
**
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
**
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
`
|
|
159
|
-
`
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
(category/country allow+block lists, per_authorization/all_time/calendar-window spending
|
|
177
|
-
limits) are enforced ahead of the webhook with the vendor's `spending_controls` decline
|
|
178
|
-
reason; and **captures debit the issuing balance** (`balance_transaction` type
|
|
179
|
-
`issuing_transaction`, `balance_type: 'issuing'`, served in `GET /v1/balance`'s `issuing`
|
|
180
|
-
section). Remaining issuing gaps (authorization holds, expire/increment/reverse test
|
|
181
|
-
helpers) are tracked todos in `stripe-capabilities.ts`. **Terminal**
|
|
182
|
-
(locations/readers/connection tokens + process_payment_intent) is likewise modeled — the old
|
|
183
|
-
"Planned" listing for both families was stale.
|
|
184
|
-
|
|
185
|
-
Also modelled: **Treasury** financial accounts and money movement, **Climate** orders,
|
|
186
|
-
**Financial Connections** sessions/accounts/transactions, **Entitlements**, **Billing** meters,
|
|
187
|
-
credit grants and usage alerts, **Reporting** report runs, and the legacy **Sources** API.
|
|
188
|
-
|
|
189
|
-
**Planned** (known-missing, will do) — **Sigma scheduled query runs** (`GET /v1/sigma/scheduled_query_runs`
|
|
190
|
-
list + retrieve, with the run object's status/result-file lifecycle), Treasury financial addresses and
|
|
191
|
-
reversals, Financial Connections refresh, the Issuing gaps above, connector pulls of payment methods and
|
|
192
|
-
setup intents, and additional list endpoints/filters as needed. (See `stripe-capabilities.ts` for the full
|
|
193
|
-
honest todo list — every entry is a tracked gap.)
|
|
194
|
-
|
|
195
|
-
## Rate budget — the fail-closed backstop on live calls
|
|
196
|
-
|
|
197
|
-
`liveStripeExecute` is the **one place** this pack issues a live request, so every call it makes is charged
|
|
198
|
-
against a persistent, fail-closed spend ledger **before** the request goes out. Past the ceiling, or
|
|
199
|
-
while a `Retry-After`/429 cooldown is armed, it **throws instead of calling**. The ledger is keyed by
|
|
200
|
-
vendor and a hash of the credential (limits are per credential, so it is deliberately *not*
|
|
201
|
-
cwd-scoped) and persists across processes, so a fresh process does not get a fresh allowance; a
|
|
202
|
-
corrupt ledger counts as a **full** window rather than zero spend. There is no option to disable it,
|
|
203
|
-
and no value you can pass for `budget` that yields an unguarded client — an injected budget is
|
|
204
|
-
validated by *method identity*, so a subclass or a `Proxy` that replaces `checkBudget` is refused.
|
|
205
|
-
|
|
206
|
-
The declared numbers: **120 weighted units / 60s** = 2 requests/second — 2% of Stripe's documented 100/s live mode and 8% of the 25/s a sandbox key or any single endpoint gets. `POST`/`DELETE` cost 2 (not a published ratio — a judgement call about blast radius: a write creates a charge, refund or receipt e-mail and cannot be taken back) and `POST /v1/payouts` costs 5 (documented at 15 creates/second). Stripe's own window is a **second** while this one is a minute, so an intra-second burst reaches Stripe's limiter first; the 429 cooldown is the backstop for that shape.
|
|
207
|
-
|
|
208
|
-
The mechanism is **shared and vendor-agnostic** — it lives in the kernel (`@volter/world-core` →
|
|
209
|
-
`packages/world-core/src/rateBudget.ts`); what lives here in [`src/stripe-budget.ts`](src/stripe-budget.ts) is this vendor's
|
|
210
|
-
**declaration** (window, ceiling, per-endpoint weights, and a `reason` citing the limits above) plus
|
|
211
|
-
the vendor-bound `StripeBudget`. The rule is ratified as
|
|
212
|
-
[../../../docs/contributing/architecture.md](../../../docs/contributing/architecture.md) **D8**, and the kernel module's header documents what the
|
|
213
|
-
guard does *not* guarantee — read that before trusting it.
|
|
15
|
+
## What it models
|
|
16
|
+
|
|
17
|
+
The calls the applications make (`journeys/demand.json`: Dub, Twenty, Inbox Zero, Rallly, cal.com and Ponder, and the
|
|
18
|
+
frontends' Stripe.js):
|
|
19
|
+
|
|
20
|
+
- **Customers**: created, updated, searched, deleted; their balance, payment methods and entitlements.
|
|
21
|
+
- **Catalog**: products (with search) and prices, coupons and promotion codes.
|
|
22
|
+
- **Checkout Sessions** and the customer portal (sessions and configurations).
|
|
23
|
+
- **Subscriptions**: their items and schedules, previews, updates, searches and cancellations.
|
|
24
|
+
- **Invoices**: invoice items, finalize, send, pay, void, delete and lines.
|
|
25
|
+
- **Intents**: payment and setup intents (confirmed by Stripe.js with the publishable key and the client secret),
|
|
26
|
+
payment methods (attach, detach), refunds, charges, disputes.
|
|
27
|
+
- **Test clocks**, billing meters, the Apps secret store.
|
|
28
|
+
- **Connect**: Express accounts, account links and login links, external accounts, transfers, payouts, the balance and
|
|
29
|
+
its transactions.
|
|
30
|
+
|
|
31
|
+
**Keys.** The platform's secret and publishable keys, and its webhook secret, are issued by the credential door and
|
|
32
|
+
held by their SHA-256. A request with no key, or with one Stripe never issued, is refused 401. A connected account's
|
|
33
|
+
OAuth key acts as that account.
|
|
34
|
+
|
|
35
|
+
**The gap.** Every other operation answers Stripe's unknown-URL 404: Issuing, Terminal, Treasury, Tax, Quotes, credit
|
|
36
|
+
notes, reporting, identity, sources, plans, payment links, and the webhook endpoints and keys APIs.
|
|
37
|
+
|
|
38
|
+
## Events
|
|
39
|
+
|
|
40
|
+
Every write Stripe reports sends its event (`payment_intent.succeeded`, `customer.subscription.created`,
|
|
41
|
+
`invoice.paid`, …; a charge sends `charge.succeeded`, `charge.failed` or `charge.captured`, never an invented
|
|
42
|
+
`charge.created`), declared as data the kernel renders, stores, signs (`Stripe-Signature: t=…,v1=…`, which the
|
|
43
|
+
SDK's `constructEvent` verifies) and delivers to the account's enabled webhook endpoints whose `enabled_events` take it
|
|
44
|
+
(`*`, `<family>.*` or the type). Each event is rendered in the writing request's API version.
|
|
45
|
+
|
|
46
|
+
- **Connect**: an event of a connected account (a write made with its `Stripe-Account` header, its own
|
|
47
|
+
`account.updated`, or a row kept on its books, such as the payout time makes for it) carries the top-level `account`
|
|
48
|
+
and reaches only endpoints created with `connect=true`; the platform's reach only the others.
|
|
49
|
+
- **Signing secrets in a World**: the credential door issues the application its keys and two signing secrets, its
|
|
50
|
+
account's (`STRIPE_WEBHOOK_SECRET` and the other names an application reads it by) and its Connect endpoint's
|
|
51
|
+
(`STRIPE_CONNECT_WEBHOOK_SECRET`), the same on every boot; an endpoint made on the Webhooks page (a door) is signed
|
|
52
|
+
with the one of its kind. The twin reads no env.
|
|
53
|
+
|
|
54
|
+
## Screens
|
|
55
|
+
|
|
56
|
+
Stripe's own pages, at their vendor urls (`src/screens/`):
|
|
57
|
+
|
|
58
|
+
- **Checkout** (`checkout.stripe.com/c/pay/{session}`): the customer pays; the session completes and
|
|
59
|
+
`checkout.session.completed` fires.
|
|
60
|
+
- **Customer portal** (`billing.stripe.com/p/session/{session}`): cancel or renew a plan, update the card, pay an
|
|
61
|
+
open invoice.
|
|
62
|
+
- **Connect onboarding** (`connect.stripe.com/setup/…`): an Account Link's hosted onboarding.
|
|
63
|
+
- **Connect OAuth** (`connect.stripe.com/oauth/authorize`, `/oauth/token`, `/oauth/deauthorize`; Standard accounts,
|
|
64
|
+
docs.stripe.com/connect/oauth-reference). The platform's client_id is `ca_twin_self` in every World (a test
|
|
65
|
+
client_id; the platform account is `acct_twin_self`), shown on the Dashboard's Connect OAuth settings page in
|
|
66
|
+
`<code data-testid="connect-client-id">`. OAuth starts off: a runner POSTs that page as a browser does,
|
|
67
|
+
`oauth_enabled=on&redirect_uris=<one per line>`. The authorize page offers the test-mode **Skip this form** (a new
|
|
68
|
+
Standard account, connected) and **Deny access**; the token endpoint exchanges a code once, within 5 minutes (a
|
|
69
|
+
reused code revokes the connection), and refreshes to an equal or lesser scope; after a deauthorization the
|
|
70
|
+
account's `Stripe-Account` header is refused 403 `account_invalid`. The deprecated `access_token` and
|
|
71
|
+
`stripe_publishable_key` act as the connected account. Not modelled: connecting an existing Stripe account, the full
|
|
72
|
+
account application, holding a `read_only` connection to reads.
|
|
73
|
+
- **Stripe.js** (`js.stripe.com/v3/`, `/v3/stripe.js`, `/<release train>/stripe.js`): `redirectToCheckout({ sessionId })`
|
|
74
|
+
goes to the hosted Checkout page; any other member
|
|
75
|
+
throws, naming itself.
|
|
76
|
+
- **Dashboard** (`dashboard.stripe.com/settings/public`, `/settings/connect/onboarding-options/oauth`): Public details
|
|
77
|
+
(the business name Checkout and the portal show) and the Connect OAuth settings.
|
|
78
|
+
|
|
79
|
+
## Doors
|
|
80
|
+
|
|
81
|
+
The World's hands where Stripe's API has no act (`src/semantics/doors.ts`), refused on a read-only twin:
|
|
82
|
+
|
|
83
|
+
- `POST /_twin/app-credentials`: the platform's keys and webhook secret, as the runtime issues them to a World's
|
|
84
|
+
applications.
|
|
85
|
+
- `POST /_twin/webhook-endpoints {url, events, connect?}`: an endpoint added on the Dashboard's Webhooks page.
|
|
86
|
+
- `POST /_twin/account {settings?, business_profile?, …}`: the platform's own account settings, as the Dashboard
|
|
87
|
+
changes them.
|
|
88
|
+
- `POST /_twin/drain`: time's events, sent when a runner drives them (`payout.paid`, `balance.available`).
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"//": "GENERATED by scripts/pack-facts.ts — current pack descriptors and explicit world-runtime server backings; no prior-artifact entries are retained.",
|
|
3
|
+
"packs": {
|
|
4
|
+
"stripe": {
|
|
5
|
+
"adoption": {
|
|
6
|
+
"pypi": [
|
|
7
|
+
"stripe"
|
|
8
|
+
],
|
|
9
|
+
"sdks": [
|
|
10
|
+
"stripe"
|
|
11
|
+
],
|
|
12
|
+
"envStems": [
|
|
13
|
+
"STRIPE",
|
|
14
|
+
"NEXTPRIVATESTRIPE"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"hosts": [
|
|
18
|
+
{
|
|
19
|
+
"host": "api.stripe.com"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"host": "checkout.stripe.com",
|
|
23
|
+
"pathPattern": "^/c/pay/"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"host": "billing.stripe.com",
|
|
27
|
+
"pathPattern": "^/p/session/"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"host": "connect.stripe.com",
|
|
31
|
+
"pathPattern": "^/setup/|^/oauth/(authorize|token|deauthorize)/?$"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"host": "dashboard.stripe.com",
|
|
35
|
+
"pathPattern": "^/settings/public/?$|^/(test/)?settings/connect(/onboarding-options/oauth)?/?$"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"host": "verify.stripe.com",
|
|
39
|
+
"pathPattern": "^/start/"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"host": "js.stripe.com",
|
|
43
|
+
"pathPattern": "^/v3/financial-connections/|^/v3/?$|^/(v3|[a-z]+)/stripe\\.js$"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"archetype": "crud",
|
|
47
|
+
"protocol": {
|
|
48
|
+
"declared": "3",
|
|
49
|
+
"major": 3,
|
|
50
|
+
"standing": "current"
|
|
51
|
+
},
|
|
52
|
+
"transport": "rest",
|
|
53
|
+
"resources": [
|
|
54
|
+
"charge",
|
|
55
|
+
"customer",
|
|
56
|
+
"payment_intent",
|
|
57
|
+
"setup_intent",
|
|
58
|
+
"payment_method",
|
|
59
|
+
"subscription",
|
|
60
|
+
"price",
|
|
61
|
+
"product",
|
|
62
|
+
"invoice",
|
|
63
|
+
"invoiceitem",
|
|
64
|
+
"refund",
|
|
65
|
+
"event"
|
|
66
|
+
],
|
|
67
|
+
"credentialDoor": {
|
|
68
|
+
"path": "/_twin/app-credentials",
|
|
69
|
+
"body": {},
|
|
70
|
+
"fill": {
|
|
71
|
+
"STRIPE_SECRET_KEY": "secret_key",
|
|
72
|
+
"STRIPE_API_KEY": "secret_key",
|
|
73
|
+
"STRIPE_PRIVATE_KEY": "secret_key",
|
|
74
|
+
"BILLING_STRIPE_API_KEY": "secret_key",
|
|
75
|
+
"STRIPE_PUBLISHABLE_KEY": "publishable_key",
|
|
76
|
+
"NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY": "publishable_key",
|
|
77
|
+
"NEXT_PUBLIC_STRIPE_PUBLIC_KEY": "publishable_key",
|
|
78
|
+
"NEXT_PUBLIC_STRIPE_KEY": "publishable_key",
|
|
79
|
+
"STRIPE_WEBHOOK_SECRET": "webhook_secret",
|
|
80
|
+
"STRIPE_WEBHOOK_SIGNING_SECRET": "webhook_secret",
|
|
81
|
+
"STRIPE_ENDPOINT_SECRET": "webhook_secret",
|
|
82
|
+
"STRIPE_WEBHOOK_SECRET_KEY": "webhook_secret",
|
|
83
|
+
"NEXT_PRIVATE_STRIPE_WEBHOOK_SECRET": "webhook_secret",
|
|
84
|
+
"BILLING_STRIPE_WEBHOOK_SECRET": "webhook_secret",
|
|
85
|
+
"STRIPE_CONNECT_WEBHOOK_SECRET": "connect_webhook_secret",
|
|
86
|
+
"STRIPE_WEBHOOK_SECRET_CONNECT": "connect_webhook_secret",
|
|
87
|
+
"STRIPE_CONNECT_WEBHOOK_SIGNING_SECRET": "connect_webhook_secret"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"serveExport": "createStripeTwinServer"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"undeclared": []
|
|
94
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# stripe spec — provenance
|
|
2
|
+
|
|
3
|
+
- **File:** `openapi.json.gz`, gzip of Stripe's published OpenAPI document.
|
|
4
|
+
- **Upstream:** https://github.com/stripe/openapi, `openapi/spec3.json` on `master`.
|
|
5
|
+
- **Spec version:** `2026-09-30.endive` (`info.version`).
|
|
6
|
+
- **SHA-256 of the uncompressed document:** `6b4680299e7b7743811c41537e828b0eae363a11cea44441511013b55e52f7ad`.
|
|
7
|
+
- **Read by:** `bun scripts/derive-pack.ts stripe`, which writes `../src/generated/surface.gen.json`.
|
|
8
|
+
|
|
9
|
+
The pack serves this document's version (`SERVED_VERSION` in `src/stripe-version.ts`).
|
|
10
|
+
|
|
11
|
+
- **Published examples:** `fixtures3.json.gz`, gzip of Stripe's `openapi/fixtures3.json` (one sample object per resource,
|
|
12
|
+
the objects Stripe's API reference shows), from commit `0d98342fc985dc7710a44be25e8528dd8e099bc2` (2026-09-23).
|
|
13
|
+
SHA-256 of the uncompressed file: `e6822f7ee6fd71bdde6228537368aafcfb7191109340fe119d9aca27c6e9396d`.
|
|
14
|
+
**Read by:** `bun scripts/vendor-examples.ts stripe`.
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"patches": [
|
|
3
|
+
{
|
|
4
|
+
"op": "add",
|
|
5
|
+
"path": "/components/schemas/invoiceitem/properties/net_amount/nullable",
|
|
6
|
+
"value": true,
|
|
7
|
+
"why": "The spec types an invoice item's net_amount as a bare integer, yet its own description says the field answers null for every discountable item, so the field is nullable.",
|
|
8
|
+
"source": {
|
|
9
|
+
"spec": "/components/schemas/invoiceitem/properties/net_amount/description",
|
|
10
|
+
"quote": "This field is `null` for `discountable=true` items."
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"op": "add",
|
|
15
|
+
"path": "/components/schemas/file/properties/purpose/enum/-",
|
|
16
|
+
"value": "issuing_logo",
|
|
17
|
+
"why": "The spec's personalization-design card_logo says \"Must have a `purpose` value of `issuing_logo`\", yet neither the File object's purpose nor the file upload's purpose lists it; Stripe's own guide uploads the logo with that purpose (https://docs.stripe.com/issuing/cards/physical/create-design.md?testing-method=with-code), so issuing_logo is a purpose a file has.",
|
|
18
|
+
"source": {
|
|
19
|
+
"url": "https://docs.stripe.com/issuing/cards/physical/create-design.md?testing-method=with-code",
|
|
20
|
+
"quote": "Use the [Files API](https://docs.stripe.com/api/files/create.md) to upload a .PNG file of your card logo, and specify the purpose as `issuing_logo`."
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"op": "add",
|
|
25
|
+
"path": "/paths/~1v1~1files/post/requestBody/content/multipart~1form-data/schema/properties/purpose/enum/-",
|
|
26
|
+
"value": "issuing_logo",
|
|
27
|
+
"why": "The spec's personalization-design card_logo says \"Must have a `purpose` value of `issuing_logo`\", yet neither the File object's purpose nor the file upload's purpose lists it; Stripe's own guide uploads the logo with that purpose (https://docs.stripe.com/issuing/cards/physical/create-design.md?testing-method=with-code), so issuing_logo is a purpose a file has.",
|
|
28
|
+
"source": {
|
|
29
|
+
"url": "https://docs.stripe.com/issuing/cards/physical/create-design.md?testing-method=with-code",
|
|
30
|
+
"quote": "Use the [Files API](https://docs.stripe.com/api/files/create.md) to upload a .PNG file of your card logo, and specify the purpose as `issuing_logo`."
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|