@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.
- package/README.md +51 -21
- package/dist/generated/pack-facts.json +3 -3
- package/dist/journeys/coverage.json +596 -0
- package/dist/journeys/customer-life.json +6108 -0
- package/dist/journeys/customer-life.outline.md +371 -0
- package/dist/journeys/decisions.json +677 -0
- package/dist/journeys/demand.json +706 -0
- package/dist/journeys/score.json +853 -0
- package/dist/journeys/unreachable.json +102 -0
- package/dist/journeys/vendor-examples.json +8010 -0
- package/dist/spec/SOURCE.md +5 -1
- package/dist/spec/doc-examples.json +445 -0
- package/dist/spec/sources.json +135 -207
- package/dist/src/cli.d.ts +0 -1
- package/dist/src/cli.js +0 -2
- package/dist/src/engine/after-payment.d.ts +0 -1
- package/dist/src/engine/after-payment.js +0 -1
- package/dist/src/engine/common.d.ts +5 -5
- package/dist/src/engine/common.js +13 -11
- package/dist/src/engine/connect.d.ts +0 -21
- package/dist/src/engine/connect.js +1 -82
- package/dist/src/engine/customers.d.ts +0 -8
- package/dist/src/engine/customers.js +0 -22
- package/dist/src/engine/display.d.ts +0 -3
- package/dist/src/engine/display.js +0 -3
- package/dist/src/engine/files.d.ts +0 -7
- package/dist/src/engine/files.js +0 -10
- package/dist/src/engine/invoices.d.ts +6 -9
- package/dist/src/engine/invoices.js +56 -29
- package/dist/src/engine/issuing.d.ts +6 -8
- package/dist/src/engine/issuing.js +19 -10
- package/dist/src/engine/ledger.d.ts +0 -1
- package/dist/src/engine/ledger.js +0 -1
- package/dist/src/engine/oauth.js +1 -2
- package/dist/src/engine/refunds.js +2 -27
- package/dist/src/engine/stripe.d.ts +2 -7
- package/dist/src/engine/stripe.js +34 -83
- package/dist/src/engine/subscriptions.d.ts +0 -1
- package/dist/src/engine/subscriptions.js +0 -1
- package/dist/src/engine/version.d.ts +0 -2
- package/dist/src/engine/version.js +17 -6
- package/dist/src/fetch.js +2 -2
- package/dist/src/generated/surface.gen.json +1 -1
- package/dist/src/generated/ui.gen.json +1 -1
- package/dist/src/index.js +5 -3
- package/dist/src/manifest.js +348 -220
- package/dist/src/screens/billing-portal.js +5 -5
- package/dist/src/screens/{connect-oauth.d.ts → checkout-js.d.ts} +0 -1
- package/dist/src/screens/checkout-js.js +84 -0
- package/dist/src/screens/connect-onboarding.js +3 -3
- package/dist/src/screens/dashboard.d.ts +1 -1
- package/dist/src/screens/dashboard.js +52 -53
- package/dist/src/screens/stripe-js.js +53 -93
- package/dist/src/semantics/account.d.ts +2 -0
- package/dist/src/semantics/account.js +8 -0
- package/dist/src/semantics/accounts.js +3 -1
- package/dist/src/semantics/around.js +3 -6
- package/dist/src/semantics/billing_portal.d.ts +0 -1
- package/dist/src/semantics/billing_portal.js +1 -7
- package/dist/src/semantics/checkout.d.ts +1 -1
- package/dist/src/semantics/checkout.js +18 -15
- package/dist/src/semantics/clock.js +1 -7
- package/dist/src/semantics/customers.d.ts +1 -2
- package/dist/src/semantics/customers.js +32 -38
- package/dist/src/semantics/entitlements.d.ts +0 -2
- package/dist/src/semantics/entitlements.js +4 -50
- package/dist/src/semantics/events.d.ts +2 -3
- package/dist/src/semantics/events.js +6 -11
- package/dist/src/semantics/index.js +16 -38
- package/dist/src/semantics/invoices.d.ts +3 -8
- package/dist/src/semantics/invoices.js +134 -127
- package/dist/src/semantics/issuing.d.ts +6 -0
- package/dist/src/semantics/issuing.js +77 -0
- package/dist/src/semantics/payment_intents.d.ts +0 -1
- package/dist/src/semantics/payment_intents.js +5 -13
- package/dist/src/semantics/payment_methods.d.ts +0 -2
- package/dist/src/semantics/payment_methods.js +2 -26
- package/dist/src/semantics/payouts.d.ts +1 -0
- package/dist/src/semantics/payouts.js +8 -1
- package/dist/src/semantics/products.d.ts +1 -3
- package/dist/src/semantics/products.js +3 -14
- package/dist/src/semantics/refunds.d.ts +1 -2
- package/dist/src/semantics/refunds.js +1 -5
- package/dist/src/semantics/shared.d.ts +64 -336
- package/dist/src/semantics/shared.js +326 -1336
- package/dist/src/semantics/states.d.ts +20 -89
- package/dist/src/semantics/states.js +116 -334
- package/dist/src/semantics/subscriptions.d.ts +1 -2
- package/dist/src/semantics/subscriptions.js +23 -145
- package/dist/src/semantics/test_helpers.d.ts +2 -5
- package/dist/src/semantics/test_helpers.js +121 -43
- package/dist/src/semantics/webhook_endpoints.d.ts +2 -0
- package/dist/src/semantics/webhook_endpoints.js +26 -0
- package/generated/pack-facts.json +3 -3
- package/journeys/coverage.json +596 -0
- package/journeys/customer-life.json +6108 -0
- package/journeys/customer-life.outline.md +371 -0
- package/journeys/decisions.json +677 -0
- package/journeys/demand.json +706 -0
- package/journeys/score.json +853 -0
- package/journeys/unreachable.json +102 -0
- package/journeys/vendor-examples.json +8010 -0
- package/package.json +4 -3
- package/spec/SOURCE.md +5 -1
- package/spec/doc-examples.json +445 -0
- package/spec/sources.json +135 -207
- package/src/cli.ts +0 -3
- package/src/engine/after-payment.ts +0 -2
- package/src/engine/balance.ts +0 -1
- package/src/engine/checkout.ts +0 -1
- package/src/engine/common.ts +19 -17
- package/src/engine/connect.ts +1 -79
- package/src/engine/customers.ts +0 -25
- package/src/engine/display.ts +2 -3
- package/src/engine/files.ts +0 -13
- package/src/engine/invoices.ts +64 -33
- package/src/engine/issuing.ts +16 -11
- package/src/engine/ledger.ts +0 -2
- package/src/engine/oauth.ts +1 -2
- package/src/engine/onboarding.ts +0 -1
- package/src/engine/params.ts +0 -1
- package/src/engine/payment-intents.ts +0 -1
- package/src/engine/payment-methods.ts +0 -1
- package/src/engine/refunds.ts +2 -28
- package/src/engine/renewals.ts +0 -1
- package/src/engine/stripe.ts +35 -83
- package/src/engine/subscriptions.ts +0 -3
- package/src/engine/transfers.ts +0 -1
- package/src/engine/version.ts +15 -7
- package/src/engine/webhooks.ts +0 -2
- package/src/fetch.ts +2 -2
- package/src/generated/surface.gen.json +1 -1
- package/src/generated/ui.gen.json +1 -1
- package/src/index.ts +6 -4
- package/src/manifest.ts +348 -220
- package/src/screens/billing-portal.tsx +5 -7
- package/src/screens/checkout-js.ts +80 -0
- package/src/screens/checkout.tsx +0 -2
- package/src/screens/connect-onboarding.tsx +3 -5
- package/src/screens/dashboard.tsx +53 -73
- package/src/screens/stripe-js.ts +57 -125
- package/src/semantics/account.ts +10 -0
- package/src/semantics/account_links.ts +0 -1
- package/src/semantics/accounts.ts +8 -7
- package/src/semantics/apps.ts +1 -2
- package/src/semantics/around.ts +3 -6
- package/src/semantics/balance.ts +0 -1
- package/src/semantics/balance_transactions.ts +1 -3
- package/src/semantics/billing_portal.ts +1 -7
- package/src/semantics/charges.ts +1 -6
- package/src/semantics/checkout.ts +16 -12
- package/src/semantics/clock.ts +1 -8
- package/src/semantics/coupons.ts +0 -1
- package/src/semantics/customers.ts +32 -35
- package/src/semantics/doors.ts +2 -3
- package/src/semantics/entitlements.ts +1 -45
- package/src/semantics/events.ts +7 -14
- package/src/semantics/index.ts +16 -38
- package/src/semantics/invoice_payments.ts +1 -3
- package/src/semantics/invoices.ts +124 -119
- package/src/semantics/issuing.ts +74 -0
- package/src/semantics/payment_intents.ts +10 -17
- package/src/semantics/payment_methods.ts +2 -25
- package/src/semantics/payouts.ts +9 -3
- package/src/semantics/prices.ts +0 -1
- package/src/semantics/products.ts +4 -14
- package/src/semantics/promotion_codes.ts +0 -1
- package/src/semantics/radar.ts +1 -3
- package/src/semantics/refunds.ts +2 -11
- package/src/semantics/shared.ts +350 -1382
- package/src/semantics/states.ts +109 -330
- package/src/semantics/subscriptions.ts +25 -145
- package/src/semantics/test_helpers.ts +109 -43
- package/src/semantics/transfers.ts +1 -3
- package/src/semantics/webhook_endpoints.ts +27 -0
- package/src/server.ts +0 -1
- package/dist/src/engine/billing.d.ts +0 -5
- package/dist/src/engine/billing.js +0 -6
- package/dist/src/engine/charges.d.ts +0 -6
- package/dist/src/engine/charges.js +0 -13
- package/dist/src/engine/connect-settings.d.ts +0 -16
- package/dist/src/engine/connect-settings.js +0 -26
- package/dist/src/engine/coupons.d.ts +0 -0
- package/dist/src/engine/coupons.js +0 -5
- package/dist/src/engine/credit-notes.d.ts +0 -1
- package/dist/src/engine/credit-notes.js +0 -5
- package/dist/src/engine/disputes.d.ts +0 -0
- package/dist/src/engine/disputes.js +0 -9
- package/dist/src/engine/entitlements.d.ts +0 -1
- package/dist/src/engine/entitlements.js +0 -4
- package/dist/src/engine/ephemeral-keys.d.ts +0 -0
- package/dist/src/engine/ephemeral-keys.js +0 -4
- package/dist/src/engine/front.d.ts +0 -5
- package/dist/src/engine/front.js +0 -25
- package/dist/src/engine/payment-links.d.ts +0 -1
- package/dist/src/engine/payment-links.js +0 -5
- package/dist/src/engine/plans.d.ts +0 -6
- package/dist/src/engine/plans.js +0 -26
- package/dist/src/engine/platform.d.ts +0 -39
- package/dist/src/engine/platform.js +0 -34
- package/dist/src/engine/products.d.ts +0 -0
- package/dist/src/engine/products.js +0 -4
- package/dist/src/engine/setup-intents.d.ts +0 -1
- package/dist/src/engine/setup-intents.js +0 -4
- package/dist/src/engine/subscription-schedules.d.ts +0 -3
- package/dist/src/engine/subscription-schedules.js +0 -1
- package/dist/src/engine/tax.d.ts +0 -7
- package/dist/src/engine/tax.js +0 -28
- package/dist/src/engine/terminal.d.ts +0 -4
- package/dist/src/engine/terminal.js +0 -20
- package/dist/src/engine/test-clocks.d.ts +0 -5
- package/dist/src/engine/test-clocks.js +0 -9
- package/dist/src/engine/tokens.d.ts +0 -7
- package/dist/src/engine/tokens.js +0 -20
- package/dist/src/engine/treasury.d.ts +0 -23
- package/dist/src/engine/treasury.js +0 -45
- package/dist/src/screens/connect-oauth.js +0 -333
- package/dist/src/semantics/disputes.d.ts +0 -2
- package/dist/src/semantics/disputes.js +0 -5
- package/dist/src/semantics/invoiceitems.d.ts +0 -3
- package/dist/src/semantics/invoiceitems.js +0 -59
- package/dist/src/semantics/setup_intents.d.ts +0 -3
- package/dist/src/semantics/setup_intents.js +0 -41
- package/dist/src/semantics/subscription_items.d.ts +0 -5
- package/dist/src/semantics/subscription_items.js +0 -55
- package/dist/src/semantics/subscription_schedules.d.ts +0 -4
- package/dist/src/semantics/subscription_schedules.js +0 -60
- package/src/engine/billing.ts +0 -16
- package/src/engine/charges.ts +0 -19
- package/src/engine/connect-settings.ts +0 -23
- package/src/engine/coupons.ts +0 -5
- package/src/engine/credit-notes.ts +0 -6
- package/src/engine/disputes.ts +0 -9
- package/src/engine/entitlements.ts +0 -5
- package/src/engine/ephemeral-keys.ts +0 -3
- package/src/engine/front.ts +0 -31
- package/src/engine/payment-links.ts +0 -6
- package/src/engine/plans.ts +0 -42
- package/src/engine/platform.ts +0 -47
- package/src/engine/products.ts +0 -3
- package/src/engine/setup-intents.ts +0 -5
- package/src/engine/subscription-schedules.ts +0 -10
- package/src/engine/tax.ts +0 -39
- package/src/engine/terminal.ts +0 -23
- package/src/engine/test-clocks.ts +0 -11
- package/src/engine/tokens.ts +0 -22
- package/src/engine/treasury.ts +0 -47
- package/src/screens/connect-oauth.tsx +0 -376
- package/src/semantics/disputes.ts +0 -12
- package/src/semantics/invoiceitems.ts +0 -59
- package/src/semantics/setup_intents.ts +0 -45
- package/src/semantics/subscription_items.ts +0 -54
- package/src/semantics/subscription_schedules.ts +0 -66
package/dist/src/manifest.js
CHANGED
|
@@ -6,71 +6,119 @@ export const manifest = {
|
|
|
6
6
|
service: 'stripe',
|
|
7
7
|
body: { form: { coerce: true } },
|
|
8
8
|
ids: { template: '{prefix}_twin_{n}', acceptProvided: true },
|
|
9
|
-
// on declared resources, but never served by the twin: Stripe's unknown-URL answer
|
|
10
9
|
unmodeled: [
|
|
11
|
-
|
|
10
|
+
'DeleteAccountsAccountBankAccountsId',
|
|
11
|
+
'DeleteAccountsAccountExternalAccountsId',
|
|
12
|
+
'DeleteAccountsAccountPeoplePerson',
|
|
13
|
+
'DeleteAccountsAccountPersonsPerson',
|
|
14
|
+
'DeleteCouponsCoupon',
|
|
15
|
+
'DeleteCustomersCustomerSourcesId',
|
|
16
|
+
'DeleteCustomersCustomerSubscriptionsSubscriptionExposedId',
|
|
17
|
+
'DeleteCustomersCustomerTaxIdsId',
|
|
18
|
+
'DeleteEphemeralKeysKey',
|
|
19
|
+
'DeleteInvoiceitemsInvoiceitem',
|
|
20
|
+
'DeleteInvoicesInvoice',
|
|
21
|
+
'DeleteProductsId',
|
|
22
|
+
'DeleteProductsProductFeaturesId',
|
|
23
|
+
'DeleteRadarValueListItemsItem',
|
|
24
|
+
'DeleteRadarValueListsValueList',
|
|
25
|
+
'DeleteSubscriptionItemsItem',
|
|
26
|
+
'DeleteTaxIdsId',
|
|
27
|
+
'DeleteTerminalConfigurationsConfiguration',
|
|
28
|
+
'DeleteTerminalLocationsLocation',
|
|
29
|
+
'DeleteTerminalReadersReader',
|
|
30
|
+
'DeleteTestHelpersTestClocksTestClock',
|
|
12
31
|
'DeleteWebhookEndpointsWebhookEndpoint',
|
|
13
|
-
'
|
|
14
|
-
'
|
|
32
|
+
'GetAccountsAccountBankAccountsId',
|
|
33
|
+
'GetAccountsAccountCapabilities',
|
|
34
|
+
'GetAccountsAccountCapabilitiesCapability',
|
|
35
|
+
'GetAccountsAccountExternalAccountsId',
|
|
36
|
+
'GetAccountsAccountPeople',
|
|
37
|
+
'GetAccountsAccountPeoplePerson',
|
|
38
|
+
'GetAccountsAccountPersonsPerson',
|
|
39
|
+
'GetApplicationFeesFeeRefundsId',
|
|
15
40
|
'GetApplicationFeesId',
|
|
41
|
+
'GetAppsSecrets',
|
|
42
|
+
'GetBalanceHistory',
|
|
43
|
+
'GetBalanceHistoryId',
|
|
44
|
+
'GetBalanceTransactionsId',
|
|
16
45
|
'GetBillingAlertsId',
|
|
17
|
-
'GetBillingCreditGrants',
|
|
18
46
|
'GetBillingCreditGrantsId',
|
|
47
|
+
'GetBillingMetersId',
|
|
19
48
|
'GetBillingPortalConfigurationsConfiguration',
|
|
20
|
-
'
|
|
49
|
+
'GetChargesChargeDispute',
|
|
50
|
+
'GetChargesChargeRefunds',
|
|
51
|
+
'GetChargesChargeRefundsRefund',
|
|
21
52
|
'GetClimateOrdersOrder',
|
|
22
|
-
'
|
|
23
|
-
'
|
|
53
|
+
'GetCreditNotesId',
|
|
54
|
+
'GetCreditNotesPreview',
|
|
55
|
+
'GetCustomersCustomerBalanceTransactionsTransaction',
|
|
56
|
+
'GetCustomersCustomerCashBalanceTransactionsTransaction',
|
|
57
|
+
'GetCustomersCustomerPaymentMethods',
|
|
58
|
+
'GetCustomersCustomerPaymentMethodsPaymentMethod',
|
|
59
|
+
'GetCustomersCustomerSourcesId',
|
|
60
|
+
'GetCustomersCustomerSubscriptions',
|
|
61
|
+
'GetCustomersCustomerSubscriptionsSubscriptionExposedId',
|
|
62
|
+
'GetCustomersCustomerTaxIds',
|
|
63
|
+
'GetCustomersCustomerTaxIdsId',
|
|
64
|
+
'GetDisputesDispute',
|
|
65
|
+
'GetEntitlementsActiveEntitlements',
|
|
24
66
|
'GetEntitlementsFeaturesId',
|
|
25
|
-
'
|
|
67
|
+
'GetEventsId',
|
|
68
|
+
'GetFileLinksLink',
|
|
26
69
|
'GetFilesFile',
|
|
27
70
|
'GetFinancialConnectionsAccountsAccount',
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
71
|
+
'GetFinancialConnectionsSessionsSession',
|
|
72
|
+
'GetFinancialConnectionsTransactions',
|
|
73
|
+
'GetFinancialConnectionsTransactionsTransaction',
|
|
31
74
|
'GetIdentityVerificationReportsReport',
|
|
32
75
|
'GetIdentityVerificationSessionsSession',
|
|
33
|
-
'
|
|
76
|
+
'GetInvoiceitemsInvoiceitem',
|
|
77
|
+
'GetInvoicesInvoiceLines',
|
|
78
|
+
'GetIssuingAuthorizationsAuthorization',
|
|
34
79
|
'GetIssuingCardholdersCardholder',
|
|
35
|
-
'GetIssuingCardsCard',
|
|
36
|
-
'GetIssuingDisputes',
|
|
37
80
|
'GetIssuingDisputesDispute',
|
|
38
81
|
'GetIssuingPersonalizationDesignsPersonalizationDesign',
|
|
39
|
-
'GetIssuingTokens',
|
|
40
|
-
'GetIssuingTokensToken',
|
|
41
|
-
'GetIssuingTransactions',
|
|
42
82
|
'GetIssuingTransactionsTransaction',
|
|
83
|
+
'GetLinkAccountSessionsSession',
|
|
84
|
+
'GetLinkedAccounts',
|
|
85
|
+
'GetLinkedAccountsAccount',
|
|
43
86
|
'GetMandatesMandate',
|
|
87
|
+
'GetPaymentIntentsIntent',
|
|
88
|
+
'GetPaymentIntentsSearch',
|
|
44
89
|
'GetPaymentLinksPaymentLink',
|
|
45
|
-
'
|
|
90
|
+
'GetPayoutsPayout',
|
|
91
|
+
'GetProductsId',
|
|
92
|
+
'GetProductsProductFeaturesId',
|
|
93
|
+
'GetProductsSearch',
|
|
46
94
|
'GetQuotesQuote',
|
|
95
|
+
'GetRadarValueListItems',
|
|
47
96
|
'GetRadarValueListItemsItem',
|
|
48
|
-
'GetRadarValueLists',
|
|
49
97
|
'GetRadarValueListsValueList',
|
|
50
|
-
'
|
|
98
|
+
'GetRefundsRefund',
|
|
51
99
|
'GetReportingReportRunsReportRun',
|
|
52
|
-
'GetReviews',
|
|
53
100
|
'GetReviewsReview',
|
|
54
101
|
'GetSetupIntentsIntent',
|
|
55
102
|
'GetSourcesSource',
|
|
56
|
-
'
|
|
103
|
+
'GetSubscriptionItems',
|
|
104
|
+
'GetSubscriptionItemsItem',
|
|
105
|
+
'GetSubscriptionSchedulesSchedule',
|
|
106
|
+
'GetSubscriptionsSearch',
|
|
57
107
|
'GetTaxCalculationsCalculation',
|
|
108
|
+
'GetTaxIdsId',
|
|
58
109
|
'GetTaxRatesTaxRate',
|
|
59
|
-
'GetTaxRegistrations',
|
|
60
110
|
'GetTaxRegistrationsId',
|
|
61
111
|
'GetTaxTransactionsTransaction',
|
|
62
|
-
'GetTerminalConfigurations',
|
|
63
112
|
'GetTerminalConfigurationsConfiguration',
|
|
64
|
-
'GetTerminalLocations',
|
|
65
113
|
'GetTerminalLocationsLocation',
|
|
66
|
-
'GetTerminalReaders',
|
|
67
114
|
'GetTerminalReadersReader',
|
|
68
115
|
'GetTestHelpersTestClocks',
|
|
116
|
+
'GetTestHelpersTestClocksTestClock',
|
|
69
117
|
'GetTokensToken',
|
|
70
118
|
'GetTopups',
|
|
71
119
|
'GetTopupsTopup',
|
|
72
120
|
'GetTransfersTransfer',
|
|
73
|
-
'
|
|
121
|
+
'GetTransfersTransferReversalsId',
|
|
74
122
|
'GetTreasuryFinancialAccountsFinancialAccount',
|
|
75
123
|
'GetTreasuryInboundTransfers',
|
|
76
124
|
'GetTreasuryInboundTransfersId',
|
|
@@ -82,57 +130,156 @@ export const manifest = {
|
|
|
82
130
|
'GetTreasuryReceivedCreditsId',
|
|
83
131
|
'GetTreasuryReceivedDebits',
|
|
84
132
|
'GetTreasuryReceivedDebitsId',
|
|
133
|
+
'GetTreasuryTransactionEntries',
|
|
85
134
|
'GetTreasuryTransactionEntriesId',
|
|
135
|
+
'GetTreasuryTransactions',
|
|
86
136
|
'GetTreasuryTransactionsId',
|
|
87
|
-
'GetWebhookEndpoints',
|
|
88
137
|
'GetWebhookEndpointsWebhookEndpoint',
|
|
89
|
-
'
|
|
90
|
-
'PostPaymentIntentsIntent',
|
|
91
|
-
'PostPaymentLinksPaymentLink',
|
|
92
|
-
'PostRefundsRefund',
|
|
93
|
-
'PostSetupIntentsIntent',
|
|
94
|
-
'PostTransfersTransfer',
|
|
95
|
-
'DeleteAccountsAccountBankAccountsId',
|
|
96
|
-
'DeleteAccountsAccountPeoplePerson',
|
|
97
|
-
'DeleteCustomersCustomerSubscriptionsSubscriptionExposedId',
|
|
98
|
-
'DeleteTaxIdsId',
|
|
99
|
-
'GetAccountsAccountBankAccountsId',
|
|
100
|
-
'GetAccountsAccountPeople',
|
|
101
|
-
'GetAccountsAccountPeoplePerson',
|
|
102
|
-
'GetApplicationFeesFeeRefundsId',
|
|
103
|
-
'GetBalanceHistory',
|
|
104
|
-
'GetBalanceHistoryId',
|
|
105
|
-
'GetChargesChargeDispute',
|
|
106
|
-
'GetCustomersCustomerSubscriptions',
|
|
107
|
-
'GetCustomersCustomerSubscriptionsSubscriptionExposedId',
|
|
108
|
-
'GetFileLinks',
|
|
109
|
-
'GetFileLinksLink',
|
|
110
|
-
'GetFinancialConnectionsTransactionsTransaction',
|
|
111
|
-
'GetIdentityVerificationSessions',
|
|
112
|
-
'GetLinkAccountSessionsSession',
|
|
113
|
-
'GetLinkedAccounts',
|
|
114
|
-
'GetLinkedAccountsAccount',
|
|
115
|
-
'GetTaxIdsId',
|
|
116
|
-
'GetTransfersTransferReversalsId',
|
|
138
|
+
'PostAccountsAccount',
|
|
117
139
|
'PostAccountsAccountBankAccounts',
|
|
118
140
|
'PostAccountsAccountBankAccountsId',
|
|
141
|
+
'PostAccountsAccountCapabilitiesCapability',
|
|
142
|
+
'PostAccountsAccountExternalAccounts',
|
|
119
143
|
'PostAccountsAccountExternalAccountsId',
|
|
120
144
|
'PostAccountsAccountPeople',
|
|
121
145
|
'PostAccountsAccountPeoplePerson',
|
|
146
|
+
'PostAccountsAccountPersons',
|
|
147
|
+
'PostAccountsAccountPersonsPerson',
|
|
122
148
|
'PostApplicationFeesFeeRefundsId',
|
|
149
|
+
'PostApplicationFeesIdRefunds',
|
|
150
|
+
'PostBillingAlerts',
|
|
151
|
+
'PostBillingAlertsIdActivate',
|
|
152
|
+
'PostBillingAlertsIdArchive',
|
|
153
|
+
'PostBillingAlertsIdDeactivate',
|
|
154
|
+
'PostBillingCreditGrants',
|
|
155
|
+
'PostBillingCreditGrantsId',
|
|
156
|
+
'PostBillingMeters',
|
|
123
157
|
'PostBillingMetersId',
|
|
158
|
+
'PostBillingMetersIdDeactivate',
|
|
159
|
+
'PostBillingMetersIdReactivate',
|
|
160
|
+
'PostBillingPortalConfigurationsConfiguration',
|
|
161
|
+
'PostCharges',
|
|
162
|
+
'PostChargesCharge',
|
|
163
|
+
'PostChargesChargeCapture',
|
|
164
|
+
'PostChargesChargeRefunds',
|
|
165
|
+
'PostChargesChargeRefundsRefund',
|
|
166
|
+
'PostCheckoutSessionsSession',
|
|
167
|
+
'PostCheckoutSessionsSessionExpire',
|
|
168
|
+
'PostClimateOrders',
|
|
169
|
+
'PostClimateOrdersOrder',
|
|
170
|
+
'PostClimateOrdersOrderCancel',
|
|
171
|
+
'PostCouponsCoupon',
|
|
172
|
+
'PostCreditNotes',
|
|
173
|
+
'PostCreditNotesId',
|
|
174
|
+
'PostCreditNotesIdVoid',
|
|
175
|
+
'PostCustomersCustomerBalanceTransactions',
|
|
124
176
|
'PostCustomersCustomerBalanceTransactionsTransaction',
|
|
177
|
+
'PostCustomersCustomerSources',
|
|
125
178
|
'PostCustomersCustomerSubscriptions',
|
|
126
179
|
'PostCustomersCustomerSubscriptionsSubscriptionExposedId',
|
|
180
|
+
'PostCustomersCustomerTaxIds',
|
|
181
|
+
'PostDisputesDispute',
|
|
182
|
+
'PostDisputesDisputeClose',
|
|
183
|
+
'PostEntitlementsFeatures',
|
|
184
|
+
'PostEntitlementsFeaturesId',
|
|
185
|
+
'PostFileLinks',
|
|
127
186
|
'PostFileLinksLink',
|
|
187
|
+
'PostFiles',
|
|
188
|
+
'PostFinancialConnectionsAccountsAccountDisconnect',
|
|
189
|
+
'PostFinancialConnectionsSessions',
|
|
190
|
+
'PostIdentityVerificationSessions',
|
|
128
191
|
'PostIdentityVerificationSessionsSession',
|
|
192
|
+
'PostInvoiceitems',
|
|
193
|
+
'PostInvoiceitemsInvoiceitem',
|
|
129
194
|
'PostInvoicesInvoice',
|
|
195
|
+
'PostInvoicesInvoiceFinalize',
|
|
196
|
+
'PostInvoicesInvoiceMarkUncollectible',
|
|
197
|
+
'PostInvoicesInvoiceSend',
|
|
198
|
+
'PostIssuingAuthorizationsAuthorization',
|
|
199
|
+
'PostIssuingCardholdersCardholder',
|
|
200
|
+
'PostIssuingDisputes',
|
|
201
|
+
'PostIssuingDisputesDispute',
|
|
202
|
+
'PostIssuingDisputesDisputeSubmit',
|
|
203
|
+
'PostIssuingPersonalizationDesigns',
|
|
204
|
+
'PostIssuingPersonalizationDesignsPersonalizationDesign',
|
|
205
|
+
'PostIssuingTransactionsTransaction',
|
|
130
206
|
'PostLinkAccountSessions',
|
|
207
|
+
'PostPaymentIntentsIntent',
|
|
208
|
+
'PostPaymentIntentsIntentApplyCustomerBalance',
|
|
209
|
+
'PostPaymentIntentsIntentCapture',
|
|
210
|
+
'PostPaymentIntentsIntentConfirm',
|
|
211
|
+
'PostPaymentIntentsIntentIncrementAuthorization',
|
|
212
|
+
'PostPaymentIntentsIntentVerifyMicrodeposits',
|
|
213
|
+
'PostPaymentLinks',
|
|
214
|
+
'PostPaymentLinksPaymentLink',
|
|
215
|
+
'PostPaymentMethods',
|
|
131
216
|
'PostPaymentMethodsPaymentMethod',
|
|
217
|
+
'PostPaymentMethodsPaymentMethodAttach',
|
|
132
218
|
'PostPayoutsPayout',
|
|
219
|
+
'PostPayoutsPayoutCancel',
|
|
220
|
+
'PostPlans',
|
|
221
|
+
'PostPricesPrice',
|
|
222
|
+
'PostProductsId',
|
|
223
|
+
'PostProductsProductFeatures',
|
|
224
|
+
'PostQuotes',
|
|
133
225
|
'PostQuotesQuote',
|
|
226
|
+
'PostQuotesQuoteAccept',
|
|
227
|
+
'PostQuotesQuoteCancel',
|
|
228
|
+
'PostQuotesQuoteFinalize',
|
|
229
|
+
'PostRadarValueLists',
|
|
230
|
+
'PostRadarValueListsValueList',
|
|
231
|
+
'PostRefundsRefund',
|
|
232
|
+
'PostRefundsRefundCancel',
|
|
233
|
+
'PostReportingReportRuns',
|
|
234
|
+
'PostReviewsReviewApprove',
|
|
235
|
+
'PostSetupIntents',
|
|
236
|
+
'PostSetupIntentsIntent',
|
|
237
|
+
'PostSetupIntentsIntentCancel',
|
|
238
|
+
'PostSetupIntentsIntentConfirm',
|
|
239
|
+
'PostSetupIntentsIntentVerifyMicrodeposits',
|
|
240
|
+
'PostSources',
|
|
241
|
+
'PostSourcesSource',
|
|
242
|
+
'PostSubscriptionItems',
|
|
243
|
+
'PostSubscriptionItemsItem',
|
|
244
|
+
'PostSubscriptionSchedules',
|
|
245
|
+
'PostSubscriptionSchedulesSchedule',
|
|
246
|
+
'PostSubscriptionSchedulesScheduleCancel',
|
|
247
|
+
'PostSubscriptionSchedulesScheduleRelease',
|
|
248
|
+
'PostSubscriptions',
|
|
249
|
+
'PostTaxCalculations',
|
|
250
|
+
'PostTaxIds',
|
|
251
|
+
'PostTaxRates',
|
|
252
|
+
'PostTaxRatesTaxRate',
|
|
253
|
+
'PostTaxRegistrations',
|
|
134
254
|
'PostTaxRegistrationsId',
|
|
255
|
+
'PostTerminalConfigurations',
|
|
256
|
+
'PostTerminalConfigurationsConfiguration',
|
|
257
|
+
'PostTerminalLocations',
|
|
258
|
+
'PostTerminalLocationsLocation',
|
|
259
|
+
'PostTerminalReaders',
|
|
260
|
+
'PostTerminalReadersReader',
|
|
261
|
+
'PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivate',
|
|
262
|
+
'PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivate',
|
|
263
|
+
'PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignReject',
|
|
264
|
+
'PostTestHelpersTestClocks',
|
|
265
|
+
'PostTestHelpersTestClocksTestClockAdvance',
|
|
266
|
+
'PostTestHelpersTreasuryInboundTransfersIdSucceed',
|
|
267
|
+
'PostTokens',
|
|
268
|
+
'PostTopups',
|
|
269
|
+
'PostTopupsTopup',
|
|
270
|
+
'PostTopupsTopupCancel',
|
|
271
|
+
'PostTransfersIdReversals',
|
|
272
|
+
'PostTransfersTransfer',
|
|
135
273
|
'PostTransfersTransferReversalsId',
|
|
274
|
+
'PostTreasuryFinancialAccounts',
|
|
275
|
+
'PostTreasuryFinancialAccountsFinancialAccount',
|
|
276
|
+
'PostTreasuryInboundTransfers',
|
|
277
|
+
'PostTreasuryInboundTransfersInboundTransferCancel',
|
|
278
|
+
'PostTreasuryOutboundPayments',
|
|
279
|
+
'PostTreasuryOutboundPaymentsIdCancel',
|
|
280
|
+
'PostTreasuryOutboundTransfers',
|
|
281
|
+
'PostTreasuryOutboundTransfersOutboundTransferCancel',
|
|
282
|
+
'PostWebhookEndpointsWebhookEndpoint',
|
|
136
283
|
],
|
|
137
284
|
time: 'unix',
|
|
138
285
|
error: { error: { type: '{kind}', message: '{message}', code: '{code}', param: '{param}' } },
|
|
@@ -144,6 +291,10 @@ export const manifest = {
|
|
|
144
291
|
pattern: '^\\d{4}-\\d{2}-\\d{2}(\\.[a-z_]+)?$',
|
|
145
292
|
error: { status: 400, kind: 'invalid_request_error', code: 'invalid_api_version', message: 'Invalid Stripe version: {value}. Check the API version reference: https://stripe.com/docs/api/versioning' },
|
|
146
293
|
},
|
|
294
|
+
// source: https://github.com/stripe/stripe-mock/issues/31 "Unrecognized request URL (GET: /v1/test)."
|
|
295
|
+
// source: spec:/components/schemas/api_errors/properties/type "invalid_request_error"
|
|
296
|
+
// Stripe's published API answer, shown by its maintainer for an unknown URL.
|
|
297
|
+
gap: { status: 404, kind: 'invalid_request_error', message: 'Unrecognized request URL ({method}: {path}). Please see https://stripe.com/docs or we can help at https://support.stripe.com/.' },
|
|
147
298
|
notFound: { status: 404, kind: 'invalid_request_error', code: 'resource_missing', message: "No such {object}: '{id}'" },
|
|
148
299
|
list: {
|
|
149
300
|
style: 'envelope',
|
|
@@ -164,8 +315,12 @@ export const manifest = {
|
|
|
164
315
|
},
|
|
165
316
|
},
|
|
166
317
|
// the pack as the World registers it (world-core packRegistry)
|
|
167
|
-
// the fail-closed ceiling on live calls against Stripe (world-core rateBudget.ts, architecture D8)
|
|
318
|
+
// the fail-closed ceiling on live calls against Stripe (world-core rateBudget.ts, architecture D8), inside its sandbox
|
|
319
|
+
// allowance
|
|
320
|
+
// source: https://docs.stripe.com/rate-limits "25 requests per second"
|
|
168
321
|
rateBudget: {
|
|
322
|
+
// the vendor's documented allowance this budget stays inside (cited above)
|
|
323
|
+
allowance: { perMinute: 1500, source: 'https://docs.stripe.com/rate-limits' },
|
|
169
324
|
windowMs: 60_000,
|
|
170
325
|
ceiling: 120,
|
|
171
326
|
defaultWeight: 1,
|
|
@@ -203,16 +358,16 @@ export const manifest = {
|
|
|
203
358
|
credentialDoor: { path: '/_twin/app-credentials', body: {}, fill: { STRIPE_SECRET_KEY: 'secret_key', STRIPE_API_KEY: 'secret_key', STRIPE_PRIVATE_KEY: 'secret_key', BILLING_STRIPE_API_KEY: 'secret_key', STRIPE_PUBLISHABLE_KEY: 'publishable_key', NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: 'publishable_key', NEXT_PUBLIC_STRIPE_PUBLIC_KEY: 'publishable_key', NEXT_PUBLIC_STRIPE_KEY: 'publishable_key', STRIPE_WEBHOOK_SECRET: 'webhook_secret', STRIPE_WEBHOOK_SIGNING_SECRET: 'webhook_secret', STRIPE_ENDPOINT_SECRET: 'webhook_secret', STRIPE_WEBHOOK_SECRET_KEY: 'webhook_secret', NEXT_PRIVATE_STRIPE_WEBHOOK_SECRET: 'webhook_secret', BILLING_STRIPE_WEBHOOK_SECRET: 'webhook_secret', STRIPE_CONNECT_WEBHOOK_SECRET: 'connect_webhook_secret', STRIPE_WEBHOOK_SECRET_CONNECT: 'connect_webhook_secret', STRIPE_CONNECT_WEBHOOK_SIGNING_SECRET: 'connect_webhook_secret' } },
|
|
204
359
|
hosts: [
|
|
205
360
|
{ host: 'api.stripe.com' }, { host: 'checkout.stripe.com', pathPattern: '^/c/pay/' }, { host: 'billing.stripe.com', pathPattern: '^/p/session/' },
|
|
206
|
-
{ host: 'connect.stripe.com', pathPattern: '^/setup
|
|
207
|
-
{ host: 'dashboard.stripe.com', pathPattern: '^/
|
|
361
|
+
{ host: 'connect.stripe.com', pathPattern: '^/setup/' },
|
|
362
|
+
{ host: 'dashboard.stripe.com', pathPattern: '^/radar/lists(?:/[^/]+)?/?$|^/test/issuing/balance/?$|^/settings/public/?$' },
|
|
208
363
|
{ host: 'verify.stripe.com', pathPattern: '^/start/' },
|
|
209
|
-
{ host: 'js.stripe.com', pathPattern: '^/v3
|
|
364
|
+
{ host: 'js.stripe.com', pathPattern: '^/v3/?$|^/(v3|[a-z]+)/stripe\\.js$' },
|
|
210
365
|
],
|
|
211
366
|
},
|
|
212
367
|
// what GET /twin says this twin is
|
|
213
368
|
discovery: {
|
|
214
|
-
twinOf: 'the Stripe REST API,
|
|
215
|
-
stores: 'customers, payment objects, checkout sessions, products and prices, subscriptions and invoices, Connect accounts, Issuing,
|
|
369
|
+
twinOf: 'the Stripe REST API, Checkout, the customer portal, Connect onboarding, and Stripe.js',
|
|
370
|
+
stores: 'customers, payment objects, checkout sessions, products and prices, subscriptions and invoices, Connect accounts, Issuing, and signed events',
|
|
216
371
|
},
|
|
217
372
|
// the World's doors (./semantics/doors.ts): what stands in for an act Stripe's API does not have
|
|
218
373
|
doors: [
|
|
@@ -222,31 +377,26 @@ export const manifest = {
|
|
|
222
377
|
{ id: 'drain', method: 'POST', path: '/_twin/drain', note: "time's events, sent when a runner drives them: payouts paid and funds made available" },
|
|
223
378
|
],
|
|
224
379
|
// The screens applications and people reach (docs/contributing/architecture.md, "Screens"). Demand is the
|
|
225
|
-
//
|
|
380
|
+
// applications' code that sends a customer to the page (journeys/demand.json).
|
|
226
381
|
screens: [
|
|
382
|
+
{ id: 'checkout-js', kind: 'content', host: 'api.stripe.com', path: '/v1/payment_pages/{session}', takes: ['POST'], status: 'done', source: 'https://docs.stripe.com/payments/advanced', demand: 'Postiz CheckoutProvider: the published Stripe.js contract over the session store; the private wire is authored (screens/checkout-js.ts).' },
|
|
227
383
|
{
|
|
228
384
|
id: 'checkout', kind: 'flow', host: 'checkout.stripe.com', path: '/c/pay/{session}', status: 'done',
|
|
229
|
-
demand: '
|
|
385
|
+
demand: 'Dub, Rallly, Postiz and Twenty send customers to Checkout (journeys/demand.json)',
|
|
230
386
|
controls: ['email', 'cardNumber', 'cardExpiry', 'cardCvc', 'billingName', 'billingCountry', 'billingPostalCode', 'Pay', '← Back'],
|
|
231
387
|
source: 'https://docs.stripe.com/payments/checkout/how-checkout-works',
|
|
232
388
|
},
|
|
233
389
|
{
|
|
234
390
|
id: 'billing-portal', kind: 'flow', host: 'billing.stripe.com', path: '/p/session/{session}', status: 'done',
|
|
235
|
-
demand: '
|
|
391
|
+
demand: 'Cal.com, Dub, Postiz, Rallly and Twenty send customers to the billing portal', controls: ['Cancel plan', 'Renew plan', '← Return to {business name}'],
|
|
236
392
|
source: 'https://docs.stripe.com/customer-management',
|
|
237
393
|
},
|
|
238
394
|
{
|
|
239
395
|
// an Account Link's url (/setup/{account_link}) opens the onboarding session the page is (/setup/s/{session})
|
|
240
396
|
id: 'connect-onboarding', kind: 'flow', host: 'connect.stripe.com', path: '/setup', status: 'done',
|
|
241
|
-
demand:
|
|
397
|
+
demand: "Dub onboards its partners' connected accounts with Account Links", controls: ['Agree and submit', '← Return to platform'],
|
|
242
398
|
source: 'https://docs.stripe.com/connect/hosted-onboarding',
|
|
243
399
|
},
|
|
244
|
-
{
|
|
245
|
-
// the authorize page, and the token and deauthorize endpoints the platform's server calls (not in Stripe's spec)
|
|
246
|
-
id: 'connect-oauth', kind: 'flow', host: 'connect.stripe.com', path: '/oauth', status: 'done',
|
|
247
|
-
demand: "Cal.com's Stripe app connects each organizer's Standard account through Connect OAuth", controls: ['Skip this form', 'Deny access'],
|
|
248
|
-
source: 'https://docs.stripe.com/connect/oauth-reference',
|
|
249
|
-
},
|
|
250
400
|
{
|
|
251
401
|
// Stripe.js, the client library an application's page loads: /v3/, /v3/stripe.js and /<release train>/stripe.js
|
|
252
402
|
id: 'stripe-js', kind: 'content', host: 'js.stripe.com', path: '/', status: 'done',
|
|
@@ -255,20 +405,21 @@ export const manifest = {
|
|
|
255
405
|
},
|
|
256
406
|
{
|
|
257
407
|
id: 'dashboard', kind: 'workspace', host: 'dashboard.stripe.com', path: '/', status: 'done',
|
|
258
|
-
demand: '
|
|
259
|
-
controls: ['Business name', 'Save', '
|
|
408
|
+
demand: 'Operator setup for the cited application calls: Public details; Radar lists for Dub add-to-stripe-fraud-value-lists.ts:3-7; sandbox funding for Open Autonomy world/model/scenario.ts:60,62',
|
|
409
|
+
controls: ['Business name', 'Save', 'New list', 'Name', 'Alias', 'List type', 'Add', 'Add test funds', 'Amount'], source: 'https://docs.stripe.com/dashboard/basics',
|
|
260
410
|
},
|
|
261
411
|
],
|
|
262
412
|
resources: {
|
|
263
|
-
'billing.meter': {
|
|
413
|
+
'billing.meter': { refresh: { list: 'GetBillingMeters' },
|
|
414
|
+
// source: spec:/components/schemas/billing.meter/properties/status "active"
|
|
415
|
+
assigned: { object: { value: 'billing.meter' }, created: { now: true }, updated: { now: true }, livemode: { value: false }, status: { value: 'active' }, status_transitions: { value: { deactivated_at: null } },
|
|
416
|
+
// source: https://docs.stripe.com/api/billing/meter/create "stripe_customer_id"
|
|
417
|
+
// Where the page stops: omitted mappings use the creation example’s customer/value payload keys.
|
|
418
|
+
customer_mapping: { value: { type: 'by_id', event_payload_key: 'stripe_customer_id' } }, value_settings: { value: { event_payload_key: 'value' } } },
|
|
264
419
|
storedAs: 'billing_meter', idPrefix: 'mtr', notFound: "No such meter: '{id}'", ...states["billing.meter"], filters: ['status'],
|
|
265
420
|
},
|
|
266
|
-
'billing.meter_event': { storedAs: 'billing_meter_event', idPrefix: 'mtr_evt' },
|
|
267
|
-
|
|
268
|
-
'billing.alert': {
|
|
269
|
-
storedAs: 'billing_alert', idPrefix: 'alert', notFound: "No such alert: '{id}'", ...states["billing.alert"],
|
|
270
|
-
},
|
|
271
|
-
payment_intent: {
|
|
421
|
+
'billing.meter_event': { refresh: { none: 'a meter event is written, never read: the API reads back only its meter’s summaries (GET /v1/billing/meters/{id}/event_summaries)' }, storedAs: 'billing_meter_event', idPrefix: 'mtr_evt' },
|
|
422
|
+
payment_intent: { refresh: { list: 'GetPaymentIntents' },
|
|
272
423
|
idPrefix: 'pi', ...states["payment_intent"],
|
|
273
424
|
embeds: { customer: 'customer', latest_charge: 'charge', payment_method: 'payment_method', invoice: 'invoice' },
|
|
274
425
|
filters: ['customer'],
|
|
@@ -277,268 +428,245 @@ export const manifest = {
|
|
|
277
428
|
// metadata keys; `update: 'replace'` keeps the twin's answer)
|
|
278
429
|
// next_invoice_sequence, "The suffix of the customer's next invoice number" (docs.stripe.com/api/customers/object): one
|
|
279
430
|
// past its numbered invoices (a finalized invoice is never deleted)
|
|
280
|
-
customer: { idPrefix: 'cus', update: 'replace', ...states["customer"], filters: ['email'], counts: { next_invoice_sequence: { of: 'invoice', by: 'customer', present: 'number', plus: 1 } } },
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
customer_cash_balance_transaction: { storedAs: 'cash_balance_transaction', idPrefix: 'ccsbtxn', ...states["customer_cash_balance_transaction"], },
|
|
431
|
+
customer: { refresh: { list: 'GetCustomers' }, idPrefix: 'cus', update: 'replace', ...states["customer"], filters: ['email'], counts: { next_invoice_sequence: { of: 'invoice', by: 'customer', present: 'number', plus: 1 } } },
|
|
432
|
+
customer_balance_transaction: { refresh: { list: 'GetCustomersCustomerBalanceTransactions' }, parent: { param: 'customer', field: 'customer', resource: 'customer' }, idPrefix: 'cbtxn', ...states["customer_balance_transaction"], },
|
|
433
|
+
customer_cash_balance_transaction: { refresh: { list: 'GetCustomersCustomerCashBalanceTransactions' }, parent: { param: 'customer', field: 'customer', resource: 'customer' }, storedAs: 'cash_balance_transaction', idPrefix: 'ccsbtxn', ...states["customer_cash_balance_transaction"], },
|
|
284
434
|
// a card is chargeable at once; any other source waits for its owner to authorize it through its
|
|
285
435
|
// flow, and is used up (single-use) or lapses
|
|
286
436
|
// what a customer's sources list answers (a card, a bank account, a Source, an account) as one
|
|
287
437
|
// resource over the stored sources; the card fields and an account's type/business_type are
|
|
288
438
|
// attributes. A customer's bank account verifies as a payout account does.
|
|
289
|
-
payment_source: {
|
|
439
|
+
payment_source: { refresh: { none: 'a customer’s sources are listed only per customer, cards, bank accounts and Sources together (GET /v1/customers/{customer}/sources); the twin keeps them among the Sources, which no list reads' },
|
|
290
440
|
storedAs: 'source',
|
|
291
441
|
idPrefix: 'src', ...states["payment_source"],
|
|
292
442
|
},
|
|
293
|
-
source: {
|
|
443
|
+
source: { refresh: { none: 'Stripe lists no Sources: each is read by its id (GET /v1/sources/{source})' },
|
|
294
444
|
idPrefix: 'src', ...states["source"],
|
|
295
445
|
},
|
|
296
446
|
// Connect OAuth's authorization codes: the row's id minted, the code's value drawn from the World's secret
|
|
297
447
|
_oauth_code: { idPrefix: '', ids: '{n}' },
|
|
298
|
-
charge: {
|
|
448
|
+
charge: { refresh: { list: 'GetCharges' },
|
|
299
449
|
idPrefix: 'ch', ...states["charge"],
|
|
300
450
|
embeds: { customer: 'customer', payment_intent: 'payment_intent', invoice: 'invoice', balance_transaction: 'balance_transaction' },
|
|
301
451
|
filters: ['customer', 'payment_intent'],
|
|
302
452
|
},
|
|
303
|
-
refund: {
|
|
453
|
+
refund: { refresh: { list: 'GetRefunds' },
|
|
304
454
|
idPrefix: 're',
|
|
305
455
|
update: 'replace', ...states["refund"],
|
|
306
456
|
embeds: { charge: 'charge', payment_intent: 'payment_intent', balance_transaction: 'balance_transaction' },
|
|
307
457
|
filters: ['charge', 'payment_intent'],
|
|
308
458
|
},
|
|
309
|
-
setup_intent: {
|
|
459
|
+
setup_intent: { refresh: { list: 'GetSetupIntents' },
|
|
310
460
|
idPrefix: 'seti',
|
|
311
461
|
update: 'replace', ...states["setup_intent"],
|
|
312
462
|
embeds: { customer: 'customer', payment_method: 'payment_method' },
|
|
313
463
|
filters: ['customer', 'payment_method'],
|
|
314
464
|
},
|
|
315
|
-
payment_method: { idPrefix: 'pm', ...states["payment_method"], embeds: { customer: 'customer' }, filters: ['customer', 'type'] },
|
|
316
|
-
subscription: {
|
|
465
|
+
payment_method: { refresh: { list: 'GetPaymentMethods' }, idPrefix: 'pm', ...states["payment_method"], embeds: { customer: 'customer' }, filters: ['customer', 'type'] },
|
|
466
|
+
subscription: { refresh: { list: 'GetSubscriptions', complete: false },
|
|
317
467
|
idPrefix: 'sub', ...states["subscription"],
|
|
318
468
|
embeds: { customer: 'customer', latest_invoice: 'invoice', default_payment_method: 'payment_method', schedule: 'subscription_schedule' },
|
|
469
|
+
// source: spec:/components/schemas/subscription/properties/items/description "List of subscription items, each with an attached price."
|
|
470
|
+
// source: https://docs.stripe.com/api/subscriptions/object "subscription_items?subscription="
|
|
471
|
+
collections: { items: { resource: 'subscription_item', by: 'subscription', list: { object: 'list', has_more: false, url: '/v1/subscription_items?subscription={id}' } } },
|
|
319
472
|
filters: ['customer'],
|
|
320
473
|
},
|
|
321
|
-
subscription_item: {
|
|
322
|
-
|
|
474
|
+
subscription_item: { refresh: { none: 'subscription items are listed only per subscription (the list requires subscription), and each subscription answers its items in full (subscription.items)' }, idPrefix: 'si',
|
|
475
|
+
// source: spec:/components/schemas/subscription_item/properties/price "price"
|
|
476
|
+
embeds: { price: 'price' }, alwaysEmbedded: ['price'] },
|
|
477
|
+
invoice: { refresh: { list: 'GetInvoices' },
|
|
323
478
|
idPrefix: 'in', ...states["invoice"],
|
|
324
479
|
embeds: { customer: 'customer', subscription: 'subscription', charge: 'charge', payment_intent: 'payment_intent' },
|
|
325
|
-
filters: ['customer', 'status', 'subscription'],
|
|
480
|
+
filters: ['customer', 'status', 'subscription', 'collection_method'],
|
|
326
481
|
},
|
|
327
|
-
invoiceitem: { idPrefix: 'ii', embeds: { customer: 'customer', price: 'price' }, filters: ['customer', 'invoice'], order: { field: 'date', direction: 'desc' } },
|
|
328
|
-
'checkout.session': {
|
|
482
|
+
invoiceitem: { refresh: { list: 'GetInvoiceitems' }, idPrefix: 'ii', embeds: { customer: 'customer', price: 'price' }, filters: ['customer', 'invoice'], order: { field: 'date', direction: 'desc' } },
|
|
483
|
+
'checkout.session': { refresh: { list: 'GetCheckoutSessions' },
|
|
329
484
|
storedAs: 'checkout_session',
|
|
330
485
|
idPrefix: 'cs', ...states["checkout.session"],
|
|
331
486
|
filters: ['customer', 'payment_intent', 'subscription', 'status'],
|
|
332
487
|
// the objects a session links to, as its x-expandableFields name them
|
|
333
488
|
embeds: { customer: 'customer', invoice: 'invoice', payment_intent: 'payment_intent', payment_link: 'payment_link', setup_intent: 'setup_intent', subscription: 'subscription' },
|
|
334
489
|
},
|
|
335
|
-
ephemeral_key: { idPrefix: 'ephkey' },
|
|
490
|
+
ephemeral_key: { refresh: { none: 'an ephemeral key is answered once, by its create: the API has no read of one' }, idPrefix: 'ephkey' },
|
|
336
491
|
// a mandate's status is the network's to move; nothing here moves it
|
|
337
|
-
mandate: {
|
|
492
|
+
mandate: { refresh: { none: 'a mandate is read by its id (GET /v1/mandates/{mandate}): the API lists none' },
|
|
338
493
|
idPrefix: 'mandate', ...states["mandate"],
|
|
339
494
|
},
|
|
340
|
-
dispute: { idPrefix: 'dp', update: 'replace', ...states["dispute"], embeds: { charge: 'charge', payment_intent: 'payment_intent' }, filters: ['charge', 'payment_intent'] },
|
|
341
|
-
payout: { idPrefix: 'po', ...states["payout"], embeds: { balance_transaction: 'balance_transaction', destination: 'account' } },
|
|
495
|
+
dispute: { refresh: { list: 'GetDisputes' }, idPrefix: 'dp', update: 'replace', ...states["dispute"], embeds: { charge: 'charge', payment_intent: 'payment_intent' }, filters: ['charge', 'payment_intent'] },
|
|
496
|
+
payout: { refresh: { list: 'GetPayouts' }, idPrefix: 'po', ...states["payout"], embeds: { balance_transaction: 'balance_transaction', destination: 'account' } },
|
|
342
497
|
// the twin's ledger is seeded available; Stripe holds funds pending until their available_on
|
|
343
|
-
balance_transaction: {
|
|
498
|
+
balance_transaction: { refresh: { list: 'GetBalanceTransactions' },
|
|
344
499
|
idPrefix: 'txn', ...states["balance_transaction"],
|
|
345
500
|
filters: ['type', 'currency'],
|
|
346
501
|
},
|
|
347
502
|
// a coupon lapses at its redeem_by: "Date after which the coupon can no longer be redeemed", and `valid` is
|
|
348
503
|
// "Taking account of the above properties, whether this coupon can still be applied to a customer" (the served
|
|
349
504
|
// spec's coupon); the twin keeps no redemption count, so max_redemptions never lapses one
|
|
350
|
-
coupon: {
|
|
505
|
+
coupon: { refresh: { list: 'GetCoupons' },
|
|
351
506
|
idPrefix: 'coupon', update: 'replace', ...states["coupon"],
|
|
352
507
|
},
|
|
353
508
|
// switched on and off by an update (Stripe also lapses one at expires_at or when fully redeemed; the
|
|
354
509
|
// twin keeps no redemption count or expiry)
|
|
355
|
-
|
|
510
|
+
// source: https://docs.stripe.com/changelog/clover/2025-09-30/polymorphic-coupon "When you retrieve Promotion Codes, they don’t auto-expand the promotion.coupon field"
|
|
511
|
+
// Before Clover the top-level coupon auto-expands; Clover omits that field in its view.
|
|
512
|
+
promotion_code: { embeds: { coupon: 'coupon' }, alwaysEmbedded: ['coupon'], refresh: { list: 'GetPromotionCodes' },
|
|
356
513
|
idPrefix: 'promo',
|
|
357
514
|
update: 'replace',
|
|
358
515
|
notFound: "No such promotion code: '{id}'", ...states["promotion_code"],
|
|
359
516
|
},
|
|
360
|
-
|
|
361
|
-
subscription_schedule: {
|
|
517
|
+
subscription_schedule: { refresh: { list: 'GetSubscriptionSchedules' },
|
|
362
518
|
idPrefix: 'sub_sched',
|
|
363
519
|
update: 'replace', ...states["subscription_schedule"],
|
|
364
520
|
embeds: { customer: 'customer', subscription: 'subscription' },
|
|
365
521
|
filters: ['customer', 'subscription'],
|
|
366
522
|
},
|
|
367
|
-
'entitlements.feature': {
|
|
523
|
+
'entitlements.feature': { refresh: { list: 'GetEntitlementsFeatures' },
|
|
368
524
|
storedAs: 'entitlements_feature', idPrefix: 'feat', notFound: "No such feature: '{id}'", ...states["entitlements.feature"],
|
|
369
525
|
},
|
|
370
526
|
// an advance answers advancing and the clock is ready once it has reached the time (./engine/test-clocks.ts)
|
|
371
|
-
'
|
|
372
|
-
storedAs: 'test_clock',
|
|
373
|
-
idPrefix: 'clock',
|
|
374
|
-
notFound: "No such test clock: '{id}'", ...states["test_helpers.test_clock"],
|
|
375
|
-
},
|
|
376
|
-
event: { idPrefix: 'evt', filters: ['type'] },
|
|
527
|
+
event: { refresh: { list: 'GetEvents', complete: false }, idPrefix: 'evt', filters: ['type'] },
|
|
377
528
|
// disabled and re-enabled by an update's `disabled` (Stripe also disables one that keeps failing; the
|
|
378
529
|
// twin counts no failures)
|
|
379
|
-
webhook_endpoint: {
|
|
530
|
+
webhook_endpoint: { refresh: { list: 'GetWebhookEndpoints' },
|
|
380
531
|
idPrefix: 'we',
|
|
381
532
|
notFound: "No such webhook endpoint: '{id}'", ...states["webhook_endpoint"],
|
|
382
533
|
},
|
|
383
|
-
account: {
|
|
384
|
-
|
|
534
|
+
account: {
|
|
535
|
+
// source: spec:/components/schemas/account/properties/individual "person"
|
|
536
|
+
embeds: { individual: 'person' }, alwaysEmbedded: ['individual'], refresh: { list: 'GetAccounts', complete: false }, idPrefix: 'acct', ...states["account"],
|
|
537
|
+
},
|
|
538
|
+
person: { refresh: { list: 'GetAccountsAccountPersons' }, idPrefix: 'person', ...states["person"], parent: { param: 'account', field: 'account', resource: 'account' } },
|
|
385
539
|
// a capability lives in its account's capability map; requesting one leaves it pending, withdrawing it inactive
|
|
386
|
-
capability: {
|
|
540
|
+
capability: { refresh: { none: 'the twin keeps a capability in its account’s capabilities, which the accounts’ list reads back (GET /v1/accounts)' },
|
|
387
541
|
idPrefix: 'cap', ...states["capability"],
|
|
388
542
|
},
|
|
389
543
|
// allow_redisplay and regulated_status belong to a card destination: consent and the issuer's
|
|
390
544
|
// regulation, set when it is added, not a lifecycle
|
|
391
|
-
external_account: {
|
|
545
|
+
external_account: { refresh: { none: 'an account answers its external accounts (account.external_accounts), which the accounts’ list reads back (GET /v1/accounts)' },
|
|
392
546
|
idPrefix: 'ba', ...states["external_account"],
|
|
393
547
|
},
|
|
394
|
-
account_link: { idPrefix: 'acctlink' },
|
|
395
|
-
account_session: { idPrefix: 'accts' },
|
|
396
|
-
transfer: { idPrefix: 'tr', update: 'replace', filters: ['destination'] },
|
|
397
|
-
transfer_reversal: { idPrefix: 'trr' },
|
|
548
|
+
account_link: { refresh: { none: 'an account link is answered once, by its create: the API has no read of one' }, idPrefix: 'acctlink' },
|
|
549
|
+
account_session: { refresh: { none: 'an account session is answered once, by its create: the API has no read of one' }, idPrefix: 'accts' },
|
|
550
|
+
transfer: { refresh: { list: 'GetTransfers' }, idPrefix: 'tr', update: 'replace', filters: ['destination'] },
|
|
551
|
+
transfer_reversal: { refresh: { list: 'GetTransfersIdReversals' }, parent: { param: 'id', field: 'transfer', resource: 'transfer' }, idPrefix: 'trr' },
|
|
398
552
|
// refunded once fee refunds take its whole amount
|
|
399
|
-
application_fee: {
|
|
553
|
+
application_fee: { refresh: { list: 'GetApplicationFees' },
|
|
400
554
|
idPrefix: 'fee', notFound: "No such application fee: '{id}'", filters: ['charge'], ...states["application_fee"],
|
|
401
555
|
},
|
|
402
|
-
fee_refund: { idPrefix: 'fr' },
|
|
403
|
-
'apps.secret': { storedAs: 'apps_secret', idPrefix: 'apmc' },
|
|
404
|
-
|
|
405
|
-
file: { idPrefix: 'file', ...states["file"], filters: ['purpose'] },
|
|
406
|
-
file_link: { idPrefix: 'link' },
|
|
407
|
-
// the user submits on Stripe's hosted verification page and Stripe checks it (the twin's own helper
|
|
408
|
-
// outside Stripe's surface, POST …/verify, stands in for both at once)
|
|
409
|
-
'identity.verification_session': {
|
|
410
|
-
storedAs: 'verification_session',
|
|
411
|
-
idPrefix: 'vs',
|
|
412
|
-
notFound: "No such VerificationSession: '{id}'", ...states["identity.verification_session"],
|
|
413
|
-
},
|
|
414
|
-
'identity.verification_report': { storedAs: 'verification_report', idPrefix: 'vr', notFound: "No such verification report: '{id}'", ...states["identity.verification_report"], filters: ['verification_session', 'type'] },
|
|
415
|
-
'billing_portal.session': { storedAs: 'billing_portal_session', idPrefix: 'bps', ...states["billing_portal.session"], },
|
|
556
|
+
fee_refund: { refresh: { list: 'GetApplicationFeesIdRefunds' }, parent: { param: 'id', field: 'fee', resource: 'application_fee' }, idPrefix: 'fr' },
|
|
557
|
+
'apps.secret': { refresh: { none: 'secrets are listed only per scope (the list requires scope), which a root does not name' }, storedAs: 'apps_secret', idPrefix: 'apmc' },
|
|
558
|
+
'billing_portal.session': { refresh: { none: 'a portal session is answered once, by its create: the API has no read of one' }, storedAs: 'billing_portal_session', idPrefix: 'bps', ...states["billing_portal.session"], },
|
|
416
559
|
// is_default is Stripe's: the configuration the dashboard made first
|
|
417
|
-
'billing_portal.configuration': {
|
|
560
|
+
'billing_portal.configuration': { refresh: { list: 'GetBillingPortalConfigurations' },
|
|
418
561
|
storedAs: 'billing_portal_configuration', idPrefix: 'bpc', notFound: "No such configuration: '{id}'", ...states["billing_portal.configuration"],
|
|
419
562
|
},
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
idPrefix: 'txr', notFound: "No such tax rate: '{id}'", ...states["tax_rate"],
|
|
423
|
-
},
|
|
424
|
-
// its status is derived on every read from whether a head office is set; nothing stores it
|
|
425
|
-
'tax.settings': { storedAs: 'tax_settings', idPrefix: 'taxset', ...states["tax.settings"], },
|
|
426
|
-
'tax.calculation': { storedAs: 'tax_calculation', idPrefix: 'taxcalc', notFound: "No such tax calculation: '{id}'" },
|
|
427
|
-
// a registration is active from creation here; its dates move it on the clock
|
|
428
|
-
'tax.registration': {
|
|
429
|
-
storedAs: 'tax_registration', idPrefix: 'taxreg', notFound: "No such tax registration: '{id}'", filters: ['status'], ...states["tax.registration"],
|
|
430
|
-
},
|
|
431
|
-
'tax.transaction': { storedAs: 'tax_transaction', idPrefix: 'tax', notFound: "No such tax transaction: '{id}'", ...states["tax.transaction"], },
|
|
432
|
-
payment_link: {
|
|
433
|
-
idPrefix: 'plink',
|
|
434
|
-
update: 'replace', notFound: "No such payment link: '{id}'", ...states["payment_link"],
|
|
435
|
-
},
|
|
436
|
-
quote: { idPrefix: 'qt', ...states["quote"], filters: ['customer', 'status'] },
|
|
563
|
+
'tax.calculation': { refresh: { none: 'a calculation is read by its id (GET /v1/tax/calculations/{calculation}): the API lists none' }, storedAs: 'tax_calculation', idPrefix: 'taxcalc', notFound: "No such tax calculation: '{id}'" },
|
|
564
|
+
'tax.transaction': { refresh: { none: 'a tax transaction is read by its id (GET /v1/tax/transactions/{transaction}): the API lists none' }, storedAs: 'tax_transaction', idPrefix: 'tax', notFound: "No such tax transaction: '{id}'", ...states["tax.transaction"], },
|
|
437
565
|
// a review is open until it is closed; approving closes it, once
|
|
438
|
-
review: {
|
|
566
|
+
review: { refresh: { list: 'GetReviews', complete: false },
|
|
439
567
|
storedAs: 'radar_review',
|
|
440
568
|
idPrefix: 'prv', ...states["review"],
|
|
441
569
|
},
|
|
442
|
-
'radar.value_list': { storedAs: 'radar_value_list', idPrefix: 'rsl', notFound: "No such radar value list: '{id}'", ...states["radar.value_list"],
|
|
443
|
-
|
|
444
|
-
|
|
570
|
+
'radar.value_list': { refresh: { list: 'GetRadarValueLists' }, storedAs: 'radar_value_list', idPrefix: 'rsl', notFound: "No such radar value list: '{id}'", ...states["radar.value_list"],
|
|
571
|
+
// source: spec:/components/schemas/radar.value_list/properties/created/description "Time at which the object was created."
|
|
572
|
+
assigned: { created: { now: true }, object: { value: 'radar.value_list' }, livemode: { value: false }, metadata: { value: {} },
|
|
573
|
+
// source: spec:/components/schemas/radar.value_list/properties/created_by/description "The name or email address of the user who created this value list."
|
|
574
|
+
// Where documentation stops: local API-key creates identify their synthetic account operator as twin.
|
|
575
|
+
created_by: { value: 'twin' }, list_items: { value: { object: 'list', data: [], has_more: false, url: '/v1/radar/value_list_items' } } }, filters: ['alias'] },
|
|
576
|
+
'radar.value_list_item': { refresh: { none: 'value list items are listed only per value list (the list requires value_list), and each list answers its items (radar.value_list.list_items)' }, storedAs: 'radar_value_list_item', idPrefix: 'rsli', notFound: "No such radar value list item: '{id}'" },
|
|
577
|
+
'issuing.cardholder': { refresh: { list: 'GetIssuingCardholders' },
|
|
445
578
|
storedAs: 'issuing_cardholder',
|
|
446
579
|
idPrefix: 'ich',
|
|
580
|
+
// source: spec:/components/schemas/issuing.cardholder/properties/created/description "Time at which the object was created."
|
|
581
|
+
assigned: { created: { now: true }, object: { value: 'issuing.cardholder' }, livemode: { value: false }, metadata: { value: {} },
|
|
582
|
+
// source: spec:/components/schemas/issuing_cardholder_requirements/properties/past_due/description "Array of fields that need to be collected"
|
|
583
|
+
requirements: { value: { disabled_reason: null, past_due: [] } } },
|
|
447
584
|
notFound: "No such cardholder: '{id}'", ...states["issuing.cardholder"],
|
|
448
585
|
filters: ['status', 'type', 'email'],
|
|
449
586
|
},
|
|
450
|
-
'issuing.card': {
|
|
587
|
+
'issuing.card': { refresh: { list: 'GetIssuingCards' },
|
|
451
588
|
storedAs: 'issuing_card',
|
|
452
589
|
idPrefix: 'ic',
|
|
453
590
|
notFound: "No such card: '{id}'", ...states["issuing.card"],
|
|
591
|
+
// source: spec:/components/schemas/issuing.card/properties/cardholder "issuing.cardholder"
|
|
592
|
+
embeds: { cardholder: 'issuing.cardholder' }, alwaysEmbedded: ['cardholder'],
|
|
454
593
|
filters: ['cardholder', 'status', 'type'],
|
|
455
594
|
},
|
|
456
|
-
'issuing.authorization': { storedAs: 'issuing_authorization', idPrefix: 'iauth', ...states["issuing.authorization"],
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
notFound: "No such dispute: '{id}'", ...states["issuing.dispute"],
|
|
462
|
-
filters: ['status', 'transaction'],
|
|
463
|
-
},
|
|
464
|
-
'issuing.token': {
|
|
465
|
-
storedAs: 'issuing_token',
|
|
466
|
-
idPrefix: 'iss_tok',
|
|
467
|
-
notFound: "No such issuing token: '{id}'", ...states["issuing.token"],
|
|
468
|
-
filters: ['card', 'status'],
|
|
469
|
-
},
|
|
470
|
-
// a design waits in review (inactive) until the review test helpers decide it
|
|
471
|
-
'issuing.personalization_design': {
|
|
472
|
-
storedAs: 'personalization_design',
|
|
473
|
-
idPrefix: 'pd',
|
|
474
|
-
notFound: "No such personalization design: '{id}'", ...states["issuing.personalization_design"],
|
|
475
|
-
},
|
|
476
|
-
'terminal.location': { storedAs: 'terminal_location', idPrefix: 'tml', notFound: "No such location: '{id}'" },
|
|
477
|
-
// a simulated reader is online from registration; a real one drops off and comes back
|
|
478
|
-
'terminal.reader': {
|
|
479
|
-
storedAs: 'terminal_reader', idPrefix: 'tmr', notFound: "No such reader: '{id}'", ...states["terminal.reader"], filters: ['location', 'status'],
|
|
480
|
-
},
|
|
481
|
-
'terminal.configuration': { storedAs: 'terminal_configuration', idPrefix: 'tmc', notFound: "No such configuration: '{id}'", ...states["terminal.configuration"], },
|
|
482
|
-
topup: {
|
|
483
|
-
idPrefix: 'tu', ...states["topup"],
|
|
484
|
-
filters: ['status'],
|
|
485
|
-
},
|
|
486
|
-
// closing an account (POST …/close) is not modeled here; is_default is Stripe's
|
|
487
|
-
'treasury.financial_account': { storedAs: 'financial_account', idPrefix: 'fa', notFound: "No such financial account: '{id}'", ...states["treasury.financial_account"], filters: ['status'] },
|
|
488
|
-
'treasury.outbound_payment': {
|
|
595
|
+
'issuing.authorization': { refresh: { list: 'GetIssuingAuthorizations' }, storedAs: 'issuing_authorization', idPrefix: 'iauth', ...states["issuing.authorization"],
|
|
596
|
+
// source: spec:/components/schemas/issuing.authorization/properties/card "issuing.card"
|
|
597
|
+
embeds: { card: 'issuing.card', cardholder: 'issuing.cardholder' }, alwaysEmbedded: ['card'], filters: ['card', 'cardholder', 'status'], },
|
|
598
|
+
'issuing.transaction': { refresh: { list: 'GetIssuingTransactions' }, storedAs: 'issuing_transaction', idPrefix: 'ipi', notFound: "No such transaction: '{id}'", ...states["issuing.transaction"], filters: ['card', 'cardholder'] },
|
|
599
|
+
'treasury.outbound_payment': { refresh: { none: 'outbound payments are listed only per financial account (the list requires financial_account)' },
|
|
489
600
|
storedAs: 'outbound_payment',
|
|
490
601
|
idPrefix: 'obp',
|
|
491
602
|
notFound: "No such outbound payment: '{id}'", ...states["treasury.outbound_payment"],
|
|
492
603
|
filters: ['financial_account', 'status'],
|
|
493
604
|
},
|
|
494
|
-
'treasury.outbound_transfer': {
|
|
605
|
+
'treasury.outbound_transfer': { refresh: { none: 'outbound transfers are listed only per financial account (the list requires financial_account)' },
|
|
495
606
|
storedAs: 'outbound_transfer',
|
|
496
607
|
idPrefix: 'obt',
|
|
497
608
|
notFound: "No such outbound transfer: '{id}'", ...states["treasury.outbound_transfer"],
|
|
498
609
|
filters: ['financial_account', 'status'],
|
|
499
610
|
},
|
|
500
|
-
'treasury.inbound_transfer': {
|
|
611
|
+
'treasury.inbound_transfer': { refresh: { none: 'inbound transfers are listed only per financial account (the list requires financial_account)' },
|
|
501
612
|
storedAs: 'inbound_transfer',
|
|
502
613
|
idPrefix: 'ibt',
|
|
503
614
|
notFound: "No such inbound transfer: '{id}'", ...states["treasury.inbound_transfer"],
|
|
504
615
|
filters: ['financial_account', 'status'],
|
|
505
616
|
},
|
|
506
617
|
// received credits and debits are materialized by the network (test helpers the twin does not serve)
|
|
507
|
-
'treasury.received_credit': { storedAs: 'received_credit', idPrefix: 'rc', notFound: "No such received credit: '{id}'", ...states["treasury.received_credit"], filters: ['financial_account', 'status'] },
|
|
508
|
-
'treasury.received_debit': { storedAs: 'received_debit', idPrefix: 'rd', notFound: "No such received debit: '{id}'", ...states["treasury.received_debit"], filters: ['financial_account', 'status'] },
|
|
618
|
+
'treasury.received_credit': { refresh: { none: 'received credits are listed only per financial account (the list requires financial_account)' }, storedAs: 'received_credit', idPrefix: 'rc', notFound: "No such received credit: '{id}'", ...states["treasury.received_credit"], filters: ['financial_account', 'status'] },
|
|
619
|
+
'treasury.received_debit': { refresh: { none: 'received debits are listed only per financial account (the list requires financial_account)' }, storedAs: 'received_debit', idPrefix: 'rd', notFound: "No such received debit: '{id}'", ...states["treasury.received_debit"], filters: ['financial_account', 'status'] },
|
|
509
620
|
// a ledger transaction is posted or left open by the flow that writes it; the network settles an open one
|
|
510
|
-
'treasury.transaction': {
|
|
621
|
+
'treasury.transaction': { refresh: { none: 'Treasury transactions are listed only per financial account (the list requires financial_account)' },
|
|
511
622
|
storedAs: 'treasury_transaction', idPrefix: 'trxn', notFound: "No such treasury transaction: '{id}'", ...states["treasury.transaction"],
|
|
512
623
|
},
|
|
513
|
-
'treasury.transaction_entry': { storedAs: 'treasury_transaction_entry', idPrefix: 'trxne', notFound: "No such transaction entry: '{id}'", ...states["treasury.transaction_entry"], },
|
|
514
|
-
'
|
|
515
|
-
storedAs: 'climate_order',
|
|
516
|
-
idPrefix: 'climorder',
|
|
517
|
-
notFound: "No such order: '{id}'", ...states["climate.order"],
|
|
518
|
-
},
|
|
519
|
-
'financial_connections.session': { storedAs: 'fc_session', idPrefix: 'fcsess' },
|
|
520
|
-
'financial_connections.account': {
|
|
521
|
-
storedAs: 'fc_account',
|
|
522
|
-
idPrefix: 'fca',
|
|
523
|
-
notFound: "No such account: '{id}'", ...states["financial_connections.account"],
|
|
524
|
-
},
|
|
624
|
+
'treasury.transaction_entry': { refresh: { none: 'transaction entries are listed only per financial account (the list requires financial_account)' }, storedAs: 'treasury_transaction_entry', idPrefix: 'trxne', notFound: "No such transaction entry: '{id}'", ...states["treasury.transaction_entry"], },
|
|
625
|
+
'financial_connections.session': { refresh: { none: 'a session is read by its id (GET /v1/financial_connections/sessions/{session}): the API lists none' }, storedAs: 'fc_session', idPrefix: 'fcsess' },
|
|
525
626
|
// a linked account's transactions arrive posted here; the bank settles a pending one
|
|
526
|
-
'financial_connections.transaction': {
|
|
627
|
+
'financial_connections.transaction': { refresh: { none: 'transactions are listed only per linked account (the list requires account)' },
|
|
527
628
|
storedAs: 'fc_transaction', idPrefix: 'fctxn', ...states["financial_connections.transaction"],
|
|
528
629
|
},
|
|
529
|
-
'forwarding.request': { storedAs: 'forwarding_request', idPrefix: 'fwdr', notFound: "No such forwarding request: '{id}'" },
|
|
530
|
-
// the twin runs a report at once; Stripe runs it in the background
|
|
531
|
-
'reporting.report_run': {
|
|
532
|
-
storedAs: 'report_run', idPrefix: 'frr', notFound: "No such report run: '{id}'", ...states["reporting.report_run"],
|
|
533
|
-
},
|
|
534
630
|
// archived (active=false) and restored by an update
|
|
535
|
-
product: { idPrefix: 'prod', update: 'replace', ...states["product"], },
|
|
536
|
-
product_feature: {
|
|
537
|
-
|
|
631
|
+
product: { refresh: { list: 'GetProducts' }, idPrefix: 'prod', update: 'replace', ...states["product"], },
|
|
632
|
+
product_feature: {
|
|
633
|
+
// source: spec:/components/schemas/product_feature/properties/entitlement_feature "entitlements.feature"
|
|
634
|
+
embeds: { entitlement_feature: 'entitlements.feature' }, alwaysEmbedded: ['entitlement_feature'], refresh: { list: 'GetProductsProductFeatures' }, parent: { param: 'product', field: '_product', resource: 'product' }, idPrefix: 'prodft'
|
|
635
|
+
},
|
|
636
|
+
price: { refresh: { list: 'GetPrices', complete: false },
|
|
538
637
|
idPrefix: 'price',
|
|
539
638
|
update: 'replace', ...states["price"], embeds: { product: 'product' },
|
|
540
639
|
},
|
|
541
640
|
},
|
|
542
641
|
// the webhooks Stripe's writes send (./semantics/shared.ts), each event's data and account rendered by ./semantics/events.ts
|
|
543
642
|
events: { ...STRIPE_EVENTS, render: data, values },
|
|
643
|
+
// a vendor-backed World's root: Stripe's webhooks sent to the World's ingest door, signed as Stripe signs every event
|
|
644
|
+
// (Stripe-Signature: t=<seconds>,v1=<HMAC-SHA256 of "<t>.<body>">, docs.stripe.com/webhooks#verify-manually), the
|
|
645
|
+
// event's type in its body and its object at data.object (docs.stripe.com/api/events/object); the types whose
|
|
646
|
+
// resource neither the events' write names nor <resource>.created|updated|deleted say
|
|
647
|
+
ingest: {
|
|
648
|
+
scheme: { kind: 'timestamp-v1', header: 'Stripe-Signature' },
|
|
649
|
+
type: { body: 'type' },
|
|
650
|
+
object: 'data.object',
|
|
651
|
+
types: {
|
|
652
|
+
'checkout.session.completed': { resource: 'checkout.session' },
|
|
653
|
+
'checkout.session.expired': { resource: 'checkout.session' },
|
|
654
|
+
'charge.succeeded': { resource: 'charge' },
|
|
655
|
+
'charge.failed': { resource: 'charge' },
|
|
656
|
+
'charge.refunded': { resource: 'charge' },
|
|
657
|
+
'payment_intent.requires_action': { resource: 'payment_intent' },
|
|
658
|
+
'payment_intent.canceled': { resource: 'payment_intent' },
|
|
659
|
+
'payment_method.automatically_updated': { resource: 'payment_method' },
|
|
660
|
+
'invoice.payment_succeeded': { resource: 'invoice' },
|
|
661
|
+
'invoice.payment_failed': { resource: 'invoice' },
|
|
662
|
+
'invoice.voided': { resource: 'invoice' },
|
|
663
|
+
'transfer.reversed': { resource: 'transfer' },
|
|
664
|
+
'account.external_account.updated': { resource: 'external_account' },
|
|
665
|
+
'account.external_account.created': { resource: 'external_account' },
|
|
666
|
+
'account.external_account.deleted': { resource: 'external_account', deleted: true },
|
|
667
|
+
'payout.paid': { resource: 'payout' },
|
|
668
|
+
'payout.failed': { resource: 'payout' },
|
|
669
|
+
'issuing_authorization.request': { resource: 'issuing.authorization' },
|
|
670
|
+
},
|
|
671
|
+
},
|
|
544
672
|
};
|