stripe 18.3.0-beta.1 → 18.3.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 (296) hide show
  1. package/CHANGELOG.md +59 -1246
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +0 -1
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +1 -91
  6. package/cjs/RequestSender.js +1 -1
  7. package/cjs/apiVersion.js +3 -2
  8. package/cjs/resources/FinancialConnections/Accounts.js +0 -5
  9. package/cjs/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +4 -4
  10. package/cjs/resources/PaymentIntents.js +0 -13
  11. package/cjs/resources/Quotes.js +0 -32
  12. package/cjs/resources/SubscriptionSchedules.js +0 -4
  13. package/cjs/resources.js +10 -98
  14. package/cjs/stripe.core.js +1 -1
  15. package/esm/Error.js +0 -79
  16. package/esm/RequestSender.js +1 -1
  17. package/esm/apiVersion.js +2 -1
  18. package/esm/resources/FinancialConnections/Accounts.js +0 -5
  19. package/esm/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +3 -3
  20. package/esm/resources/PaymentIntents.js +0 -13
  21. package/esm/resources/Quotes.js +0 -32
  22. package/esm/resources/SubscriptionSchedules.js +0 -4
  23. package/esm/resources.js +1 -82
  24. package/esm/stripe.core.js +1 -1
  25. package/package.json +1 -1
  26. package/types/AccountLinksResource.d.ts +1 -5
  27. package/types/AccountSessions.d.ts +31 -76
  28. package/types/AccountSessionsResource.d.ts +48 -312
  29. package/types/Accounts.d.ts +30 -213
  30. package/types/AccountsResource.d.ts +85 -540
  31. package/types/Billing/CreditBalanceSummary.d.ts +0 -5
  32. package/types/Billing/CreditBalanceSummaryResource.d.ts +3 -8
  33. package/types/Billing/CreditBalanceTransactionsResource.d.ts +4 -12
  34. package/types/Billing/CreditGrants.d.ts +0 -5
  35. package/types/Billing/CreditGrantsResource.d.ts +1 -11
  36. package/types/BillingPortal/Sessions.d.ts +1 -6
  37. package/types/BillingPortal/SessionsResource.d.ts +5 -13
  38. package/types/Cards.d.ts +0 -5
  39. package/types/CashBalances.d.ts +0 -5
  40. package/types/Charges.d.ts +52 -182
  41. package/types/ChargesResource.d.ts +0 -1406
  42. package/types/Checkout/Sessions.d.ts +1 -314
  43. package/types/Checkout/SessionsResource.d.ts +62 -340
  44. package/types/ConfirmationTokens.d.ts +22 -136
  45. package/types/Coupons.d.ts +0 -33
  46. package/types/CouponsResource.d.ts +0 -21
  47. package/types/CreditNoteLineItems.d.ts +0 -17
  48. package/types/CreditNotes.d.ts +0 -5
  49. package/types/CreditNotesResource.d.ts +9 -14
  50. package/types/CustomerBalanceTransactions.d.ts +0 -2
  51. package/types/CustomerCashBalanceTransactions.d.ts +0 -2
  52. package/types/CustomerSessions.d.ts +1 -6
  53. package/types/CustomerSessionsResource.d.ts +2 -7
  54. package/types/Customers.d.ts +0 -2
  55. package/types/CustomersResource.d.ts +1 -8
  56. package/types/Discounts.d.ts +0 -10
  57. package/types/Disputes.d.ts +6 -2
  58. package/types/Errors.d.ts +2 -69
  59. package/types/EventTypes.d.ts +0 -664
  60. package/types/Events.d.ts +1 -98
  61. package/types/FinancialConnections/Accounts.d.ts +1 -36
  62. package/types/FinancialConnections/AccountsResource.d.ts +3 -40
  63. package/types/FinancialConnections/Sessions.d.ts +1 -51
  64. package/types/FinancialConnections/SessionsResource.d.ts +1 -43
  65. package/types/Identity/VerificationSessions.d.ts +33 -4
  66. package/types/Identity/VerificationSessionsResource.d.ts +14 -4
  67. package/types/InvoiceItems.d.ts +1 -14
  68. package/types/InvoiceItemsResource.d.ts +6 -117
  69. package/types/InvoiceLineItems.d.ts +1 -45
  70. package/types/InvoicePayments.d.ts +0 -5
  71. package/types/InvoicePaymentsResource.d.ts +74 -0
  72. package/types/Invoices.d.ts +4 -133
  73. package/types/InvoicesResource.d.ts +37 -1446
  74. package/types/Issuing/CardholdersResource.d.ts +1 -2
  75. package/types/Issuing/Transactions.d.ts +0 -5
  76. package/types/Issuing/TransactionsResource.d.ts +0 -5
  77. package/types/LineItems.d.ts +0 -49
  78. package/types/Mandates.d.ts +4 -77
  79. package/types/PaymentIntents.d.ts +35 -770
  80. package/types/PaymentIntentsResource.d.ts +4268 -8619
  81. package/types/PaymentLinks.d.ts +0 -6
  82. package/types/PaymentLinksResource.d.ts +0 -12
  83. package/types/PaymentMethodConfigurations.d.ts +0 -180
  84. package/types/PaymentMethodConfigurationsResource.d.ts +0 -250
  85. package/types/PaymentMethods.d.ts +16 -134
  86. package/types/PaymentMethodsResource.d.ts +12 -167
  87. package/types/Payouts.d.ts +0 -5
  88. package/types/PayoutsResource.d.ts +0 -5
  89. package/types/Prices.d.ts +0 -22
  90. package/types/PricesResource.d.ts +0 -22
  91. package/types/PromotionCodes.d.ts +0 -5
  92. package/types/PromotionCodesResource.d.ts +0 -10
  93. package/types/Quotes.d.ts +8 -592
  94. package/types/QuotesResource.d.ts +278 -2617
  95. package/types/Refunds.d.ts +0 -14
  96. package/types/SetupAttempts.d.ts +4 -48
  97. package/types/SetupIntents.d.ts +17 -119
  98. package/types/SetupIntentsResource.d.ts +413 -660
  99. package/types/Sources.d.ts +0 -29
  100. package/types/SubscriptionItems.d.ts +0 -30
  101. package/types/SubscriptionItemsResource.d.ts +0 -109
  102. package/types/SubscriptionSchedules.d.ts +16 -207
  103. package/types/SubscriptionSchedulesResource.d.ts +14 -1236
  104. package/types/Subscriptions.d.ts +15 -108
  105. package/types/SubscriptionsResource.d.ts +30 -402
  106. package/types/Tax/Registrations.d.ts +9 -0
  107. package/types/Tax/RegistrationsResource.d.ts +12 -0
  108. package/types/TaxIds.d.ts +0 -10
  109. package/types/TaxIdsResource.d.ts +0 -10
  110. package/types/Terminal/Configurations.d.ts +1 -0
  111. package/types/Terminal/LocationsResource.d.ts +1 -1
  112. package/types/Terminal/Readers.d.ts +6 -26
  113. package/types/Terminal/ReadersResource.d.ts +4 -4
  114. package/types/TestHelpers/ConfirmationTokensResource.d.ts +15 -128
  115. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
  116. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
  117. package/types/TokensResource.d.ts +3 -0
  118. package/types/Transfers.d.ts +0 -5
  119. package/types/TransfersResource.d.ts +0 -5
  120. package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
  121. package/types/Treasury/FinancialAccounts.d.ts +0 -5
  122. package/types/Treasury/FinancialAccountsResource.d.ts +9 -37
  123. package/types/Treasury/OutboundTransfers.d.ts +0 -26
  124. package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
  125. package/types/Treasury/ReceivedCredits.d.ts +0 -26
  126. package/types/Treasury/ReceivedDebits.d.ts +0 -31
  127. package/types/V2/EventTypes.d.ts +4 -906
  128. package/types/WebhookEndpointsResource.d.ts +2 -79
  129. package/types/index.d.ts +6 -142
  130. package/types/lib.d.ts +11 -11
  131. package/types/test/typescriptTest.ts +3 -3
  132. package/cjs/resources/AccountNotices.js +0 -21
  133. package/cjs/resources/BalanceSettings.js +0 -10
  134. package/cjs/resources/Capital/FinancingOffers.js +0 -21
  135. package/cjs/resources/Capital/FinancingSummary.js +0 -12
  136. package/cjs/resources/Capital/FinancingTransactions.js +0 -17
  137. package/cjs/resources/ExternalAccounts.js +0 -23
  138. package/cjs/resources/FinancialConnections/Institutions.js +0 -17
  139. package/cjs/resources/FxQuotes.js +0 -15
  140. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
  141. package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
  142. package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
  143. package/cjs/resources/Margins.js +0 -22
  144. package/cjs/resources/Orders.js +0 -24
  145. package/cjs/resources/PaymentRecords.js +0 -29
  146. package/cjs/resources/Privacy/RedactionJobs.js +0 -42
  147. package/cjs/resources/Tax/Associations.js +0 -9
  148. package/cjs/resources/Tax/Forms.js +0 -20
  149. package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
  150. package/cjs/resources/V2/Core/AccountLinks.js +0 -9
  151. package/cjs/resources/V2/Core/Accounts/Persons.js +0 -29
  152. package/cjs/resources/V2/Core/Accounts.js +0 -25
  153. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +0 -28
  154. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +0 -24
  155. package/cjs/resources/V2/MoneyManagement/Adjustments.js +0 -17
  156. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +0 -17
  157. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +0 -21
  158. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +0 -21
  159. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -16
  160. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +0 -25
  161. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -29
  162. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +0 -25
  163. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +0 -25
  164. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -12
  165. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +0 -17
  166. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +0 -17
  167. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +0 -17
  168. package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
  169. package/cjs/resources/V2/Payments/OffSessionPayments.js +0 -25
  170. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
  171. package/esm/resources/AccountNotices.js +0 -18
  172. package/esm/resources/BalanceSettings.js +0 -7
  173. package/esm/resources/Capital/FinancingOffers.js +0 -18
  174. package/esm/resources/Capital/FinancingSummary.js +0 -9
  175. package/esm/resources/Capital/FinancingTransactions.js +0 -14
  176. package/esm/resources/ExternalAccounts.js +0 -20
  177. package/esm/resources/FinancialConnections/Institutions.js +0 -14
  178. package/esm/resources/FxQuotes.js +0 -12
  179. package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
  180. package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
  181. package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
  182. package/esm/resources/Margins.js +0 -19
  183. package/esm/resources/Orders.js +0 -21
  184. package/esm/resources/PaymentRecords.js +0 -26
  185. package/esm/resources/Privacy/RedactionJobs.js +0 -39
  186. package/esm/resources/Tax/Associations.js +0 -6
  187. package/esm/resources/Tax/Forms.js +0 -17
  188. package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
  189. package/esm/resources/V2/Core/AccountLinks.js +0 -6
  190. package/esm/resources/V2/Core/Accounts/Persons.js +0 -26
  191. package/esm/resources/V2/Core/Accounts.js +0 -22
  192. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +0 -25
  193. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +0 -21
  194. package/esm/resources/V2/MoneyManagement/Adjustments.js +0 -14
  195. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +0 -14
  196. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +0 -18
  197. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +0 -18
  198. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -13
  199. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +0 -22
  200. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -26
  201. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +0 -22
  202. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +0 -22
  203. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -9
  204. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +0 -14
  205. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +0 -14
  206. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +0 -14
  207. package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
  208. package/esm/resources/V2/Payments/OffSessionPayments.js +0 -22
  209. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
  210. package/types/AccountNotices.d.ts +0 -113
  211. package/types/AccountNoticesResource.d.ts +0 -98
  212. package/types/BalanceSettings.d.ts +0 -89
  213. package/types/BalanceSettingsResource.d.ts +0 -108
  214. package/types/Capital/FinancingOffers.d.ts +0 -188
  215. package/types/Capital/FinancingOffersResource.d.ts +0 -97
  216. package/types/Capital/FinancingSummary.d.ts +0 -106
  217. package/types/Capital/FinancingSummaryResource.d.ts +0 -27
  218. package/types/Capital/FinancingTransactions.d.ts +0 -135
  219. package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
  220. package/types/ExternalAccountsResource.d.ts +0 -304
  221. package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
  222. package/types/FinancialConnections/Institutions.d.ts +0 -98
  223. package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
  224. package/types/FxQuotes.d.ts +0 -153
  225. package/types/FxQuotesResource.d.ts +0 -130
  226. package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
  227. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
  228. package/types/Issuing/DisputeSettlementDetails.d.ts +0 -85
  229. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
  230. package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
  231. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
  232. package/types/Issuing/Settlements.d.ts +0 -113
  233. package/types/Margins.d.ts +0 -56
  234. package/types/MarginsResource.d.ts +0 -114
  235. package/types/Orders.d.ts +0 -1159
  236. package/types/OrdersResource.d.ts +0 -2967
  237. package/types/PaymentAttemptRecords.d.ts +0 -2132
  238. package/types/PaymentAttemptRecordsResource.d.ts +0 -47
  239. package/types/PaymentIntentAmountDetailsLineItems.d.ts +0 -116
  240. package/types/PaymentRecords.d.ts +0 -2125
  241. package/types/PaymentRecordsResource.d.ts +0 -455
  242. package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -60
  243. package/types/Privacy/RedactionJobs.d.ts +0 -111
  244. package/types/Privacy/RedactionJobsResource.d.ts +0 -230
  245. package/types/QuoteLines.d.ts +0 -634
  246. package/types/QuotePreviewInvoices.d.ts +0 -1695
  247. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -831
  248. package/types/Tax/Associations.d.ts +0 -82
  249. package/types/Tax/AssociationsResource.d.ts +0 -29
  250. package/types/Tax/Forms.d.ts +0 -220
  251. package/types/Tax/FormsResource.d.ts +0 -107
  252. package/types/Terminal/ReaderCollectedData.d.ts +0 -51
  253. package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
  254. package/types/V2/Core/AccountLinks.d.ts +0 -106
  255. package/types/V2/Core/AccountLinksResource.d.ts +0 -90
  256. package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -3770
  257. package/types/V2/Core/Accounts.d.ts +0 -8169
  258. package/types/V2/Core/AccountsResource.d.ts +0 -10203
  259. package/types/V2/Core/Persons.d.ts +0 -1867
  260. package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -160
  261. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -172
  262. package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -70
  263. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -123
  264. package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -27
  265. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -32
  266. package/types/V2/MoneyManagement/Adjustments.d.ts +0 -110
  267. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
  268. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -546
  269. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -52
  270. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -314
  271. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -288
  272. package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -206
  273. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
  274. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -168
  275. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -115
  276. package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -278
  277. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
  278. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -97
  279. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
  280. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -251
  281. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -207
  282. package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -151
  283. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +0 -41
  284. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +0 -87
  285. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +0 -113
  286. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +0 -243
  287. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
  288. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -176
  289. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
  290. package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -155
  291. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
  292. package/types/V2/MoneyManagement/Transactions.d.ts +0 -170
  293. package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
  294. package/types/V2/Payments/OffSessionPayments.d.ts +0 -167
  295. package/types/V2/Payments/OffSessionPaymentsResource.d.ts +0 -159
  296. 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
  */
