stripe 18.1.0-beta.2 → 18.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/CHANGELOG.md +140 -1185
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +0 -1
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +3 -93
  6. package/cjs/RequestSender.js +3 -7
  7. package/cjs/Webhooks.js +6 -2
  8. package/cjs/apiVersion.js +1 -1
  9. package/cjs/net/FetchHttpClient.js +3 -4
  10. package/cjs/resources/FinancialConnections/Accounts.js +0 -5
  11. package/cjs/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +4 -4
  12. package/cjs/resources/Invoices.js +0 -17
  13. package/cjs/resources/PaymentIntents.js +0 -8
  14. package/cjs/resources/Quotes.js +0 -32
  15. package/cjs/resources/SubscriptionSchedules.js +0 -4
  16. package/cjs/resources/Terminal/Readers.js +0 -12
  17. package/cjs/resources/TestHelpers/Terminal/Readers.js +0 -8
  18. package/cjs/resources.js +18 -106
  19. package/cjs/stripe.core.js +2 -4
  20. package/cjs/utils.js +28 -4
  21. package/esm/Error.js +2 -81
  22. package/esm/RequestSender.js +4 -8
  23. package/esm/Webhooks.js +6 -2
  24. package/esm/apiVersion.js +1 -1
  25. package/esm/net/FetchHttpClient.js +3 -4
  26. package/esm/resources/FinancialConnections/Accounts.js +0 -5
  27. package/esm/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +3 -3
  28. package/esm/resources/Invoices.js +0 -17
  29. package/esm/resources/PaymentIntents.js +0 -8
  30. package/esm/resources/Quotes.js +0 -32
  31. package/esm/resources/SubscriptionSchedules.js +0 -4
  32. package/esm/resources/Terminal/Readers.js +0 -12
  33. package/esm/resources/TestHelpers/Terminal/Readers.js +0 -8
  34. package/esm/resources.js +1 -83
  35. package/esm/stripe.core.js +2 -4
  36. package/esm/utils.js +24 -3
  37. package/package.json +12 -3
  38. package/types/AccountLinksResource.d.ts +1 -5
  39. package/types/AccountSessions.d.ts +0 -45
  40. package/types/AccountSessionsResource.d.ts +0 -300
  41. package/types/Accounts.d.ts +20 -212
  42. package/types/AccountsResource.d.ts +214 -546
  43. package/types/Billing/CreditBalanceSummary.d.ts +0 -5
  44. package/types/Billing/CreditBalanceSummaryResource.d.ts +3 -8
  45. package/types/Billing/CreditBalanceTransactionsResource.d.ts +4 -12
  46. package/types/Billing/CreditGrants.d.ts +0 -5
  47. package/types/Billing/CreditGrantsResource.d.ts +1 -11
  48. package/types/BillingPortal/Sessions.d.ts +0 -5
  49. package/types/BillingPortal/SessionsResource.d.ts +4 -12
  50. package/types/Cards.d.ts +0 -5
  51. package/types/CashBalances.d.ts +0 -5
  52. package/types/Charges.d.ts +5 -166
  53. package/types/ChargesResource.d.ts +0 -1294
  54. package/types/Checkout/Sessions.d.ts +13 -306
  55. package/types/Checkout/SessionsResource.d.ts +3 -246
  56. package/types/ConfirmationTokens.d.ts +5 -120
  57. package/types/CreditNoteLineItems.d.ts +0 -17
  58. package/types/CreditNotes.d.ts +0 -9
  59. package/types/CreditNotesResource.d.ts +0 -5
  60. package/types/CustomerBalanceTransactions.d.ts +0 -2
  61. package/types/CustomerCashBalanceTransactions.d.ts +0 -2
  62. package/types/CustomerSessions.d.ts +0 -5
  63. package/types/CustomerSessionsResource.d.ts +1 -6
  64. package/types/Customers.d.ts +0 -2
  65. package/types/CustomersResource.d.ts +23 -11
  66. package/types/Discounts.d.ts +0 -10
  67. package/types/Errors.d.ts +2 -69
  68. package/types/EventTypes.d.ts +0 -681
  69. package/types/Events.d.ts +1 -99
  70. package/types/FinancialConnections/Accounts.d.ts +1 -31
  71. package/types/FinancialConnections/AccountsResource.d.ts +3 -40
  72. package/types/FinancialConnections/Sessions.d.ts +1 -51
  73. package/types/FinancialConnections/SessionsResource.d.ts +1 -43
  74. package/types/Identity/VerificationSessions.d.ts +0 -5
  75. package/types/Identity/VerificationSessionsResource.d.ts +0 -7
  76. package/types/InvoiceItems.d.ts +0 -10
  77. package/types/InvoiceItemsResource.d.ts +6 -117
  78. package/types/InvoiceLineItems.d.ts +2 -46
  79. package/types/InvoicePayments.d.ts +0 -5
  80. package/types/InvoicePaymentsResource.d.ts +74 -0
  81. package/types/Invoices.d.ts +16 -138
  82. package/types/InvoicesResource.d.ts +20 -1550
  83. package/types/Issuing/CardholdersResource.d.ts +1 -2
  84. package/types/Issuing/Transactions.d.ts +0 -5
  85. package/types/Issuing/TransactionsResource.d.ts +0 -5
  86. package/types/LineItems.d.ts +0 -49
  87. package/types/Mandates.d.ts +0 -77
  88. package/types/PaymentIntents.d.ts +2 -675
  89. package/types/PaymentIntentsResource.d.ts +3983 -8416
  90. package/types/PaymentLinks.d.ts +0 -6
  91. package/types/PaymentLinksResource.d.ts +0 -12
  92. package/types/PaymentMethodConfigurations.d.ts +4 -148
  93. package/types/PaymentMethodConfigurationsResource.d.ts +10 -210
  94. package/types/PaymentMethods.d.ts +5 -120
  95. package/types/PaymentMethodsResource.d.ts +12 -167
  96. package/types/Payouts.d.ts +0 -5
  97. package/types/PayoutsResource.d.ts +0 -5
  98. package/types/Persons.d.ts +88 -1
  99. package/types/Prices.d.ts +0 -22
  100. package/types/PricesResource.d.ts +0 -22
  101. package/types/Products.d.ts +0 -39
  102. package/types/ProductsResource.d.ts +0 -36
  103. package/types/PromotionCodes.d.ts +0 -5
  104. package/types/PromotionCodesResource.d.ts +0 -10
  105. package/types/Quotes.d.ts +2 -597
  106. package/types/QuotesResource.d.ts +224 -2571
  107. package/types/Refunds.d.ts +10 -14
  108. package/types/SetupAttempts.d.ts +1 -50
  109. package/types/SetupIntents.d.ts +2 -121
  110. package/types/SetupIntentsResource.d.ts +18 -730
  111. package/types/Sources.d.ts +0 -29
  112. package/types/SubscriptionItems.d.ts +0 -23
  113. package/types/SubscriptionItemsResource.d.ts +0 -109
  114. package/types/SubscriptionSchedules.d.ts +0 -205
  115. package/types/SubscriptionSchedulesResource.d.ts +8 -1236
  116. package/types/Subscriptions.d.ts +2 -97
  117. package/types/SubscriptionsResource.d.ts +11 -391
  118. package/types/Tax/Calculations.d.ts +11 -1
  119. package/types/Tax/CalculationsResource.d.ts +11 -1
  120. package/types/Tax/Registrations.d.ts +99 -0
  121. package/types/Tax/RegistrationsResource.d.ts +132 -0
  122. package/types/Tax/Transactions.d.ts +11 -1
  123. package/types/TaxIds.d.ts +11 -11
  124. package/types/TaxIdsResource.d.ts +11 -11
  125. package/types/Terminal/Readers.d.ts +0 -300
  126. package/types/Terminal/ReadersResource.d.ts +0 -220
  127. package/types/TestHelpers/ConfirmationTokensResource.d.ts +12 -127
  128. package/types/TestHelpers/Terminal/ReadersResource.d.ts +0 -53
  129. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
  130. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
  131. package/types/TokensResource.d.ts +106 -0
  132. package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
  133. package/types/Treasury/FinancialAccounts.d.ts +0 -5
  134. package/types/Treasury/FinancialAccountsResource.d.ts +0 -37
  135. package/types/Treasury/OutboundTransfers.d.ts +0 -26
  136. package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
  137. package/types/Treasury/ReceivedCredits.d.ts +0 -26
  138. package/types/Treasury/ReceivedDebits.d.ts +0 -31
  139. package/types/V2/EventTypes.d.ts +7 -677
  140. package/types/WebhookEndpointsResource.d.ts +4 -83
  141. package/types/index.d.ts +5 -142
  142. package/types/lib.d.ts +1 -11
  143. package/types/test/typescriptTest.ts +3 -3
  144. package/cjs/resources/AccountNotices.js +0 -21
  145. package/cjs/resources/BalanceSettings.js +0 -10
  146. package/cjs/resources/Capital/FinancingOffers.js +0 -21
  147. package/cjs/resources/Capital/FinancingSummary.js +0 -12
  148. package/cjs/resources/Capital/FinancingTransactions.js +0 -17
  149. package/cjs/resources/ExternalAccounts.js +0 -23
  150. package/cjs/resources/FinancialConnections/Institutions.js +0 -17
  151. package/cjs/resources/GiftCards/Cards.js +0 -23
  152. package/cjs/resources/GiftCards/Transactions.js +0 -33
  153. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
  154. package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
  155. package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
  156. package/cjs/resources/Margins.js +0 -22
  157. package/cjs/resources/Orders.js +0 -24
  158. package/cjs/resources/PaymentRecords.js +0 -29
  159. package/cjs/resources/Privacy/RedactionJobs.js +0 -46
  160. package/cjs/resources/Tax/Associations.js +0 -9
  161. package/cjs/resources/Tax/Forms.js +0 -20
  162. package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
  163. package/cjs/resources/V2/Core/AccountLinks.js +0 -9
  164. package/cjs/resources/V2/Core/Accounts/Persons.js +0 -29
  165. package/cjs/resources/V2/Core/Accounts.js +0 -25
  166. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +0 -28
  167. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +0 -24
  168. package/cjs/resources/V2/MoneyManagement/Adjustments.js +0 -17
  169. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +0 -17
  170. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +0 -21
  171. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +0 -21
  172. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -12
  173. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +0 -25
  174. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -29
  175. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +0 -25
  176. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +0 -25
  177. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -12
  178. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +0 -17
  179. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +0 -17
  180. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +0 -17
  181. package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
  182. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
  183. package/esm/resources/AccountNotices.js +0 -18
  184. package/esm/resources/BalanceSettings.js +0 -7
  185. package/esm/resources/Capital/FinancingOffers.js +0 -18
  186. package/esm/resources/Capital/FinancingSummary.js +0 -9
  187. package/esm/resources/Capital/FinancingTransactions.js +0 -14
  188. package/esm/resources/ExternalAccounts.js +0 -20
  189. package/esm/resources/FinancialConnections/Institutions.js +0 -14
  190. package/esm/resources/GiftCards/Cards.js +0 -20
  191. package/esm/resources/GiftCards/Transactions.js +0 -30
  192. package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
  193. package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
  194. package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
  195. package/esm/resources/Margins.js +0 -19
  196. package/esm/resources/Orders.js +0 -21
  197. package/esm/resources/PaymentRecords.js +0 -26
  198. package/esm/resources/Privacy/RedactionJobs.js +0 -43
  199. package/esm/resources/Tax/Associations.js +0 -6
  200. package/esm/resources/Tax/Forms.js +0 -17
  201. package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
  202. package/esm/resources/V2/Core/AccountLinks.js +0 -6
  203. package/esm/resources/V2/Core/Accounts/Persons.js +0 -26
  204. package/esm/resources/V2/Core/Accounts.js +0 -22
  205. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +0 -25
  206. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +0 -21
  207. package/esm/resources/V2/MoneyManagement/Adjustments.js +0 -14
  208. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +0 -14
  209. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +0 -18
  210. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +0 -18
  211. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -9
  212. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +0 -22
  213. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -26
  214. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +0 -22
  215. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +0 -22
  216. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -9
  217. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +0 -14
  218. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +0 -14
  219. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +0 -14
  220. package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
  221. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
  222. package/types/AccountNotices.d.ts +0 -113
  223. package/types/AccountNoticesResource.d.ts +0 -98
  224. package/types/BalanceSettings.d.ts +0 -85
  225. package/types/BalanceSettingsResource.d.ts +0 -108
  226. package/types/Billing/MeterErrorReports.d.ts +0 -106
  227. package/types/Capital/FinancingOffers.d.ts +0 -188
  228. package/types/Capital/FinancingOffersResource.d.ts +0 -97
  229. package/types/Capital/FinancingSummary.d.ts +0 -106
  230. package/types/Capital/FinancingSummaryResource.d.ts +0 -27
  231. package/types/Capital/FinancingTransactions.d.ts +0 -135
  232. package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
  233. package/types/ExternalAccountsResource.d.ts +0 -304
  234. package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
  235. package/types/FinancialConnections/Institutions.d.ts +0 -93
  236. package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
  237. package/types/GiftCards/Cards.d.ts +0 -118
  238. package/types/GiftCards/CardsResource.d.ts +0 -159
  239. package/types/GiftCards/Transactions.d.ts +0 -129
  240. package/types/GiftCards/TransactionsResource.d.ts +0 -201
  241. package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
  242. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
  243. package/types/Issuing/DisputeSettlementDetails.d.ts +0 -85
  244. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
  245. package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
  246. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
  247. package/types/Issuing/Settlements.d.ts +0 -113
  248. package/types/Margins.d.ts +0 -56
  249. package/types/MarginsResource.d.ts +0 -114
  250. package/types/Orders.d.ts +0 -1189
  251. package/types/OrdersResource.d.ts +0 -2981
  252. package/types/PaymentAttemptRecords.d.ts +0 -2112
  253. package/types/PaymentAttemptRecordsResource.d.ts +0 -47
  254. package/types/PaymentRecords.d.ts +0 -2105
  255. package/types/PaymentRecordsResource.d.ts +0 -455
  256. package/types/Privacy/RedactionJobRootObjects.d.ts +0 -35
  257. package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -30
  258. package/types/Privacy/RedactionJobs.d.ts +0 -43
  259. package/types/Privacy/RedactionJobsResource.d.ts +0 -240
  260. package/types/QuoteLines.d.ts +0 -634
  261. package/types/QuotePreviewInvoices.d.ts +0 -1686
  262. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -778
  263. package/types/Tax/Associations.d.ts +0 -126
  264. package/types/Tax/AssociationsResource.d.ts +0 -29
  265. package/types/Tax/Forms.d.ts +0 -220
  266. package/types/Tax/FormsResource.d.ts +0 -107
  267. package/types/Terminal/ReaderCollectedData.d.ts +0 -51
  268. package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
  269. package/types/V2/Core/AccountLinks.d.ts +0 -101
  270. package/types/V2/Core/AccountLinksResource.d.ts +0 -90
  271. package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -3760
  272. package/types/V2/Core/Accounts.d.ts +0 -8057
  273. package/types/V2/Core/AccountsResource.d.ts +0 -10184
  274. package/types/V2/Core/Persons.d.ts +0 -1857
  275. package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -155
  276. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -172
  277. package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -65
  278. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -123
  279. package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -22
  280. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -27
  281. package/types/V2/MoneyManagement/Adjustments.d.ts +0 -105
  282. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
  283. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -540
  284. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -52
  285. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -308
  286. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -287
  287. package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -201
  288. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
  289. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -141
  290. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -93
  291. package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -273
  292. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
  293. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -92
  294. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
  295. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -246
  296. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -207
  297. package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -146
  298. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +0 -41
  299. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +0 -82
  300. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +0 -113
  301. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +0 -280
  302. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
  303. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -219
  304. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
  305. package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -151
  306. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
  307. package/types/V2/MoneyManagement/Transactions.d.ts +0 -166
  308. package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
  309. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -66
