stripe 17.5.0 → 17.6.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/CHANGELOG.md +1052 -109
  2. package/README.md +24 -16
  3. package/VERSION +1 -1
  4. package/cjs/apiVersion.js +1 -1
  5. package/cjs/resources/AccountNotices.js +21 -0
  6. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  7. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  8. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  9. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  10. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  11. package/cjs/resources/GiftCards/Cards.js +23 -0
  12. package/cjs/resources/GiftCards/Transactions.js +33 -0
  13. package/cjs/resources/Invoices.js +17 -0
  14. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  15. package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
  16. package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
  17. package/cjs/resources/Margins.js +22 -0
  18. package/cjs/resources/Orders.js +24 -0
  19. package/cjs/resources/PaymentAttemptRecords.js +17 -0
  20. package/cjs/resources/PaymentIntents.js +8 -0
  21. package/cjs/resources/PaymentRecords.js +29 -0
  22. package/cjs/resources/Quotes.js +32 -0
  23. package/cjs/resources/SubscriptionSchedules.js +4 -0
  24. package/cjs/resources/Tax/Associations.js +9 -0
  25. package/cjs/resources/Tax/Forms.js +20 -0
  26. package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
  27. package/cjs/resources/Terminal/Readers.js +12 -0
  28. package/cjs/resources/Treasury/FinancialAccounts.js +4 -0
  29. package/cjs/resources.js +48 -10
  30. package/cjs/stripe.core.js +1 -1
  31. package/esm/apiVersion.js +1 -1
  32. package/esm/resources/AccountNotices.js +18 -0
  33. package/esm/resources/Capital/FinancingOffers.js +18 -0
  34. package/esm/resources/Capital/FinancingSummary.js +9 -0
  35. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  36. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  37. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  38. package/esm/resources/GiftCards/Cards.js +20 -0
  39. package/esm/resources/GiftCards/Transactions.js +30 -0
  40. package/esm/resources/Invoices.js +17 -0
  41. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  42. package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
  43. package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
  44. package/esm/resources/Margins.js +19 -0
  45. package/esm/resources/Orders.js +21 -0
  46. package/esm/resources/PaymentAttemptRecords.js +14 -0
  47. package/esm/resources/PaymentIntents.js +8 -0
  48. package/esm/resources/PaymentRecords.js +26 -0
  49. package/esm/resources/Quotes.js +32 -0
  50. package/esm/resources/SubscriptionSchedules.js +4 -0
  51. package/esm/resources/Tax/Associations.js +6 -0
  52. package/esm/resources/Tax/Forms.js +17 -0
  53. package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
  54. package/esm/resources/Terminal/Readers.js +12 -0
  55. package/esm/resources/Treasury/FinancialAccounts.js +4 -0
  56. package/esm/resources.js +33 -0
  57. package/esm/stripe.core.js +1 -1
  58. package/package.json +3 -15
  59. package/types/AccountLinksResource.d.ts +5 -1
  60. package/types/AccountNotices.d.ts +113 -0
  61. package/types/AccountNoticesResource.d.ts +98 -0
  62. package/types/AccountSessions.d.ts +175 -0
  63. package/types/AccountSessionsResource.d.ts +376 -0
  64. package/types/Accounts.d.ts +225 -1
  65. package/types/AccountsResource.d.ts +628 -0
  66. package/types/Billing/CreditBalanceTransactions.d.ts +1 -1
  67. package/types/Billing/MeterErrorReports.d.ts +106 -0
  68. package/types/BillingPortal/ConfigurationsResource.d.ts +2 -2
  69. package/types/Capital/FinancingOffers.d.ts +188 -0
  70. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  71. package/types/Capital/FinancingSummary.d.ts +106 -0
  72. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  73. package/types/Capital/FinancingTransactions.d.ts +135 -0
  74. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  75. package/types/Cards.d.ts +6 -1
  76. package/types/Charges.d.ts +159 -2
  77. package/types/ChargesResource.d.ts +1294 -0
  78. package/types/Checkout/Sessions.d.ts +359 -5
  79. package/types/Checkout/SessionsResource.d.ts +456 -5
  80. package/types/ConfirmationTokens.d.ts +110 -1
  81. package/types/Coupons.d.ts +1 -1
  82. package/types/CouponsResource.d.ts +1 -1
  83. package/types/CreditNoteLineItems.d.ts +1 -1
  84. package/types/CreditNotes.d.ts +22 -1
  85. package/types/CreditNotesResource.d.ts +51 -0
  86. package/types/CustomersResource.d.ts +8 -0
  87. package/types/EventTypes.d.ts +596 -0
  88. package/types/Events.d.ts +93 -0
  89. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  90. package/types/FinancialConnections/Accounts.d.ts +29 -1
  91. package/types/FinancialConnections/AccountsResource.d.ts +35 -3
  92. package/types/FinancialConnections/Institutions.d.ts +93 -0
  93. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  94. package/types/FinancialConnections/Sessions.d.ts +49 -1
  95. package/types/FinancialConnections/SessionsResource.d.ts +38 -1
  96. package/types/FinancialConnections/TransactionsResource.d.ts +1 -1
  97. package/types/GiftCards/Cards.d.ts +118 -0
  98. package/types/GiftCards/CardsResource.d.ts +159 -0
  99. package/types/GiftCards/Transactions.d.ts +129 -0
  100. package/types/GiftCards/TransactionsResource.d.ts +201 -0
  101. package/types/InvoiceItems.d.ts +5 -0
  102. package/types/InvoiceItemsResource.d.ts +98 -0
  103. package/types/InvoiceLineItems.d.ts +29 -2
  104. package/types/InvoicePayments.d.ts +113 -0
  105. package/types/Invoices.d.ts +143 -3
  106. package/types/InvoicesResource.d.ts +4618 -933
  107. package/types/Issuing/Authorizations.d.ts +2 -1
  108. package/types/Issuing/CardholdersResource.d.ts +2 -1
  109. package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
  110. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
  111. package/types/Issuing/DisputeSettlementDetails.d.ts +73 -0
  112. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
  113. package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
  114. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
  115. package/types/Issuing/Settlements.d.ts +103 -0
  116. package/types/Issuing/Transactions.d.ts +3 -1
  117. package/types/Issuing/TransactionsResource.d.ts +5 -0
  118. package/types/LineItems.d.ts +32 -0
  119. package/types/Mandates.d.ts +77 -0
  120. package/types/Margins.d.ts +56 -0
  121. package/types/MarginsResource.d.ts +114 -0
  122. package/types/Orders.d.ts +1179 -0
  123. package/types/OrdersResource.d.ts +2961 -0
  124. package/types/PaymentAttemptRecords.d.ts +242 -0
  125. package/types/PaymentAttemptRecordsResource.d.ts +47 -0
  126. package/types/PaymentIntents.d.ts +653 -1
  127. package/types/PaymentIntentsResource.d.ts +8018 -3686
  128. package/types/PaymentLinks.d.ts +8 -0
  129. package/types/PaymentLinksResource.d.ts +30 -0
  130. package/types/PaymentMethodConfigurations.d.ts +216 -0
  131. package/types/PaymentMethodConfigurationsResource.d.ts +300 -0
  132. package/types/PaymentMethods.d.ts +110 -1
  133. package/types/PaymentMethodsResource.d.ts +149 -0
  134. package/types/PaymentRecords.d.ts +242 -0
  135. package/types/PaymentRecordsResource.d.ts +455 -0
  136. package/types/Prices.d.ts +22 -0
  137. package/types/PricesResource.d.ts +22 -0
  138. package/types/Products.d.ts +39 -0
  139. package/types/ProductsResource.d.ts +36 -0
  140. package/types/QuoteLines.d.ts +634 -0
  141. package/types/QuotePreviewInvoices.d.ts +1658 -0
  142. package/types/QuotePreviewSubscriptionSchedules.d.ts +824 -0
  143. package/types/Quotes.d.ts +591 -1
  144. package/types/QuotesResource.d.ts +2526 -194
  145. package/types/Refunds.d.ts +14 -0
  146. package/types/SetupAttempts.d.ts +43 -0
  147. package/types/SetupIntents.d.ts +116 -1
  148. package/types/SetupIntentsResource.d.ts +669 -3
  149. package/types/Sources.d.ts +29 -0
  150. package/types/SubscriptionItems.d.ts +21 -0
  151. package/types/SubscriptionItemsResource.d.ts +109 -0
  152. package/types/SubscriptionSchedules.d.ts +200 -0
  153. package/types/SubscriptionSchedulesResource.d.ts +1234 -16
  154. package/types/Subscriptions.d.ts +91 -1
  155. package/types/SubscriptionsResource.d.ts +369 -2
  156. package/types/Tax/Associations.d.ts +126 -0
  157. package/types/Tax/AssociationsResource.d.ts +29 -0
  158. package/types/Tax/Forms.d.ts +220 -0
  159. package/types/Tax/FormsResource.d.ts +107 -0
  160. package/types/Terminal/Configurations.d.ts +19 -0
  161. package/types/Terminal/ConfigurationsResource.d.ts +44 -0
  162. package/types/Terminal/ReaderCollectedData.d.ts +51 -0
  163. package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
  164. package/types/Terminal/Readers.d.ts +310 -0
  165. package/types/Terminal/ReadersResource.d.ts +215 -0
  166. package/types/TestHelpers/ConfirmationTokensResource.d.ts +112 -0
  167. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  168. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  169. package/types/TokensResource.d.ts +30 -0
  170. package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
  171. package/types/Treasury/FinancialAccounts.d.ts +12 -0
  172. package/types/Treasury/FinancialAccountsResource.d.ts +121 -0
  173. package/types/Treasury/OutboundTransfers.d.ts +43 -1
  174. package/types/Treasury/OutboundTransfersResource.d.ts +43 -0
  175. package/types/Treasury/ReceivedCredits.d.ts +36 -0
  176. package/types/Treasury/ReceivedCreditsResource.d.ts +1 -0
  177. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  178. package/types/WebhookEndpointsResource.d.ts +72 -1
  179. package/types/index.d.ts +62 -0
  180. package/types/lib.d.ts +1 -1
  181. package/types/test/typescriptTest.ts +3 -3