@@ -14,12 +19,12 @@ declare module 'stripe' {
14
19
  application_fee_percent?: Stripe.Emptyable<number>;
15
20
 
16
21
  /**
17
- * Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
22
+ * Automatic tax settings for this subscription.
18
23
  */
19
24
  automatic_tax?: SubscriptionCreateParams.AutomaticTax;
20
25
 
21
26
  /**
22
- * For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
27
+ * A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
23
28
  */
24
29
  backdate_start_date?: number;
25
30
 
@@ -48,10 +53,10 @@ declare module 'stripe' {
48
53
  /**
49
54
  * A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
50
55
  */
51
- cancel_at?: number | SubscriptionCreateParams.CancelAt;
56
+ cancel_at?: number;
52
57
 
53
58
  /**
54
- * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
59
+ * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
55
60
  */
56
61
  cancel_at_period_end?: boolean;
57
62
 
@@ -65,16 +70,6 @@ declare module 'stripe' {
65
70
  */
66
71
  currency?: string;
67
72
 
68
- /**
69
- * The identifier of the customer to subscribe.
70
- */
71
- customer?: string;
72
-
73
- /**
74
- * The identifier of the account to subscribe.
75
- */
76
- customer_account?: string;
77
-
78
73
  /**
79
74
  * 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`.
80
75
  */
@@ -162,11 +157,6 @@ declare module 'stripe' {
162
157
  SubscriptionCreateParams.PendingInvoiceItemInterval
163
158
  >;
164
159
 
165
- /**
166
- * If specified, the invoicing for the given billing cycle iterations will be processed now.
167
- */
168
- prebilling?: SubscriptionCreateParams.Prebilling;
169
-
170
160
  /**
171
161
  * 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`.
172
162
  */
@@ -238,56 +228,12 @@ declare module 'stripe' {
238
228
  */
239
229
  discount?: string;
240
230
 
241
- /**
242
- * Details to determine how long the discount should be applied for.
243
- */
244
- discount_end?: Discount.DiscountEnd;
245
-
246
231
  /**
247
232
  * ID of the promotion code to create a new discount for.
248
233
  */
249
234
  promotion_code?: string;
250
235
  }
251
236
 
252
- namespace Discount {
253
- interface DiscountEnd {
254
- /**
255
- * Time span for the redeemed discount.
256
- */
257
- duration?: DiscountEnd.Duration;
258
-
259
- /**
260
- * A precise Unix timestamp for the discount to end. Must be in the future.
261
- */
262
- timestamp?: number;
263
-
264
- /**
265
- * The type of calculation made to determine when the discount ends.
266
- */
267
- type: DiscountEnd.Type;
268
- }
269
-
270
- namespace DiscountEnd {
271
- interface Duration {
272
- /**
273
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
274
- */
275
- interval: Duration.Interval;
276
-
277
- /**
278
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
279
- */
280
- interval_count: number;
281
- }
282
-
283
- namespace Duration {
284
- type Interval = 'day' | 'month' | 'week' | 'year';
285
- }
286
-
287
- type Type = 'duration' | 'timestamp';
288
- }
289
- }
290
-
291
237
  interface PriceData {
292
238
  /**
293
239
  * 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).
@@ -377,7 +323,13 @@ declare module 'stripe' {
377
323
  second?: number;
378
324
  }
379
325
 
380
- type BillingMode = 'classic' | 'flexible';
326
+ interface BillingMode {
327
+ type: BillingMode.Type;
328
+ }
329
+
330
+ namespace BillingMode {
331
+ type Type = 'classic' | 'flexible';
332
+ }
381
333
 
382
334
  interface BillingThresholds {
383
335
  /**
@@ -391,8 +343,6 @@ declare module 'stripe' {
391
343
  reset_billing_cycle_anchor?: boolean;
392
344
  }
393
345
 
394
- type CancelAt = 'max_period_end' | 'min_period_end';
395
-
396
346
  type CollectionMethod = 'charge_automatically' | 'send_invoice';
397
347
 
398
348
  interface Discount {
@@ -406,56 +356,12 @@ declare module 'stripe' {
406
356
  */
407
357
  discount?: string;
408
358
 
409
- /**
410
- * Details to determine how long the discount should be applied for.
411
- */
412
- discount_end?: Discount.DiscountEnd;
413
-
414
359
  /**
415
360
  * ID of the promotion code to create a new discount for.
416
361
  */
417
362
  promotion_code?: string;
418
363
  }
419
364
 
420
- namespace Discount {
421
- interface DiscountEnd {
422
- /**
423
- * Time span for the redeemed discount.
424
- */
425
- duration?: DiscountEnd.Duration;
426
-
427
- /**
428
- * A precise Unix timestamp for the discount to end. Must be in the future.
429
- */
430
- timestamp?: number;
431
-
432
- /**
433
- * The type of calculation made to determine when the discount ends.
434
- */
435
- type: DiscountEnd.Type;
436
- }
437
-
438
- namespace DiscountEnd {
439
- interface Duration {
440
- /**
441
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
442
- */
443
- interval: Duration.Interval;
444
-
445
- /**
446
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
447
- */
448
- interval_count: number;
449
- }
450
-
451
- namespace Duration {
452
- type Interval = 'day' | 'month' | 'week' | 'year';
453
- }
454
-
455
- type Type = 'duration' | 'timestamp';
456
- }
457
- }
458
-
459
365
  interface InvoiceSettings {
460
366
  /**
461
367
  * The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
@@ -526,11 +432,6 @@ declare module 'stripe' {
526
432
  * 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.
527
433
  */
528
434
  tax_rates?: Stripe.Emptyable<Array<string>>;
529
-
530
- /**
531
- * Define options to configure the trial on the subscription item.
532
- */
533
- trial?: Item.Trial;
534
435
  }
535
436
 
536
437
  namespace Item {
@@ -552,56 +453,12 @@ declare module 'stripe' {
552
453
  */
553
454
  discount?: string;
554
455
 
555
- /**
556
- * Details to determine how long the discount should be applied for.
557
- */
558
- discount_end?: Discount.DiscountEnd;
559
-
560
456
  /**
561
457
  * ID of the promotion code to create a new discount for.
562
458
  */
563
459
  promotion_code?: string;
564
460
  }
565
461
 
566
- namespace Discount {
567
- interface DiscountEnd {
568
- /**
569
- * Time span for the redeemed discount.
570
- */
571
- duration?: DiscountEnd.Duration;
572
-
573
- /**
574
- * A precise Unix timestamp for the discount to end. Must be in the future.
575
- */
576
- timestamp?: number;
577
-
578
- /**
579
- * The type of calculation made to determine when the discount ends.
580
- */
581
- type: DiscountEnd.Type;
582
- }
583
-
584
- namespace DiscountEnd {
585
- interface Duration {
586
- /**
587
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
588
- */
589
- interval: Duration.Interval;
590
-
591
- /**
592
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
593
- */
594
- interval_count: number;
595
- }
596
-
597
- namespace Duration {
598
- type Interval = 'day' | 'month' | 'week' | 'year';
599
- }
600
-
601
- type Type = 'duration' | 'timestamp';
602
- }
603
- }
604
-
605
462
  interface PriceData {
606
463
  /**
607
464
  * 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).
@@ -653,22 +510,6 @@ declare module 'stripe' {
653
510
 
654
511
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
655
512
  }
656
-
657
- interface Trial {
658
- /**
659
- * 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.
660
- */
661
- converts_to?: Array<string>;
662
-
663
- /**
664
- * Determines the type of trial for this item.
665
- */
666
- type: Trial.Type;
667
- }
668
-
669
- namespace Trial {
670
- type Type = 'free' | 'paid';
671
- }
672
513
  }
673
514
 
674
515
  type PaymentBehavior =
@@ -720,13 +561,6 @@ declare module 'stripe' {
720
561
  PaymentMethodOptions.CustomerBalance
721
562
  >;
722
563
 
723
- /**
724
- * This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
725
- */
726
- id_bank_transfer?: Stripe.Emptyable<
727
- PaymentMethodOptions.IdBankTransfer
728
- >;
729
-
730
564
  /**
731
565
  * This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
732
566
  */
@@ -876,8 +710,6 @@ declare module 'stripe' {
876
710
  }
877
711
  }
878
712
 
879
- interface IdBankTransfer {}
880
-
881
713
  interface Konbini {}
882
714
 
883
715
  interface SepaDebit {}
@@ -918,11 +750,6 @@ declare module 'stripe' {
918
750
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
919
751
  */
920
752
  account_subcategories?: Array<Filters.AccountSubcategory>;
921
-
922
- /**
923
- * ID of the institution to use to filter for selectable accounts.
924
- */
925
- institution?: string;
926
753
  }
927
754
 
928
755
  namespace Filters {
@@ -935,11 +762,7 @@ declare module 'stripe' {
935
762
  | 'payment_method'
936
763
  | 'transactions';
937
764
 
938
- type Prefetch =
939
- | 'balances'
940
- | 'inferred_balances'
941
- | 'ownership'
942
- | 'transactions';
765
+ type Prefetch = 'balances' | 'ownership' | 'transactions';
943
766
  }
944
767
 
945
768
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -958,13 +781,12 @@ declare module 'stripe' {
958
781
  | 'boleto'
959
782
  | 'card'
960
783
  | 'cashapp'
961
- | 'custom'
784
+ | 'crypto'
962
785
  | 'customer_balance'
963
786
  | 'eps'
964
787
  | 'fpx'
965
788
  | 'giropay'
966
789
  | 'grabpay'
967
- | 'id_bank_transfer'
968
790
  | 'ideal'
969
791
  | 'jp_credit_transfer'
970
792
  | 'kakao_pay'
@@ -984,7 +806,6 @@ declare module 'stripe' {
984
806
  | 'sepa_credit_transfer'
985
807
  | 'sepa_debit'
986
808
  | 'sofort'
987
- | 'stripe_balance'
988
809
  | 'swish'
989
810
  | 'us_bank_account'
990
811
  | 'wechat_pay';
@@ -1008,22 +829,6 @@ declare module 'stripe' {
1008
829
  type Interval = 'day' | 'month' | 'week' | 'year';
1009
830
  }
1010
831
 
1011
- interface Prebilling {
1012
- /**
1013
- * This is used to determine the number of billing cycles to prebill.
1014
- */
1015
- iterations: number;
1016
-
1017
- /**
1018
- * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1019
- */
1020
- update_behavior?: Prebilling.UpdateBehavior;
1021
- }
1022
-
1023
- namespace Prebilling {
1024
- type UpdateBehavior = 'prebill' | 'reset';
1025
- }
1026
-
1027
832
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
1028
833
 
1029
834
  interface TransferData {
@@ -1097,10 +902,10 @@ declare module 'stripe' {
1097
902
  /**
1098
903
  * A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
1099
904
  */
1100
- cancel_at?: Stripe.Emptyable<number | SubscriptionUpdateParams.CancelAt>;
905
+ cancel_at?: Stripe.Emptyable<number>;
1101
906
 
1102
907
  /**
1103
- * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
908
+ * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1104
909
  */
1105
910
  cancel_at_period_end?: boolean;
1106
911
 
@@ -1204,11 +1009,6 @@ declare module 'stripe' {
1204
1009
  SubscriptionUpdateParams.PendingInvoiceItemInterval
1205
1010
  >;
1206
1011
 
1207
- /**
1208
- * If specified, the invoicing for the given billing cycle iterations will be processed now.
1209
- */
1210
- prebilling?: SubscriptionUpdateParams.Prebilling;
1211
-
1212
1012
  /**
1213
1013
  * 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`.
1214
1014
  */
@@ -1280,56 +1080,12 @@ declare module 'stripe' {
1280
1080
  */
1281
1081
  discount?: string;
1282
1082
 
1283
- /**
1284
- * Details to determine how long the discount should be applied for.
1285
- */
1286
- discount_end?: Discount.DiscountEnd;
1287
-
1288
1083
  /**
1289
1084
  * ID of the promotion code to create a new discount for.
1290
1085
  */
1291
1086
  promotion_code?: string;
1292
1087
  }
1293
1088
 
1294
- namespace Discount {
1295
- interface DiscountEnd {
1296
- /**
1297
- * Time span for the redeemed discount.
1298
- */
1299
- duration?: DiscountEnd.Duration;
1300
-
1301
- /**
1302
- * A precise Unix timestamp for the discount to end. Must be in the future.
1303
- */
1304
- timestamp?: number;
1305
-
1306
- /**
1307
- * The type of calculation made to determine when the discount ends.
1308
- */
1309
- type: DiscountEnd.Type;
1310
- }
1311
-
1312
- namespace DiscountEnd {
1313
- interface Duration {
1314
- /**
1315
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1316
- */
1317
- interval: Duration.Interval;
1318
-
1319
- /**
1320
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1321
- */
1322
- interval_count: number;
1323
- }
1324
-
1325
- namespace Duration {
1326
- type Interval = 'day' | 'month' | 'week' | 'year';
1327
- }
1328
-
1329
- type Type = 'duration' | 'timestamp';
1330
- }
1331
- }
1332
-
1333
1089
  interface PriceData {
1334
1090
  /**
1335
1091
  * 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).
@@ -1406,8 +1162,6 @@ declare module 'stripe' {
1406
1162
  reset_billing_cycle_anchor?: boolean;
1407
1163
  }
1408
1164
 
1409
- type CancelAt = 'max_period_end' | 'min_period_end';
1410
-
1411
1165
  interface CancellationDetails {
1412
1166
  /**
1413
1167
  * Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
@@ -1445,56 +1199,12 @@ declare module 'stripe' {
1445
1199
  */
1446
1200
  discount?: string;
1447
1201
 
1448
- /**
1449
- * Details to determine how long the discount should be applied for.
1450
- */
1451
- discount_end?: Discount.DiscountEnd;
1452
-
1453
1202
  /**
1454
1203
  * ID of the promotion code to create a new discount for.
1455
1204
  */
1456
1205
  promotion_code?: string;
1457
1206
  }
1458
1207
 
1459
- namespace Discount {
1460
- interface DiscountEnd {
1461
- /**
1462
- * Time span for the redeemed discount.
1463
- */
1464
- duration?: DiscountEnd.Duration;
1465
-
1466
- /**
1467
- * A precise Unix timestamp for the discount to end. Must be in the future.
1468
- */
1469
- timestamp?: number;
1470
-
1471
- /**
1472
- * The type of calculation made to determine when the discount ends.
1473
- */
1474
- type: DiscountEnd.Type;
1475
- }
1476
-
1477
- namespace DiscountEnd {
1478
- interface Duration {
1479
- /**
1480
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1481
- */
1482
- interval: Duration.Interval;
1483
-
1484
- /**
1485
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1486
- */
1487
- interval_count: number;
1488
- }
1489
-
1490
- namespace Duration {
1491
- type Interval = 'day' | 'month' | 'week' | 'year';
1492
- }
1493
-
1494
- type Type = 'duration' | 'timestamp';
1495
- }
1496
- }
1497
-
1498
1208
  interface InvoiceSettings {
1499
1209
  /**
1500
1210
  * The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
@@ -1601,56 +1311,12 @@ declare module 'stripe' {
1601
1311
  */
1602
1312
  discount?: string;
1603
1313
 
1604
- /**
1605
- * Details to determine how long the discount should be applied for.
1606
- */
1607
- discount_end?: Discount.DiscountEnd;
1608
-
1609
1314
  /**
1610
1315
  * ID of the promotion code to create a new discount for.
1611
1316
  */
1612
1317
  promotion_code?: string;
1613
1318
  }
1614
1319
 
1615
- namespace Discount {
1616
- interface DiscountEnd {
1617
- /**
1618
- * Time span for the redeemed discount.
1619
- */
1620
- duration?: DiscountEnd.Duration;
1621
-
1622
- /**
1623
- * A precise Unix timestamp for the discount to end. Must be in the future.
1624
- */
1625
- timestamp?: number;
1626
-
1627
- /**
1628
- * The type of calculation made to determine when the discount ends.
1629
- */
1630
- type: DiscountEnd.Type;
1631
- }
1632
-
1633
- namespace DiscountEnd {
1634
- interface Duration {
1635
- /**
1636
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1637
- */
1638
- interval: Duration.Interval;
1639
-
1640
- /**
1641
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1642
- */
1643
- interval_count: number;
1644
- }
1645
-
1646
- namespace Duration {
1647
- type Interval = 'day' | 'month' | 'week' | 'year';
1648
- }
1649
-
1650
- type Type = 'duration' | 'timestamp';
1651
- }
1652
- }
1653
-
1654
1320
  interface PriceData {
1655
1321
  /**
1656
1322
  * 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).
@@ -1769,13 +1435,6 @@ declare module 'stripe' {
1769
1435
  PaymentMethodOptions.CustomerBalance
1770
1436
  >;
1771
1437
 
1772
- /**
1773
- * This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
1774
- */
1775
- id_bank_transfer?: Stripe.Emptyable<
1776
- PaymentMethodOptions.IdBankTransfer
1777
- >;
1778
-
1779
1438
  /**
1780
1439
  * This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
1781
1440
  */
@@ -1925,8 +1584,6 @@ declare module 'stripe' {
1925
1584
  }
1926
1585
  }
1927
1586
 
1928
- interface IdBankTransfer {}
1929
-
1930
1587
  interface Konbini {}
1931
1588
 
1932
1589
  interface SepaDebit {}
@@ -1967,11 +1624,6 @@ declare module 'stripe' {
1967
1624
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1968
1625
  */
1969
1626
  account_subcategories?: Array<Filters.AccountSubcategory>;
1970
-
1971
- /**
1972
- * ID of the institution to use to filter for selectable accounts.
1973
- */
1974
- institution?: string;
1975
1627
  }
1976
1628
 
1977
1629
  namespace Filters {
@@ -1984,11 +1636,7 @@ declare module 'stripe' {
1984
1636
  | 'payment_method'
1985
1637
  | 'transactions';
1986
1638
 
1987
- type Prefetch =
1988
- | 'balances'
1989
- | 'inferred_balances'
1990
- | 'ownership'
1991
- | 'transactions';
1639
+ type Prefetch = 'balances' | 'ownership' | 'transactions';
1992
1640
  }
1993
1641
 
1994
1642
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -2007,13 +1655,12 @@ declare module 'stripe' {
2007
1655
  | 'boleto'
2008
1656
  | 'card'
2009
1657
  | 'cashapp'
2010
- | 'custom'
1658
+ | 'crypto'
2011
1659
  | 'customer_balance'
2012
1660
  | 'eps'
2013
1661
  | 'fpx'
2014
1662
  | 'giropay'
2015
1663
  | 'grabpay'
2016
- | 'id_bank_transfer'
2017
1664
  | 'ideal'
2018
1665
  | 'jp_credit_transfer'
2019
1666
  | 'kakao_pay'
@@ -2033,7 +1680,6 @@ declare module 'stripe' {
2033
1680
  | 'sepa_credit_transfer'
2034
1681
  | 'sepa_debit'
2035
1682
  | 'sofort'
2036
- | 'stripe_balance'
2037
1683
  | 'swish'
2038
1684
  | 'us_bank_account'
2039
1685
  | 'wechat_pay';
@@ -2057,22 +1703,6 @@ declare module 'stripe' {
2057
1703
  type Interval = 'day' | 'month' | 'week' | 'year';
2058
1704
  }
2059
1705
 
2060
- interface Prebilling {
2061
- /**
2062
- * This is used to determine the number of billing cycles to prebill.
2063
- */
2064
- iterations: number;
2065
-
2066
- /**
2067
- * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2068
- */
2069
- update_behavior?: Prebilling.UpdateBehavior;
2070
- }
2071
-
2072
- namespace Prebilling {
2073
- type UpdateBehavior = 'prebill' | 'reset';
2074
- }
2075
-
2076
1706
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
2077
1707
 
2078
1708
  interface TransferData {
@@ -2139,11 +1769,6 @@ declare module 'stripe' {
2139
1769
  */
2140
1770
  customer?: string;
2141
1771
 
2142
- /**
2143
- * The ID of the account whose subscriptions will be retrieved.
2144
- */
2145
- customer_account?: string;
2146
-
2147
1772
  /**
2148
1773
  * Specifies which fields in the response should be expanded.
2149
1774
  */
@@ -2247,7 +1872,7 @@ declare module 'stripe' {
2247
1872
  /**
2248
1873
  * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2249
1874
  */
2250
- billing_mode: 'flexible';
1875
+ billing_mode: SubscriptionMigrateParams.BillingMode;
2251
1876
 
2252
1877
  /**
2253
1878
  * Specifies which fields in the response should be expanded.
@@ -2255,6 +1880,12 @@ declare module 'stripe' {
2255
1880
  expand?: Array<string>;
2256
1881
  }
2257
1882
 
1883
+ namespace SubscriptionMigrateParams {
1884
+ interface BillingMode {
1885
+ type: 'flexible';
1886
+ }
1887
+ }
1888
+
2258
1889
  interface SubscriptionResumeParams {
2259
1890
  /**
2260
1891
  * The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
@@ -2316,10 +1947,7 @@ declare module 'stripe' {
2316
1947
  * Schedules provide the flexibility to model more complex billing configurations that change over time.
2317
1948
  */
2318
1949
  create(
2319
- params?: SubscriptionCreateParams,
2320
- options?: RequestOptions
2321
- ): Promise<Stripe.Response<Stripe.Subscription>>;
2322
- create(
1950
+ params: SubscriptionCreateParams,
2323
1951
  options?: RequestOptions
2324
1952
  ): Promise<Stripe.Response<Stripe.Subscription>>;
2325
1953