@@ -3,6 +3,11 @@
3
3
  declare module 'stripe' {
4
4
  namespace Stripe {
5
5
  interface SubscriptionCreateParams {
6
+ /**
7
+ * The identifier of the customer to subscribe.
8
+ */
9
+ customer: string;
10
+
6
11
  /**
7
12
  * A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
8
13
  */
@@ -53,16 +58,6 @@ declare module 'stripe' {
53
58
  */
54
59
  currency?: string;
55
60
 
56
- /**
57
- * The identifier of the customer to subscribe.
58
- */
59
- customer?: string;
60
-
61
- /**
62
- * The identifier of the account to subscribe.
63
- */
64
- customer_account?: string;
65
-
66
61
  /**
67
62
  * Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
68
63
  */
@@ -150,11 +145,6 @@ declare module 'stripe' {
150
145
  SubscriptionCreateParams.PendingInvoiceItemInterval
151
146
  >;
152
147
 
153
- /**
154
- * If specified, the invoicing for the given billing cycle iterations will be processed now.
155
- */
156
- prebilling?: SubscriptionCreateParams.Prebilling;
157
-
158
148
  /**
159
149
  * Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
160
150
  */
@@ -226,56 +216,12 @@ declare module 'stripe' {
226
216
  */
227
217
  discount?: string;
228
218
 
229
- /**
230
- * Details to determine how long the discount should be applied for.
231
- */
232
- discount_end?: Discount.DiscountEnd;
233
-
234
219
  /**
235
220
  * ID of the promotion code to create a new discount for.
236
221
  */
237
222
  promotion_code?: string;
238
223
  }
239
224
 
240
- namespace Discount {
241
- interface DiscountEnd {
242
- /**
243
- * Time span for the redeemed discount.
244
- */
245
- duration?: DiscountEnd.Duration;
246
-
247
- /**
248
- * A precise Unix timestamp for the discount to end. Must be in the future.
249
- */
250
- timestamp?: number;
251
-
252
- /**
253
- * The type of calculation made to determine when the discount ends.
254
- */
255
- type: DiscountEnd.Type;
256
- }
257
-
258
- namespace DiscountEnd {
259
- interface Duration {
260
- /**
261
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
262
- */
263
- interval: Duration.Interval;
264
-
265
- /**
266
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
267
- */
268
- interval_count: number;
269
- }
270
-
271
- namespace Duration {
272
- type Interval = 'day' | 'month' | 'week' | 'year';
273
- }
274
-
275
- type Type = 'duration' | 'timestamp';
276
- }
277
- }
278
-
279
225
  interface PriceData {
280
226
  /**
281
227
  * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
@@ -378,56 +324,12 @@ declare module 'stripe' {
378
324
  */
379
325
  discount?: string;
380
326
 
381
- /**
382
- * Details to determine how long the discount should be applied for.
383
- */
384
- discount_end?: Discount.DiscountEnd;
385
-
386
327
  /**
387
328
  * ID of the promotion code to create a new discount for.
388
329
  */
389
330
  promotion_code?: string;
390
331
  }
391
332
 
392
- namespace Discount {
393
- interface DiscountEnd {
394
- /**
395
- * Time span for the redeemed discount.
396
- */
397
- duration?: DiscountEnd.Duration;
398
-
399
- /**
400
- * A precise Unix timestamp for the discount to end. Must be in the future.
401
- */
402
- timestamp?: number;
403
-
404
- /**
405
- * The type of calculation made to determine when the discount ends.
406
- */
407
- type: DiscountEnd.Type;
408
- }
409
-
410
- namespace DiscountEnd {
411
- interface Duration {
412
- /**
413
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
414
- */
415
- interval: Duration.Interval;
416
-
417
- /**
418
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
419
- */
420
- interval_count: number;
421
- }
422
-
423
- namespace Duration {
424
- type Interval = 'day' | 'month' | 'week' | 'year';
425
- }
426
-
427
- type Type = 'duration' | 'timestamp';
428
- }
429
- }
430
-
431
333
  interface InvoiceSettings {
432
334
  /**
433
335
  * The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
@@ -493,11 +395,6 @@ declare module 'stripe' {
493
395
  * A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
494
396
  */
495
397
  tax_rates?: Stripe.Emptyable<Array<string>>;
496
-
497
- /**
498
- * Define options to configure the trial on the subscription item.
499
- */
500
- trial?: Item.Trial;
501
398
  }
502
399
 
503
400
  namespace Item {
@@ -512,56 +409,12 @@ declare module 'stripe' {
512
409
  */
513
410
  discount?: string;
514
411
 
515
- /**
516
- * Details to determine how long the discount should be applied for.
517
- */
518
- discount_end?: Discount.DiscountEnd;
519
-
520
412
  /**
521
413
  * ID of the promotion code to create a new discount for.
522
414
  */
523
415
  promotion_code?: string;
524
416
  }
525
417
 
526
- namespace Discount {
527
- interface DiscountEnd {
528
- /**
529
- * Time span for the redeemed discount.
530
- */
531
- duration?: DiscountEnd.Duration;
532
-
533
- /**
534
- * A precise Unix timestamp for the discount to end. Must be in the future.
535
- */
536
- timestamp?: number;
537
-
538
- /**
539
- * The type of calculation made to determine when the discount ends.
540
- */
541
- type: DiscountEnd.Type;
542
- }
543
-
544
- namespace DiscountEnd {
545
- interface Duration {
546
- /**
547
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
548
- */
549
- interval: Duration.Interval;
550
-
551
- /**
552
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
553
- */
554
- interval_count: number;
555
- }
556
-
557
- namespace Duration {
558
- type Interval = 'day' | 'month' | 'week' | 'year';
559
- }
560
-
561
- type Type = 'duration' | 'timestamp';
562
- }
563
- }
564
-
565
418
  interface PriceData {
566
419
  /**
567
420
  * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
@@ -613,22 +466,6 @@ declare module 'stripe' {
613
466
 
614
467
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
615
468
  }
616
-
617
- interface Trial {
618
- /**
619
- * List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
620
- */
621
- converts_to?: Array<string>;
622
-
623
- /**
624
- * Determines the type of trial for this item.
625
- */
626
- type: Trial.Type;
627
- }
628
-
629
- namespace Trial {
630
- type Type = 'free' | 'paid';
631
- }
632
469
  }
633
470
 
634
471
  type PaymentBehavior =
@@ -680,13 +517,6 @@ declare module 'stripe' {
680
517
  PaymentMethodOptions.CustomerBalance
681
518
  >;
682
519
 
683
- /**
684
- * This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
685
- */
686
- id_bank_transfer?: Stripe.Emptyable<
687
- PaymentMethodOptions.IdBankTransfer
688
- >;
689
-
690
520
  /**
691
521
  * This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
692
522
  */
@@ -836,8 +666,6 @@ declare module 'stripe' {
836
666
  }
837
667
  }
838
668
 
839
- interface IdBankTransfer {}
840
-
841
669
  interface Konbini {}
842
670
 
843
671
  interface SepaDebit {}
@@ -878,11 +706,6 @@ declare module 'stripe' {
878
706
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
879
707
  */
880
708
  account_subcategories?: Array<Filters.AccountSubcategory>;
881
-
882
- /**
883
- * ID of the institution to use to filter for selectable accounts.
884
- */
885
- institution?: string;
886
709
  }
887
710
 
888
711
  namespace Filters {
@@ -895,11 +718,7 @@ declare module 'stripe' {
895
718
  | 'payment_method'
896
719
  | 'transactions';
897
720
 
898
- type Prefetch =
899
- | 'balances'
900
- | 'inferred_balances'
901
- | 'ownership'
902
- | 'transactions';
721
+ type Prefetch = 'balances' | 'ownership' | 'transactions';
903
722
  }
904
723
 
905
724
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -910,6 +729,7 @@ declare module 'stripe' {
910
729
  | 'ach_credit_transfer'
911
730
  | 'ach_debit'
912
731
  | 'acss_debit'
732
+ | 'affirm'
913
733
  | 'amazon_pay'
914
734
  | 'au_becs_debit'
915
735
  | 'bacs_debit'
@@ -917,13 +737,11 @@ declare module 'stripe' {
917
737
  | 'boleto'
918
738
  | 'card'
919
739
  | 'cashapp'
920
- | 'custom'
921
740
  | 'customer_balance'
922
741
  | 'eps'
923
742
  | 'fpx'
924
743
  | 'giropay'
925
744
  | 'grabpay'
926
- | 'id_bank_transfer'
927
745
  | 'ideal'
928
746
  | 'jp_credit_transfer'
929
747
  | 'kakao_pay'
@@ -943,7 +761,6 @@ declare module 'stripe' {
943
761
  | 'sepa_credit_transfer'
944
762
  | 'sepa_debit'
945
763
  | 'sofort'
946
- | 'stripe_balance'
947
764
  | 'swish'
948
765
  | 'us_bank_account'
949
766
  | 'wechat_pay';
@@ -967,22 +784,6 @@ declare module 'stripe' {
967
784
  type Interval = 'day' | 'month' | 'week' | 'year';
968
785
  }
969
786
 
970
- interface Prebilling {
971
- /**
972
- * This is used to determine the number of billing cycles to prebill.
973
- */
974
- iterations: number;
975
-
976
- /**
977
- * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
978
- */
979
- update_behavior?: Prebilling.UpdateBehavior;
980
- }
981
-
982
- namespace Prebilling {
983
- type UpdateBehavior = 'prebill' | 'reset';
984
- }
985
-
986
787
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
987
788
 
988
789
  interface TransferData {
@@ -1156,11 +957,6 @@ declare module 'stripe' {
1156
957
  SubscriptionUpdateParams.PendingInvoiceItemInterval
1157
958
  >;
1158
959
 
1159
- /**
1160
- * If specified, the invoicing for the given billing cycle iterations will be processed now.
1161
- */
1162
- prebilling?: SubscriptionUpdateParams.Prebilling;
1163
-
1164
960
  /**
1165
961
  * Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
1166
962
  */
@@ -1232,56 +1028,12 @@ declare module 'stripe' {
1232
1028
  */
1233
1029
  discount?: string;
1234
1030
 
1235
- /**
1236
- * Details to determine how long the discount should be applied for.
1237
- */
1238
- discount_end?: Discount.DiscountEnd;
1239
-
1240
1031
  /**
1241
1032
  * ID of the promotion code to create a new discount for.
1242
1033
  */
1243
1034
  promotion_code?: string;
1244
1035
  }
1245
1036
 
1246
- namespace Discount {
1247
- interface DiscountEnd {
1248
- /**
1249
- * Time span for the redeemed discount.
1250
- */
1251
- duration?: DiscountEnd.Duration;
1252
-
1253
- /**
1254
- * A precise Unix timestamp for the discount to end. Must be in the future.
1255
- */
1256
- timestamp?: number;
1257
-
1258
- /**
1259
- * The type of calculation made to determine when the discount ends.
1260
- */
1261
- type: DiscountEnd.Type;
1262
- }
1263
-
1264
- namespace DiscountEnd {
1265
- interface Duration {
1266
- /**
1267
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1268
- */
1269
- interval: Duration.Interval;
1270
-
1271
- /**
1272
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1273
- */
1274
- interval_count: number;
1275
- }
1276
-
1277
- namespace Duration {
1278
- type Interval = 'day' | 'month' | 'week' | 'year';
1279
- }
1280
-
1281
- type Type = 'duration' | 'timestamp';
1282
- }
1283
- }
1284
-
1285
1037
  interface PriceData {
1286
1038
  /**
1287
1039
  * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
@@ -1383,56 +1135,12 @@ declare module 'stripe' {
1383
1135
  */
1384
1136
  discount?: string;
1385
1137
 
1386
- /**
1387
- * Details to determine how long the discount should be applied for.
1388
- */
1389
- discount_end?: Discount.DiscountEnd;
1390
-
1391
1138
  /**
1392
1139
  * ID of the promotion code to create a new discount for.
1393
1140
  */
1394
1141
  promotion_code?: string;
1395
1142
  }
1396
1143
 
1397
- namespace Discount {
1398
- interface DiscountEnd {
1399
- /**
1400
- * Time span for the redeemed discount.
1401
- */
1402
- duration?: DiscountEnd.Duration;
1403
-
1404
- /**
1405
- * A precise Unix timestamp for the discount to end. Must be in the future.
1406
- */
1407
- timestamp?: number;
1408
-
1409
- /**
1410
- * The type of calculation made to determine when the discount ends.
1411
- */
1412
- type: DiscountEnd.Type;
1413
- }
1414
-
1415
- namespace DiscountEnd {
1416
- interface Duration {
1417
- /**
1418
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1419
- */
1420
- interval: Duration.Interval;
1421
-
1422
- /**
1423
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1424
- */
1425
- interval_count: number;
1426
- }
1427
-
1428
- namespace Duration {
1429
- type Interval = 'day' | 'month' | 'week' | 'year';
1430
- }
1431
-
1432
- type Type = 'duration' | 'timestamp';
1433
- }
1434
- }
1435
-
1436
1144
  interface InvoiceSettings {
1437
1145
  /**
1438
1146
  * The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
@@ -1527,56 +1235,12 @@ declare module 'stripe' {
1527
1235
  */
1528
1236
  discount?: string;
1529
1237
 
1530
- /**
1531
- * Details to determine how long the discount should be applied for.
1532
- */
1533
- discount_end?: Discount.DiscountEnd;
1534
-
1535
1238
  /**
1536
1239
  * ID of the promotion code to create a new discount for.
1537
1240
  */
1538
1241
  promotion_code?: string;
1539
1242
  }
1540
1243
 
1541
- namespace Discount {
1542
- interface DiscountEnd {
1543
- /**
1544
- * Time span for the redeemed discount.
1545
- */
1546
- duration?: DiscountEnd.Duration;
1547
-
1548
- /**
1549
- * A precise Unix timestamp for the discount to end. Must be in the future.
1550
- */
1551
- timestamp?: number;
1552
-
1553
- /**
1554
- * The type of calculation made to determine when the discount ends.
1555
- */
1556
- type: DiscountEnd.Type;
1557
- }
1558
-
1559
- namespace DiscountEnd {
1560
- interface Duration {
1561
- /**
1562
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1563
- */
1564
- interval: Duration.Interval;
1565
-
1566
- /**
1567
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1568
- */
1569
- interval_count: number;
1570
- }
1571
-
1572
- namespace Duration {
1573
- type Interval = 'day' | 'month' | 'week' | 'year';
1574
- }
1575
-
1576
- type Type = 'duration' | 'timestamp';
1577
- }
1578
- }
1579
-
1580
1244
  interface PriceData {
1581
1245
  /**
1582
1246
  * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
@@ -1695,13 +1359,6 @@ declare module 'stripe' {
1695
1359
  PaymentMethodOptions.CustomerBalance
1696
1360
  >;
1697
1361
 
1698
- /**
1699
- * This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
1700
- */
1701
- id_bank_transfer?: Stripe.Emptyable<
1702
- PaymentMethodOptions.IdBankTransfer
1703
- >;
1704
-
1705
1362
  /**
1706
1363
  * This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
1707
1364
  */
@@ -1851,8 +1508,6 @@ declare module 'stripe' {
1851
1508
  }
1852
1509
  }
1853
1510
 
1854
- interface IdBankTransfer {}
1855
-
1856
1511
  interface Konbini {}
1857
1512
 
1858
1513
  interface SepaDebit {}
@@ -1893,11 +1548,6 @@ declare module 'stripe' {
1893
1548
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1894
1549
  */
1895
1550
  account_subcategories?: Array<Filters.AccountSubcategory>;
1896
-
1897
- /**
1898
- * ID of the institution to use to filter for selectable accounts.
1899
- */
1900
- institution?: string;
1901
1551
  }
1902
1552
 
1903
1553
  namespace Filters {
@@ -1910,11 +1560,7 @@ declare module 'stripe' {
1910
1560
  | 'payment_method'
1911
1561
  | 'transactions';
1912
1562
 
1913
- type Prefetch =
1914
- | 'balances'
1915
- | 'inferred_balances'
1916
- | 'ownership'
1917
- | 'transactions';
1563
+ type Prefetch = 'balances' | 'ownership' | 'transactions';
1918
1564
  }
1919
1565
 
1920
1566
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -1925,6 +1571,7 @@ declare module 'stripe' {
1925
1571
  | 'ach_credit_transfer'
1926
1572
  | 'ach_debit'
1927
1573
  | 'acss_debit'
1574
+ | 'affirm'
1928
1575
  | 'amazon_pay'
1929
1576
  | 'au_becs_debit'
1930
1577
  | 'bacs_debit'
@@ -1932,13 +1579,11 @@ declare module 'stripe' {
1932
1579
  | 'boleto'
1933
1580
  | 'card'
1934
1581
  | 'cashapp'
1935
- | 'custom'
1936
1582
  | 'customer_balance'
1937
1583
  | 'eps'
1938
1584
  | 'fpx'
1939
1585
  | 'giropay'
1940
1586
  | 'grabpay'
1941
- | 'id_bank_transfer'
1942
1587
  | 'ideal'
1943
1588
  | 'jp_credit_transfer'
1944
1589
  | 'kakao_pay'
@@ -1958,7 +1603,6 @@ declare module 'stripe' {
1958
1603
  | 'sepa_credit_transfer'
1959
1604
  | 'sepa_debit'
1960
1605
  | 'sofort'
1961
- | 'stripe_balance'
1962
1606
  | 'swish'
1963
1607
  | 'us_bank_account'
1964
1608
  | 'wechat_pay';
@@ -1982,22 +1626,6 @@ declare module 'stripe' {
1982
1626
  type Interval = 'day' | 'month' | 'week' | 'year';
1983
1627
  }
1984
1628
 
1985
- interface Prebilling {
1986
- /**
1987
- * This is used to determine the number of billing cycles to prebill.
1988
- */
1989
- iterations: number;
1990
-
1991
- /**
1992
- * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1993
- */
1994
- update_behavior?: Prebilling.UpdateBehavior;
1995
- }
1996
-
1997
- namespace Prebilling {
1998
- type UpdateBehavior = 'prebill' | 'reset';
1999
- }
2000
-
2001
1629
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
2002
1630
 
2003
1631
  interface TransferData {
@@ -2064,11 +1692,6 @@ declare module 'stripe' {
2064
1692
  */
2065
1693
  customer?: string;
2066
1694
 
2067
- /**
2068
- * The ID of the account whose subscriptions will be retrieved.
2069
- */
2070
- customer_account?: string;
2071
-
2072
1695
  /**
2073
1696
  * Specifies which fields in the response should be expanded.
2074
1697
  */
@@ -2229,10 +1852,7 @@ declare module 'stripe' {
2229
1852
  * Schedules provide the flexibility to model more complex billing configurations that change over time.
2230
1853
  */
2231
1854
  create(
2232
- params?: SubscriptionCreateParams,
2233
- options?: RequestOptions
2234
- ): Promise<Stripe.Response<Stripe.Subscription>>;
2235
- create(
1855
+ params: SubscriptionCreateParams,
2236
1856
  options?: RequestOptions
2237
1857
  ): Promise<Stripe.Response<Stripe.Subscription>>;
2238
1858
 
@@ -2290,7 +1910,7 @@ declare module 'stripe' {
2290
1910
  /**
2291
1911
  * Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata).
2292
1912
  *
2293
- * Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed.
1913
+ * Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true.
2294
1914
  *
2295
1915
  * By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
2296
1916
  */