stripe 20.2.0-alpha.1 → 20.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/CHANGELOG.md +45 -460
  2. package/OPENAPI_VERSION +1 -1
  3. package/VERSION +1 -1
  4. package/cjs/Error.js +1 -9
  5. package/cjs/StripeEventNotificationHandler.js +118 -0
  6. package/cjs/resources/PaymentMethods.js +0 -4
  7. package/cjs/resources/Reserve/Holds.js +14 -0
  8. package/cjs/resources/{ProductCatalog/TrialOffers.js → Reserve/Plans.js} +3 -6
  9. package/cjs/resources/{SharedPayment/GrantedTokens.js → Reserve/Releases.js} +8 -3
  10. package/cjs/resources.js +11 -77
  11. package/cjs/stripe.core.js +5 -1
  12. package/esm/Error.js +0 -7
  13. package/esm/StripeEventNotificationHandler.js +114 -0
  14. package/esm/resources/PaymentMethods.js +0 -4
  15. package/esm/resources/Reserve/Holds.js +11 -0
  16. package/esm/resources/Reserve/Plans.js +6 -0
  17. package/esm/resources/Reserve/Releases.js +14 -0
  18. package/esm/resources.js +7 -72
  19. package/esm/stripe.core.js +5 -1
  20. package/package.json +1 -1
  21. package/types/AccountSessions.d.ts +0 -18
  22. package/types/AccountSessionsResource.d.ts +0 -21
  23. package/types/AccountsResource.d.ts +12 -136
  24. package/types/ApplicationFees.d.ts +1 -6
  25. package/types/Balance.d.ts +0 -82
  26. package/types/BalanceTransactions.d.ts +1 -2
  27. package/types/Billing/AlertTriggereds.d.ts +0 -15
  28. package/types/Billing/Alerts.d.ts +1 -116
  29. package/types/Billing/AlertsResource.d.ts +2 -149
  30. package/types/Billing/Analytics/MeterUsageResource.d.ts +0 -5
  31. package/types/Billing/Analytics/MeterUsageRows.d.ts +0 -7
  32. package/types/Billing/CreditBalanceSummary.d.ts +2 -118
  33. package/types/Billing/CreditBalanceSummaryResource.d.ts +0 -12
  34. package/types/Billing/CreditBalanceTransactions.d.ts +2 -118
  35. package/types/Billing/CreditGrants.d.ts +1 -71
  36. package/types/Billing/CreditGrantsResource.d.ts +1 -32
  37. package/types/Billing/MeterEventSummaries.d.ts +0 -7
  38. package/types/Billing/Meters.d.ts +0 -5
  39. package/types/Billing/MetersResource.d.ts +0 -17
  40. package/types/Cards.d.ts +0 -14
  41. package/types/Charges.d.ts +0 -14
  42. package/types/Checkout/Sessions.d.ts +0 -58
  43. package/types/Checkout/SessionsResource.d.ts +0 -78
  44. package/types/ConfirmationTokens.d.ts +0 -14
  45. package/types/Discounts.d.ts +0 -10
  46. package/types/Errors.d.ts +0 -6
  47. package/types/Identity/VerificationReports.d.ts +0 -10
  48. package/types/Identity/VerificationReportsResource.d.ts +0 -5
  49. package/types/InvoiceItems.d.ts +3 -118
  50. package/types/InvoiceLineItems.d.ts +8 -127
  51. package/types/Invoices.d.ts +0 -13
  52. package/types/InvoicesResource.d.ts +0 -201
  53. package/types/Issuing/Cards.d.ts +0 -10
  54. package/types/Issuing/CardsResource.d.ts +0 -33
  55. package/types/PaymentIntents.d.ts +1 -45
  56. package/types/PaymentIntentsResource.d.ts +5 -126
  57. package/types/PaymentLinksResource.d.ts +0 -14
  58. package/types/PaymentMethods.d.ts +0 -14
  59. package/types/PaymentMethodsResource.d.ts +0 -20
  60. package/types/Persons.d.ts +0 -28
  61. package/types/ProductsResource.d.ts +0 -24
  62. package/types/QuoteLines.d.ts +0 -17
  63. package/types/QuotePreviewInvoices.d.ts +0 -13
  64. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -126
  65. package/types/Quotes.d.ts +0 -282
  66. package/types/QuotesResource.d.ts +44 -662
  67. package/types/Reserve/Holds.d.ts +104 -0
  68. package/types/Reserve/HoldsResource.d.ts +76 -0
  69. package/types/Reserve/Plans.d.ts +103 -0
  70. package/types/{SharedPayment/GrantedTokensResource.d.ts → Reserve/PlansResource.d.ts} +7 -7
  71. package/types/Reserve/Releases.d.ts +105 -0
  72. package/types/Reserve/ReleasesResource.d.ts +60 -0
  73. package/types/SetupIntents.d.ts +0 -21
  74. package/types/SetupIntentsResource.d.ts +0 -90
  75. package/types/SubscriptionItems.d.ts +0 -13
  76. package/types/SubscriptionItemsResource.d.ts +0 -34
  77. package/types/SubscriptionSchedules.d.ts +0 -124
  78. package/types/SubscriptionSchedulesResource.d.ts +0 -238
  79. package/types/Subscriptions.d.ts +0 -22
  80. package/types/SubscriptionsResource.d.ts +0 -34
  81. package/types/TokensResource.d.ts +0 -68
  82. package/types/Transfers.d.ts +0 -4
  83. package/types/TransfersResource.d.ts +0 -2
  84. package/types/V2/Billing/Cadences.d.ts +0 -45
  85. package/types/V2/Billing/CadencesResource.d.ts +3 -32
  86. package/types/V2/Core/AccountTokensResource.d.ts +0 -245
  87. package/types/V2/Core/Accounts.d.ts +1 -1473
  88. package/types/V2/Core/AccountsResource.d.ts +0 -1644
  89. package/types/V2/Core/EventTypes.d.ts +702 -4551
  90. package/types/V2/Core/Events.d.ts +0 -61
  91. package/types/V2/Core/EventsResource.d.ts +1 -11
  92. package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -21
  93. package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -21
  94. package/types/V2/EventMisc.d.ts +37 -0
  95. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +1 -31
  96. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -7
  97. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +1 -4
  98. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +1 -18
  99. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -8
  100. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -7
  101. package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -12
  102. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -12
  103. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -34
  104. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -5
  105. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -5
  106. package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -62
  107. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +1 -34
  108. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +1 -61
  109. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +1 -6
  110. package/types/WebhookEndpointsResource.d.ts +2 -1
  111. package/types/Webhooks.d.ts +0 -2
  112. package/types/index.d.ts +25 -122
  113. package/types/test/typescriptTest.ts +27 -0
  114. package/cjs/resources/BalanceTransfers.js +0 -9
  115. package/cjs/resources/DelegatedCheckout/RequestedSessions.js +0 -28
  116. package/cjs/resources/Identity/BlocklistEntries.js +0 -25
  117. package/cjs/resources/Issuing/Programs.js +0 -22
  118. package/cjs/resources/Radar/AccountEvaluations.js +0 -20
  119. package/cjs/resources/TestHelpers/Capital/FinancingOffers.js +0 -16
  120. package/cjs/resources/TestHelpers/SharedPayment/GrantedTokens.js +0 -16
  121. package/cjs/resources/V2/Billing/CustomPricingUnits.js +0 -25
  122. package/cjs/resources/V2/Billing/Intents/Actions.js +0 -17
  123. package/cjs/resources/V2/Billing/Intents.js +0 -36
  124. package/cjs/resources/V2/Billing/LicenseFeeSubscriptions.js +0 -12
  125. package/cjs/resources/V2/Billing/LicenseFees/Versions.js +0 -17
  126. package/cjs/resources/V2/Billing/LicenseFees.js +0 -27
  127. package/cjs/resources/V2/Billing/LicensedItems.js +0 -25
  128. package/cjs/resources/V2/Billing/MeteredItems.js +0 -22
  129. package/cjs/resources/V2/Billing/PricingPlanSubscriptions/Components.js +0 -12
  130. package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +0 -26
  131. package/cjs/resources/V2/Billing/PricingPlans/Components.js +0 -29
  132. package/cjs/resources/V2/Billing/PricingPlans/Versions.js +0 -17
  133. package/cjs/resources/V2/Billing/PricingPlans.js +0 -29
  134. package/cjs/resources/V2/Billing/RateCardSubscriptions.js +0 -29
  135. package/cjs/resources/V2/Billing/RateCards/Rates.js +0 -25
  136. package/cjs/resources/V2/Billing/RateCards/Versions.js +0 -17
  137. package/cjs/resources/V2/Billing/RateCards.js +0 -29
  138. package/cjs/resources/V2/Billing/ServiceActions.js +0 -20
  139. package/cjs/resources/V2/Core/ClaimableSandboxes.js +0 -16
  140. package/cjs/resources/V2/Iam/ApiKeys.js +0 -24
  141. package/cjs/resources/V2/MoneyManagement/CurrencyConversions.js +0 -21
  142. package/cjs/resources/V2/MoneyManagement/RecipientVerifications.js +0 -20
  143. package/cjs/resources/V2/Payments/OffSessionPayments.js +0 -29
  144. package/cjs/resources/V2/Payments/SettlementAllocationIntents/Splits.js +0 -20
  145. package/cjs/resources/V2/Payments/SettlementAllocationIntents.js +0 -33
  146. package/cjs/resources/V2/Reporting/ReportRuns.js +0 -13
  147. package/cjs/resources/V2/Reporting/Reports.js +0 -12
  148. package/cjs/resources/V2/Tax/ManualRules.js +0 -23
  149. package/cjs/resources/V2/TestHelpers/MoneyManagement.js +0 -12
  150. package/esm/resources/BalanceTransfers.js +0 -6
  151. package/esm/resources/DelegatedCheckout/RequestedSessions.js +0 -25
  152. package/esm/resources/Identity/BlocklistEntries.js +0 -22
  153. package/esm/resources/Issuing/Programs.js +0 -19
  154. package/esm/resources/ProductCatalog/TrialOffers.js +0 -9
  155. package/esm/resources/Radar/AccountEvaluations.js +0 -17
  156. package/esm/resources/SharedPayment/GrantedTokens.js +0 -9
  157. package/esm/resources/TestHelpers/Capital/FinancingOffers.js +0 -13
  158. package/esm/resources/TestHelpers/SharedPayment/GrantedTokens.js +0 -13
  159. package/esm/resources/V2/Billing/CustomPricingUnits.js +0 -22
  160. package/esm/resources/V2/Billing/Intents/Actions.js +0 -14
  161. package/esm/resources/V2/Billing/Intents.js +0 -33
  162. package/esm/resources/V2/Billing/LicenseFeeSubscriptions.js +0 -9
  163. package/esm/resources/V2/Billing/LicenseFees/Versions.js +0 -14
  164. package/esm/resources/V2/Billing/LicenseFees.js +0 -24
  165. package/esm/resources/V2/Billing/LicensedItems.js +0 -22
  166. package/esm/resources/V2/Billing/MeteredItems.js +0 -19
  167. package/esm/resources/V2/Billing/PricingPlanSubscriptions/Components.js +0 -9
  168. package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +0 -23
  169. package/esm/resources/V2/Billing/PricingPlans/Components.js +0 -26
  170. package/esm/resources/V2/Billing/PricingPlans/Versions.js +0 -14
  171. package/esm/resources/V2/Billing/PricingPlans.js +0 -26
  172. package/esm/resources/V2/Billing/RateCardSubscriptions.js +0 -26
  173. package/esm/resources/V2/Billing/RateCards/Rates.js +0 -22
  174. package/esm/resources/V2/Billing/RateCards/Versions.js +0 -14
  175. package/esm/resources/V2/Billing/RateCards.js +0 -26
  176. package/esm/resources/V2/Billing/ServiceActions.js +0 -17
  177. package/esm/resources/V2/Core/ClaimableSandboxes.js +0 -13
  178. package/esm/resources/V2/Iam/ApiKeys.js +0 -21
  179. package/esm/resources/V2/MoneyManagement/CurrencyConversions.js +0 -18
  180. package/esm/resources/V2/MoneyManagement/RecipientVerifications.js +0 -17
  181. package/esm/resources/V2/Payments/OffSessionPayments.js +0 -26
  182. package/esm/resources/V2/Payments/SettlementAllocationIntents/Splits.js +0 -17
  183. package/esm/resources/V2/Payments/SettlementAllocationIntents.js +0 -30
  184. package/esm/resources/V2/Reporting/ReportRuns.js +0 -10
  185. package/esm/resources/V2/Reporting/Reports.js +0 -9
  186. package/esm/resources/V2/Tax/ManualRules.js +0 -20
  187. package/esm/resources/V2/TestHelpers/MoneyManagement.js +0 -9
  188. package/types/BalanceTransfers.d.ts +0 -122
  189. package/types/BalanceTransfersResource.d.ts +0 -87
  190. package/types/DelegatedCheckout/RequestedSessions.d.ts +0 -465
  191. package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +0 -701
  192. package/types/Identity/BlocklistEntries.d.ts +0 -78
  193. package/types/Identity/BlocklistEntriesResource.d.ts +0 -146
  194. package/types/Issuing/Programs.d.ts +0 -42
  195. package/types/Issuing/ProgramsResource.d.ts +0 -96
  196. package/types/PaymentMethodBalances.d.ts +0 -63
  197. package/types/ProductCatalog/TrialOffers.d.ts +0 -77
  198. package/types/ProductCatalog/TrialOffersResource.d.ts +0 -80
  199. package/types/Radar/AccountEvaluations.d.ts +0 -88
  200. package/types/Radar/AccountEvaluationsResource.d.ts +0 -148
  201. package/types/SharedPayment/GrantedTokens.d.ts +0 -102
  202. package/types/TestHelpers/Capital/FinancingOffersResource.d.ts +0 -130
  203. package/types/TestHelpers/SharedPayment/GrantedTokensResource.d.ts +0 -87
  204. package/types/TransitBalances.d.ts +0 -40
  205. package/types/V2/Billing/CustomPricingUnits.d.ts +0 -56
  206. package/types/V2/Billing/CustomPricingUnitsResource.d.ts +0 -122
  207. package/types/V2/Billing/IntentActions.d.ts +0 -564
  208. package/types/V2/Billing/Intents/ActionsResource.d.ts +0 -58
  209. package/types/V2/Billing/Intents.d.ts +0 -117
  210. package/types/V2/Billing/IntentsResource.d.ts +0 -674
  211. package/types/V2/Billing/LicenseFeeSubscriptions.d.ts +0 -64
  212. package/types/V2/Billing/LicenseFeeSubscriptionsResource.d.ts +0 -28
  213. package/types/V2/Billing/LicenseFeeVersions.d.ts +0 -106
  214. package/types/V2/Billing/LicenseFees/VersionsResource.d.ts +0 -58
  215. package/types/V2/Billing/LicenseFees.d.ts +0 -164
  216. package/types/V2/Billing/LicenseFeesResource.d.ts +0 -290
  217. package/types/V2/Billing/LicensedItems.d.ts +0 -73
  218. package/types/V2/Billing/LicensedItemsResource.d.ts +0 -157
  219. package/types/V2/Billing/MeteredItems.d.ts +0 -101
  220. package/types/V2/Billing/MeteredItemsResource.d.ts +0 -189
  221. package/types/V2/Billing/PricingPlanComponents.d.ts +0 -109
  222. package/types/V2/Billing/PricingPlanSubscriptionComponents.d.ts +0 -57
  223. package/types/V2/Billing/PricingPlanSubscriptions/ComponentsResource.d.ts +0 -40
  224. package/types/V2/Billing/PricingPlanSubscriptions.d.ts +0 -144
  225. package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +0 -120
  226. package/types/V2/Billing/PricingPlanVersions.d.ts +0 -49
  227. package/types/V2/Billing/PricingPlans/ComponentsResource.d.ts +0 -197
  228. package/types/V2/Billing/PricingPlans/VersionsResource.d.ts +0 -58
  229. package/types/V2/Billing/PricingPlans.d.ts +0 -84
  230. package/types/V2/Billing/PricingPlansResource.d.ts +0 -151
  231. package/types/V2/Billing/RateCardRates.d.ts +0 -144
  232. package/types/V2/Billing/RateCardSubscriptions.d.ts +0 -144
  233. package/types/V2/Billing/RateCardSubscriptionsResource.d.ts +0 -157
  234. package/types/V2/Billing/RateCardVersions.d.ts +0 -39
  235. package/types/V2/Billing/RateCards/RatesResource.d.ts +0 -203
  236. package/types/V2/Billing/RateCards/VersionsResource.d.ts +0 -58
  237. package/types/V2/Billing/RateCards.d.ts +0 -98
  238. package/types/V2/Billing/RateCardsResource.d.ts +0 -162
  239. package/types/V2/Billing/ServiceActions.d.ts +0 -298
  240. package/types/V2/Billing/ServiceActionsResource.d.ts +0 -394
  241. package/types/V2/Core/ClaimableSandboxes.d.ts +0 -132
  242. package/types/V2/Core/ClaimableSandboxesResource.d.ts +0 -74
  243. package/types/V2/Iam/ApiKeys.d.ts +0 -154
  244. package/types/V2/Iam/ApiKeysResource.d.ts +0 -215
  245. package/types/V2/MoneyManagement/CurrencyConversions.d.ts +0 -98
  246. package/types/V2/MoneyManagement/CurrencyConversionsResource.d.ts +0 -141
  247. package/types/V2/MoneyManagement/RecipientVerifications.d.ts +0 -112
  248. package/types/V2/MoneyManagement/RecipientVerificationsResource.d.ts +0 -77
  249. package/types/V2/Payments/OffSessionPayments.d.ts +0 -249
  250. package/types/V2/Payments/OffSessionPaymentsResource.d.ts +0 -306
  251. package/types/V2/Payments/SettlementAllocationIntentSplits.d.ts +0 -111
  252. package/types/V2/Payments/SettlementAllocationIntents/SplitsResource.d.ts +0 -126
  253. package/types/V2/Payments/SettlementAllocationIntents.d.ts +0 -122
  254. package/types/V2/Payments/SettlementAllocationIntentsResource.d.ts +0 -168
  255. package/types/V2/Reporting/ReportRuns.d.ts +0 -154
  256. package/types/V2/Reporting/ReportRunsResource.d.ts +0 -75
  257. package/types/V2/Reporting/Reports.d.ts +0 -120
  258. package/types/V2/Reporting/ReportsResource.d.ts +0 -30
  259. package/types/V2/Tax/ManualRules.d.ts +0 -142
  260. package/types/V2/Tax/ManualRulesResource.d.ts +0 -292
  261. package/types/V2/TestHelpers/MoneyManagementResource.d.ts +0 -49
