stripe 18.1.0-beta.3 → 18.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/CHANGELOG.md +140 -1208
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +0 -1
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +3 -93
  6. package/cjs/RequestSender.js +3 -7
  7. package/cjs/Webhooks.js +6 -2
  8. package/cjs/apiVersion.js +1 -1
  9. package/cjs/net/FetchHttpClient.js +3 -4
  10. package/cjs/resources/FinancialConnections/Accounts.js +0 -5
  11. package/cjs/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +4 -4
  12. package/cjs/resources/Invoices.js +0 -4
  13. package/cjs/resources/PaymentIntents.js +0 -13
  14. package/cjs/resources/Quotes.js +0 -32
  15. package/cjs/resources/SubscriptionSchedules.js +0 -4
  16. package/cjs/resources/Terminal/Readers.js +0 -12
  17. package/cjs/resources/TestHelpers/Terminal/Readers.js +0 -8
  18. package/cjs/resources.js +18 -108
  19. package/cjs/stripe.core.js +2 -4
  20. package/cjs/utils.js +28 -4
  21. package/esm/Error.js +2 -81
  22. package/esm/RequestSender.js +4 -8
  23. package/esm/Webhooks.js +6 -2
  24. package/esm/apiVersion.js +1 -1
  25. package/esm/net/FetchHttpClient.js +3 -4
  26. package/esm/resources/FinancialConnections/Accounts.js +0 -5
  27. package/esm/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +3 -3
  28. package/esm/resources/Invoices.js +0 -4
  29. package/esm/resources/PaymentIntents.js +0 -13
  30. package/esm/resources/Quotes.js +0 -32
  31. package/esm/resources/SubscriptionSchedules.js +0 -4
  32. package/esm/resources/Terminal/Readers.js +0 -12
  33. package/esm/resources/TestHelpers/Terminal/Readers.js +0 -8
  34. package/esm/resources.js +1 -84
  35. package/esm/stripe.core.js +2 -4
  36. package/esm/utils.js +24 -3
  37. package/package.json +12 -3
  38. package/types/AccountLinksResource.d.ts +1 -5
  39. package/types/AccountSessions.d.ts +0 -45
  40. package/types/AccountSessionsResource.d.ts +0 -300
  41. package/types/Accounts.d.ts +1 -212
  42. package/types/AccountsResource.d.ts +2 -546
  43. package/types/Billing/CreditBalanceSummary.d.ts +0 -5
  44. package/types/Billing/CreditBalanceSummaryResource.d.ts +3 -8
  45. package/types/Billing/CreditBalanceTransactionsResource.d.ts +4 -12
  46. package/types/Billing/CreditGrants.d.ts +0 -5
  47. package/types/Billing/CreditGrantsResource.d.ts +1 -11
  48. package/types/BillingPortal/Sessions.d.ts +0 -5
  49. package/types/BillingPortal/SessionsResource.d.ts +4 -12
  50. package/types/Cards.d.ts +0 -5
  51. package/types/CashBalances.d.ts +0 -5
  52. package/types/Charges.d.ts +0 -166
  53. package/types/ChargesResource.d.ts +0 -1314
  54. package/types/Checkout/Sessions.d.ts +13 -306
  55. package/types/Checkout/SessionsResource.d.ts +1 -333
  56. package/types/ConfirmationTokens.d.ts +0 -120
  57. package/types/Coupons.d.ts +0 -33
  58. package/types/CouponsResource.d.ts +0 -21
  59. package/types/CreditNoteLineItems.d.ts +0 -17
  60. package/types/CreditNotes.d.ts +0 -9
  61. package/types/CreditNotesResource.d.ts +0 -5
  62. package/types/CustomerBalanceTransactions.d.ts +0 -2
  63. package/types/CustomerCashBalanceTransactions.d.ts +0 -2
  64. package/types/CustomerSessions.d.ts +0 -5
  65. package/types/CustomerSessionsResource.d.ts +1 -6
  66. package/types/Customers.d.ts +0 -2
  67. package/types/CustomersResource.d.ts +23 -11
  68. package/types/Discounts.d.ts +0 -10
  69. package/types/Errors.d.ts +2 -69
  70. package/types/EventTypes.d.ts +0 -698
  71. package/types/Events.d.ts +1 -100
  72. package/types/FinancialConnections/Accounts.d.ts +1 -31
  73. package/types/FinancialConnections/AccountsResource.d.ts +3 -40
  74. package/types/FinancialConnections/Sessions.d.ts +1 -51
  75. package/types/FinancialConnections/SessionsResource.d.ts +1 -43
  76. package/types/Identity/VerificationSessions.d.ts +0 -5
  77. package/types/Identity/VerificationSessionsResource.d.ts +0 -7
  78. package/types/InvoiceItems.d.ts +0 -10
  79. package/types/InvoiceItemsResource.d.ts +6 -117
  80. package/types/InvoiceLineItems.d.ts +2 -46
  81. package/types/InvoicePayments.d.ts +0 -5
  82. package/types/InvoicePaymentsResource.d.ts +74 -0
  83. package/types/Invoices.d.ts +15 -138
  84. package/types/InvoicesResource.d.ts +15 -1471
  85. package/types/Issuing/CardholdersResource.d.ts +1 -2
  86. package/types/Issuing/Transactions.d.ts +0 -5
  87. package/types/Issuing/TransactionsResource.d.ts +0 -5
  88. package/types/LineItems.d.ts +0 -49
  89. package/types/Mandates.d.ts +0 -77
  90. package/types/PaymentIntents.d.ts +2 -728
  91. package/types/PaymentIntentsResource.d.ts +3955 -8479
  92. package/types/PaymentLinks.d.ts +0 -6
  93. package/types/PaymentLinksResource.d.ts +0 -12
  94. package/types/PaymentMethodConfigurations.d.ts +0 -180
  95. package/types/PaymentMethodConfigurationsResource.d.ts +0 -250
  96. package/types/PaymentMethods.d.ts +0 -120
  97. package/types/PaymentMethodsResource.d.ts +2 -167
  98. package/types/Payouts.d.ts +0 -5
  99. package/types/PayoutsResource.d.ts +0 -5
  100. package/types/Prices.d.ts +0 -22
  101. package/types/PricesResource.d.ts +0 -22
  102. package/types/Products.d.ts +0 -39
  103. package/types/ProductsResource.d.ts +0 -36
  104. package/types/PromotionCodes.d.ts +0 -5
  105. package/types/PromotionCodesResource.d.ts +0 -10
  106. package/types/Quotes.d.ts +2 -597
  107. package/types/QuotesResource.d.ts +224 -2571
  108. package/types/Refunds.d.ts +0 -14
  109. package/types/SetupAttempts.d.ts +1 -50
  110. package/types/SetupIntents.d.ts +2 -121
  111. package/types/SetupIntentsResource.d.ts +3 -730
  112. package/types/Sources.d.ts +0 -29
  113. package/types/SubscriptionItems.d.ts +0 -23
  114. package/types/SubscriptionItemsResource.d.ts +0 -109
  115. package/types/SubscriptionSchedules.d.ts +0 -205
  116. package/types/SubscriptionSchedulesResource.d.ts +8 -1236
  117. package/types/Subscriptions.d.ts +1 -97
  118. package/types/SubscriptionsResource.d.ts +9 -391
  119. package/types/Tax/Calculations.d.ts +11 -1
  120. package/types/Tax/CalculationsResource.d.ts +11 -1
  121. package/types/Tax/Registrations.d.ts +27 -0
  122. package/types/Tax/RegistrationsResource.d.ts +36 -0
  123. package/types/Tax/Transactions.d.ts +11 -1
  124. package/types/TaxIds.d.ts +11 -11
  125. package/types/TaxIdsResource.d.ts +11 -11
  126. package/types/Terminal/Readers.d.ts +0 -300
  127. package/types/Terminal/ReadersResource.d.ts +0 -220
  128. package/types/TestHelpers/ConfirmationTokensResource.d.ts +7 -127
  129. package/types/TestHelpers/Terminal/ReadersResource.d.ts +0 -53
  130. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
  131. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
  132. package/types/Transfers.d.ts +0 -5
  133. package/types/TransfersResource.d.ts +0 -5
  134. package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
  135. package/types/Treasury/FinancialAccounts.d.ts +0 -5
  136. package/types/Treasury/FinancialAccountsResource.d.ts +0 -37
  137. package/types/Treasury/OutboundPaymentsResource.d.ts +0 -5
  138. package/types/Treasury/OutboundTransfers.d.ts +0 -26
  139. package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
  140. package/types/Treasury/ReceivedCredits.d.ts +0 -26
  141. package/types/Treasury/ReceivedDebits.d.ts +0 -31
  142. package/types/V2/EventTypes.d.ts +7 -677
  143. package/types/WebhookEndpointsResource.d.ts +4 -85
  144. package/types/index.d.ts +5 -146
  145. package/types/lib.d.ts +1 -11
  146. package/types/test/typescriptTest.ts +3 -3
  147. package/cjs/resources/AccountNotices.js +0 -21
  148. package/cjs/resources/BalanceSettings.js +0 -10
  149. package/cjs/resources/Capital/FinancingOffers.js +0 -21
  150. package/cjs/resources/Capital/FinancingSummary.js +0 -12
  151. package/cjs/resources/Capital/FinancingTransactions.js +0 -17
  152. package/cjs/resources/ExternalAccounts.js +0 -23
  153. package/cjs/resources/FinancialConnections/Institutions.js +0 -17
  154. package/cjs/resources/FxQuotes.js +0 -15
  155. package/cjs/resources/GiftCards/Cards.js +0 -23
  156. package/cjs/resources/GiftCards/Transactions.js +0 -33
  157. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
  158. package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
  159. package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
  160. package/cjs/resources/Margins.js +0 -22
  161. package/cjs/resources/Orders.js +0 -24
  162. package/cjs/resources/PaymentRecords.js +0 -29
  163. package/cjs/resources/Privacy/RedactionJobs.js +0 -46
  164. package/cjs/resources/Tax/Associations.js +0 -9
  165. package/cjs/resources/Tax/Forms.js +0 -20
  166. package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
  167. package/cjs/resources/V2/Core/AccountLinks.js +0 -9
  168. package/cjs/resources/V2/Core/Accounts/Persons.js +0 -29
  169. package/cjs/resources/V2/Core/Accounts.js +0 -25
  170. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +0 -28
  171. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +0 -24
  172. package/cjs/resources/V2/MoneyManagement/Adjustments.js +0 -17
  173. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +0 -17
  174. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +0 -21
  175. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +0 -21
  176. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -12
  177. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +0 -25
  178. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -29
  179. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +0 -25
  180. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +0 -25
  181. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -12
  182. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +0 -17
  183. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +0 -17
  184. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +0 -17
  185. package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
  186. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
  187. package/esm/resources/AccountNotices.js +0 -18
  188. package/esm/resources/BalanceSettings.js +0 -7
  189. package/esm/resources/Capital/FinancingOffers.js +0 -18
  190. package/esm/resources/Capital/FinancingSummary.js +0 -9
  191. package/esm/resources/Capital/FinancingTransactions.js +0 -14
  192. package/esm/resources/ExternalAccounts.js +0 -20
  193. package/esm/resources/FinancialConnections/Institutions.js +0 -14
  194. package/esm/resources/FxQuotes.js +0 -12
  195. package/esm/resources/GiftCards/Cards.js +0 -20
  196. package/esm/resources/GiftCards/Transactions.js +0 -30
  197. package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
  198. package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
  199. package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
  200. package/esm/resources/Margins.js +0 -19
  201. package/esm/resources/Orders.js +0 -21
  202. package/esm/resources/PaymentRecords.js +0 -26
  203. package/esm/resources/Privacy/RedactionJobs.js +0 -43
  204. package/esm/resources/Tax/Associations.js +0 -6
  205. package/esm/resources/Tax/Forms.js +0 -17
  206. package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
  207. package/esm/resources/V2/Core/AccountLinks.js +0 -6
  208. package/esm/resources/V2/Core/Accounts/Persons.js +0 -26
  209. package/esm/resources/V2/Core/Accounts.js +0 -22
  210. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +0 -25
  211. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +0 -21
  212. package/esm/resources/V2/MoneyManagement/Adjustments.js +0 -14
  213. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +0 -14
  214. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +0 -18
  215. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +0 -18
  216. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -9
  217. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +0 -22
  218. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -26
  219. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +0 -22
  220. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +0 -22
  221. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -9
  222. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +0 -14
  223. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +0 -14
  224. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +0 -14
  225. package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
  226. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
  227. package/types/AccountNotices.d.ts +0 -113
  228. package/types/AccountNoticesResource.d.ts +0 -98
  229. package/types/BalanceSettings.d.ts +0 -89
  230. package/types/BalanceSettingsResource.d.ts +0 -108
  231. package/types/Billing/MeterErrorReports.d.ts +0 -106
  232. package/types/Capital/FinancingOffers.d.ts +0 -188
  233. package/types/Capital/FinancingOffersResource.d.ts +0 -97
  234. package/types/Capital/FinancingSummary.d.ts +0 -106
  235. package/types/Capital/FinancingSummaryResource.d.ts +0 -27
  236. package/types/Capital/FinancingTransactions.d.ts +0 -135
  237. package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
  238. package/types/ExternalAccountsResource.d.ts +0 -304
  239. package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
  240. package/types/FinancialConnections/Institutions.d.ts +0 -93
  241. package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
  242. package/types/FxQuotes.d.ts +0 -153
  243. package/types/FxQuotesResource.d.ts +0 -130
  244. package/types/GiftCards/Cards.d.ts +0 -118
  245. package/types/GiftCards/CardsResource.d.ts +0 -159
  246. package/types/GiftCards/Transactions.d.ts +0 -129
  247. package/types/GiftCards/TransactionsResource.d.ts +0 -201
  248. package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
  249. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
  250. package/types/Issuing/DisputeSettlementDetails.d.ts +0 -85
  251. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
  252. package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
  253. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
  254. package/types/Issuing/Settlements.d.ts +0 -113
  255. package/types/Margins.d.ts +0 -56
  256. package/types/MarginsResource.d.ts +0 -114
  257. package/types/Orders.d.ts +0 -1189
  258. package/types/OrdersResource.d.ts +0 -2981
  259. package/types/PaymentAttemptRecords.d.ts +0 -2112
  260. package/types/PaymentAttemptRecordsResource.d.ts +0 -47
  261. package/types/PaymentIntentAmountDetailsLineItems.d.ts +0 -110
  262. package/types/PaymentRecords.d.ts +0 -2105
  263. package/types/PaymentRecordsResource.d.ts +0 -455
  264. package/types/Privacy/RedactionJobRootObjects.d.ts +0 -35
  265. package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -30
  266. package/types/Privacy/RedactionJobs.d.ts +0 -43
  267. package/types/Privacy/RedactionJobsResource.d.ts +0 -240
  268. package/types/QuoteLines.d.ts +0 -634
  269. package/types/QuotePreviewInvoices.d.ts +0 -1687
  270. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -778
  271. package/types/Tax/Associations.d.ts +0 -126
  272. package/types/Tax/AssociationsResource.d.ts +0 -29
  273. package/types/Tax/Forms.d.ts +0 -220
  274. package/types/Tax/FormsResource.d.ts +0 -107
  275. package/types/Terminal/ReaderCollectedData.d.ts +0 -51
  276. package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
  277. package/types/V2/Core/AccountLinks.d.ts +0 -101
  278. package/types/V2/Core/AccountLinksResource.d.ts +0 -90
  279. package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -3760
  280. package/types/V2/Core/Accounts.d.ts +0 -8057
  281. package/types/V2/Core/AccountsResource.d.ts +0 -10184
  282. package/types/V2/Core/Persons.d.ts +0 -1857
  283. package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -155
  284. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -172
  285. package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -65
  286. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -123
  287. package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -22
  288. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -27
  289. package/types/V2/MoneyManagement/Adjustments.d.ts +0 -105
  290. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
  291. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -540
  292. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -52
  293. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -308
  294. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -287
  295. package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -201
  296. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
  297. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -141
  298. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -93
  299. package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -273
  300. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
  301. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -92
  302. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
  303. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -246
  304. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -207
  305. package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -146
  306. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +0 -41
  307. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +0 -82
  308. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +0 -113
  309. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +0 -280
  310. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
  311. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -219
  312. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
  313. package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -151
  314. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
  315. package/types/V2/MoneyManagement/Transactions.d.ts +0 -166
  316. package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
  317. 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
  */