package/types/Events.d.ts CHANGED
@@ -21,6 +21,59 @@ declare module 'stripe' {
21
21
  interface PreviousAttributes {}
22
22
  }
23
23
 
24
+ interface Reason {
25
+ automation_action?: Reason.AutomationAction;
26
+
27
+ request?: Reason.Request;
28
+
29
+ /**
30
+ * The type of the reason for the event.
31
+ */
32
+ type: Reason.Type;
33
+ }
34
+
35
+ namespace Reason {
36
+ interface AutomationAction {
37
+ stripe_send_webhook_custom_event?: AutomationAction.StripeSendWebhookCustomEvent;
38
+
39
+ /**
40
+ * The trigger name of the automation that triggered this action.
41
+ * Please visit [Revenue and retention automations](https://docs.stripe.com/billing/automations#choose-a-trigger) for all possible trigger names.
42
+ */
43
+ trigger: string;
44
+
45
+ /**
46
+ * The type of the `automation_action`.
47
+ */
48
+ type: 'stripe_send_webhook_custom_event';
49
+ }
50
+
51
+ namespace AutomationAction {
52
+ interface StripeSendWebhookCustomEvent {
53
+ /**
54
+ * Set of key-value pairs attached to the action when creating an Automation.
55
+ */
56
+ custom_data: {
57
+ [key: string]: string;
58
+ } | null;
59
+ }
60
+ }
61
+
62
+ interface Request {
63
+ /**
64
+ * ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API.
65
+ */
66
+ id: string | null;
67
+
68
+ /**
69
+ * The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*.
70
+ */
71
+ idempotency_key: string | null;
72
+ }
73
+
74
+ type Type = 'automation_action' | 'request';
75
+ }
76
+
24
77
  interface Request {
25
78
  /**
26
79
  * ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API.
@@ -40,15 +93,27 @@ declare module 'stripe' {
40
93
  | 'account.external_account.deleted'
41
94
  | 'account.external_account.updated'
42
95
  | 'account.updated'
96
+ | 'account_notice.created'
97
+ | 'account_notice.updated'
43
98
  | 'application_fee.created'
44
99
  | 'application_fee.refund.updated'
45
100
  | 'application_fee.refunded'
46
101
  | 'balance.available'
47
102
  | 'billing.alert.triggered'
103
+ | 'billing.meter_error_report.triggered'
48
104
  | 'billing_portal.configuration.created'
49
105
  | 'billing_portal.configuration.updated'
50
106
  | 'billing_portal.session.created'
51
107
  | 'capability.updated'
108
+ | 'capital.financing_offer.accepted'
109
+ | 'capital.financing_offer.canceled'
110
+ | 'capital.financing_offer.created'
111
+ | 'capital.financing_offer.expired'
112
+ | 'capital.financing_offer.fully_repaid'
113
+ | 'capital.financing_offer.paid_out'
114
+ | 'capital.financing_offer.rejected'
115
+ | 'capital.financing_offer.replacement_created'
116
+ | 'capital.financing_transaction.created'
52
117
  | 'cash_balance.funds_available'
53
118
  | 'charge.captured'
54
119
  | 'charge.dispute.closed'
@@ -89,11 +154,15 @@ declare module 'stripe' {
89
154
  | 'customer.source.deleted'
90
155
  | 'customer.source.expiring'
91
156
  | 'customer.source.updated'
157
+ | 'customer.subscription.collection_paused'
158
+ | 'customer.subscription.collection_resumed'
92
159
  | 'customer.subscription.created'
160
+ | 'customer.subscription.custom_event'
93
161
  | 'customer.subscription.deleted'
94
162
  | 'customer.subscription.paused'
95
163
  | 'customer.subscription.pending_update_applied'
96
164
  | 'customer.subscription.pending_update_expired'
165
+ | 'customer.subscription.price_migration_failed'
97
166
  | 'customer.subscription.resumed'
98
167
  | 'customer.subscription.trial_will_end'
99
168
  | 'customer.subscription.updated'
@@ -109,8 +178,10 @@ declare module 'stripe' {
109
178
  | 'financial_connections.account.disconnected'
110
179
  | 'financial_connections.account.reactivated'
111
180
  | 'financial_connections.account.refreshed_balance'
181
+ | 'financial_connections.account.refreshed_inferred_balances'
112
182
  | 'financial_connections.account.refreshed_ownership'
113
183
  | 'financial_connections.account.refreshed_transactions'
184
+ | 'financial_connections.session.updated'
114
185
  | 'identity.verification_session.canceled'
115
186
  | 'identity.verification_session.created'
116
187
  | 'identity.verification_session.processing'
@@ -123,8 +194,11 @@ declare module 'stripe' {
123
194
  | 'invoice.finalized'
124
195
  | 'invoice.marked_uncollectible'
125
196
  | 'invoice.overdue'
197
+ | 'invoice.overpaid'
126
198
  | 'invoice.paid'
199
+ | 'invoice.payment.overpaid'
127
200
  | 'invoice.payment_action_required'
201
+ | 'invoice.payment_attempt_required'
128
202
  | 'invoice.payment_failed'
129
203
  | 'invoice.payment_succeeded'
130
204
  | 'invoice.sent'
@@ -147,10 +221,15 @@ declare module 'stripe' {
147
221
  | 'issuing_dispute.funds_rescinded'
148
222
  | 'issuing_dispute.submitted'
149
223
  | 'issuing_dispute.updated'
224
+ | 'issuing_dispute_settlement_detail.created'
225
+ | 'issuing_dispute_settlement_detail.updated'
226
+ | 'issuing_fraud_liability_debit.created'
150
227
  | 'issuing_personalization_design.activated'
151
228
  | 'issuing_personalization_design.deactivated'
152
229
  | 'issuing_personalization_design.rejected'
153
230
  | 'issuing_personalization_design.updated'
231
+ | 'issuing_settlement.created'
232
+ | 'issuing_settlement.updated'
154
233
  | 'issuing_token.created'
155
234
  | 'issuing_token.updated'
156
235
  | 'issuing_transaction.created'
@@ -191,10 +270,16 @@ declare module 'stripe' {
191
270
  | 'product.updated'
192
271
  | 'promotion_code.created'
193
272
  | 'promotion_code.updated'
273
+ | 'quote.accept_failed'
194
274
  | 'quote.accepted'
275
+ | 'quote.accepting'
195
276
  | 'quote.canceled'
196
277
  | 'quote.created'
278
+ | 'quote.draft'
197
279
  | 'quote.finalized'
280
+ | 'quote.reestimate_failed'
281
+ | 'quote.reestimated'
282
+ | 'quote.stale'
198
283
  | 'radar.early_fraud_warning.created'
199
284
  | 'radar.early_fraud_warning.updated'
200
285
  | 'refund.created'
@@ -223,13 +308,16 @@ declare module 'stripe' {
223
308
  | 'subscription_schedule.completed'
224
309
  | 'subscription_schedule.created'
225
310
  | 'subscription_schedule.expiring'
311
+ | 'subscription_schedule.price_migration_failed'
226
312
  | 'subscription_schedule.released'
227
313
  | 'subscription_schedule.updated'
314
+ | 'tax.form.updated'
228
315
  | 'tax.settings.updated'
229
316
  | 'tax_rate.created'
230
317
  | 'tax_rate.updated'
231
318
  | 'terminal.reader.action_failed'
232
319
  | 'terminal.reader.action_succeeded'
320
+ | 'terminal.reader.action_updated'
233
321
  | 'test_helpers.test_clock.advancing'
234
322
  | 'test_helpers.test_clock.created'
235
323
  | 'test_helpers.test_clock.deleted'
@@ -345,6 +433,11 @@ declare module 'stripe' {
345
433
  */
346
434
  pending_webhooks: number;
347
435
 
436
+ /**
437
+ * Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action.
438
+ */
439
+ reason?: Event.Reason | null;
440
+
348
441
  /**
349
442
  * Information on the API request that triggers the event.
350
443
  */
@@ -0,0 +1,38 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace FinancialConnections {
6
+ /**
7
+ * A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data.
8
+ */
9
+ interface AccountInferredBalance {
10
+ /**
11
+ * Unique identifier for the object.
12
+ */
13
+ id: string;
14
+
15
+ /**
16
+ * String representing the object's type. Objects of the same type share the same value.
17
+ */
18
+ object: 'financial_connections.account_inferred_balance';
19
+
20
+ /**
21
+ * The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC.
22
+ */
23
+ as_of: number;
24
+
25
+ /**
26
+ * The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions.
27
+ *
28
+ * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
29
+ *
30
+ * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
31
+ */
32
+ current: {
33
+ [key: string]: number;
34
+ };
35
+ }
36
+ }
37
+ }
38
+ }
@@ -47,6 +47,11 @@ declare module 'stripe' {
47
47
  */
48
48
  display_name: string | null;
49
49
 
50
+ /**
51
+ * The state of the most recent attempt to refresh the account's inferred balance history.
52
+ */
53
+ inferred_balances_refresh?: Account.InferredBalancesRefresh | null;
54
+
50
55
  /**
51
56
  * The name of the institution that holds this account.
52
57
  */
@@ -103,7 +108,7 @@ declare module 'stripe' {
103
108
  /**
104
109
  * The list of data refresh subscriptions requested on this account.
105
110
  */
106
- subscriptions: Array<'transactions'> | null;
111
+ subscriptions: Array<Account.Subscription> | null;
107
112
 
108
113
  /**
109
114
  * The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.
@@ -220,6 +225,27 @@ declare module 'stripe' {
220
225
 
221
226
  type Category = 'cash' | 'credit' | 'investment' | 'other';
222
227
 
228
+ interface InferredBalancesRefresh {
229
+ /**
230
+ * The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
231
+ */
232
+ last_attempted_at: number;
233
+
234
+ /**
235
+ * Time at which the next inferred balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
236
+ */
237
+ next_refresh_available_at: number | null;
238
+
239
+ /**
240
+ * The status of the last refresh attempt.
241
+ */
242
+ status: InferredBalancesRefresh.Status;
243
+ }
244
+
245
+ namespace InferredBalancesRefresh {
246
+ type Status = 'failed' | 'pending' | 'succeeded';
247
+ }
248
+
223
249
  interface OwnershipRefresh {
224
250
  /**
225
251
  * The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
@@ -257,6 +283,8 @@ declare module 'stripe' {
257
283
  | 'other'
258
284
  | 'savings';
259
285
 
286
+ type Subscription = 'balance' | 'inferred_balances' | 'transactions';
287
+
260
288
  type SupportedPaymentMethodType = 'link' | 'us_bank_account';
261
289
 
262
290
  interface TransactionRefresh {
@@ -48,6 +48,13 @@ declare module 'stripe' {
48
48
  expand?: Array<string>;
49
49
  }
50
50
 
51
+ interface AccountListInferredBalancesParams extends PaginationParams {
52
+ /**
53
+ * Specifies which fields in the response should be expanded.
54
+ */
55
+ expand?: Array<string>;
56
+ }
57
+
51
58
  interface AccountListOwnersParams extends PaginationParams {
52
59
  /**
53
60
  * The ID of the ownership object to fetch owners from.
@@ -73,14 +80,18 @@ declare module 'stripe' {
73
80
  }
74
81
 
75
82
  namespace AccountRefreshParams {
76
- type Feature = 'balance' | 'ownership' | 'transactions';
83
+ type Feature =
84
+ | 'balance'
85
+ | 'inferred_balances'
86
+ | 'ownership'
87
+ | 'transactions';
77
88
  }
78
89
 
79
90
  interface AccountSubscribeParams {
80
91
  /**
81
92
  * The list of account features to which you would like to subscribe.
82
93
  */
83
- features: Array<'transactions'>;
94
+ features: Array<AccountSubscribeParams.Feature>;
84
95
 
85
96
  /**
86
97
  * Specifies which fields in the response should be expanded.
@@ -88,11 +99,15 @@ declare module 'stripe' {
88
99
  expand?: Array<string>;
89
100
  }
90
101
 
102
+ namespace AccountSubscribeParams {
103
+ type Feature = 'balance' | 'inferred_balances' | 'transactions';
104
+ }
105
+
91
106
  interface AccountUnsubscribeParams {
92
107
  /**
93
108
  * The list of account features from which you would like to unsubscribe.
94
109
  */
95
- features: Array<'transactions'>;
110
+ features: Array<AccountUnsubscribeParams.Feature>;
96
111
 
97
112
  /**
98
113
  * Specifies which fields in the response should be expanded.
@@ -100,6 +115,10 @@ declare module 'stripe' {
100
115
  expand?: Array<string>;
101
116
  }
102
117
 
118
+ namespace AccountUnsubscribeParams {
119
+ type Feature = 'balance' | 'inferred_balances' | 'transactions';
120
+ }
121
+
103
122
  class AccountsResource {
104
123
  /**
105
124
  * Retrieves the details of an Financial Connections Account.
@@ -138,6 +157,19 @@ declare module 'stripe' {
138
157
  options?: RequestOptions
139
158
  ): Promise<Stripe.Response<Stripe.FinancialConnections.Account>>;
140
159
 
160
+ /**
161
+ * Lists the recorded inferred balances for a Financial Connections Account.
162
+ */
163
+ listInferredBalances(
164
+ id: string,
165
+ params?: AccountListInferredBalancesParams,
166
+ options?: RequestOptions
167
+ ): ApiListPromise<Stripe.FinancialConnections.AccountInferredBalance>;
168
+ listInferredBalances(
169
+ id: string,
170
+ options?: RequestOptions
171
+ ): ApiListPromise<Stripe.FinancialConnections.AccountInferredBalance>;
172
+
141
173
  /**
142
174
  * Lists all owners for a given Account
143
175
  */
@@ -0,0 +1,93 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace FinancialConnections {
6
+ /**
7
+ * An institution represents a financial institution to which an end user can connect using the Financial Connections authentication flow.
8
+ */
9
+ interface Institution {
10
+ /**
11
+ * Unique identifier for the object.
12
+ */
13
+ id: string;
14
+
15
+ /**
16
+ * String representing the object's type. Objects of the same type share the same value.
17
+ */
18
+ object: 'financial_connections.institution';
19
+
20
+ features: Institution.Features;
21
+
22
+ /**
23
+ * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
24
+ */
25
+ livemode: boolean;
26
+
27
+ /**
28
+ * The name of this institution.
29
+ */
30
+ name: string;
31
+
32
+ /**
33
+ * A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions.
34
+ */
35
+ routing_numbers: Array<string>;
36
+
37
+ /**
38
+ * The status of this institution in the Financial Connections authentication flow.
39
+ */
40
+ status: Institution.Status;
41
+
42
+ /**
43
+ * A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution.
44
+ */
45
+ url: string | null;
46
+ }
47
+
48
+ namespace Institution {
49
+ interface Features {
50
+ balances: Features.Balances;
51
+
52
+ ownership: Features.Ownership;
53
+
54
+ payment_method: Features.PaymentMethod;
55
+
56
+ transactions: Features.Transactions;
57
+ }
58
+
59
+ namespace Features {
60
+ interface Balances {
61
+ /**
62
+ * Whether the given feature is supported by this institution.
63
+ */
64
+ supported: boolean;
65
+ }
66
+
67
+ interface Ownership {
68
+ /**
69
+ * Whether the given feature is supported by this institution.
70
+ */
71
+ supported: boolean;
72
+ }
73
+
74
+ interface PaymentMethod {
75
+ /**
76
+ * Whether the given feature is supported by this institution.
77
+ */
78
+ supported: boolean;
79
+ }
80
+
81
+ interface Transactions {
82
+ /**
83
+ * Whether the given feature is supported by this institution.
84
+ */
85
+ supported: boolean;
86
+ }
87
+ }
88
+
89
+ type Status = 'active' | 'degraded' | 'inactive';
90
+ }
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,47 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace FinancialConnections {
6
+ interface InstitutionRetrieveParams {
7
+ /**
8
+ * Specifies which fields in the response should be expanded.
9
+ */
10
+ expand?: Array<string>;
11
+ }
12
+
13
+ interface InstitutionListParams extends PaginationParams {
14
+ /**
15
+ * Specifies which fields in the response should be expanded.
16
+ */
17
+ expand?: Array<string>;
18
+ }
19
+
20
+ class InstitutionsResource {
21
+ /**
22
+ * Retrieves the details of a Financial Connections Institution.
23
+ */
24
+ retrieve(
25
+ id: string,
26
+ params?: InstitutionRetrieveParams,
27
+ options?: RequestOptions
28
+ ): Promise<Stripe.Response<Stripe.FinancialConnections.Institution>>;
29
+ retrieve(
30
+ id: string,
31
+ options?: RequestOptions
32
+ ): Promise<Stripe.Response<Stripe.FinancialConnections.Institution>>;
33
+
34
+ /**
35
+ * Returns a list of Financial Connections Institution objects.
36
+ */
37
+ list(
38
+ params?: InstitutionListParams,
39
+ options?: RequestOptions
40
+ ): ApiListPromise<Stripe.FinancialConnections.Institution>;
41
+ list(
42
+ options?: RequestOptions
43
+ ): ApiListPromise<Stripe.FinancialConnections.Institution>;
44
+ }
45
+ }
46
+ }
47
+ }
@@ -34,11 +34,15 @@ declare module 'stripe' {
34
34
 
35
35
  filters?: Session.Filters;
36
36
 
37
+ limits?: Session.Limits;
38
+
37
39
  /**
38
40
  * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
39
41
  */
40
42
  livemode: boolean;
41
43
 
44
+ manual_entry?: Session.ManualEntry;
45
+
42
46
  /**
43
47
  * Permissions requested for accounts collected during this session.
44
48
  */
@@ -53,6 +57,13 @@ declare module 'stripe' {
53
57
  * For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
54
58
  */
55
59
  return_url?: string;
60
+
61
+ /**
62
+ * The current state of the session.
63
+ */
64
+ status?: Session.Status;
65
+
66
+ status_details?: Session.StatusDetails;
56
67
  }
57
68
 
58
69
  namespace Session {
@@ -87,6 +98,11 @@ declare module 'stripe' {
87
98
  * List of countries from which to filter accounts.
88
99
  */
89
100
  countries: Array<string> | null;
101
+
102
+ /**
103
+ * Stripe ID of the institution with which the customer should be directed to log in.
104
+ */
105
+ institution?: string;
90
106
  }
91
107
 
92
108
  namespace Filters {
@@ -98,13 +114,45 @@ declare module 'stripe' {
98
114
  | 'savings';
99
115
  }
100
116
 
117
+ interface Limits {
118
+ /**
119
+ * The number of accounts that can be linked in this Session.
120
+ */
121
+ accounts: number;
122
+ }
123
+
124
+ interface ManualEntry {}
125
+
101
126
  type Permission =
102
127
  | 'balances'
103
128
  | 'ownership'
104
129
  | 'payment_method'
105
130
  | 'transactions';
106
131
 
107
- type Prefetch = 'balances' | 'ownership' | 'transactions';
132
+ type Prefetch =
133
+ | 'balances'
134
+ | 'inferred_balances'
135
+ | 'ownership'
136
+ | 'transactions';
137
+
138
+ type Status = 'cancelled' | 'failed' | 'pending' | 'succeeded';
139
+
140
+ interface StatusDetails {
141
+ cancelled?: StatusDetails.Cancelled;
142
+ }
143
+
144
+ namespace StatusDetails {
145
+ interface Cancelled {
146
+ /**
147
+ * The reason for the Session being cancelled.
148
+ */
149
+ reason: Cancelled.Reason;
150
+ }
151
+
152
+ namespace Cancelled {
153
+ type Reason = 'custom_manual_entry' | 'other';
154
+ }
155
+ }
108
156
  }
109
157
  }
110
158
  }
@@ -26,6 +26,16 @@ declare module 'stripe' {
26
26
  */
27
27
  filters?: SessionCreateParams.Filters;
28
28
 
29
+ /**
30
+ * Settings for configuring Session-specific limits.
31
+ */
32
+ limits?: SessionCreateParams.Limits;
33
+
34
+ /**
35
+ * Settings for configuring manual entry of account details for this Session.
36
+ */
37
+ manual_entry?: SessionCreateParams.ManualEntry;
38
+
29
39
  /**
30
40
  * List of data features that you would like to retrieve upon account creation.
31
41
  */
@@ -69,6 +79,11 @@ declare module 'stripe' {
69
79
  * List of countries from which to collect accounts.
70
80
  */
71
81
  countries?: Array<string>;
82
+
83
+ /**
84
+ * Stripe ID of the institution with which the customer should be directed to log in.
85
+ */
86
+ institution?: string;
72
87
  }
73
88
 
74
89
  namespace Filters {
@@ -80,13 +95,35 @@ declare module 'stripe' {
80
95
  | 'savings';
81
96
  }
82
97
 
98
+ interface Limits {
99
+ /**
100
+ * The number of accounts that can be linked in this Session.
101
+ */
102
+ accounts: number;
103
+ }
104
+
105
+ interface ManualEntry {
106
+ /**
107
+ * Whether manual entry will be handled by Stripe during the Session.
108
+ */
109
+ mode?: ManualEntry.Mode;
110
+ }
111
+
112
+ namespace ManualEntry {
113
+ type Mode = 'automatic' | 'custom';
114
+ }
115
+
83
116
  type Permission =
84
117
  | 'balances'
85
118
  | 'ownership'
86
119
  | 'payment_method'
87
120
  | 'transactions';
88
121
 
89
- type Prefetch = 'balances' | 'ownership' | 'transactions';
122
+ type Prefetch =
123
+ | 'balances'
124
+ | 'inferred_balances'
125
+ | 'ownership'
126
+ | 'transactions';
90
127
  }
91
128
 
92
129
  interface SessionRetrieveParams {
@@ -12,7 +12,7 @@ declare module 'stripe' {
12
12
 
13
13
  interface TransactionListParams extends PaginationParams {
14
14
  /**
15
- * The ID of the Stripe account whose transactions will be retrieved.
15
+ * The ID of the Financial Connections Account whose transactions will be retrieved.
16
16
  */
17
17
  account: string;
18
18