@@ -23,11 +23,6 @@ declare module 'stripe' {
23
23
 
24
24
  namespace Reason {
25
25
  interface Request {
26
- /**
27
- * The client details that made the request.
28
- */
29
- client?: Request.Client;
30
-
31
26
  /**
32
27
  * ID of the API request that caused the event.
33
28
  */
@@ -38,62 +33,6 @@ declare module 'stripe' {
38
33
  */
39
34
  idempotency_key: string;
40
35
  }
41
-
42
- namespace Request {
43
- interface Client {
44
- /**
45
- * The type of the client.
46
- */
47
- type: Client.Type;
48
-
49
- /**
50
- * API key that triggered the event.
51
- */
52
- api_key?: Client.ApiKey;
53
-
54
- /**
55
- * Dashboard user that triggered the event.
56
- */
57
- dashboard_user?: Client.DashboardUser;
58
-
59
- /**
60
- * Stripe action that triggered the event.
61
- */
62
- stripe_action?: Client.StripeAction;
63
- }
64
-
65
- namespace Client {
66
- interface ApiKey {
67
- /**
68
- * The ID of the API key.
69
- */
70
- id: string;
71
- }
72
-
73
- interface DashboardUser {
74
- /**
75
- * The email of the dashboard user.
76
- */
77
- email: string;
78
-
79
- /**
80
- * The IP address of the user.
81
- */
82
- ip_address: string;
83
-
84
- /**
85
- * The machine identifier of the user.
86
- */
87
- machine_identifier: string;
88
- }
89
-
90
- type StripeAction = {
91
- [key: string]: unknown;
92
- };
93
-
94
- type Type = 'api_key' | 'dashboard_user' | 'stripe_action';
95
- }
96
- }
97
36
  }
98
37
  }
99
38
 
@@ -6,12 +6,7 @@ declare module 'stripe' {
6
6
  namespace Stripe {
7
7
  namespace V2 {
8
8
  namespace Core {
9
- interface EventRetrieveParams {
10
- /**
11
- * Additional fields to include in the response.
12
- */
13
- include?: Array<'reason.request.client'>;
14
- }
9
+ interface EventRetrieveParams {}
15
10
  }
16
11
 
17
12
  namespace Core {
@@ -21,11 +16,6 @@ declare module 'stripe' {
21
16
  */
22
17
  created?: Stripe.RangeQueryParam;
23
18
 
24
- /**
25
- * Additional fields to include in the response.
26
- */
27
- include?: Array<'reason.request.client'>;
28
-
29
19
  /**
30
20
  * The page size.
31
21
  */
@@ -19,11 +19,6 @@ declare module 'stripe' {
19
19
  */
20
20
  object: 'v2.core.vault.gb_bank_account';
21
21
 
22
- /**
23
- * The alternative reference for this payout method, if it's a projected payout method.
24
- */
25
- alternative_reference?: GbBankAccount.AlternativeReference;
26
-
27
22
  /**
28
23
  * Whether this bank account object was archived. Bank account objects can be archived through
29
24
  * the /archive API, and they will not be automatically archived by Stripe. Archived bank account objects
@@ -69,22 +64,6 @@ declare module 'stripe' {
69
64
  }
70
65
 
71
66
  namespace GbBankAccount {
72
- interface AlternativeReference {
73
- /**
74
- * The ID of the alternative resource being referenced.
75
- */
76
- id: string;
77
-
78
- /**
79
- * The type of the alternative reference (e.g., external_account for V1 external accounts).
80
- */
81
- type: AlternativeReference.Type;
82
- }
83
-
84
- namespace AlternativeReference {
85
- type Type = 'external_account' | 'payment_method';
86
- }
87
-
88
67
  type BankAccountType = 'checking' | 'savings';
89
68
 
90
69
  interface ConfirmationOfPayee {
@@ -19,11 +19,6 @@ declare module 'stripe' {
19
19
  */
20
20
  object: 'v2.core.vault.us_bank_account';
21
21
 
22
- /**
23
- * The alternative reference for this payout method, if it's a projected payout method.
24
- */
25
- alternative_reference?: UsBankAccount.AlternativeReference;
26
-
27
22
  /**
28
23
  * Whether this USBankAccount object was archived.
29
24
  */
@@ -76,22 +71,6 @@ declare module 'stripe' {
76
71
  }
77
72
 
78
73
  namespace UsBankAccount {
79
- interface AlternativeReference {
80
- /**
81
- * The ID of the alternative resource being referenced.
82
- */
83
- id: string;
84
-
85
- /**
86
- * The type of the alternative reference (e.g., external_account for V1 external accounts).
87
- */
88
- type: AlternativeReference.Type;
89
- }
90
-
91
- namespace AlternativeReference {
92
- type Type = 'external_account' | 'payment_method';
93
- }
94
-
95
74
  type BankAccountType = 'checking' | 'savings';
96
75
 
97
76
  interface Verification {
@@ -26,6 +26,43 @@ declare module 'stripe' {
26
26
  static parse(contextStr?: string | null): StripeContext;
27
27
  }
28
28
 
29
+ interface UnhandledNotificationDetails {
30
+ isKnownEventType: boolean;
31
+ }
32
+
33
+ type FallbackCallback = (
34
+ event: V2.Core.EventNotificationBase,
35
+ client: Stripe,
36
+ details: UnhandledNotificationDetails
37
+ ) => Promise<void>;
38
+
39
+ class EventNotificationHandler {
40
+ constructor(
41
+ client: Stripe,
42
+ webhookSecret: string,
43
+ fallbackCallback: FallbackCallback
44
+ );
45
+
46
+ on<T extends Stripe.V2.Core.EventNotification['type']>(
47
+ eventType: T,
48
+ callback: (
49
+ eventNotification: Extract<
50
+ Stripe.V2.Core.EventNotification,
51
+ {type: T}
52
+ >,
53
+ client: Stripe
54
+ ) => void
55
+ // a very cool thing would be if the whole class was generic and `on` returned all of the event types, but omitting the one we just used.
56
+ // So `.on('a').on('a') would be a type error.
57
+ // but, the event types aren't accessible from the runtime code, so we can't (yet)
58
+ ): this;
59
+
60
+ handle(
61
+ rawBody: string | Uint8Array,
62
+ signature: string | Uint8Array
63
+ ): Promise<void>;
64
+ }
65
+
29
66
  namespace Events {
30
67
  /**
31
68
  * Represents the shape of an EventNotification that the SDK didn't know about when it was generated.
@@ -43,12 +43,6 @@ declare module 'stripe' {
43
43
  */
44
44
  livemode: boolean;
45
45
 
46
- /**
47
- * If this is a managed FinancialAccount, `managed_by` indicates the product that created and manages this FinancialAccount. For managed FinancialAccounts,
48
- * creation of money management resources can only be orchestrated by the managing product.
49
- */
50
- managed_by?: FinancialAccount.ManagedBy;
51
-
52
46
  /**
53
47
  * Metadata associated with the FinancialAccount.
54
48
  */
@@ -59,11 +53,6 @@ declare module 'stripe' {
59
53
  */
60
54
  other?: FinancialAccount.Other;
61
55
 
62
- /**
63
- * If this is a `payments` FinancialAccount, this hash include details specific to `payments` FinancialAccount.
64
- */
65
- payments?: FinancialAccount.Payments;
66
-
67
56
  /**
68
57
  * Closed Enum. An enum representing the status of the FinancialAccount. This indicates whether or not the FinancialAccount can be used for any money movement flows.
69
58
  */
@@ -145,13 +134,6 @@ declare module 'stripe' {
145
134
  }
146
135
  }
147
136
 
148
- interface ManagedBy {
149
- /**
150
- * Enum describing the Stripe product that is managing this FinancialAccount.
151
- */
152
- type: 'multiprocessor_settlement';
153
- }
154
-
155
137
  interface Other {
156
138
  /**
157
139
  * The type of the FinancialAccount, represented as a string. Upgrade your API version to see the type reflected in `financial_account.type`.
@@ -159,18 +141,6 @@ declare module 'stripe' {
159
141
  type: string;
160
142
  }
161
143
 
162
- interface Payments {
163
- /**
164
- * The currency that non-settlement currency payments will be converted to.
165
- */
166
- default_currency: string;
167
-
168
- /**
169
- * Settlement currencies enabled for this FinancialAccount. Payments in other currencies will be automatically converted to `default_currency`.
170
- */
171
- settlement_currencies: Array<string>;
172
- }
173
-
174
144
  type Status = 'closed' | 'open' | 'pending';
175
145
 
176
146
  interface StatusDetails {
@@ -208,7 +178,7 @@ declare module 'stripe' {
208
178
  holds_currencies: Array<string>;
209
179
  }
210
180
 
211
- type Type = 'other' | 'payments' | 'storage';
181
+ type Type = 'other' | 'storage';
212
182
  }
213
183
  }
214
184
  }
@@ -65,17 +65,10 @@ declare module 'stripe' {
65
65
  * The status of the FinancialAccount to filter by. By default, closed FinancialAccounts are not returned.
66
66
  */
67
67
  status?: FinancialAccountListParams.Status;
68
-
69
- /**
70
- * Filter for FinancialAccount `type`. By default, FinancialAccounts of any `type` are returned.
71
- */
72
- types?: Array<FinancialAccountListParams.Type>;
73
68
  }
74
69
 
75
70
  namespace FinancialAccountListParams {
76
71
  type Status = 'closed' | 'open' | 'pending';
77
-
78
- type Type = 'payments' | 'storage';
79
72
  }
80
73
  }
81
74
 
@@ -136,10 +136,7 @@ declare module 'stripe' {
136
136
  last4: string;
137
137
  }
138
138
 
139
- type Type =
140
- | 'gb_bank_account'
141
- | 'sepa_bank_account'
142
- | 'us_bank_account';
139
+ type Type = 'gb_bank_account' | 'us_bank_account';
143
140
 
144
141
  interface UsBankAccount {
145
142
  /**
@@ -14,25 +14,10 @@ declare module 'stripe' {
14
14
  * The type of FinancialAddress details to provision.
15
15
  */
16
16
  type: FinancialAddressCreateParams.Type;
17
-
18
- /**
19
- * Optional SEPA Bank account options, used to configure the type of SEPA Bank account to create, such as the originating country.
20
- */
21
- sepa_bank_account?: FinancialAddressCreateParams.SepaBankAccount;
22
17
  }
23
18
 
24
19
  namespace FinancialAddressCreateParams {
25
- interface SepaBankAccount {
26
- /**
27
- * The originating country of the SEPA Bank account.
28
- */
29
- country: string;
30
- }
31
-
32
- type Type =
33
- | 'gb_bank_account'
34
- | 'sepa_bank_account'
35
- | 'us_bank_account';
20
+ type Type = 'gb_bank_account' | 'us_bank_account';
36
21
  }
37
22
  }
38
23
 
@@ -47,7 +32,6 @@ declare module 'stripe' {
47
32
  namespace FinancialAddressRetrieveParams {
48
33
  type Include =
49
34
  | 'credentials.gb_bank_account.account_number'
50
- | 'credentials.sepa_bank_account.iban'
51
35
  | 'credentials.us_bank_account.account_number';
52
36
  }
53
37
  }
@@ -73,7 +57,6 @@ declare module 'stripe' {
73
57
  namespace FinancialAddressListParams {
74
58
  type Include =
75
59
  | 'credentials.gb_bank_account.account_number'
76
- | 'credentials.sepa_bank_account.iban'
77
60
  | 'credentials.us_bank_account.account_number';
78
61
  }
79
62
  }
@@ -78,17 +78,10 @@ declare module 'stripe' {
78
78
  * Open Enum. Method for bank account.
79
79
  */
80
80
  bank_account?: DeliveryOptions.BankAccount;
81
-
82
- /**
83
- * Open Enum. Speed of the payout.
84
- */
85
- speed?: DeliveryOptions.Speed;
86
81
  }
87
82
 
88
83
  namespace DeliveryOptions {
89
84
  type BankAccount = 'automatic' | 'local' | 'wire';
90
-
91
- type Speed = 'instant' | 'next_business_day' | 'standard';
92
85
  }
93
86
 
94
87
  interface EstimatedFee {
@@ -120,7 +113,6 @@ declare module 'stripe' {
120
113
  | 'cross_border_payout_fee'
121
114
  | 'foreign_exchange_fee'
122
115
  | 'instant_payout_fee'
123
- | 'real_time_payout_fee'
124
116
  | 'standard_payout_fee'
125
117
  | 'wire_payout_fee';
126
118
  }
@@ -44,17 +44,10 @@ declare module 'stripe' {
44
44
  * Open Enum. Method for bank account.
45
45
  */
46
46
  bank_account?: DeliveryOptions.BankAccount;
47
-
48
- /**
49
- * Open Enum. Speed of the payout.
50
- */
51
- speed?: DeliveryOptions.Speed;
52
47
  }
53
48
 
54
49
  namespace DeliveryOptions {
55
50
  type BankAccount = 'automatic' | 'local' | 'wire';
56
-
57
- type Speed = 'instant' | 'next_business_day' | 'standard';
58
51
  }
59
52
 
60
53
  interface From {
@@ -80,11 +80,6 @@ declare module 'stripe' {
80
80
  */
81
81
  recipient_notification: OutboundPayment.RecipientNotification;
82
82
 
83
- /**
84
- * The recipient verification id for this OutboundPayment. Only required for countries with regulatory mandates to verify recipient names before OutboundPayment creation.
85
- */
86
- recipient_verification?: string;
87
-
88
83
  /**
89
84
  * The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). It will default to `STRIPE` if not set on the account settings.
90
85
  */
@@ -137,17 +132,10 @@ declare module 'stripe' {
137
132
  * Open Enum. Method for bank account.
138
133
  */
139
134
  bank_account?: DeliveryOptions.BankAccount;
140
-
141
- /**
142
- * Open Enum. Speed of the payout.
143
- */
144
- speed?: DeliveryOptions.Speed;
145
135
  }
146
136
 
147
137
  namespace DeliveryOptions {
148
138
  type BankAccount = 'automatic' | 'local' | 'wire';
149
-
150
- type Speed = 'instant' | 'next_business_day' | 'standard';
151
139
  }
152
140
 
153
141
  interface From {
@@ -44,11 +44,6 @@ declare module 'stripe' {
44
44
  * Details about the notification settings for the OutboundPayment recipient.
45
45
  */
46
46
  recipient_notification?: OutboundPaymentCreateParams.RecipientNotification;
47
-
48
- /**
49
- * The recipient verification id for this OutboundPayment. Only required for countries with regulatory mandates to verify recipient names before OutboundPayment creation.
50
- */
51
- recipient_verification?: string;
52
47
  }
53
48
 
54
49
  namespace OutboundPaymentCreateParams {
@@ -69,17 +64,10 @@ declare module 'stripe' {
69
64
  * Open Enum. Method for bank account.
70
65
  */
71
66
  bank_account?: DeliveryOptions.BankAccount;
72
-
73
- /**
74
- * Open Enum. Speed of the payout.
75
- */
76
- speed?: DeliveryOptions.Speed;
77
67
  }
78
68
 
79
69
  namespace DeliveryOptions {
80
70
  type BankAccount = 'automatic' | 'local' | 'wire';
81
-
82
- type Speed = 'instant' | 'next_business_day' | 'standard';
83
71
  }
84
72
 
85
73
  interface From {
@@ -40,11 +40,6 @@ declare module 'stripe' {
40
40
  * The type specific details of the card payout method.
41
41
  */
42
42
  card?: PayoutMethodData.Card;
43
-
44
- /**
45
- * The type specific details of the crypto wallet payout method.
46
- */
47
- crypto_wallet?: PayoutMethodData.CryptoWallet;
48
43
  }
49
44
 
50
45
  namespace PayoutMethodData {
@@ -101,35 +96,6 @@ declare module 'stripe' {
101
96
  number: string;
102
97
  }
103
98
 
104
- interface CryptoWallet {
105
- /**
106
- * Crypto wallet address.
107
- */
108
- address: string;
109
-
110
- /**
111
- * Optional field, required if network supports memos (only "stellar" currently).
112
- */
113
- memo?: string;
114
-
115
- /**
116
- * Which rail we should use to make an Outbound money movement to this wallet.
117
- */
118
- network: CryptoWallet.Network;
119
- }
120
-
121
- namespace CryptoWallet {
122
- type Network =
123
- | 'arbitrum'
124
- | 'avalanche_c_chain'
125
- | 'base'
126
- | 'ethereum'
127
- | 'optimism'
128
- | 'polygon'
129
- | 'solana'
130
- | 'stellar';
131
- }
132
-
133
99
  type Type = 'bank_account' | 'card' | 'crypto_wallet';
134
100
  }
135
101
 
@@ -70,11 +70,6 @@ declare module 'stripe' {
70
70
  */
71
71
  receipt_url?: string;
72
72
 
73
- /**
74
- * The recipient verification id for this OutboundTransfer. Only required for countries with regulatory mandates to verify recipient names before OutboundTransfer creation.
75
- */
76
- recipient_verification?: string;
77
-
78
73
  /**
79
74
  * The description that appears on the receiving end for an OutboundTransfer (for example, bank statement for external bank transfer). It will default to `STRIPE` if not set on the account settings.
80
75
  */
@@ -34,11 +34,6 @@ declare module 'stripe' {
34
34
  * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
35
35
  */
36
36
  metadata?: Stripe.MetadataParam;
37
-
38
- /**
39
- * The recipient verification id for this OutboundTransfer. Only required for countries with regulatory mandates to verify recipient names before OutboundTransfer creation.
40
- */
41
- recipient_verification?: string;
42
37
  }
43
38
 
44
39
  namespace OutboundTransferCreateParams {
@@ -18,11 +18,6 @@ declare module 'stripe' {
18
18
  */
19
19
  object: 'v2.money_management.payout_method';
20
20
 
21
- /**
22
- * The alternative reference for this payout method, if it's a projected payout method.
23
- */
24
- alternative_reference?: PayoutMethod.AlternativeReference;
25
-
26
21
  /**
27
22
  * A set of available payout speeds for this payout method.
28
23
  */
@@ -43,11 +38,6 @@ declare module 'stripe' {
43
38
  */
44
39
  created: string;
45
40
 
46
- /**
47
- * The PayoutMethodCryptoWallet object details.
48
- */
49
- crypto_wallet?: PayoutMethod.CryptoWallet;
50
-
51
41
  /**
52
42
  * ID of the underlying active OutboundSetupIntent object, if any.
53
43
  */
@@ -70,22 +60,6 @@ declare module 'stripe' {
70
60
  }
71
61
 
72
62
  namespace PayoutMethod {
73
- interface AlternativeReference {
74
- /**
75
- * The ID of the alternative resource being referenced.
76
- */
77
- id: string;
78
-
79
- /**
80
- * The type of the alternative reference (e.g., external_account for V1 external accounts).
81
- */
82
- type: AlternativeReference.Type;
83
- }
84
-
85
- namespace AlternativeReference {
86
- type Type = 'external_account' | 'payment_method';
87
- }
88
-
89
63
  type AvailablePayoutSpeed = 'instant' | 'standard';
90
64
 
91
65
  interface BankAccount {
@@ -165,42 +139,6 @@ declare module 'stripe' {
165
139
  last4: string;
166
140
  }
167
141
 
168
- interface CryptoWallet {
169
- /**
170
- * Destination wallet address.
171
- */
172
- address: string;
173
-
174
- /**
175
- * Whether the crypto wallet was archived. Crypto wallets can be archived through the /archive API,
176
- * and they will not be automatically archived by Stripe. Archived crypto wallets cannot be used as
177
- * payout method and will not appear in the payout method list.
178
- */
179
- archived: boolean;
180
-
181
- /**
182
- * Optional field, required if network supports memos (only "stellar" currently).
183
- */
184
- memo?: string;
185
-
186
- /**
187
- * Which rail is being used to make an outbound money movement to this wallet.
188
- */
189
- network: CryptoWallet.Network;
190
- }
191
-
192
- namespace CryptoWallet {
193
- type Network =
194
- | 'arbitrum'
195
- | 'avalanche_c_chain'
196
- | 'base'
197
- | 'ethereum'
198
- | 'optimism'
199
- | 'polygon'
200
- | 'solana'
201
- | 'stellar';
202
- }
203
-
204
142
  type Type = 'bank_account' | 'card' | 'crypto_wallet';
205
143
 
206
144
  interface UsageStatus {