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