@@ -528,8 +440,6 @@ declare module 'stripe' {
528
440
  }
529
441
  }
530
442
 
531
- interface IdBankTransfer {}
532
-
533
443
  interface Konbini {}
534
444
 
535
445
  interface SepaDebit {}
@@ -570,11 +480,6 @@ declare module 'stripe' {
570
480
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
571
481
  */
572
482
  account_subcategories?: Array<Filters.AccountSubcategory>;
573
-
574
- /**
575
- * ID of the institution to use to filter for selectable accounts.
576
- */
577
- institution?: string;
578
483
  }
579
484
 
580
485
  namespace Filters {
@@ -587,11 +492,7 @@ declare module 'stripe' {
587
492
  | 'payment_method'
588
493
  | 'transactions';
589
494
 
590
- type Prefetch =
591
- | 'balances'
592
- | 'inferred_balances'
593
- | 'ownership'
594
- | 'transactions';
495
+ type Prefetch = 'balances' | 'ownership' | 'transactions';
595
496
  }
596
497
 
597
498
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -610,13 +511,11 @@ declare module 'stripe' {
610
511
  | 'boleto'
611
512
  | 'card'
612
513
  | 'cashapp'
613
- | 'custom'
614
514
  | 'customer_balance'
615
515
  | 'eps'
616
516
  | 'fpx'
617
517
  | 'giropay'
618
518
  | 'grabpay'
619
- | 'id_bank_transfer'
620
519
  | 'ideal'
621
520
  | 'jp_credit_transfer'
622
521
  | 'kakao_pay'
@@ -636,7 +535,6 @@ declare module 'stripe' {
636
535
  | 'sepa_credit_transfer'
637
536
  | 'sepa_debit'
638
537
  | 'sofort'
639
- | 'stripe_balance'
640
538
  | 'swish'
641
539
  | 'us_bank_account'
642
540
  | 'wechat_pay';
@@ -864,11 +762,6 @@ declare module 'stripe' {
864
762
  */
865
763
  account_tax_ids?: Stripe.Emptyable<Array<string>>;
866
764
 
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
765
  /**
873
766
  * 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
767
  */
@@ -904,11 +797,6 @@ declare module 'stripe' {
904
797
  */
905
798
  days_until_due?: number;
906
799
 
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
800
  /**
913
801
  * 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
802
  */
@@ -1006,28 +894,6 @@ declare module 'stripe' {
1006
894
  }
1007
895
 
1008
896
  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
897
  interface AutomaticTax {
1032
898
  /**
1033
899
  * 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 +949,12 @@ declare module 'stripe' {
1083
949
  */
1084
950
  discount?: string;
1085
951
 
1086
- /**
1087
- * Details to determine how long the discount should be applied for.
1088
- */
1089
- discount_end?: Discount.DiscountEnd;
1090
-
1091
952
  /**
1092
953
  * ID of the promotion code to create a new discount for.
1093
954
  */
1094
955
  promotion_code?: string;
1095
956
  }
1096
957
 
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
958
  interface Issuer {
1137
959
  /**
1138
960
  * The connected account being referenced when `type` is `account`.
@@ -1192,13 +1014,6 @@ declare module 'stripe' {
1192
1014
  PaymentMethodOptions.CustomerBalance
1193
1015
  >;
1194
1016
 
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
1017
  /**
1203
1018
  * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
1204
1019
  */
@@ -1342,8 +1157,6 @@ declare module 'stripe' {
1342
1157
  }
1343
1158
  }
1344
1159
 
1345
- interface IdBankTransfer {}
1346
-
1347
1160
  interface Konbini {}
1348
1161
 
1349
1162
  interface SepaDebit {}
@@ -1384,11 +1197,6 @@ declare module 'stripe' {
1384
1197
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1385
1198
  */
1386
1199
  account_subcategories?: Array<Filters.AccountSubcategory>;
1387
-
1388
- /**
1389
- * ID of the institution to use to filter for selectable accounts.
1390
- */
1391
- institution?: string;
1392
1200
  }
1393
1201
 
1394
1202
  namespace Filters {
@@ -1401,11 +1209,7 @@ declare module 'stripe' {
1401
1209
  | 'payment_method'
1402
1210
  | 'transactions';
1403
1211
 
1404
- type Prefetch =
1405
- | 'balances'
1406
- | 'inferred_balances'
1407
- | 'ownership'
1408
- | 'transactions';
1212
+ type Prefetch = 'balances' | 'ownership' | 'transactions';
1409
1213
  }
1410
1214
 
1411
1215
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -1424,13 +1228,11 @@ declare module 'stripe' {
1424
1228
  | 'boleto'
1425
1229
  | 'card'
1426
1230
  | 'cashapp'
1427
- | 'custom'
1428
1231
  | 'customer_balance'
1429
1232
  | 'eps'
1430
1233
  | 'fpx'
1431
1234
  | 'giropay'
1432
1235
  | 'grabpay'
1433
- | 'id_bank_transfer'
1434
1236
  | 'ideal'
1435
1237
  | 'jp_credit_transfer'
1436
1238
  | 'kakao_pay'
@@ -1450,7 +1252,6 @@ declare module 'stripe' {
1450
1252
  | 'sepa_credit_transfer'
1451
1253
  | 'sepa_debit'
1452
1254
  | 'sofort'
1453
- | 'stripe_balance'
1454
1255
  | 'swish'
1455
1256
  | 'us_bank_account'
1456
1257
  | 'wechat_pay';
@@ -1679,11 +1480,6 @@ declare module 'stripe' {
1679
1480
  */
1680
1481
  customer?: string;
1681
1482
 
1682
- /**
1683
- * Only return invoices for the account specified by this account ID.
1684
- */
1685
- customer_account?: string;
1686
-
1687
1483
  due_date?: Stripe.RangeQueryParam | number;
1688
1484
 
1689
1485
  /**
@@ -1756,11 +1552,6 @@ declare module 'stripe' {
1756
1552
  */
1757
1553
  invoice_item?: string;
1758
1554
 
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
1555
  /**
1765
1556
  * 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
1557
  */
@@ -1809,56 +1600,12 @@ declare module 'stripe' {
1809
1600
  */
1810
1601
  discount?: string;
1811
1602
 
1812
- /**
1813
- * Details to determine how long the discount should be applied for.
1814
- */
1815
- discount_end?: Discount.DiscountEnd;
1816
-
1817
1603
  /**
1818
1604
  * ID of the promotion code to create a new discount for.
1819
1605
  */
1820
1606
  promotion_code?: string;
1821
1607
  }
1822
1608
 
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
1609
  interface Period {
1863
1610
  /**
1864
1611
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -2059,67 +1806,6 @@ declare module 'stripe' {
2059
1806
  }
2060
1807
  }
2061
1808
 
2062
- 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
- /**
2069
- * Specifies which fields in the response should be expanded.
2070
- */
2071
- expand?: Array<string>;
2072
-
2073
- /**
2074
- * The ID of the PaymentIntent to attach to the invoice.
2075
- */
2076
- 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
- }
2122
-
2123
1809
  interface InvoiceCreatePreviewParams {
2124
1810
  /**
2125
1811
  * Settings for automatic tax lookup for this invoice preview.
@@ -2136,11 +1822,6 @@ declare module 'stripe' {
2136
1822
  */
2137
1823
  customer?: string;
2138
1824
 
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
1825
  /**
2145
1826
  * 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
1827
  */
@@ -2284,7 +1965,7 @@ declare module 'stripe' {
2284
1965
 
2285
1966
  interface TaxId {
2286
1967
  /**
2287
- * Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
1968
+ * Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
2288
1969
  */
2289
1970
  type: TaxId.Type;
2290
1971
 
@@ -2304,10 +1985,15 @@ declare module 'stripe' {
2304
1985
  | 'ar_cuit'
2305
1986
  | 'au_abn'
2306
1987
  | 'au_arn'
1988
+ | 'aw_tin'
1989
+ | 'az_tin'
2307
1990
  | 'ba_tin'
2308
1991
  | 'bb_tin'
1992
+ | 'bd_bin'
1993
+ | 'bf_ifu'
2309
1994
  | 'bg_uic'
2310
1995
  | 'bh_vat'
1996
+ | 'bj_ifu'
2311
1997
  | 'bo_tin'
2312
1998
  | 'br_cnpj'
2313
1999
  | 'br_cpf'
@@ -2323,14 +2009,17 @@ declare module 'stripe' {
2323
2009
  | 'ch_uid'
2324
2010
  | 'ch_vat'
2325
2011
  | 'cl_tin'
2012
+ | 'cm_niu'
2326
2013
  | 'cn_tin'
2327
2014
  | 'co_nit'
2328
2015
  | 'cr_tin'
2016
+ | 'cv_nif'
2329
2017
  | 'de_stn'
2330
2018
  | 'do_rcn'
2331
2019
  | 'ec_ruc'
2332
2020
  | 'eg_tin'
2333
2021
  | 'es_cif'
2022
+ | 'et_tin'
2334
2023
  | 'eu_oss_vat'
2335
2024
  | 'eu_vat'
2336
2025
  | 'gb_vat'
@@ -2347,9 +2036,11 @@ declare module 'stripe' {
2347
2036
  | 'jp_rn'
2348
2037
  | 'jp_trn'
2349
2038
  | 'ke_pin'
2039
+ | 'kg_tin'
2350
2040
  | 'kh_tin'
2351
2041
  | 'kr_brn'
2352
2042
  | 'kz_bin'
2043
+ | 'la_tin'
2353
2044
  | 'li_uid'
2354
2045
  | 'li_vat'
2355
2046
  | 'ma_vat'
@@ -2410,56 +2101,12 @@ declare module 'stripe' {
2410
2101
  */
2411
2102
  discount?: string;
2412
2103
 
2413
- /**
2414
- * Details to determine how long the discount should be applied for.
2415
- */
2416
- discount_end?: Discount.DiscountEnd;
2417
-
2418
2104
  /**
2419
2105
  * ID of the promotion code to create a new discount for.
2420
2106
  */
2421
2107
  promotion_code?: string;
2422
2108
  }
2423
2109
 
2424
- namespace Discount {
2425
- interface DiscountEnd {
2426
- /**
2427
- * Time span for the redeemed discount.
2428
- */
2429
- duration?: DiscountEnd.Duration;
2430
-
2431
- /**
2432
- * A precise Unix timestamp for the discount to end. Must be in the future.
2433
- */
2434
- timestamp?: number;
2435
-
2436
- /**
2437
- * The type of calculation made to determine when the discount ends.
2438
- */
2439
- type: DiscountEnd.Type;
2440
- }
2441
-
2442
- namespace DiscountEnd {
2443
- interface Duration {
2444
- /**
2445
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2446
- */
2447
- interval: Duration.Interval;
2448
-
2449
- /**
2450
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2451
- */
2452
- interval_count: number;
2453
- }
2454
-
2455
- namespace Duration {
2456
- type Interval = 'day' | 'month' | 'week' | 'year';
2457
- }
2458
-
2459
- type Type = 'duration' | 'timestamp';
2460
- }
2461
- }
2462
-
2463
2110
  interface InvoiceItem {
2464
2111
  /**
2465
2112
  * The integer amount in cents (or local equivalent) of previewed invoice item.
@@ -2554,56 +2201,12 @@ declare module 'stripe' {
2554
2201
  */
2555
2202
  discount?: string;
2556
2203
 
2557
- /**
2558
- * Details to determine how long the discount should be applied for.
2559
- */
2560
- discount_end?: Discount.DiscountEnd;
2561
-
2562
2204
  /**
2563
2205
  * ID of the promotion code to create a new discount for.
2564
2206
  */
2565
2207
  promotion_code?: string;
2566
2208
  }
2567
2209
 
2568
- namespace Discount {
2569
- interface DiscountEnd {
2570
- /**
2571
- * Time span for the redeemed discount.
2572
- */
2573
- duration?: DiscountEnd.Duration;
2574
-
2575
- /**
2576
- * A precise Unix timestamp for the discount to end. Must be in the future.
2577
- */
2578
- timestamp?: number;
2579
-
2580
- /**
2581
- * The type of calculation made to determine when the discount ends.
2582
- */
2583
- type: DiscountEnd.Type;
2584
- }
2585
-
2586
- namespace DiscountEnd {
2587
- interface Duration {
2588
- /**
2589
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2590
- */
2591
- interval: Duration.Interval;
2592
-
2593
- /**
2594
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2595
- */
2596
- interval_count: number;
2597
- }
2598
-
2599
- namespace Duration {
2600
- type Interval = 'day' | 'month' | 'week' | 'year';
2601
- }
2602
-
2603
- type Type = 'duration' | 'timestamp';
2604
- }
2605
- }
2606
-
2607
2210
  interface Period {
2608
2211
  /**
2609
2212
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -2669,16 +2272,6 @@ declare module 'stripe' {
2669
2272
  type PreviewMode = 'next' | 'recurring';
2670
2273
 
2671
2274
  interface ScheduleDetails {
2672
- /**
2673
- * Changes to apply to the phases of the subscription schedule, in the order provided.
2674
- */
2675
- amendments?: Array<ScheduleDetails.Amendment>;
2676
-
2677
- /**
2678
- * 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.
2679
- */
2680
- billing_behavior?: ScheduleDetails.BillingBehavior;
2681
-
2682
2275
  /**
2683
2276
  * Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
2684
2277
  */
@@ -2689,11 +2282,6 @@ declare module 'stripe' {
2689
2282
  */
2690
2283
  phases?: Array<ScheduleDetails.Phase>;
2691
2284
 
2692
- /**
2693
- * Provide any time periods to bill in advance.
2694
- */
2695
- prebilling?: Stripe.Emptyable<Array<ScheduleDetails.Prebilling>>;
2696
-
2697
2285
  /**
2698
2286
  * In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
2699
2287
  */
@@ -2701,606 +2289,9 @@ declare module 'stripe' {
2701
2289
  }
2702
2290
 
2703
2291
  namespace ScheduleDetails {
2704
- interface Amendment {
2705
- /**
2706
- * 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.
2707
- */
2708
- amendment_end?: Amendment.AmendmentEnd;
2292
+ type EndBehavior = 'cancel' | 'release';
2709
2293
 
2710
- /**
2711
- * Details to identify the earliest timestamp where the proposed change should take effect.
2712
- */
2713
- amendment_start: Amendment.AmendmentStart;
2714
-
2715
- /**
2716
- * 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.
2717
- */
2718
- billing_cycle_anchor?: Amendment.BillingCycleAnchor;
2719
-
2720
- /**
2721
- * Changes to the coupons being redeemed or discounts being applied during the amendment time span.
2722
- */
2723
- discount_actions?: Array<Amendment.DiscountAction>;
2724
-
2725
- /**
2726
- * Changes to the subscription items during the amendment time span.
2727
- */
2728
- item_actions?: Array<Amendment.ItemAction>;
2729
-
2730
- /**
2731
- * Instructions for how to modify phase metadata
2732
- */
2733
- metadata_actions?: Array<Amendment.MetadataAction>;
2734
-
2735
- /**
2736
- * 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`.
2737
- */
2738
- proration_behavior?: Amendment.ProrationBehavior;
2739
-
2740
- /**
2741
- * Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2742
- */
2743
- set_pause_collection?: Amendment.SetPauseCollection;
2744
-
2745
- /**
2746
- * Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2747
- */
2748
- set_schedule_end?: Amendment.SetScheduleEnd;
2749
-
2750
- /**
2751
- * Settings related to subscription trials.
2752
- */
2753
- trial_settings?: Amendment.TrialSettings;
2754
- }
2755
-
2756
- namespace Amendment {
2757
- interface AmendmentEnd {
2758
- /**
2759
- * Use the `end` time of a given discount.
2760
- */
2761
- discount_end?: AmendmentEnd.DiscountEnd;
2762
-
2763
- /**
2764
- * Time span for the amendment starting from the `amendment_start`.
2765
- */
2766
- duration?: AmendmentEnd.Duration;
2767
-
2768
- /**
2769
- * A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
2770
- */
2771
- timestamp?: number;
2772
-
2773
- /**
2774
- * Select one of three ways to pass the `amendment_end`.
2775
- */
2776
- type: AmendmentEnd.Type;
2777
- }
2778
-
2779
- namespace AmendmentEnd {
2780
- interface DiscountEnd {
2781
- /**
2782
- * The ID of a specific discount.
2783
- */
2784
- discount: string;
2785
- }
2786
-
2787
- interface Duration {
2788
- /**
2789
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2790
- */
2791
- interval: Duration.Interval;
2792
-
2793
- /**
2794
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2795
- */
2796
- interval_count: number;
2797
- }
2798
-
2799
- namespace Duration {
2800
- type Interval = 'day' | 'month' | 'week' | 'year';
2801
- }
2802
-
2803
- type Type =
2804
- | 'discount_end'
2805
- | 'duration'
2806
- | 'schedule_end'
2807
- | 'timestamp'
2808
- | 'trial_end'
2809
- | 'trial_start'
2810
- | 'upcoming_invoice';
2811
- }
2812
-
2813
- interface AmendmentStart {
2814
- /**
2815
- * Details of another amendment in the same array, immediately after which this amendment should begin.
2816
- */
2817
- amendment_end?: AmendmentStart.AmendmentEnd;
2818
-
2819
- /**
2820
- * Use the `end` time of a given discount.
2821
- */
2822
- discount_end?: AmendmentStart.DiscountEnd;
2823
-
2824
- /**
2825
- * A precise Unix timestamp for the amendment to start.
2826
- */
2827
- timestamp?: number;
2828
-
2829
- /**
2830
- * Select one of three ways to pass the `amendment_start`.
2831
- */
2832
- type: AmendmentStart.Type;
2833
- }
2834
-
2835
- namespace AmendmentStart {
2836
- interface AmendmentEnd {
2837
- /**
2838
- * 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.
2839
- */
2840
- index: number;
2841
- }
2842
-
2843
- interface DiscountEnd {
2844
- /**
2845
- * The ID of a specific discount.
2846
- */
2847
- discount: string;
2848
- }
2849
-
2850
- type Type =
2851
- | 'amendment_end'
2852
- | 'discount_end'
2853
- | 'now'
2854
- | 'schedule_end'
2855
- | 'timestamp'
2856
- | 'trial_end'
2857
- | 'trial_start'
2858
- | 'upcoming_invoice';
2859
- }
2860
-
2861
- type BillingCycleAnchor = 'amendment_start' | 'automatic';
2862
-
2863
- interface DiscountAction {
2864
- /**
2865
- * Details of the discount to add.
2866
- */
2867
- add?: DiscountAction.Add;
2868
-
2869
- /**
2870
- * Details of the discount to remove.
2871
- */
2872
- remove?: DiscountAction.Remove;
2873
-
2874
- /**
2875
- * Details of the discount to replace the existing discounts with.
2876
- */
2877
- set?: DiscountAction.Set;
2878
-
2879
- /**
2880
- * Determines the type of discount action.
2881
- */
2882
- type: DiscountAction.Type;
2883
- }
2884
-
2885
- namespace DiscountAction {
2886
- interface Add {
2887
- /**
2888
- * The coupon code to redeem.
2889
- */
2890
- coupon?: string;
2891
-
2892
- /**
2893
- * An ID of an existing discount for a coupon that was already redeemed.
2894
- */
2895
- discount?: string;
2896
-
2897
- /**
2898
- * Details to determine how long the discount should be applied for.
2899
- */
2900
- discount_end?: Add.DiscountEnd;
2901
-
2902
- /**
2903
- * 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.
2904
- */
2905
- index?: number;
2906
-
2907
- /**
2908
- * The promotion code to redeem.
2909
- */
2910
- promotion_code?: string;
2911
- }
2912
-
2913
- namespace Add {
2914
- interface DiscountEnd {
2915
- /**
2916
- * The type of calculation made to determine when the discount ends.
2917
- */
2918
- type: 'amendment_end';
2919
- }
2920
- }
2921
-
2922
- interface Remove {
2923
- /**
2924
- * The coupon code to remove from the `discounts` array.
2925
- */
2926
- coupon?: string;
2927
-
2928
- /**
2929
- * The ID of a discount to remove from the `discounts` array.
2930
- */
2931
- discount?: string;
2932
-
2933
- /**
2934
- * The ID of a promotion code to remove from the `discounts` array.
2935
- */
2936
- promotion_code?: string;
2937
- }
2938
-
2939
- interface Set {
2940
- /**
2941
- * The coupon code to replace the `discounts` array with.
2942
- */
2943
- coupon?: string;
2944
-
2945
- /**
2946
- * An ID of an existing discount to replace the `discounts` array with.
2947
- */
2948
- discount?: string;
2949
-
2950
- /**
2951
- * An ID of an existing promotion code to replace the `discounts` array with.
2952
- */
2953
- promotion_code?: string;
2954
- }
2955
-
2956
- type Type = 'add' | 'remove' | 'set';
2957
- }
2958
-
2959
- interface ItemAction {
2960
- /**
2961
- * 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.
2962
- */
2963
- add?: ItemAction.Add;
2964
-
2965
- /**
2966
- * Details of the subscription item to remove.
2967
- */
2968
- remove?: ItemAction.Remove;
2969
-
2970
- /**
2971
- * 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.
2972
- */
2973
- set?: ItemAction.Set;
2974
-
2975
- /**
2976
- * Determines the type of item action.
2977
- */
2978
- type: ItemAction.Type;
2979
- }
2980
-
2981
- namespace ItemAction {
2982
- interface Add {
2983
- /**
2984
- * The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
2985
- */
2986
- discounts?: Array<Add.Discount>;
2987
-
2988
- /**
2989
- * 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`.
2990
- */
2991
- metadata?: Stripe.MetadataParam;
2992
-
2993
- /**
2994
- * The ID of the price object.
2995
- */
2996
- price: string;
2997
-
2998
- /**
2999
- * Quantity for this item.
3000
- */
3001
- quantity?: number;
3002
-
3003
- /**
3004
- * 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`.
3005
- */
3006
- tax_rates?: Array<string>;
3007
-
3008
- /**
3009
- * Options that configure the trial on the subscription item.
3010
- */
3011
- trial?: Add.Trial;
3012
- }
3013
-
3014
- namespace Add {
3015
- interface Discount {
3016
- /**
3017
- * ID of the coupon to create a new discount for.
3018
- */
3019
- coupon?: string;
3020
-
3021
- /**
3022
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
3023
- */
3024
- discount?: string;
3025
-
3026
- /**
3027
- * Details to determine how long the discount should be applied for.
3028
- */
3029
- discount_end?: Discount.DiscountEnd;
3030
-
3031
- /**
3032
- * ID of the promotion code to create a new discount for.
3033
- */
3034
- promotion_code?: string;
3035
- }
3036
-
3037
- namespace Discount {
3038
- interface DiscountEnd {
3039
- /**
3040
- * Time span for the redeemed discount.
3041
- */
3042
- duration?: DiscountEnd.Duration;
3043
-
3044
- /**
3045
- * A precise Unix timestamp for the discount to end. Must be in the future.
3046
- */
3047
- timestamp?: number;
3048
-
3049
- /**
3050
- * The type of calculation made to determine when the discount ends.
3051
- */
3052
- type: DiscountEnd.Type;
3053
- }
3054
-
3055
- namespace DiscountEnd {
3056
- interface Duration {
3057
- /**
3058
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3059
- */
3060
- interval: Duration.Interval;
3061
-
3062
- /**
3063
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3064
- */
3065
- interval_count: number;
3066
- }
3067
-
3068
- namespace Duration {
3069
- type Interval = 'day' | 'month' | 'week' | 'year';
3070
- }
3071
-
3072
- type Type = 'duration' | 'timestamp';
3073
- }
3074
- }
3075
-
3076
- interface Trial {
3077
- /**
3078
- * 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.
3079
- */
3080
- converts_to?: Array<string>;
3081
-
3082
- /**
3083
- * Determines the type of trial for this item.
3084
- */
3085
- type: Trial.Type;
3086
- }
3087
-
3088
- namespace Trial {
3089
- type Type = 'free' | 'paid';
3090
- }
3091
- }
3092
-
3093
- interface Remove {
3094
- /**
3095
- * ID of a price to remove.
3096
- */
3097
- price: string;
3098
- }
3099
-
3100
- interface Set {
3101
- /**
3102
- * 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`.
3103
- */
3104
- discounts?: Array<Set.Discount>;
3105
-
3106
- /**
3107
- * 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`.
3108
- */
3109
- metadata?: Stripe.MetadataParam;
3110
-
3111
- /**
3112
- * The ID of the price object.
3113
- */
3114
- price: string;
3115
-
3116
- /**
3117
- * 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`.
3118
- */
3119
- quantity?: number;
3120
-
3121
- /**
3122
- * 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`.
3123
- */
3124
- tax_rates?: Array<string>;
3125
-
3126
- /**
3127
- * 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`.
3128
- */
3129
- trial?: Set.Trial;
3130
- }
3131
-
3132
- namespace Set {
3133
- interface Discount {
3134
- /**
3135
- * ID of the coupon to create a new discount for.
3136
- */
3137
- coupon?: string;
3138
-
3139
- /**
3140
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
3141
- */
3142
- discount?: string;
3143
-
3144
- /**
3145
- * Details to determine how long the discount should be applied for.
3146
- */
3147
- discount_end?: Discount.DiscountEnd;
3148
-
3149
- /**
3150
- * ID of the promotion code to create a new discount for.
3151
- */
3152
- promotion_code?: string;
3153
- }
3154
-
3155
- namespace Discount {
3156
- interface DiscountEnd {
3157
- /**
3158
- * Time span for the redeemed discount.
3159
- */
3160
- duration?: DiscountEnd.Duration;
3161
-
3162
- /**
3163
- * A precise Unix timestamp for the discount to end. Must be in the future.
3164
- */
3165
- timestamp?: number;
3166
-
3167
- /**
3168
- * The type of calculation made to determine when the discount ends.
3169
- */
3170
- type: DiscountEnd.Type;
3171
- }
3172
-
3173
- namespace DiscountEnd {
3174
- interface Duration {
3175
- /**
3176
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3177
- */
3178
- interval: Duration.Interval;
3179
-
3180
- /**
3181
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3182
- */
3183
- interval_count: number;
3184
- }
3185
-
3186
- namespace Duration {
3187
- type Interval = 'day' | 'month' | 'week' | 'year';
3188
- }
3189
-
3190
- type Type = 'duration' | 'timestamp';
3191
- }
3192
- }
3193
-
3194
- interface Trial {
3195
- /**
3196
- * 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.
3197
- */
3198
- converts_to?: Array<string>;
3199
-
3200
- /**
3201
- * Determines the type of trial for this item.
3202
- */
3203
- type: Trial.Type;
3204
- }
3205
-
3206
- namespace Trial {
3207
- type Type = 'free' | 'paid';
3208
- }
3209
- }
3210
-
3211
- type Type = 'add' | 'remove' | 'set';
3212
- }
3213
-
3214
- interface MetadataAction {
3215
- /**
3216
- * Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
3217
- */
3218
- add?: {
3219
- [key: string]: string;
3220
- };
3221
-
3222
- /**
3223
- * Keys to remove from schedule phase metadata.
3224
- */
3225
- remove?: Array<string>;
3226
-
3227
- /**
3228
- * Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
3229
- */
3230
- set?: Stripe.Emptyable<{
3231
- [key: string]: string;
3232
- }>;
3233
-
3234
- /**
3235
- * Select one of three ways to update phase-level `metadata` on subscription schedules.
3236
- */
3237
- type: MetadataAction.Type;
3238
- }
3239
-
3240
- namespace MetadataAction {
3241
- type Type = 'add' | 'remove' | 'set';
3242
- }
3243
-
3244
- type ProrationBehavior =
3245
- | 'always_invoice'
3246
- | 'create_prorations'
3247
- | 'none';
3248
-
3249
- interface SetPauseCollection {
3250
- /**
3251
- * Details of the pause_collection behavior to apply to the amendment.
3252
- */
3253
- set?: SetPauseCollection.Set;
3254
-
3255
- /**
3256
- * Determines the type of the pause_collection amendment.
3257
- */
3258
- type: SetPauseCollection.Type;
3259
- }
3260
-
3261
- namespace SetPauseCollection {
3262
- interface Set {
3263
- /**
3264
- * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3265
- */
3266
- behavior: Set.Behavior;
3267
- }
3268
-
3269
- namespace Set {
3270
- type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
3271
- }
3272
-
3273
- type Type = 'remove' | 'set';
3274
- }
3275
-
3276
- type SetScheduleEnd = 'amendment_end' | 'amendment_start';
3277
-
3278
- interface TrialSettings {
3279
- /**
3280
- * Defines how the subscription should behave when a trial ends.
3281
- */
3282
- end_behavior?: TrialSettings.EndBehavior;
3283
- }
3284
-
3285
- namespace TrialSettings {
3286
- interface EndBehavior {
3287
- /**
3288
- * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3289
- */
3290
- prorate_up_front?: EndBehavior.ProrateUpFront;
3291
- }
3292
-
3293
- namespace EndBehavior {
3294
- type ProrateUpFront = 'defer' | 'include';
3295
- }
3296
- }
3297
- }
3298
-
3299
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
3300
-
3301
- type EndBehavior = 'cancel' | 'release';
3302
-
3303
- interface Phase {
2294
+ interface Phase {
3304
2295
  /**
3305
2296
  * 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.
3306
2297
  */
@@ -3381,11 +2372,6 @@ declare module 'stripe' {
3381
2372
  */
3382
2373
  on_behalf_of?: string;
3383
2374
 
3384
- /**
3385
- * 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).
3386
- */
3387
- pause_collection?: Phase.PauseCollection;
3388
-
3389
2375
  /**
3390
2376
  * Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. 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 of the current phase.
3391
2377
  */
@@ -3406,20 +2392,10 @@ declare module 'stripe' {
3406
2392
  */
3407
2393
  trial?: boolean;
3408
2394
 
3409
- /**
3410
- * Specify trial behavior when crossing phase boundaries
3411
- */
3412
- trial_continuation?: Phase.TrialContinuation;
3413
-
3414
2395
  /**
3415
2396
  * 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`
3416
2397
  */
3417
2398
  trial_end?: number | 'now';
3418
-
3419
- /**
3420
- * Settings related to subscription trials.
3421
- */
3422
- trial_settings?: Phase.TrialSettings;
3423
2399
  }
3424
2400
 
3425
2401
  namespace Phase {
@@ -3462,56 +2438,12 @@ declare module 'stripe' {
3462
2438
  */
3463
2439
  discount?: string;
3464
2440
 
3465
- /**
3466
- * Details to determine how long the discount should be applied for.
3467
- */
3468
- discount_end?: Discount.DiscountEnd;
3469
-
3470
2441
  /**
3471
2442
  * ID of the promotion code to create a new discount for.
3472
2443
  */
3473
2444
  promotion_code?: string;
3474
2445
  }
3475
2446
 
3476
- namespace Discount {
3477
- interface DiscountEnd {
3478
- /**
3479
- * Time span for the redeemed discount.
3480
- */
3481
- duration?: DiscountEnd.Duration;
3482
-
3483
- /**
3484
- * A precise Unix timestamp for the discount to end. Must be in the future.
3485
- */
3486
- timestamp?: number;
3487
-
3488
- /**
3489
- * The type of calculation made to determine when the discount ends.
3490
- */
3491
- type: DiscountEnd.Type;
3492
- }
3493
-
3494
- namespace DiscountEnd {
3495
- interface Duration {
3496
- /**
3497
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3498
- */
3499
- interval: Duration.Interval;
3500
-
3501
- /**
3502
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3503
- */
3504
- interval_count: number;
3505
- }
3506
-
3507
- namespace Duration {
3508
- type Interval = 'day' | 'month' | 'week' | 'year';
3509
- }
3510
-
3511
- type Type = 'duration' | 'timestamp';
3512
- }
3513
- }
3514
-
3515
2447
  interface PriceData {
3516
2448
  /**
3517
2449
  * 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).
@@ -3589,56 +2521,12 @@ declare module 'stripe' {
3589
2521
  */
3590
2522
  discount?: string;
3591
2523
 
3592
- /**
3593
- * Details to determine how long the discount should be applied for.
3594
- */
3595
- discount_end?: Discount.DiscountEnd;
3596
-
3597
2524
  /**
3598
2525
  * ID of the promotion code to create a new discount for.
3599
2526
  */
3600
2527
  promotion_code?: string;
3601
2528
  }
3602
2529
 
3603
- namespace Discount {
3604
- interface DiscountEnd {
3605
- /**
3606
- * Time span for the redeemed discount.
3607
- */
3608
- duration?: DiscountEnd.Duration;
3609
-
3610
- /**
3611
- * A precise Unix timestamp for the discount to end. Must be in the future.
3612
- */
3613
- timestamp?: number;
3614
-
3615
- /**
3616
- * The type of calculation made to determine when the discount ends.
3617
- */
3618
- type: DiscountEnd.Type;
3619
- }
3620
-
3621
- namespace DiscountEnd {
3622
- interface Duration {
3623
- /**
3624
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3625
- */
3626
- interval: Duration.Interval;
3627
-
3628
- /**
3629
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3630
- */
3631
- interval_count: number;
3632
- }
3633
-
3634
- namespace Duration {
3635
- type Interval = 'day' | 'month' | 'week' | 'year';
3636
- }
3637
-
3638
- type Type = 'duration' | 'timestamp';
3639
- }
3640
- }
3641
-
3642
2530
  interface InvoiceSettings {
3643
2531
  /**
3644
2532
  * 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.
@@ -3709,11 +2597,6 @@ declare module 'stripe' {
3709
2597
  * 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.
3710
2598
  */
3711
2599
  tax_rates?: Stripe.Emptyable<Array<string>>;
3712
-
3713
- /**
3714
- * Options that configure the trial on the subscription item.
3715
- */
3716
- trial?: Item.Trial;
3717
2600
  }
3718
2601
 
3719
2602
  namespace Item {
@@ -3728,56 +2611,12 @@ declare module 'stripe' {
3728
2611
  */
3729
2612
  discount?: string;
3730
2613
 
3731
- /**
3732
- * Details to determine how long the discount should be applied for.
3733
- */
3734
- discount_end?: Discount.DiscountEnd;
3735
-
3736
2614
  /**
3737
2615
  * ID of the promotion code to create a new discount for.
3738
2616
  */
3739
2617
  promotion_code?: string;
3740
2618
  }
3741
2619
 
3742
- namespace Discount {
3743
- interface DiscountEnd {
3744
- /**
3745
- * Time span for the redeemed discount.
3746
- */
3747
- duration?: DiscountEnd.Duration;
3748
-
3749
- /**
3750
- * A precise Unix timestamp for the discount to end. Must be in the future.
3751
- */
3752
- timestamp?: number;
3753
-
3754
- /**
3755
- * The type of calculation made to determine when the discount ends.
3756
- */
3757
- type: DiscountEnd.Type;
3758
- }
3759
-
3760
- namespace DiscountEnd {
3761
- interface Duration {
3762
- /**
3763
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3764
- */
3765
- interval: Duration.Interval;
3766
-
3767
- /**
3768
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3769
- */
3770
- interval_count: number;
3771
- }
3772
-
3773
- namespace Duration {
3774
- type Interval = 'day' | 'month' | 'week' | 'year';
3775
- }
3776
-
3777
- type Type = 'duration' | 'timestamp';
3778
- }
3779
- }
3780
-
3781
2620
  interface PriceData {
3782
2621
  /**
3783
2622
  * 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).
@@ -3829,33 +2668,6 @@ declare module 'stripe' {
3829
2668
 
3830
2669
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
3831
2670
  }
3832
-
3833
- interface Trial {
3834
- /**
3835
- * 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.
3836
- */
3837
- converts_to?: Array<string>;
3838
-
3839
- /**
3840
- * Determines the type of trial for this item.
3841
- */
3842
- type: Trial.Type;
3843
- }
3844
-
3845
- namespace Trial {
3846
- type Type = 'free' | 'paid';
3847
- }
3848
- }
3849
-
3850
- interface PauseCollection {
3851
- /**
3852
- * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3853
- */
3854
- behavior: PauseCollection.Behavior;
3855
- }
3856
-
3857
- namespace PauseCollection {
3858
- type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
3859
2671
  }
3860
2672
 
3861
2673
  type ProrationBehavior =
@@ -3874,95 +2686,6 @@ declare module 'stripe' {
3874
2686
  */
3875
2687
  destination: string;
3876
2688
  }
3877
-
3878
- type TrialContinuation = 'continue' | 'none';
3879
-
3880
- interface TrialSettings {
3881
- /**
3882
- * Defines how the subscription should behave when a trial ends.
3883
- */
3884
- end_behavior?: TrialSettings.EndBehavior;
3885
- }
3886
-
3887
- namespace TrialSettings {
3888
- interface EndBehavior {
3889
- /**
3890
- * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3891
- */
3892
- prorate_up_front?: EndBehavior.ProrateUpFront;
3893
- }
3894
-
3895
- namespace EndBehavior {
3896
- type ProrateUpFront = 'defer' | 'include';
3897
- }
3898
- }
3899
- }
3900
-
3901
- interface Prebilling {
3902
- /**
3903
- * The end of the prebilled time period.
3904
- */
3905
- bill_until?: Prebilling.BillUntil;
3906
-
3907
- /**
3908
- * This is used to determine the number of billing cycles to prebill.
3909
- */
3910
- iterations?: number;
3911
- }
3912
-
3913
- namespace Prebilling {
3914
- interface BillUntil {
3915
- /**
3916
- * End the prebilled period when a specified amendment ends.
3917
- */
3918
- amendment_end?: BillUntil.AmendmentEnd;
3919
-
3920
- /**
3921
- * Time span for prebilling, starting from `bill_from`.
3922
- */
3923
- duration?: BillUntil.Duration;
3924
-
3925
- /**
3926
- * End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
3927
- */
3928
- timestamp?: number;
3929
-
3930
- /**
3931
- * Select one of several ways to pass the `bill_until` value.
3932
- */
3933
- type: BillUntil.Type;
3934
- }
3935
-
3936
- namespace BillUntil {
3937
- interface AmendmentEnd {
3938
- /**
3939
- * 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.
3940
- */
3941
- index: number;
3942
- }
3943
-
3944
- interface Duration {
3945
- /**
3946
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3947
- */
3948
- interval: Duration.Interval;
3949
-
3950
- /**
3951
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3952
- */
3953
- interval_count: number;
3954
- }
3955
-
3956
- namespace Duration {
3957
- type Interval = 'day' | 'month' | 'week' | 'year';
3958
- }
3959
-
3960
- type Type =
3961
- | 'amendment_end'
3962
- | 'duration'
3963
- | 'schedule_end'
3964
- | 'timestamp';
3965
- }
3966
2689
  }
3967
2690
 
3968
2691
  type ProrationBehavior =
@@ -4002,11 +2725,6 @@ declare module 'stripe' {
4002
2725
  */
4003
2726
  items?: Array<SubscriptionDetails.Item>;
4004
2727
 
4005
- /**
4006
- * The pre-billing to apply to the subscription as a preview.
4007
- */
4008
- prebilling?: SubscriptionDetails.Prebilling;
4009
-
4010
2728
  /**
4011
2729
  * 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`.
4012
2730
  */
@@ -4100,56 +2818,12 @@ declare module 'stripe' {
4100
2818
  */
4101
2819
  discount?: string;
4102
2820
 
4103
- /**
4104
- * Details to determine how long the discount should be applied for.
4105
- */
4106
- discount_end?: Discount.DiscountEnd;
4107
-
4108
2821
  /**
4109
2822
  * ID of the promotion code to create a new discount for.
4110
2823
  */
4111
2824
  promotion_code?: string;
4112
2825
  }
4113
2826
 
4114
- namespace Discount {
4115
- interface DiscountEnd {
4116
- /**
4117
- * Time span for the redeemed discount.
4118
- */
4119
- duration?: DiscountEnd.Duration;
4120
-
4121
- /**
4122
- * A precise Unix timestamp for the discount to end. Must be in the future.
4123
- */
4124
- timestamp?: number;
4125
-
4126
- /**
4127
- * The type of calculation made to determine when the discount ends.
4128
- */
4129
- type: DiscountEnd.Type;
4130
- }
4131
-
4132
- namespace DiscountEnd {
4133
- interface Duration {
4134
- /**
4135
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4136
- */
4137
- interval: Duration.Interval;
4138
-
4139
- /**
4140
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4141
- */
4142
- interval_count: number;
4143
- }
4144
-
4145
- namespace Duration {
4146
- type Interval = 'day' | 'month' | 'week' | 'year';
4147
- }
4148
-
4149
- type Type = 'duration' | 'timestamp';
4150
- }
4151
- }
4152
-
4153
2827
  interface PriceData {
4154
2828
  /**
4155
2829
  * 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).
@@ -4203,13 +2877,6 @@ declare module 'stripe' {
4203
2877
  }
4204
2878
  }
4205
2879
 
4206
- interface Prebilling {
4207
- /**
4208
- * This is used to determine the number of billing cycles to prebill.
4209
- */
4210
- iterations: number;
4211
- }
4212
-
4213
2880
  type ProrationBehavior =
4214
2881
  | 'always_invoice'
4215
2882
  | 'create_prorations'
@@ -4394,11 +3061,6 @@ declare module 'stripe' {
4394
3061
  */
4395
3062
  id: string;
4396
3063
 
4397
- /**
4398
- * 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.
4399
- */
4400
- margins?: Stripe.Emptyable<Array<string>>;
4401
-
4402
3064
  /**
4403
3065
  * 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.
4404
3066
  */
@@ -4447,56 +3109,12 @@ declare module 'stripe' {
4447
3109
  */
4448
3110
  discount?: string;
4449
3111
 
4450
- /**
4451
- * Details to determine how long the discount should be applied for.
4452
- */
4453
- discount_end?: Discount.DiscountEnd;
4454
-
4455
3112
  /**
4456
3113
  * ID of the promotion code to create a new discount for.
4457
3114
  */
4458
3115
  promotion_code?: string;
4459
3116
  }
4460
3117
 
4461
- namespace Discount {
4462
- interface DiscountEnd {
4463
- /**
4464
- * Time span for the redeemed discount.
4465
- */
4466
- duration?: DiscountEnd.Duration;
4467
-
4468
- /**
4469
- * A precise Unix timestamp for the discount to end. Must be in the future.
4470
- */
4471
- timestamp?: number;
4472
-
4473
- /**
4474
- * The type of calculation made to determine when the discount ends.
4475
- */
4476
- type: DiscountEnd.Type;
4477
- }
4478
-
4479
- namespace DiscountEnd {
4480
- interface Duration {
4481
- /**
4482
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4483
- */
4484
- interval: Duration.Interval;
4485
-
4486
- /**
4487
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4488
- */
4489
- interval_count: number;
4490
- }
4491
-
4492
- namespace Duration {
4493
- type Interval = 'day' | 'month' | 'week' | 'year';
4494
- }
4495
-
4496
- type Type = 'duration' | 'timestamp';
4497
- }
4498
- }
4499
-
4500
3118
  interface Period {
4501
3119
  /**
4502
3120
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -4723,11 +3341,6 @@ declare module 'stripe' {
4723
3341
  */
4724
3342
  expand?: Array<string>;
4725
3343
 
4726
- /**
4727
- * 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.
4728
- */
4729
- margins?: Stripe.Emptyable<Array<string>>;
4730
-
4731
3344
  /**
4732
3345
  * 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.
4733
3346
  */
@@ -4778,56 +3391,12 @@ declare module 'stripe' {
4778
3391
  */
4779
3392
  discount?: string;
4780
3393
 
4781
- /**
4782
- * Details to determine how long the discount should be applied for.
4783
- */
4784
- discount_end?: Discount.DiscountEnd;
4785
-
4786
3394
  /**
4787
3395
  * ID of the promotion code to create a new discount for.
4788
3396
  */
4789
3397
  promotion_code?: string;
4790
3398
  }
4791
3399
 
4792
- namespace Discount {
4793
- interface DiscountEnd {
4794
- /**
4795
- * Time span for the redeemed discount.
4796
- */
4797
- duration?: DiscountEnd.Duration;
4798
-
4799
- /**
4800
- * A precise Unix timestamp for the discount to end. Must be in the future.
4801
- */
4802
- timestamp?: number;
4803
-
4804
- /**
4805
- * The type of calculation made to determine when the discount ends.
4806
- */
4807
- type: DiscountEnd.Type;
4808
- }
4809
-
4810
- namespace DiscountEnd {
4811
- interface Duration {
4812
- /**
4813
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4814
- */
4815
- interval: Duration.Interval;
4816
-
4817
- /**
4818
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4819
- */
4820
- interval_count: number;
4821
- }
4822
-
4823
- namespace Duration {
4824
- type Interval = 'day' | 'month' | 'week' | 'year';
4825
- }
4826
-
4827
- type Type = 'duration' | 'timestamp';
4828
- }
4829
- }
4830
-
4831
3400
  interface Period {
4832
3401
  /**
4833
3402
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -5104,31 +3673,6 @@ declare module 'stripe' {
5104
3673
  options?: RequestOptions
5105
3674
  ): Promise<Stripe.Response<Stripe.Invoice>>;
5106
3675
 
5107
- /**
5108
- * Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
5109
- *
5110
- * For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid
5111
- * of the invoice and subsequently transitioning the status of the invoice to paid if necessary.
5112
- *
5113
- * For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
5114
- * to the invoice, increasing its amount_paid. When the invoice is fully paid, the
5115
- * invoice's status becomes paid.
5116
- *
5117
- * If the PaymentIntent's status is already succeeded when it's attached, it's
5118
- * credited to the invoice immediately.
5119
- *
5120
- * See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more.
5121
- */
5122
- attachPayment(
5123
- id: string,
5124
- params?: InvoiceAttachPaymentParams,
5125
- options?: RequestOptions
5126
- ): Promise<Stripe.Response<Stripe.Invoice>>;
5127
- attachPayment(
5128
- id: string,
5129
- options?: RequestOptions
5130
- ): Promise<Stripe.Response<Stripe.Invoice>>;
5131
-
5132
3676
  /**
5133
3677
  * At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
5134
3678
  *