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
@@ -8,11 +8,6 @@ declare module 'stripe' {
8
8
  */
9
9
  account_tax_ids?: Stripe.Emptyable<Array<string>>;
10
10
 
11
- /**
12
- * List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
13
- */
14
- amounts_due?: Stripe.Emptyable<Array<InvoiceCreateParams.AmountsDue>>;
15
-
16
11
  /**
17
12
  * A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
18
13
  */
@@ -53,21 +48,11 @@ declare module 'stripe' {
53
48
  */
54
49
  customer?: string;
55
50
 
56
- /**
57
- * The ID of the account who will be billed.
58
- */
59
- customer_account?: string;
60
-
61
51
  /**
62
52
  * The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
63
53
  */
64
54
  days_until_due?: number;
65
55
 
66
- /**
67
- * The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
68
- */
69
- default_margins?: Array<string>;
70
-
71
56
  /**
72
57
  * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
73
58
  */
@@ -180,28 +165,6 @@ declare module 'stripe' {
180
165
  }
181
166
 
182
167
  namespace InvoiceCreateParams {
183
- interface AmountsDue {
184
- /**
185
- * The amount in cents (or local equivalent).
186
- */
187
- amount: number;
188
-
189
- /**
190
- * Number of days from when invoice is finalized until the payment is due.
191
- */
192
- days_until_due?: number;
193
-
194
- /**
195
- * An arbitrary string attached to the object. Often useful for displaying to users.
196
- */
197
- description: string;
198
-
199
- /**
200
- * Date on which a payment plan's payment is due.
201
- */
202
- due_date?: number;
203
- }
204
-
205
168
  interface AutomaticTax {
206
169
  /**
207
170
  * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
@@ -257,56 +220,12 @@ declare module 'stripe' {
257
220
  */
258
221
  discount?: string;
259
222
 
260
- /**
261
- * Details to determine how long the discount should be applied for.
262
- */
263
- discount_end?: Discount.DiscountEnd;
264
-
265
223
  /**
266
224
  * ID of the promotion code to create a new discount for.
267
225
  */
268
226
  promotion_code?: string;
269
227
  }
270
228
 
271
- namespace Discount {
272
- interface DiscountEnd {
273
- /**
274
- * Time span for the redeemed discount.
275
- */
276
- duration?: DiscountEnd.Duration;
277
-
278
- /**
279
- * A precise Unix timestamp for the discount to end. Must be in the future.
280
- */
281
- timestamp?: number;
282
-
283
- /**
284
- * The type of calculation made to determine when the discount ends.
285
- */
286
- type: DiscountEnd.Type;
287
- }
288
-
289
- namespace DiscountEnd {
290
- interface Duration {
291
- /**
292
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
293
- */
294
- interval: Duration.Interval;
295
-
296
- /**
297
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
298
- */
299
- interval_count: number;
300
- }
301
-
302
- namespace Duration {
303
- type Interval = 'day' | 'month' | 'week' | 'year';
304
- }
305
-
306
- type Type = 'duration' | 'timestamp';
307
- }
308
- }
309
-
310
229
  interface FromInvoice {
311
230
  /**
312
231
  * The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
@@ -378,13 +297,6 @@ declare module 'stripe' {
378
297
  PaymentMethodOptions.CustomerBalance
379
298
  >;
380
299
 
381
- /**
382
- * If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
383
- */
384
- id_bank_transfer?: Stripe.Emptyable<
385
- PaymentMethodOptions.IdBankTransfer
386
- >;
387
-
388
300
  /**
389
301
  * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
390
302
  */
@@ -484,9 +396,13 @@ declare module 'stripe' {
484
396
  interval?: 'month';
485
397
 
486
398
  /**
487
- * Type of installment plan, one of `fixed_count`.
399
+ * Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
488
400
  */
489
- type: 'fixed_count';
401
+ type: Plan.Type;
402
+ }
403
+
404
+ namespace Plan {
405
+ type Type = 'bonus' | 'fixed_count' | 'revolving';
490
406
  }
491
407
  }
492
408
 
@@ -528,8 +444,6 @@ declare module 'stripe' {
528
444
  }
529
445
  }
530
446
 
531
- interface IdBankTransfer {}
532
-
533
447
  interface Konbini {}
534
448
 
535
449
  interface SepaDebit {}
@@ -570,11 +484,6 @@ declare module 'stripe' {
570
484
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
571
485
  */
572
486
  account_subcategories?: Array<Filters.AccountSubcategory>;
573
-
574
- /**
575
- * ID of the institution to use to filter for selectable accounts.
576
- */
577
- institution?: string;
578
487
  }
579
488
 
580
489
  namespace Filters {
@@ -587,11 +496,7 @@ declare module 'stripe' {
587
496
  | 'payment_method'
588
497
  | 'transactions';
589
498
 
590
- type Prefetch =
591
- | 'balances'
592
- | 'inferred_balances'
593
- | 'ownership'
594
- | 'transactions';
499
+ type Prefetch = 'balances' | 'ownership' | 'transactions';
595
500
  }
596
501
 
597
502
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -610,13 +515,12 @@ declare module 'stripe' {
610
515
  | 'boleto'
611
516
  | 'card'
612
517
  | 'cashapp'
613
- | 'custom'
518
+ | 'crypto'
614
519
  | 'customer_balance'
615
520
  | 'eps'
616
521
  | 'fpx'
617
522
  | 'giropay'
618
523
  | 'grabpay'
619
- | 'id_bank_transfer'
620
524
  | 'ideal'
621
525
  | 'jp_credit_transfer'
622
526
  | 'kakao_pay'
@@ -636,7 +540,6 @@ declare module 'stripe' {
636
540
  | 'sepa_credit_transfer'
637
541
  | 'sepa_debit'
638
542
  | 'sofort'
639
- | 'stripe_balance'
640
543
  | 'swish'
641
544
  | 'us_bank_account'
642
545
  | 'wechat_pay';
@@ -864,11 +767,6 @@ declare module 'stripe' {
864
767
  */
865
768
  account_tax_ids?: Stripe.Emptyable<Array<string>>;
866
769
 
867
- /**
868
- * List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
869
- */
870
- amounts_due?: Stripe.Emptyable<Array<InvoiceUpdateParams.AmountsDue>>;
871
-
872
770
  /**
873
771
  * A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
874
772
  */
@@ -904,11 +802,6 @@ declare module 'stripe' {
904
802
  */
905
803
  days_until_due?: number;
906
804
 
907
- /**
908
- * The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
909
- */
910
- default_margins?: Stripe.Emptyable<Array<string>>;
911
-
912
805
  /**
913
806
  * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
914
807
  */
@@ -1006,28 +899,6 @@ declare module 'stripe' {
1006
899
  }
1007
900
 
1008
901
  namespace InvoiceUpdateParams {
1009
- interface AmountsDue {
1010
- /**
1011
- * The amount in cents (or local equivalent).
1012
- */
1013
- amount: number;
1014
-
1015
- /**
1016
- * Number of days from when invoice is finalized until the payment is due.
1017
- */
1018
- days_until_due?: number;
1019
-
1020
- /**
1021
- * An arbitrary string attached to the object. Often useful for displaying to users.
1022
- */
1023
- description: string;
1024
-
1025
- /**
1026
- * Date on which a payment plan's payment is due.
1027
- */
1028
- due_date?: number;
1029
- }
1030
-
1031
902
  interface AutomaticTax {
1032
903
  /**
1033
904
  * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
@@ -1083,56 +954,12 @@ declare module 'stripe' {
1083
954
  */
1084
955
  discount?: string;
1085
956
 
1086
- /**
1087
- * Details to determine how long the discount should be applied for.
1088
- */
1089
- discount_end?: Discount.DiscountEnd;
1090
-
1091
957
  /**
1092
958
  * ID of the promotion code to create a new discount for.
1093
959
  */
1094
960
  promotion_code?: string;
1095
961
  }
1096
962
 
1097
- namespace Discount {
1098
- interface DiscountEnd {
1099
- /**
1100
- * Time span for the redeemed discount.
1101
- */
1102
- duration?: DiscountEnd.Duration;
1103
-
1104
- /**
1105
- * A precise Unix timestamp for the discount to end. Must be in the future.
1106
- */
1107
- timestamp?: number;
1108
-
1109
- /**
1110
- * The type of calculation made to determine when the discount ends.
1111
- */
1112
- type: DiscountEnd.Type;
1113
- }
1114
-
1115
- namespace DiscountEnd {
1116
- interface Duration {
1117
- /**
1118
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1119
- */
1120
- interval: Duration.Interval;
1121
-
1122
- /**
1123
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1124
- */
1125
- interval_count: number;
1126
- }
1127
-
1128
- namespace Duration {
1129
- type Interval = 'day' | 'month' | 'week' | 'year';
1130
- }
1131
-
1132
- type Type = 'duration' | 'timestamp';
1133
- }
1134
- }
1135
-
1136
963
  interface Issuer {
1137
964
  /**
1138
965
  * The connected account being referenced when `type` is `account`.
@@ -1192,13 +1019,6 @@ declare module 'stripe' {
1192
1019
  PaymentMethodOptions.CustomerBalance
1193
1020
  >;
1194
1021
 
1195
- /**
1196
- * If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
1197
- */
1198
- id_bank_transfer?: Stripe.Emptyable<
1199
- PaymentMethodOptions.IdBankTransfer
1200
- >;
1201
-
1202
1022
  /**
1203
1023
  * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
1204
1024
  */
@@ -1298,9 +1118,13 @@ declare module 'stripe' {
1298
1118
  interval?: 'month';
1299
1119
 
1300
1120
  /**
1301
- * Type of installment plan, one of `fixed_count`.
1121
+ * Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
1302
1122
  */
1303
- type: 'fixed_count';
1123
+ type: Plan.Type;
1124
+ }
1125
+
1126
+ namespace Plan {
1127
+ type Type = 'bonus' | 'fixed_count' | 'revolving';
1304
1128
  }
1305
1129
  }
1306
1130
 
@@ -1342,8 +1166,6 @@ declare module 'stripe' {
1342
1166
  }
1343
1167
  }
1344
1168
 
1345
- interface IdBankTransfer {}
1346
-
1347
1169
  interface Konbini {}
1348
1170
 
1349
1171
  interface SepaDebit {}
@@ -1384,11 +1206,6 @@ declare module 'stripe' {
1384
1206
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1385
1207
  */
1386
1208
  account_subcategories?: Array<Filters.AccountSubcategory>;
1387
-
1388
- /**
1389
- * ID of the institution to use to filter for selectable accounts.
1390
- */
1391
- institution?: string;
1392
1209
  }
1393
1210
 
1394
1211
  namespace Filters {
@@ -1401,11 +1218,7 @@ declare module 'stripe' {
1401
1218
  | 'payment_method'
1402
1219
  | 'transactions';
1403
1220
 
1404
- type Prefetch =
1405
- | 'balances'
1406
- | 'inferred_balances'
1407
- | 'ownership'
1408
- | 'transactions';
1221
+ type Prefetch = 'balances' | 'ownership' | 'transactions';
1409
1222
  }
1410
1223
 
1411
1224
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -1424,13 +1237,12 @@ declare module 'stripe' {
1424
1237
  | 'boleto'
1425
1238
  | 'card'
1426
1239
  | 'cashapp'
1427
- | 'custom'
1240
+ | 'crypto'
1428
1241
  | 'customer_balance'
1429
1242
  | 'eps'
1430
1243
  | 'fpx'
1431
1244
  | 'giropay'
1432
1245
  | 'grabpay'
1433
- | 'id_bank_transfer'
1434
1246
  | 'ideal'
1435
1247
  | 'jp_credit_transfer'
1436
1248
  | 'kakao_pay'
@@ -1450,7 +1262,6 @@ declare module 'stripe' {
1450
1262
  | 'sepa_credit_transfer'
1451
1263
  | 'sepa_debit'
1452
1264
  | 'sofort'
1453
- | 'stripe_balance'
1454
1265
  | 'swish'
1455
1266
  | 'us_bank_account'
1456
1267
  | 'wechat_pay';
@@ -1679,11 +1490,6 @@ declare module 'stripe' {
1679
1490
  */
1680
1491
  customer?: string;
1681
1492
 
1682
- /**
1683
- * Only return invoices for the account specified by this account ID.
1684
- */
1685
- customer_account?: string;
1686
-
1687
1493
  due_date?: Stripe.RangeQueryParam | number;
1688
1494
 
1689
1495
  /**
@@ -1756,11 +1562,6 @@ declare module 'stripe' {
1756
1562
  */
1757
1563
  invoice_item?: string;
1758
1564
 
1759
- /**
1760
- * The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
1761
- */
1762
- margins?: Stripe.Emptyable<Array<string>>;
1763
-
1764
1565
  /**
1765
1566
  * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
1766
1567
  */
@@ -1809,56 +1610,12 @@ declare module 'stripe' {
1809
1610
  */
1810
1611
  discount?: string;
1811
1612
 
1812
- /**
1813
- * Details to determine how long the discount should be applied for.
1814
- */
1815
- discount_end?: Discount.DiscountEnd;
1816
-
1817
1613
  /**
1818
1614
  * ID of the promotion code to create a new discount for.
1819
1615
  */
1820
1616
  promotion_code?: string;
1821
1617
  }
1822
1618
 
1823
- namespace Discount {
1824
- interface DiscountEnd {
1825
- /**
1826
- * Time span for the redeemed discount.
1827
- */
1828
- duration?: DiscountEnd.Duration;
1829
-
1830
- /**
1831
- * A precise Unix timestamp for the discount to end. Must be in the future.
1832
- */
1833
- timestamp?: number;
1834
-
1835
- /**
1836
- * The type of calculation made to determine when the discount ends.
1837
- */
1838
- type: DiscountEnd.Type;
1839
- }
1840
-
1841
- namespace DiscountEnd {
1842
- interface Duration {
1843
- /**
1844
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1845
- */
1846
- interval: Duration.Interval;
1847
-
1848
- /**
1849
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1850
- */
1851
- interval_count: number;
1852
- }
1853
-
1854
- namespace Duration {
1855
- type Interval = 'day' | 'month' | 'week' | 'year';
1856
- }
1857
-
1858
- type Type = 'duration' | 'timestamp';
1859
- }
1860
- }
1861
-
1862
1619
  interface Period {
1863
1620
  /**
1864
1621
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -2060,11 +1817,6 @@ declare module 'stripe' {
2060
1817
  }
2061
1818
 
2062
1819
  interface InvoiceAttachPaymentParams {
2063
- /**
2064
- * The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
2065
- */
2066
- amount_requested?: number;
2067
-
2068
1820
  /**
2069
1821
  * Specifies which fields in the response should be expanded.
2070
1822
  */
@@ -2074,50 +1826,6 @@ declare module 'stripe' {
2074
1826
  * The ID of the PaymentIntent to attach to the invoice.
2075
1827
  */
2076
1828
  payment_intent?: string;
2077
-
2078
- /**
2079
- * The ID of the PaymentRecord to attach to the invoice.
2080
- */
2081
- payment_record?: string;
2082
-
2083
- /**
2084
- * The PaymentRecord data for attaching an out of band payment to the invoice.
2085
- */
2086
- payment_record_data?: InvoiceAttachPaymentParams.PaymentRecordData;
2087
- }
2088
-
2089
- namespace InvoiceAttachPaymentParams {
2090
- interface PaymentRecordData {
2091
- /**
2092
- * The amount that was paid out of band.
2093
- */
2094
- amount: number;
2095
-
2096
- /**
2097
- * The currency that was paid out of band.
2098
- */
2099
- currency: string;
2100
-
2101
- /**
2102
- * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2103
- */
2104
- metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
2105
-
2106
- /**
2107
- * The type of money movement for this out of band payment record.
2108
- */
2109
- money_movement_type: string;
2110
-
2111
- /**
2112
- * The timestamp when this out of band payment was paid.
2113
- */
2114
- paid_at?: number;
2115
-
2116
- /**
2117
- * The reference for this out of band payment record.
2118
- */
2119
- payment_reference?: string;
2120
- }
2121
1829
  }
2122
1830
 
2123
1831
  interface InvoiceCreatePreviewParams {
@@ -2136,11 +1844,6 @@ declare module 'stripe' {
2136
1844
  */
2137
1845
  customer?: string;
2138
1846
 
2139
- /**
2140
- * The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
2141
- */
2142
- customer_account?: string;
2143
-
2144
1847
  /**
2145
1848
  * Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
2146
1849
  */
@@ -2420,56 +2123,12 @@ declare module 'stripe' {
2420
2123
  */
2421
2124
  discount?: string;
2422
2125
 
2423
- /**
2424
- * Details to determine how long the discount should be applied for.
2425
- */
2426
- discount_end?: Discount.DiscountEnd;
2427
-
2428
2126
  /**
2429
2127
  * ID of the promotion code to create a new discount for.
2430
2128
  */
2431
2129
  promotion_code?: string;
2432
2130
  }
2433
2131
 
2434
- namespace Discount {
2435
- interface DiscountEnd {
2436
- /**
2437
- * Time span for the redeemed discount.
2438
- */
2439
- duration?: DiscountEnd.Duration;
2440
-
2441
- /**
2442
- * A precise Unix timestamp for the discount to end. Must be in the future.
2443
- */
2444
- timestamp?: number;
2445
-
2446
- /**
2447
- * The type of calculation made to determine when the discount ends.
2448
- */
2449
- type: DiscountEnd.Type;
2450
- }
2451
-
2452
- namespace DiscountEnd {
2453
- interface Duration {
2454
- /**
2455
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2456
- */
2457
- interval: Duration.Interval;
2458
-
2459
- /**
2460
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2461
- */
2462
- interval_count: number;
2463
- }
2464
-
2465
- namespace Duration {
2466
- type Interval = 'day' | 'month' | 'week' | 'year';
2467
- }
2468
-
2469
- type Type = 'duration' | 'timestamp';
2470
- }
2471
- }
2472
-
2473
2132
  interface InvoiceItem {
2474
2133
  /**
2475
2134
  * The integer amount in cents (or local equivalent) of previewed invoice item.
@@ -2564,56 +2223,12 @@ declare module 'stripe' {
2564
2223
  */
2565
2224
  discount?: string;
2566
2225
 
2567
- /**
2568
- * Details to determine how long the discount should be applied for.
2569
- */
2570
- discount_end?: Discount.DiscountEnd;
2571
-
2572
2226
  /**
2573
2227
  * ID of the promotion code to create a new discount for.
2574
2228
  */
2575
2229
  promotion_code?: string;
2576
2230
  }
2577
2231
 
2578
- namespace Discount {
2579
- interface DiscountEnd {
2580
- /**
2581
- * Time span for the redeemed discount.
2582
- */
2583
- duration?: DiscountEnd.Duration;
2584
-
2585
- /**
2586
- * A precise Unix timestamp for the discount to end. Must be in the future.
2587
- */
2588
- timestamp?: number;
2589
-
2590
- /**
2591
- * The type of calculation made to determine when the discount ends.
2592
- */
2593
- type: DiscountEnd.Type;
2594
- }
2595
-
2596
- namespace DiscountEnd {
2597
- interface Duration {
2598
- /**
2599
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2600
- */
2601
- interval: Duration.Interval;
2602
-
2603
- /**
2604
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2605
- */
2606
- interval_count: number;
2607
- }
2608
-
2609
- namespace Duration {
2610
- type Interval = 'day' | 'month' | 'week' | 'year';
2611
- }
2612
-
2613
- type Type = 'duration' | 'timestamp';
2614
- }
2615
- }
2616
-
2617
2232
  interface Period {
2618
2233
  /**
2619
2234
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -2679,16 +2294,6 @@ declare module 'stripe' {
2679
2294
  type PreviewMode = 'next' | 'recurring';
2680
2295
 
2681
2296
  interface ScheduleDetails {
2682
- /**
2683
- * Changes to apply to the phases of the subscription schedule, in the order provided.
2684
- */
2685
- amendments?: Array<ScheduleDetails.Amendment>;
2686
-
2687
- /**
2688
- * Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
2689
- */
2690
- billing_behavior?: ScheduleDetails.BillingBehavior;
2691
-
2692
2297
  /**
2693
2298
  * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2694
2299
  */
@@ -2704,11 +2309,6 @@ declare module 'stripe' {
2704
2309
  */
2705
2310
  phases?: Array<ScheduleDetails.Phase>;
2706
2311
 
2707
- /**
2708
- * Provide any time periods to bill in advance.
2709
- */
2710
- prebilling?: Stripe.Emptyable<Array<ScheduleDetails.Prebilling>>;
2711
-
2712
2312
  /**
2713
2313
  * In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
2714
2314
  */
@@ -2716,612 +2316,21 @@ declare module 'stripe' {
2716
2316
  }
2717
2317
 
2718
2318
  namespace ScheduleDetails {
2719
- interface Amendment {
2319
+ interface BillingMode {
2320
+ type: BillingMode.Type;
2321
+ }
2322
+
2323
+ namespace BillingMode {
2324
+ type Type = 'classic' | 'flexible';
2325
+ }
2326
+
2327
+ type EndBehavior = 'cancel' | 'release';
2328
+
2329
+ interface Phase {
2720
2330
  /**
2721
- * Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
2331
+ * A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
2722
2332
  */
2723
- amendment_end?: Amendment.AmendmentEnd;
2724
-
2725
- /**
2726
- * Details to identify the earliest timestamp where the proposed change should take effect.
2727
- */
2728
- amendment_start: Amendment.AmendmentStart;
2729
-
2730
- /**
2731
- * For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
2732
- */
2733
- billing_cycle_anchor?: Amendment.BillingCycleAnchor;
2734
-
2735
- /**
2736
- * Changes to the coupons being redeemed or discounts being applied during the amendment time span.
2737
- */
2738
- discount_actions?: Array<Amendment.DiscountAction>;
2739
-
2740
- /**
2741
- * Changes to the subscription items during the amendment time span.
2742
- */
2743
- item_actions?: Array<Amendment.ItemAction>;
2744
-
2745
- /**
2746
- * Instructions for how to modify phase metadata
2747
- */
2748
- metadata_actions?: Array<Amendment.MetadataAction>;
2749
-
2750
- /**
2751
- * Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
2752
- */
2753
- proration_behavior?: Amendment.ProrationBehavior;
2754
-
2755
- /**
2756
- * Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2757
- */
2758
- set_pause_collection?: Amendment.SetPauseCollection;
2759
-
2760
- /**
2761
- * Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2762
- */
2763
- set_schedule_end?: Amendment.SetScheduleEnd;
2764
-
2765
- /**
2766
- * Settings related to subscription trials.
2767
- */
2768
- trial_settings?: Amendment.TrialSettings;
2769
- }
2770
-
2771
- namespace Amendment {
2772
- interface AmendmentEnd {
2773
- /**
2774
- * Use the `end` time of a given discount.
2775
- */
2776
- discount_end?: AmendmentEnd.DiscountEnd;
2777
-
2778
- /**
2779
- * Time span for the amendment starting from the `amendment_start`.
2780
- */
2781
- duration?: AmendmentEnd.Duration;
2782
-
2783
- /**
2784
- * A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
2785
- */
2786
- timestamp?: number;
2787
-
2788
- /**
2789
- * Select one of three ways to pass the `amendment_end`.
2790
- */
2791
- type: AmendmentEnd.Type;
2792
- }
2793
-
2794
- namespace AmendmentEnd {
2795
- interface DiscountEnd {
2796
- /**
2797
- * The ID of a specific discount.
2798
- */
2799
- discount: string;
2800
- }
2801
-
2802
- interface Duration {
2803
- /**
2804
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2805
- */
2806
- interval: Duration.Interval;
2807
-
2808
- /**
2809
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2810
- */
2811
- interval_count: number;
2812
- }
2813
-
2814
- namespace Duration {
2815
- type Interval = 'day' | 'month' | 'week' | 'year';
2816
- }
2817
-
2818
- type Type =
2819
- | 'discount_end'
2820
- | 'duration'
2821
- | 'schedule_end'
2822
- | 'timestamp'
2823
- | 'trial_end'
2824
- | 'trial_start'
2825
- | 'upcoming_invoice';
2826
- }
2827
-
2828
- interface AmendmentStart {
2829
- /**
2830
- * Details of another amendment in the same array, immediately after which this amendment should begin.
2831
- */
2832
- amendment_end?: AmendmentStart.AmendmentEnd;
2833
-
2834
- /**
2835
- * Use the `end` time of a given discount.
2836
- */
2837
- discount_end?: AmendmentStart.DiscountEnd;
2838
-
2839
- /**
2840
- * A precise Unix timestamp for the amendment to start.
2841
- */
2842
- timestamp?: number;
2843
-
2844
- /**
2845
- * Select one of three ways to pass the `amendment_start`.
2846
- */
2847
- type: AmendmentStart.Type;
2848
- }
2849
-
2850
- namespace AmendmentStart {
2851
- interface AmendmentEnd {
2852
- /**
2853
- * The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
2854
- */
2855
- index: number;
2856
- }
2857
-
2858
- interface DiscountEnd {
2859
- /**
2860
- * The ID of a specific discount.
2861
- */
2862
- discount: string;
2863
- }
2864
-
2865
- type Type =
2866
- | 'amendment_end'
2867
- | 'discount_end'
2868
- | 'now'
2869
- | 'schedule_end'
2870
- | 'timestamp'
2871
- | 'trial_end'
2872
- | 'trial_start'
2873
- | 'upcoming_invoice';
2874
- }
2875
-
2876
- type BillingCycleAnchor = 'amendment_start' | 'automatic';
2877
-
2878
- interface DiscountAction {
2879
- /**
2880
- * Details of the discount to add.
2881
- */
2882
- add?: DiscountAction.Add;
2883
-
2884
- /**
2885
- * Details of the discount to remove.
2886
- */
2887
- remove?: DiscountAction.Remove;
2888
-
2889
- /**
2890
- * Details of the discount to replace the existing discounts with.
2891
- */
2892
- set?: DiscountAction.Set;
2893
-
2894
- /**
2895
- * Determines the type of discount action.
2896
- */
2897
- type: DiscountAction.Type;
2898
- }
2899
-
2900
- namespace DiscountAction {
2901
- interface Add {
2902
- /**
2903
- * The coupon code to redeem.
2904
- */
2905
- coupon?: string;
2906
-
2907
- /**
2908
- * An ID of an existing discount for a coupon that was already redeemed.
2909
- */
2910
- discount?: string;
2911
-
2912
- /**
2913
- * Details to determine how long the discount should be applied for.
2914
- */
2915
- discount_end?: Add.DiscountEnd;
2916
-
2917
- /**
2918
- * The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
2919
- */
2920
- index?: number;
2921
-
2922
- /**
2923
- * The promotion code to redeem.
2924
- */
2925
- promotion_code?: string;
2926
- }
2927
-
2928
- namespace Add {
2929
- interface DiscountEnd {
2930
- /**
2931
- * The type of calculation made to determine when the discount ends.
2932
- */
2933
- type: 'amendment_end';
2934
- }
2935
- }
2936
-
2937
- interface Remove {
2938
- /**
2939
- * The coupon code to remove from the `discounts` array.
2940
- */
2941
- coupon?: string;
2942
-
2943
- /**
2944
- * The ID of a discount to remove from the `discounts` array.
2945
- */
2946
- discount?: string;
2947
-
2948
- /**
2949
- * The ID of a promotion code to remove from the `discounts` array.
2950
- */
2951
- promotion_code?: string;
2952
- }
2953
-
2954
- interface Set {
2955
- /**
2956
- * The coupon code to replace the `discounts` array with.
2957
- */
2958
- coupon?: string;
2959
-
2960
- /**
2961
- * An ID of an existing discount to replace the `discounts` array with.
2962
- */
2963
- discount?: string;
2964
-
2965
- /**
2966
- * An ID of an existing promotion code to replace the `discounts` array with.
2967
- */
2968
- promotion_code?: string;
2969
- }
2970
-
2971
- type Type = 'add' | 'remove' | 'set';
2972
- }
2973
-
2974
- interface ItemAction {
2975
- /**
2976
- * Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
2977
- */
2978
- add?: ItemAction.Add;
2979
-
2980
- /**
2981
- * Details of the subscription item to remove.
2982
- */
2983
- remove?: ItemAction.Remove;
2984
-
2985
- /**
2986
- * Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
2987
- */
2988
- set?: ItemAction.Set;
2989
-
2990
- /**
2991
- * Determines the type of item action.
2992
- */
2993
- type: ItemAction.Type;
2994
- }
2995
-
2996
- namespace ItemAction {
2997
- interface Add {
2998
- /**
2999
- * The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
3000
- */
3001
- discounts?: Array<Add.Discount>;
3002
-
3003
- /**
3004
- * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
3005
- */
3006
- metadata?: Stripe.MetadataParam;
3007
-
3008
- /**
3009
- * The ID of the price object.
3010
- */
3011
- price: string;
3012
-
3013
- /**
3014
- * Quantity for this item.
3015
- */
3016
- quantity?: number;
3017
-
3018
- /**
3019
- * The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
3020
- */
3021
- tax_rates?: Array<string>;
3022
-
3023
- /**
3024
- * Options that configure the trial on the subscription item.
3025
- */
3026
- trial?: Add.Trial;
3027
- }
3028
-
3029
- namespace Add {
3030
- interface Discount {
3031
- /**
3032
- * ID of the coupon to create a new discount for.
3033
- */
3034
- coupon?: string;
3035
-
3036
- /**
3037
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
3038
- */
3039
- discount?: string;
3040
-
3041
- /**
3042
- * Details to determine how long the discount should be applied for.
3043
- */
3044
- discount_end?: Discount.DiscountEnd;
3045
-
3046
- /**
3047
- * ID of the promotion code to create a new discount for.
3048
- */
3049
- promotion_code?: string;
3050
- }
3051
-
3052
- namespace Discount {
3053
- interface DiscountEnd {
3054
- /**
3055
- * Time span for the redeemed discount.
3056
- */
3057
- duration?: DiscountEnd.Duration;
3058
-
3059
- /**
3060
- * A precise Unix timestamp for the discount to end. Must be in the future.
3061
- */
3062
- timestamp?: number;
3063
-
3064
- /**
3065
- * The type of calculation made to determine when the discount ends.
3066
- */
3067
- type: DiscountEnd.Type;
3068
- }
3069
-
3070
- namespace DiscountEnd {
3071
- interface Duration {
3072
- /**
3073
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3074
- */
3075
- interval: Duration.Interval;
3076
-
3077
- /**
3078
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3079
- */
3080
- interval_count: number;
3081
- }
3082
-
3083
- namespace Duration {
3084
- type Interval = 'day' | 'month' | 'week' | 'year';
3085
- }
3086
-
3087
- type Type = 'duration' | 'timestamp';
3088
- }
3089
- }
3090
-
3091
- interface Trial {
3092
- /**
3093
- * 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.
3094
- */
3095
- converts_to?: Array<string>;
3096
-
3097
- /**
3098
- * Determines the type of trial for this item.
3099
- */
3100
- type: Trial.Type;
3101
- }
3102
-
3103
- namespace Trial {
3104
- type Type = 'free' | 'paid';
3105
- }
3106
- }
3107
-
3108
- interface Remove {
3109
- /**
3110
- * ID of a price to remove.
3111
- */
3112
- price: string;
3113
- }
3114
-
3115
- interface Set {
3116
- /**
3117
- * If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
3118
- */
3119
- discounts?: Array<Set.Discount>;
3120
-
3121
- /**
3122
- * If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
3123
- */
3124
- metadata?: Stripe.MetadataParam;
3125
-
3126
- /**
3127
- * The ID of the price object.
3128
- */
3129
- price: string;
3130
-
3131
- /**
3132
- * If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
3133
- */
3134
- quantity?: number;
3135
-
3136
- /**
3137
- * If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
3138
- */
3139
- tax_rates?: Array<string>;
3140
-
3141
- /**
3142
- * If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
3143
- */
3144
- trial?: Set.Trial;
3145
- }
3146
-
3147
- namespace Set {
3148
- interface Discount {
3149
- /**
3150
- * ID of the coupon to create a new discount for.
3151
- */
3152
- coupon?: string;
3153
-
3154
- /**
3155
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
3156
- */
3157
- discount?: string;
3158
-
3159
- /**
3160
- * Details to determine how long the discount should be applied for.
3161
- */
3162
- discount_end?: Discount.DiscountEnd;
3163
-
3164
- /**
3165
- * ID of the promotion code to create a new discount for.
3166
- */
3167
- promotion_code?: string;
3168
- }
3169
-
3170
- namespace Discount {
3171
- interface DiscountEnd {
3172
- /**
3173
- * Time span for the redeemed discount.
3174
- */
3175
- duration?: DiscountEnd.Duration;
3176
-
3177
- /**
3178
- * A precise Unix timestamp for the discount to end. Must be in the future.
3179
- */
3180
- timestamp?: number;
3181
-
3182
- /**
3183
- * The type of calculation made to determine when the discount ends.
3184
- */
3185
- type: DiscountEnd.Type;
3186
- }
3187
-
3188
- namespace DiscountEnd {
3189
- interface Duration {
3190
- /**
3191
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3192
- */
3193
- interval: Duration.Interval;
3194
-
3195
- /**
3196
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3197
- */
3198
- interval_count: number;
3199
- }
3200
-
3201
- namespace Duration {
3202
- type Interval = 'day' | 'month' | 'week' | 'year';
3203
- }
3204
-
3205
- type Type = 'duration' | 'timestamp';
3206
- }
3207
- }
3208
-
3209
- interface Trial {
3210
- /**
3211
- * 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.
3212
- */
3213
- converts_to?: Array<string>;
3214
-
3215
- /**
3216
- * Determines the type of trial for this item.
3217
- */
3218
- type: Trial.Type;
3219
- }
3220
-
3221
- namespace Trial {
3222
- type Type = 'free' | 'paid';
3223
- }
3224
- }
3225
-
3226
- type Type = 'add' | 'remove' | 'set';
3227
- }
3228
-
3229
- interface MetadataAction {
3230
- /**
3231
- * Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
3232
- */
3233
- add?: {
3234
- [key: string]: string;
3235
- };
3236
-
3237
- /**
3238
- * Keys to remove from schedule phase metadata.
3239
- */
3240
- remove?: Array<string>;
3241
-
3242
- /**
3243
- * Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
3244
- */
3245
- set?: Stripe.Emptyable<{
3246
- [key: string]: string;
3247
- }>;
3248
-
3249
- /**
3250
- * Select one of three ways to update phase-level `metadata` on subscription schedules.
3251
- */
3252
- type: MetadataAction.Type;
3253
- }
3254
-
3255
- namespace MetadataAction {
3256
- type Type = 'add' | 'remove' | 'set';
3257
- }
3258
-
3259
- type ProrationBehavior =
3260
- | 'always_invoice'
3261
- | 'create_prorations'
3262
- | 'none';
3263
-
3264
- interface SetPauseCollection {
3265
- /**
3266
- * Details of the pause_collection behavior to apply to the amendment.
3267
- */
3268
- set?: SetPauseCollection.Set;
3269
-
3270
- /**
3271
- * Determines the type of the pause_collection amendment.
3272
- */
3273
- type: SetPauseCollection.Type;
3274
- }
3275
-
3276
- namespace SetPauseCollection {
3277
- interface Set {
3278
- /**
3279
- * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3280
- */
3281
- behavior: Set.Behavior;
3282
- }
3283
-
3284
- namespace Set {
3285
- type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
3286
- }
3287
-
3288
- type Type = 'remove' | 'set';
3289
- }
3290
-
3291
- type SetScheduleEnd = 'amendment_end' | 'amendment_start';
3292
-
3293
- interface TrialSettings {
3294
- /**
3295
- * Defines how the subscription should behave when a trial ends.
3296
- */
3297
- end_behavior?: TrialSettings.EndBehavior;
3298
- }
3299
-
3300
- namespace TrialSettings {
3301
- interface EndBehavior {
3302
- /**
3303
- * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3304
- */
3305
- prorate_up_front?: EndBehavior.ProrateUpFront;
3306
- }
3307
-
3308
- namespace EndBehavior {
3309
- type ProrateUpFront = 'defer' | 'include';
3310
- }
3311
- }
3312
- }
3313
-
3314
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
3315
-
3316
- type BillingMode = 'classic' | 'flexible';
3317
-
3318
- type EndBehavior = 'cancel' | 'release';
3319
-
3320
- interface Phase {
3321
- /**
3322
- * A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
3323
- */
3324
- add_invoice_items?: Array<Phase.AddInvoiceItem>;
2333
+ add_invoice_items?: Array<Phase.AddInvoiceItem>;
3325
2334
 
3326
2335
  /**
3327
2336
  * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
@@ -3403,11 +2412,6 @@ declare module 'stripe' {
3403
2412
  */
3404
2413
  on_behalf_of?: string;
3405
2414
 
3406
- /**
3407
- * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
3408
- */
3409
- pause_collection?: Phase.PauseCollection;
3410
-
3411
2415
  /**
3412
2416
  * Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
3413
2417
  */
@@ -3428,20 +2432,10 @@ declare module 'stripe' {
3428
2432
  */
3429
2433
  trial?: boolean;
3430
2434
 
3431
- /**
3432
- * Specify trial behavior when crossing phase boundaries
3433
- */
3434
- trial_continuation?: Phase.TrialContinuation;
3435
-
3436
2435
  /**
3437
2436
  * Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
3438
2437
  */
3439
2438
  trial_end?: number | 'now';
3440
-
3441
- /**
3442
- * Settings related to subscription trials.
3443
- */
3444
- trial_settings?: Phase.TrialSettings;
3445
2439
  }
3446
2440
 
3447
2441
  namespace Phase {
@@ -3484,56 +2478,12 @@ declare module 'stripe' {
3484
2478
  */
3485
2479
  discount?: string;
3486
2480
 
3487
- /**
3488
- * Details to determine how long the discount should be applied for.
3489
- */
3490
- discount_end?: Discount.DiscountEnd;
3491
-
3492
2481
  /**
3493
2482
  * ID of the promotion code to create a new discount for.
3494
2483
  */
3495
2484
  promotion_code?: string;
3496
2485
  }
3497
2486
 
3498
- namespace Discount {
3499
- interface DiscountEnd {
3500
- /**
3501
- * Time span for the redeemed discount.
3502
- */
3503
- duration?: DiscountEnd.Duration;
3504
-
3505
- /**
3506
- * A precise Unix timestamp for the discount to end. Must be in the future.
3507
- */
3508
- timestamp?: number;
3509
-
3510
- /**
3511
- * The type of calculation made to determine when the discount ends.
3512
- */
3513
- type: DiscountEnd.Type;
3514
- }
3515
-
3516
- namespace DiscountEnd {
3517
- interface Duration {
3518
- /**
3519
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3520
- */
3521
- interval: Duration.Interval;
3522
-
3523
- /**
3524
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3525
- */
3526
- interval_count: number;
3527
- }
3528
-
3529
- namespace Duration {
3530
- type Interval = 'day' | 'month' | 'week' | 'year';
3531
- }
3532
-
3533
- type Type = 'duration' | 'timestamp';
3534
- }
3535
- }
3536
-
3537
2487
  interface PriceData {
3538
2488
  /**
3539
2489
  * 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).
@@ -3623,56 +2573,12 @@ declare module 'stripe' {
3623
2573
  */
3624
2574
  discount?: string;
3625
2575
 
3626
- /**
3627
- * Details to determine how long the discount should be applied for.
3628
- */
3629
- discount_end?: Discount.DiscountEnd;
3630
-
3631
2576
  /**
3632
2577
  * ID of the promotion code to create a new discount for.
3633
2578
  */
3634
2579
  promotion_code?: string;
3635
2580
  }
3636
2581
 
3637
- namespace Discount {
3638
- interface DiscountEnd {
3639
- /**
3640
- * Time span for the redeemed discount.
3641
- */
3642
- duration?: DiscountEnd.Duration;
3643
-
3644
- /**
3645
- * A precise Unix timestamp for the discount to end. Must be in the future.
3646
- */
3647
- timestamp?: number;
3648
-
3649
- /**
3650
- * The type of calculation made to determine when the discount ends.
3651
- */
3652
- type: DiscountEnd.Type;
3653
- }
3654
-
3655
- namespace DiscountEnd {
3656
- interface Duration {
3657
- /**
3658
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3659
- */
3660
- interval: Duration.Interval;
3661
-
3662
- /**
3663
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3664
- */
3665
- interval_count: number;
3666
- }
3667
-
3668
- namespace Duration {
3669
- type Interval = 'day' | 'month' | 'week' | 'year';
3670
- }
3671
-
3672
- type Type = 'duration' | 'timestamp';
3673
- }
3674
- }
3675
-
3676
2582
  interface InvoiceSettings {
3677
2583
  /**
3678
2584
  * The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
@@ -3748,11 +2654,6 @@ declare module 'stripe' {
3748
2654
  * 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.
3749
2655
  */
3750
2656
  tax_rates?: Stripe.Emptyable<Array<string>>;
3751
-
3752
- /**
3753
- * Options that configure the trial on the subscription item.
3754
- */
3755
- trial?: Item.Trial;
3756
2657
  }
3757
2658
 
3758
2659
  namespace Item {
@@ -3774,56 +2675,12 @@ declare module 'stripe' {
3774
2675
  */
3775
2676
  discount?: string;
3776
2677
 
3777
- /**
3778
- * Details to determine how long the discount should be applied for.
3779
- */
3780
- discount_end?: Discount.DiscountEnd;
3781
-
3782
2678
  /**
3783
2679
  * ID of the promotion code to create a new discount for.
3784
2680
  */
3785
2681
  promotion_code?: string;
3786
2682
  }
3787
2683
 
3788
- namespace Discount {
3789
- interface DiscountEnd {
3790
- /**
3791
- * Time span for the redeemed discount.
3792
- */
3793
- duration?: DiscountEnd.Duration;
3794
-
3795
- /**
3796
- * A precise Unix timestamp for the discount to end. Must be in the future.
3797
- */
3798
- timestamp?: number;
3799
-
3800
- /**
3801
- * The type of calculation made to determine when the discount ends.
3802
- */
3803
- type: DiscountEnd.Type;
3804
- }
3805
-
3806
- namespace DiscountEnd {
3807
- interface Duration {
3808
- /**
3809
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3810
- */
3811
- interval: Duration.Interval;
3812
-
3813
- /**
3814
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3815
- */
3816
- interval_count: number;
3817
- }
3818
-
3819
- namespace Duration {
3820
- type Interval = 'day' | 'month' | 'week' | 'year';
3821
- }
3822
-
3823
- type Type = 'duration' | 'timestamp';
3824
- }
3825
- }
3826
-
3827
2684
  interface PriceData {
3828
2685
  /**
3829
2686
  * 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).
@@ -3875,33 +2732,6 @@ declare module 'stripe' {
3875
2732
 
3876
2733
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
3877
2734
  }
3878
-
3879
- interface Trial {
3880
- /**
3881
- * 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.
3882
- */
3883
- converts_to?: Array<string>;
3884
-
3885
- /**
3886
- * Determines the type of trial for this item.
3887
- */
3888
- type: Trial.Type;
3889
- }
3890
-
3891
- namespace Trial {
3892
- type Type = 'free' | 'paid';
3893
- }
3894
- }
3895
-
3896
- interface PauseCollection {
3897
- /**
3898
- * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3899
- */
3900
- behavior: PauseCollection.Behavior;
3901
- }
3902
-
3903
- namespace PauseCollection {
3904
- type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
3905
2735
  }
3906
2736
 
3907
2737
  type ProrationBehavior =
@@ -3920,95 +2750,6 @@ declare module 'stripe' {
3920
2750
  */
3921
2751
  destination: string;
3922
2752
  }
3923
-
3924
- type TrialContinuation = 'continue' | 'none';
3925
-
3926
- interface TrialSettings {
3927
- /**
3928
- * Defines how the subscription should behave when a trial ends.
3929
- */
3930
- end_behavior?: TrialSettings.EndBehavior;
3931
- }
3932
-
3933
- namespace TrialSettings {
3934
- interface EndBehavior {
3935
- /**
3936
- * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3937
- */
3938
- prorate_up_front?: EndBehavior.ProrateUpFront;
3939
- }
3940
-
3941
- namespace EndBehavior {
3942
- type ProrateUpFront = 'defer' | 'include';
3943
- }
3944
- }
3945
- }
3946
-
3947
- interface Prebilling {
3948
- /**
3949
- * The end of the prebilled time period.
3950
- */
3951
- bill_until?: Prebilling.BillUntil;
3952
-
3953
- /**
3954
- * This is used to determine the number of billing cycles to prebill.
3955
- */
3956
- iterations?: number;
3957
- }
3958
-
3959
- namespace Prebilling {
3960
- interface BillUntil {
3961
- /**
3962
- * End the prebilled period when a specified amendment ends.
3963
- */
3964
- amendment_end?: BillUntil.AmendmentEnd;
3965
-
3966
- /**
3967
- * Time span for prebilling, starting from `bill_from`.
3968
- */
3969
- duration?: BillUntil.Duration;
3970
-
3971
- /**
3972
- * End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
3973
- */
3974
- timestamp?: number;
3975
-
3976
- /**
3977
- * Select one of several ways to pass the `bill_until` value.
3978
- */
3979
- type: BillUntil.Type;
3980
- }
3981
-
3982
- namespace BillUntil {
3983
- interface AmendmentEnd {
3984
- /**
3985
- * The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
3986
- */
3987
- index: number;
3988
- }
3989
-
3990
- interface Duration {
3991
- /**
3992
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3993
- */
3994
- interval: Duration.Interval;
3995
-
3996
- /**
3997
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3998
- */
3999
- interval_count: number;
4000
- }
4001
-
4002
- namespace Duration {
4003
- type Interval = 'day' | 'month' | 'week' | 'year';
4004
- }
4005
-
4006
- type Type =
4007
- | 'amendment_end'
4008
- | 'duration'
4009
- | 'schedule_end'
4010
- | 'timestamp';
4011
- }
4012
2753
  }
4013
2754
 
4014
2755
  type ProrationBehavior =
@@ -4031,10 +2772,10 @@ declare module 'stripe' {
4031
2772
  /**
4032
2773
  * 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.
4033
2774
  */
4034
- cancel_at?: Stripe.Emptyable<number | SubscriptionDetails.CancelAt>;
2775
+ cancel_at?: Stripe.Emptyable<number>;
4035
2776
 
4036
2777
  /**
4037
- * 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.
2778
+ * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
4038
2779
  */
4039
2780
  cancel_at_period_end?: boolean;
4040
2781
 
@@ -4053,11 +2794,6 @@ declare module 'stripe' {
4053
2794
  */
4054
2795
  items?: Array<SubscriptionDetails.Item>;
4055
2796
 
4056
- /**
4057
- * The pre-billing to apply to the subscription as a preview.
4058
- */
4059
- prebilling?: SubscriptionDetails.Prebilling;
4060
-
4061
2797
  /**
4062
2798
  * 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`.
4063
2799
  */
@@ -4087,9 +2823,13 @@ declare module 'stripe' {
4087
2823
  namespace SubscriptionDetails {
4088
2824
  type BillingCycleAnchor = 'now' | 'unchanged';
4089
2825
 
4090
- type BillingMode = 'classic' | 'flexible';
2826
+ interface BillingMode {
2827
+ type: BillingMode.Type;
2828
+ }
4091
2829
 
4092
- type CancelAt = 'max_period_end' | 'min_period_end';
2830
+ namespace BillingMode {
2831
+ type Type = 'classic' | 'flexible';
2832
+ }
4093
2833
 
4094
2834
  interface Item {
4095
2835
  /**
@@ -4167,56 +2907,12 @@ declare module 'stripe' {
4167
2907
  */
4168
2908
  discount?: string;
4169
2909
 
4170
- /**
4171
- * Details to determine how long the discount should be applied for.
4172
- */
4173
- discount_end?: Discount.DiscountEnd;
4174
-
4175
2910
  /**
4176
2911
  * ID of the promotion code to create a new discount for.
4177
2912
  */
4178
2913
  promotion_code?: string;
4179
2914
  }
4180
2915
 
4181
- namespace Discount {
4182
- interface DiscountEnd {
4183
- /**
4184
- * Time span for the redeemed discount.
4185
- */
4186
- duration?: DiscountEnd.Duration;
4187
-
4188
- /**
4189
- * A precise Unix timestamp for the discount to end. Must be in the future.
4190
- */
4191
- timestamp?: number;
4192
-
4193
- /**
4194
- * The type of calculation made to determine when the discount ends.
4195
- */
4196
- type: DiscountEnd.Type;
4197
- }
4198
-
4199
- namespace DiscountEnd {
4200
- interface Duration {
4201
- /**
4202
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4203
- */
4204
- interval: Duration.Interval;
4205
-
4206
- /**
4207
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4208
- */
4209
- interval_count: number;
4210
- }
4211
-
4212
- namespace Duration {
4213
- type Interval = 'day' | 'month' | 'week' | 'year';
4214
- }
4215
-
4216
- type Type = 'duration' | 'timestamp';
4217
- }
4218
- }
4219
-
4220
2916
  interface PriceData {
4221
2917
  /**
4222
2918
  * 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).
@@ -4270,13 +2966,6 @@ declare module 'stripe' {
4270
2966
  }
4271
2967
  }
4272
2968
 
4273
- interface Prebilling {
4274
- /**
4275
- * This is used to determine the number of billing cycles to prebill.
4276
- */
4277
- iterations: number;
4278
- }
4279
-
4280
2969
  type ProrationBehavior =
4281
2970
  | 'always_invoice'
4282
2971
  | 'create_prorations'
@@ -4461,11 +3150,6 @@ declare module 'stripe' {
4461
3150
  */
4462
3151
  id: string;
4463
3152
 
4464
- /**
4465
- * The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
4466
- */
4467
- margins?: Stripe.Emptyable<Array<string>>;
4468
-
4469
3153
  /**
4470
3154
  * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
4471
3155
  */
@@ -4514,56 +3198,12 @@ declare module 'stripe' {
4514
3198
  */
4515
3199
  discount?: string;
4516
3200
 
4517
- /**
4518
- * Details to determine how long the discount should be applied for.
4519
- */
4520
- discount_end?: Discount.DiscountEnd;
4521
-
4522
3201
  /**
4523
3202
  * ID of the promotion code to create a new discount for.
4524
3203
  */
4525
3204
  promotion_code?: string;
4526
3205
  }
4527
3206
 
4528
- namespace Discount {
4529
- interface DiscountEnd {
4530
- /**
4531
- * Time span for the redeemed discount.
4532
- */
4533
- duration?: DiscountEnd.Duration;
4534
-
4535
- /**
4536
- * A precise Unix timestamp for the discount to end. Must be in the future.
4537
- */
4538
- timestamp?: number;
4539
-
4540
- /**
4541
- * The type of calculation made to determine when the discount ends.
4542
- */
4543
- type: DiscountEnd.Type;
4544
- }
4545
-
4546
- namespace DiscountEnd {
4547
- interface Duration {
4548
- /**
4549
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4550
- */
4551
- interval: Duration.Interval;
4552
-
4553
- /**
4554
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4555
- */
4556
- interval_count: number;
4557
- }
4558
-
4559
- namespace Duration {
4560
- type Interval = 'day' | 'month' | 'week' | 'year';
4561
- }
4562
-
4563
- type Type = 'duration' | 'timestamp';
4564
- }
4565
- }
4566
-
4567
3207
  interface Period {
4568
3208
  /**
4569
3209
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -4790,11 +3430,6 @@ declare module 'stripe' {
4790
3430
  */
4791
3431
  expand?: Array<string>;
4792
3432
 
4793
- /**
4794
- * The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
4795
- */
4796
- margins?: Stripe.Emptyable<Array<string>>;
4797
-
4798
3433
  /**
4799
3434
  * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
4800
3435
  */
@@ -4845,56 +3480,12 @@ declare module 'stripe' {
4845
3480
  */
4846
3481
  discount?: string;
4847
3482
 
4848
- /**
4849
- * Details to determine how long the discount should be applied for.
4850
- */
4851
- discount_end?: Discount.DiscountEnd;
4852
-
4853
3483
  /**
4854
3484
  * ID of the promotion code to create a new discount for.
4855
3485
  */
4856
3486
  promotion_code?: string;
4857
3487
  }
4858
3488
 
4859
- namespace Discount {
4860
- interface DiscountEnd {
4861
- /**
4862
- * Time span for the redeemed discount.
4863
- */
4864
- duration?: DiscountEnd.Duration;
4865
-
4866
- /**
4867
- * A precise Unix timestamp for the discount to end. Must be in the future.
4868
- */
4869
- timestamp?: number;
4870
-
4871
- /**
4872
- * The type of calculation made to determine when the discount ends.
4873
- */
4874
- type: DiscountEnd.Type;
4875
- }
4876
-
4877
- namespace DiscountEnd {
4878
- interface Duration {
4879
- /**
4880
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4881
- */
4882
- interval: Duration.Interval;
4883
-
4884
- /**
4885
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4886
- */
4887
- interval_count: number;
4888
- }
4889
-
4890
- namespace Duration {
4891
- type Interval = 'day' | 'month' | 'week' | 'year';
4892
- }
4893
-
4894
- type Type = 'duration' | 'timestamp';
4895
- }
4896
- }
4897
-
4898
3489
  interface Period {
4899
3490
  /**
4900
3491
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.