stripe 20.0.0 → 20.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (444) hide show
  1. package/CHANGELOG.md +1790 -12
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +1 -0
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +115 -1
  6. package/cjs/apiVersion.js +2 -3
  7. package/cjs/resources/AccountNotices.js +21 -0
  8. package/cjs/resources/BalanceTransfers.js +9 -0
  9. package/cjs/resources/Billing/Analytics/MeterUsage.js +12 -0
  10. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  11. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  12. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  13. package/cjs/resources/DelegatedCheckout/RequestedSessions.js +28 -0
  14. package/cjs/resources/ExternalAccounts.js +23 -0
  15. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  16. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  17. package/cjs/resources/FxQuotes.js +15 -0
  18. package/cjs/resources/Identity/BlocklistEntries.js +25 -0
  19. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  20. package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
  21. package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
  22. package/cjs/resources/Issuing/Programs.js +22 -0
  23. package/cjs/resources/Mandates.js +5 -0
  24. package/cjs/resources/Margins.js +22 -0
  25. package/cjs/resources/Orders.js +24 -0
  26. package/cjs/resources/PaymentIntents.js +8 -0
  27. package/cjs/resources/PaymentMethods.js +4 -0
  28. package/cjs/resources/Privacy/RedactionJobs.js +42 -0
  29. package/cjs/resources/Quotes.js +32 -0
  30. package/cjs/resources/Radar/AccountEvaluations.js +20 -0
  31. package/cjs/resources/SubscriptionSchedules.js +4 -0
  32. package/cjs/resources/Subscriptions.js +4 -0
  33. package/cjs/resources/Tax/Forms.js +20 -0
  34. package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
  35. package/cjs/resources/TestHelpers/Capital/FinancingOffers.js +16 -0
  36. package/cjs/resources/V2/Billing/BillSettings/Versions.js +17 -0
  37. package/cjs/resources/V2/Billing/BillSettings.js +27 -0
  38. package/cjs/resources/V2/Billing/Cadences.js +23 -0
  39. package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +17 -0
  40. package/cjs/resources/V2/Billing/CollectionSettings.js +30 -0
  41. package/cjs/resources/V2/Billing/CustomPricingUnits.js +25 -0
  42. package/cjs/resources/V2/Billing/Intents/Actions.js +17 -0
  43. package/cjs/resources/V2/Billing/Intents.js +36 -0
  44. package/cjs/resources/V2/Billing/LicenseFeeSubscriptions.js +12 -0
  45. package/cjs/resources/V2/Billing/LicenseFees/Versions.js +17 -0
  46. package/cjs/resources/V2/Billing/LicenseFees.js +27 -0
  47. package/cjs/resources/V2/Billing/LicensedItems.js +25 -0
  48. package/cjs/resources/V2/Billing/MeteredItems.js +22 -0
  49. package/cjs/resources/V2/Billing/PricingPlanSubscriptions/Components.js +12 -0
  50. package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +26 -0
  51. package/cjs/resources/V2/Billing/PricingPlans/Components.js +29 -0
  52. package/cjs/resources/V2/Billing/PricingPlans/Versions.js +17 -0
  53. package/cjs/resources/V2/Billing/PricingPlans.js +29 -0
  54. package/cjs/resources/V2/Billing/Profiles.js +19 -0
  55. package/cjs/resources/V2/Billing/RateCardSubscriptions.js +29 -0
  56. package/cjs/resources/V2/Billing/RateCards/Rates.js +25 -0
  57. package/cjs/resources/V2/Billing/RateCards/Versions.js +17 -0
  58. package/cjs/resources/V2/Billing/RateCards.js +29 -0
  59. package/cjs/resources/V2/Billing/ServiceActions.js +20 -0
  60. package/cjs/resources/V2/Core/AccountLinks.js +9 -0
  61. package/cjs/resources/V2/Core/Accounts/Persons.js +29 -0
  62. package/cjs/resources/V2/Core/Accounts.js +25 -0
  63. package/cjs/resources/V2/Core/ClaimableSandboxes.js +16 -0
  64. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +33 -0
  65. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +37 -0
  66. package/cjs/resources/V2/MoneyManagement/Adjustments.js +17 -0
  67. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +29 -0
  68. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +21 -0
  69. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +21 -0
  70. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +16 -0
  71. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +25 -0
  72. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +29 -0
  73. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +25 -0
  74. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +25 -0
  75. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +12 -0
  76. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +17 -0
  77. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +17 -0
  78. package/cjs/resources/V2/MoneyManagement/RecipientVerifications.js +20 -0
  79. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +17 -0
  80. package/cjs/resources/V2/MoneyManagement/Transactions.js +17 -0
  81. package/cjs/resources/V2/Payments/OffSessionPayments.js +29 -0
  82. package/cjs/resources/V2/Reporting/ReportRuns.js +13 -0
  83. package/cjs/resources/V2/Reporting/Reports.js +12 -0
  84. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
  85. package/cjs/resources/V2/TestHelpers/MoneyManagement.js +12 -0
  86. package/cjs/resources.js +152 -8
  87. package/cjs/stripe.core.js +1 -1
  88. package/esm/Error.js +100 -0
  89. package/esm/apiVersion.js +1 -2
  90. package/esm/resources/AccountNotices.js +18 -0
  91. package/esm/resources/BalanceTransfers.js +6 -0
  92. package/esm/resources/Billing/Analytics/MeterUsage.js +9 -0
  93. package/esm/resources/Capital/FinancingOffers.js +18 -0
  94. package/esm/resources/Capital/FinancingSummary.js +9 -0
  95. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  96. package/esm/resources/DelegatedCheckout/RequestedSessions.js +25 -0
  97. package/esm/resources/ExternalAccounts.js +20 -0
  98. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  99. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  100. package/esm/resources/FxQuotes.js +12 -0
  101. package/esm/resources/Identity/BlocklistEntries.js +22 -0
  102. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  103. package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
  104. package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
  105. package/esm/resources/Issuing/Programs.js +19 -0
  106. package/esm/resources/Mandates.js +5 -0
  107. package/esm/resources/Margins.js +19 -0
  108. package/esm/resources/Orders.js +21 -0
  109. package/esm/resources/PaymentIntents.js +8 -0
  110. package/esm/resources/PaymentMethods.js +4 -0
  111. package/esm/resources/Privacy/RedactionJobs.js +39 -0
  112. package/esm/resources/Quotes.js +32 -0
  113. package/esm/resources/Radar/AccountEvaluations.js +17 -0
  114. package/esm/resources/SubscriptionSchedules.js +4 -0
  115. package/esm/resources/Subscriptions.js +4 -0
  116. package/esm/resources/Tax/Forms.js +17 -0
  117. package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
  118. package/esm/resources/TestHelpers/Capital/FinancingOffers.js +13 -0
  119. package/esm/resources/V2/Billing/BillSettings/Versions.js +14 -0
  120. package/esm/resources/V2/Billing/BillSettings.js +24 -0
  121. package/esm/resources/V2/Billing/Cadences.js +20 -0
  122. package/esm/resources/V2/Billing/CollectionSettings/Versions.js +14 -0
  123. package/esm/resources/V2/Billing/CollectionSettings.js +27 -0
  124. package/esm/resources/V2/Billing/CustomPricingUnits.js +22 -0
  125. package/esm/resources/V2/Billing/Intents/Actions.js +14 -0
  126. package/esm/resources/V2/Billing/Intents.js +33 -0
  127. package/esm/resources/V2/Billing/LicenseFeeSubscriptions.js +9 -0
  128. package/esm/resources/V2/Billing/LicenseFees/Versions.js +14 -0
  129. package/esm/resources/V2/Billing/LicenseFees.js +24 -0
  130. package/esm/resources/V2/Billing/LicensedItems.js +22 -0
  131. package/esm/resources/V2/Billing/MeteredItems.js +19 -0
  132. package/esm/resources/V2/Billing/PricingPlanSubscriptions/Components.js +9 -0
  133. package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +23 -0
  134. package/esm/resources/V2/Billing/PricingPlans/Components.js +26 -0
  135. package/esm/resources/V2/Billing/PricingPlans/Versions.js +14 -0
  136. package/esm/resources/V2/Billing/PricingPlans.js +26 -0
  137. package/esm/resources/V2/Billing/Profiles.js +16 -0
  138. package/esm/resources/V2/Billing/RateCardSubscriptions.js +26 -0
  139. package/esm/resources/V2/Billing/RateCards/Rates.js +22 -0
  140. package/esm/resources/V2/Billing/RateCards/Versions.js +14 -0
  141. package/esm/resources/V2/Billing/RateCards.js +26 -0
  142. package/esm/resources/V2/Billing/ServiceActions.js +17 -0
  143. package/esm/resources/V2/Core/AccountLinks.js +6 -0
  144. package/esm/resources/V2/Core/Accounts/Persons.js +26 -0
  145. package/esm/resources/V2/Core/Accounts.js +22 -0
  146. package/esm/resources/V2/Core/ClaimableSandboxes.js +13 -0
  147. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +30 -0
  148. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +34 -0
  149. package/esm/resources/V2/MoneyManagement/Adjustments.js +14 -0
  150. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +26 -0
  151. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +18 -0
  152. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +18 -0
  153. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +13 -0
  154. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +22 -0
  155. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +26 -0
  156. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +22 -0
  157. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +22 -0
  158. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +9 -0
  159. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +14 -0
  160. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +14 -0
  161. package/esm/resources/V2/MoneyManagement/RecipientVerifications.js +17 -0
  162. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +14 -0
  163. package/esm/resources/V2/MoneyManagement/Transactions.js +14 -0
  164. package/esm/resources/V2/Payments/OffSessionPayments.js +26 -0
  165. package/esm/resources/V2/Reporting/ReportRuns.js +10 -0
  166. package/esm/resources/V2/Reporting/Reports.js +9 -0
  167. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
  168. package/esm/resources/V2/TestHelpers/MoneyManagement.js +9 -0
  169. package/esm/resources.js +138 -0
  170. package/esm/stripe.core.js +1 -1
  171. package/package.json +1 -1
  172. package/types/AccountLinksResource.d.ts +5 -1
  173. package/types/AccountNotices.d.ts +113 -0
  174. package/types/AccountNoticesResource.d.ts +98 -0
  175. package/types/AccountSessions.d.ts +45 -0
  176. package/types/AccountSessionsResource.d.ts +264 -0
  177. package/types/Accounts.d.ts +232 -1
  178. package/types/AccountsResource.d.ts +674 -0
  179. package/types/ApplicationFees.d.ts +6 -1
  180. package/types/Balance.d.ts +82 -0
  181. package/types/BalanceTransactions.d.ts +2 -1
  182. package/types/BalanceTransfers.d.ts +122 -0
  183. package/types/BalanceTransfersResource.d.ts +87 -0
  184. package/types/BankAccounts.d.ts +2 -0
  185. package/types/Billing/AlertTriggereds.d.ts +16 -1
  186. package/types/Billing/Alerts.d.ts +116 -1
  187. package/types/Billing/AlertsResource.d.ts +149 -2
  188. package/types/Billing/Analytics/MeterUsage.d.ts +31 -0
  189. package/types/Billing/Analytics/MeterUsageResource.d.ts +694 -0
  190. package/types/Billing/Analytics/MeterUsageRows.d.ts +58 -0
  191. package/types/Billing/CreditBalanceSummary.d.ts +123 -2
  192. package/types/Billing/CreditBalanceSummaryResource.d.ts +20 -3
  193. package/types/Billing/CreditBalanceTransactions.d.ts +118 -2
  194. package/types/Billing/CreditBalanceTransactionsResource.d.ts +12 -4
  195. package/types/Billing/CreditGrants.d.ts +76 -1
  196. package/types/Billing/CreditGrantsResource.d.ts +45 -4
  197. package/types/Billing/MeterEventSummaries.d.ts +7 -0
  198. package/types/Billing/Meters.d.ts +5 -0
  199. package/types/Billing/MetersResource.d.ts +17 -0
  200. package/types/BillingPortal/Sessions.d.ts +5 -0
  201. package/types/BillingPortal/SessionsResource.d.ts +12 -4
  202. package/types/Capabilities.d.ts +2 -0
  203. package/types/Capital/FinancingOffers.d.ts +188 -0
  204. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  205. package/types/Capital/FinancingSummary.d.ts +106 -0
  206. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  207. package/types/Capital/FinancingTransactions.d.ts +135 -0
  208. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  209. package/types/Cards.d.ts +19 -0
  210. package/types/CashBalances.d.ts +5 -0
  211. package/types/Charges.d.ts +190 -0
  212. package/types/ChargesResource.d.ts +3855 -75
  213. package/types/Checkout/Sessions.d.ts +427 -2
  214. package/types/Checkout/SessionsResource.d.ts +682 -2
  215. package/types/ConfirmationTokens.d.ts +139 -0
  216. package/types/Coupons.d.ts +35 -0
  217. package/types/CouponsResource.d.ts +23 -0
  218. package/types/CreditNoteLineItems.d.ts +17 -0
  219. package/types/CreditNotes.d.ts +5 -0
  220. package/types/CreditNotesResource.d.ts +5 -0
  221. package/types/CustomerBalanceTransactions.d.ts +2 -0
  222. package/types/CustomerCashBalanceTransactions.d.ts +2 -0
  223. package/types/CustomerSessions.d.ts +46 -0
  224. package/types/CustomerSessionsResource.d.ts +47 -1
  225. package/types/Customers.d.ts +2 -0
  226. package/types/CustomersResource.d.ts +8 -0
  227. package/types/DelegatedCheckout/RequestedSessions.d.ts +384 -0
  228. package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +599 -0
  229. package/types/Discounts.d.ts +20 -0
  230. package/types/Disputes.d.ts +40 -0
  231. package/types/DisputesResource.d.ts +11 -0
  232. package/types/Errors.d.ts +85 -0
  233. package/types/EventTypes.d.ts +630 -0
  234. package/types/Events.d.ts +96 -0
  235. package/types/ExternalAccountsResource.d.ts +304 -0
  236. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  237. package/types/FinancialConnections/Accounts.d.ts +36 -1
  238. package/types/FinancialConnections/AccountsResource.d.ts +40 -3
  239. package/types/FinancialConnections/Institutions.d.ts +98 -0
  240. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  241. package/types/FinancialConnections/Sessions.d.ts +51 -1
  242. package/types/FinancialConnections/SessionsResource.d.ts +43 -1
  243. package/types/FxQuotes.d.ts +155 -0
  244. package/types/FxQuotesResource.d.ts +130 -0
  245. package/types/Identity/BlocklistEntries.d.ts +78 -0
  246. package/types/Identity/BlocklistEntriesResource.d.ts +146 -0
  247. package/types/Identity/VerificationReports.d.ts +10 -0
  248. package/types/Identity/VerificationReportsResource.d.ts +5 -0
  249. package/types/Identity/VerificationSessions.d.ts +5 -0
  250. package/types/Identity/VerificationSessionsResource.d.ts +7 -0
  251. package/types/InvoiceItems.d.ts +127 -2
  252. package/types/InvoiceItemsResource.d.ts +117 -6
  253. package/types/InvoiceLineItems.d.ts +171 -3
  254. package/types/Invoices.d.ts +216 -4
  255. package/types/InvoicesResource.d.ts +1743 -2
  256. package/types/Issuing/CardholdersResource.d.ts +2 -1
  257. package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
  258. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
  259. package/types/Issuing/DisputeSettlementDetails.d.ts +85 -0
  260. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
  261. package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
  262. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
  263. package/types/Issuing/Programs.d.ts +42 -0
  264. package/types/Issuing/ProgramsResource.d.ts +96 -0
  265. package/types/Issuing/Settlements.d.ts +113 -0
  266. package/types/Issuing/Transactions.d.ts +5 -0
  267. package/types/Issuing/TransactionsResource.d.ts +5 -0
  268. package/types/LineItems.d.ts +49 -0
  269. package/types/Mandates.d.ts +135 -1
  270. package/types/MandatesResource.d.ts +31 -0
  271. package/types/Margins.d.ts +56 -0
  272. package/types/MarginsResource.d.ts +114 -0
  273. package/types/Orders.d.ts +1163 -0
  274. package/types/OrdersResource.d.ts +5505 -0
  275. package/types/PaymentAttemptRecords.d.ts +141 -0
  276. package/types/PaymentIntents.d.ts +779 -3
  277. package/types/PaymentIntentsResource.d.ts +19573 -6528
  278. package/types/PaymentLinks.d.ts +6 -0
  279. package/types/PaymentLinksResource.d.ts +12 -0
  280. package/types/PaymentMethodBalances.d.ts +63 -0
  281. package/types/PaymentMethodConfigurations.d.ts +216 -0
  282. package/types/PaymentMethodConfigurationsResource.d.ts +300 -0
  283. package/types/PaymentMethods.d.ts +144 -0
  284. package/types/PaymentMethodsResource.d.ts +199 -2
  285. package/types/PaymentRecords.d.ts +141 -0
  286. package/types/Persons.d.ts +30 -0
  287. package/types/Prices.d.ts +22 -0
  288. package/types/PricesResource.d.ts +22 -0
  289. package/types/Privacy/RedactionJobValidationErrors.d.ts +60 -0
  290. package/types/Privacy/RedactionJobs.d.ts +111 -0
  291. package/types/Privacy/RedactionJobsResource.d.ts +230 -0
  292. package/types/PromotionCodes.d.ts +5 -0
  293. package/types/PromotionCodesResource.d.ts +10 -0
  294. package/types/QuoteLines.d.ts +634 -0
  295. package/types/QuotePreviewInvoices.d.ts +1784 -0
  296. package/types/QuotePreviewSubscriptionSchedules.d.ts +1108 -0
  297. package/types/Quotes.d.ts +982 -1
  298. package/types/QuotesResource.d.ts +3226 -293
  299. package/types/Radar/AccountEvaluations.d.ts +88 -0
  300. package/types/Radar/AccountEvaluationsResource.d.ts +148 -0
  301. package/types/Refunds.d.ts +14 -0
  302. package/types/SetupAttempts.d.ts +51 -1
  303. package/types/SetupIntents.d.ts +239 -2
  304. package/types/SetupIntentsResource.d.ts +1044 -4
  305. package/types/Sources.d.ts +29 -0
  306. package/types/SubscriptionItems.d.ts +26 -0
  307. package/types/SubscriptionItemsResource.d.ts +109 -0
  308. package/types/SubscriptionSchedules.d.ts +403 -0
  309. package/types/SubscriptionSchedulesResource.d.ts +1437 -0
  310. package/types/Subscriptions.d.ts +370 -1
  311. package/types/SubscriptionsResource.d.ts +757 -8
  312. package/types/Tax/Forms.d.ts +220 -0
  313. package/types/Tax/FormsResource.d.ts +107 -0
  314. package/types/TaxIds.d.ts +10 -0
  315. package/types/TaxIdsResource.d.ts +10 -0
  316. package/types/Terminal/Configurations.d.ts +9 -0
  317. package/types/Terminal/ConfigurationsResource.d.ts +28 -0
  318. package/types/Terminal/ReaderCollectedData.d.ts +51 -0
  319. package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
  320. package/types/Terminal/Readers.d.ts +20 -0
  321. package/types/TestHelpers/Capital/FinancingOffersResource.d.ts +130 -0
  322. package/types/TestHelpers/ConfirmationTokensResource.d.ts +126 -0
  323. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  324. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  325. package/types/TokensResource.d.ts +44 -0
  326. package/types/Transfers.d.ts +9 -0
  327. package/types/TransfersResource.d.ts +7 -0
  328. package/types/TransitBalances.d.ts +40 -0
  329. package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
  330. package/types/Treasury/FinancialAccounts.d.ts +5 -0
  331. package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
  332. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  333. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  334. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  335. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  336. package/types/V2/Billing/BillSettingVersions.d.ts +97 -0
  337. package/types/V2/Billing/BillSettings/VersionsResource.d.ts +58 -0
  338. package/types/V2/Billing/BillSettings.d.ts +120 -0
  339. package/types/V2/Billing/BillSettingsResource.d.ts +241 -0
  340. package/types/V2/Billing/Cadences.d.ts +735 -0
  341. package/types/V2/Billing/CadencesResource.d.ts +516 -0
  342. package/types/V2/Billing/CollectionSettingVersions.d.ts +318 -0
  343. package/types/V2/Billing/CollectionSettings/VersionsResource.d.ts +62 -0
  344. package/types/V2/Billing/CollectionSettings.d.ts +341 -0
  345. package/types/V2/Billing/CollectionSettingsResource.d.ts +683 -0
  346. package/types/V2/Billing/CustomPricingUnits.d.ts +56 -0
  347. package/types/V2/Billing/CustomPricingUnitsResource.d.ts +122 -0
  348. package/types/V2/Billing/IntentActions.d.ts +459 -0
  349. package/types/V2/Billing/Intents/ActionsResource.d.ts +58 -0
  350. package/types/V2/Billing/Intents.d.ts +117 -0
  351. package/types/V2/Billing/IntentsResource.d.ts +575 -0
  352. package/types/V2/Billing/LicenseFeeSubscriptions.d.ts +64 -0
  353. package/types/V2/Billing/LicenseFeeSubscriptionsResource.d.ts +28 -0
  354. package/types/V2/Billing/LicenseFeeVersions.d.ts +106 -0
  355. package/types/V2/Billing/LicenseFees/VersionsResource.d.ts +58 -0
  356. package/types/V2/Billing/LicenseFees.d.ts +164 -0
  357. package/types/V2/Billing/LicenseFeesResource.d.ts +290 -0
  358. package/types/V2/Billing/LicensedItems.d.ts +73 -0
  359. package/types/V2/Billing/LicensedItemsResource.d.ts +157 -0
  360. package/types/V2/Billing/MeterEvents.d.ts +1 -2
  361. package/types/V2/Billing/MeteredItems.d.ts +101 -0
  362. package/types/V2/Billing/MeteredItemsResource.d.ts +189 -0
  363. package/types/V2/Billing/PricingPlanComponents.d.ts +109 -0
  364. package/types/V2/Billing/PricingPlanSubscriptionComponents.d.ts +57 -0
  365. package/types/V2/Billing/PricingPlanSubscriptions/ComponentsResource.d.ts +40 -0
  366. package/types/V2/Billing/PricingPlanSubscriptions.d.ts +144 -0
  367. package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +120 -0
  368. package/types/V2/Billing/PricingPlanVersions.d.ts +49 -0
  369. package/types/V2/Billing/PricingPlans/ComponentsResource.d.ts +197 -0
  370. package/types/V2/Billing/PricingPlans/VersionsResource.d.ts +58 -0
  371. package/types/V2/Billing/PricingPlans.d.ts +84 -0
  372. package/types/V2/Billing/PricingPlansResource.d.ts +151 -0
  373. package/types/V2/Billing/Profiles.d.ts +70 -0
  374. package/types/V2/Billing/ProfilesResource.d.ts +150 -0
  375. package/types/V2/Billing/RateCardRates.d.ts +144 -0
  376. package/types/V2/Billing/RateCardSubscriptions.d.ts +144 -0
  377. package/types/V2/Billing/RateCardSubscriptionsResource.d.ts +157 -0
  378. package/types/V2/Billing/RateCardVersions.d.ts +39 -0
  379. package/types/V2/Billing/RateCards/RatesResource.d.ts +203 -0
  380. package/types/V2/Billing/RateCards/VersionsResource.d.ts +58 -0
  381. package/types/V2/Billing/RateCards.d.ts +98 -0
  382. package/types/V2/Billing/RateCardsResource.d.ts +162 -0
  383. package/types/V2/Billing/ServiceActions.d.ts +274 -0
  384. package/types/V2/Billing/ServiceActionsResource.d.ts +370 -0
  385. package/types/V2/Core/AccountLinks.d.ts +168 -0
  386. package/types/V2/Core/AccountLinksResource.d.ts +152 -0
  387. package/types/V2/Core/AccountPersons.d.ts +615 -0
  388. package/types/V2/Core/Accounts/PersonsResource.d.ts +1153 -0
  389. package/types/V2/Core/Accounts.d.ts +7478 -0
  390. package/types/V2/Core/AccountsResource.d.ts +6723 -0
  391. package/types/V2/Core/ClaimableSandboxes.d.ts +132 -0
  392. package/types/V2/Core/ClaimableSandboxesResource.d.ts +74 -0
  393. package/types/V2/Core/EventTypes.d.ts +8680 -10
  394. package/types/V2/Core/Events.d.ts +14 -0
  395. package/types/V2/Core/EventsResource.d.ts +17 -2
  396. package/types/V2/Core/Vault/GbBankAccounts.d.ts +160 -0
  397. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +194 -0
  398. package/types/V2/Core/Vault/UsBankAccounts.d.ts +116 -0
  399. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +198 -0
  400. package/types/V2/FinancialAddressCreditSimulations.d.ts +27 -0
  401. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +32 -0
  402. package/types/V2/MoneyManagement/Adjustments.d.ts +110 -0
  403. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +83 -0
  404. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +148 -0
  405. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +172 -0
  406. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +178 -0
  407. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +126 -0
  408. package/types/V2/MoneyManagement/InboundTransfers.d.ts +212 -0
  409. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +144 -0
  410. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +170 -0
  411. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +115 -0
  412. package/types/V2/MoneyManagement/OutboundPayments.d.ts +283 -0
  413. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +247 -0
  414. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +97 -0
  415. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +330 -0
  416. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +256 -0
  417. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +213 -0
  418. package/types/V2/MoneyManagement/PayoutMethods.d.ts +201 -0
  419. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +93 -0
  420. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +41 -0
  421. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +113 -0
  422. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +307 -0
  423. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +78 -0
  424. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +186 -0
  425. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +48 -0
  426. package/types/V2/MoneyManagement/RecipientVerifications.d.ts +112 -0
  427. package/types/V2/MoneyManagement/RecipientVerificationsResource.d.ts +77 -0
  428. package/types/V2/MoneyManagement/TransactionEntries.d.ts +162 -0
  429. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +82 -0
  430. package/types/V2/MoneyManagement/Transactions.d.ts +177 -0
  431. package/types/V2/MoneyManagement/TransactionsResource.d.ts +83 -0
  432. package/types/V2/Payments/OffSessionPayments.d.ts +326 -0
  433. package/types/V2/Payments/OffSessionPaymentsResource.d.ts +401 -0
  434. package/types/V2/Reporting/ReportRuns.d.ts +154 -0
  435. package/types/V2/Reporting/ReportRunsResource.d.ts +75 -0
  436. package/types/V2/Reporting/Reports.d.ts +120 -0
  437. package/types/V2/Reporting/ReportsResource.d.ts +30 -0
  438. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +73 -0
  439. package/types/V2/TestHelpers/MoneyManagementResource.d.ts +49 -0
  440. package/types/WebhookEndpointsResource.d.ts +76 -0
  441. package/types/Webhooks.d.ts +2 -0
  442. package/types/apiVersion.d.ts +1 -2
  443. package/types/index.d.ts +233 -0
  444. package/types/lib.d.ts +10 -0
@@ -3,6 +3,11 @@
3
3
  declare module 'stripe' {
4
4
  namespace Stripe {
5
5
  interface QuoteCreateParams {
6
+ /**
7
+ * Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
8
+ */
9
+ allow_backdated_lines?: boolean;
10
+
6
11
  /**
7
12
  * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
8
13
  */
@@ -28,6 +33,11 @@ declare module 'stripe' {
28
33
  */
29
34
  customer?: string;
30
35
 
36
+ /**
37
+ * The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
38
+ */
39
+ customer_account?: string;
40
+
31
41
  /**
32
42
  * The tax rates that will apply to any line item that does not have `tax_rates` set.
33
43
  */
@@ -78,6 +88,11 @@ declare module 'stripe' {
78
88
  */
79
89
  line_items?: Array<QuoteCreateParams.LineItem>;
80
90
 
91
+ /**
92
+ * A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
93
+ */
94
+ lines?: Array<QuoteCreateParams.Line>;
95
+
81
96
  /**
82
97
  * 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`.
83
98
  */
@@ -93,6 +108,13 @@ declare module 'stripe' {
93
108
  */
94
109
  subscription_data?: QuoteCreateParams.SubscriptionData;
95
110
 
111
+ /**
112
+ * List representing overrides for `subscription_data` configurations for specific subscription schedules.
113
+ */
114
+ subscription_data_overrides?: Array<
115
+ QuoteCreateParams.SubscriptionDataOverride
116
+ >;
117
+
96
118
  /**
97
119
  * ID of the test clock to attach to the quote.
98
120
  */
@@ -148,12 +170,56 @@ declare module 'stripe' {
148
170
  */
149
171
  discount?: string;
150
172
 
173
+ /**
174
+ * Details to determine how long the discount should be applied for.
175
+ */
176
+ discount_end?: Discount.DiscountEnd;
177
+
151
178
  /**
152
179
  * ID of the promotion code to create a new discount for.
153
180
  */
154
181
  promotion_code?: string;
155
182
  }
156
183
 
184
+ namespace Discount {
185
+ interface DiscountEnd {
186
+ /**
187
+ * Time span for the redeemed discount.
188
+ */
189
+ duration?: DiscountEnd.Duration;
190
+
191
+ /**
192
+ * A precise Unix timestamp for the discount to end. Must be in the future.
193
+ */
194
+ timestamp?: number;
195
+
196
+ /**
197
+ * The type of calculation made to determine when the discount ends.
198
+ */
199
+ type: DiscountEnd.Type;
200
+ }
201
+
202
+ namespace DiscountEnd {
203
+ interface Duration {
204
+ /**
205
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
206
+ */
207
+ interval: Duration.Interval;
208
+
209
+ /**
210
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
211
+ */
212
+ interval_count: number;
213
+ }
214
+
215
+ namespace Duration {
216
+ type Interval = 'day' | 'month' | 'week' | 'year';
217
+ }
218
+
219
+ type Type = 'duration' | 'timestamp';
220
+ }
221
+ }
222
+
157
223
  interface FromQuote {
158
224
  /**
159
225
  * Whether this quote is a revision of the previous quote.
@@ -196,480 +262,3183 @@ declare module 'stripe' {
196
262
  }
197
263
  }
198
264
 
199
- interface LineItem {
265
+ interface Line {
200
266
  /**
201
- * The discounts applied to this line item.
267
+ * An array of operations the quote line performs.
202
268
  */
203
- discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
269
+ actions?: Array<Line.Action>;
204
270
 
205
271
  /**
206
- * The ID of the price object. One of `price` or `price_data` is required.
272
+ * Details to identify the subscription schedule the quote line applies to.
207
273
  */
208
- price?: string;
274
+ applies_to?: Line.AppliesTo;
209
275
 
210
276
  /**
211
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
277
+ * For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
212
278
  */
213
- price_data?: LineItem.PriceData;
279
+ billing_cycle_anchor?: Line.BillingCycleAnchor;
214
280
 
215
281
  /**
216
- * The quantity of the line item.
282
+ * A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
217
283
  */
218
- quantity?: number;
284
+ cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
219
285
 
220
286
  /**
221
- * The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
287
+ * Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
222
288
  */
223
- tax_rates?: Stripe.Emptyable<Array<string>>;
289
+ ends_at?: Line.EndsAt;
290
+
291
+ /**
292
+ * Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
293
+ */
294
+ proration_behavior?: Line.ProrationBehavior;
295
+
296
+ /**
297
+ * Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
298
+ */
299
+ set_pause_collection?: Line.SetPauseCollection;
300
+
301
+ /**
302
+ * Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
303
+ */
304
+ set_schedule_end?: Line.SetScheduleEnd;
305
+
306
+ /**
307
+ * Details to identify the earliest timestamp where the proposed change should take effect.
308
+ */
309
+ starts_at?: Line.StartsAt;
310
+
311
+ /**
312
+ * Settings related to subscription trials.
313
+ */
314
+ trial_settings?: Line.TrialSettings;
224
315
  }
225
316
 
226
- namespace LineItem {
227
- interface Discount {
317
+ namespace Line {
318
+ interface Action {
228
319
  /**
229
- * ID of the coupon to create a new discount for.
320
+ * Details for the `add_discount` type.
230
321
  */
231
- coupon?: string;
322
+ add_discount?: Action.AddDiscount;
232
323
 
233
324
  /**
234
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
325
+ * Details for the `add_item` type.
235
326
  */
236
- discount?: string;
327
+ add_item?: Action.AddItem;
237
328
 
238
329
  /**
239
- * ID of the promotion code to create a new discount for.
330
+ * Details for the `add_metadata` type: specify a hash of key-value pairs.
240
331
  */
241
- promotion_code?: string;
242
- }
332
+ add_metadata?: {
333
+ [key: string]: string;
334
+ };
243
335
 
244
- interface PriceData {
245
336
  /**
246
- * 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).
337
+ * Details for the `remove_discount` type.
247
338
  */
248
- currency: string;
339
+ remove_discount?: Action.RemoveDiscount;
249
340
 
250
341
  /**
251
- * The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
342
+ * Details for the `remove_item` type.
252
343
  */
253
- product: string;
344
+ remove_item?: Action.RemoveItem;
254
345
 
255
346
  /**
256
- * The recurring components of a price such as `interval` and `interval_count`.
347
+ * Details for the `remove_metadata` type: specify an array of metadata keys.
257
348
  */
258
- recurring?: PriceData.Recurring;
349
+ remove_metadata?: Array<string>;
259
350
 
260
351
  /**
261
- * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
352
+ * Details for the `set_discounts` type.
262
353
  */
263
- tax_behavior?: PriceData.TaxBehavior;
354
+ set_discounts?: Array<Action.SetDiscount>;
264
355
 
265
356
  /**
266
- * A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
357
+ * Details for the `set_items` type.
267
358
  */
268
- unit_amount?: number;
359
+ set_items?: Array<Action.SetItem>;
269
360
 
270
361
  /**
271
- * Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
362
+ * Details for the `set_metadata` type: specify an array of key-value pairs.
272
363
  */
273
- unit_amount_decimal?: string;
364
+ set_metadata?: Stripe.Emptyable<{
365
+ [key: string]: string;
366
+ }>;
367
+
368
+ /**
369
+ * The type of action the quote line performs.
370
+ */
371
+ type: Action.Type;
274
372
  }
275
373
 
276
- namespace PriceData {
277
- interface Recurring {
374
+ namespace Action {
375
+ interface AddDiscount {
278
376
  /**
279
- * Specifies billing frequency. Either `day`, `week`, `month` or `year`.
377
+ * The coupon code to redeem.
280
378
  */
281
- interval: Recurring.Interval;
379
+ coupon?: string;
282
380
 
283
381
  /**
284
- * The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
382
+ * An ID of an existing discount for a coupon that was already redeemed.
285
383
  */
286
- interval_count?: number;
287
- }
384
+ discount?: string;
288
385
 
289
- namespace Recurring {
290
- type Interval = 'day' | 'month' | 'week' | 'year';
291
- }
386
+ /**
387
+ * Details to determine how long the discount should be applied for.
388
+ */
389
+ discount_end?: AddDiscount.DiscountEnd;
292
390
 
293
- type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
294
- }
295
- }
391
+ /**
392
+ * 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.
393
+ */
394
+ index?: number;
296
395
 
297
- interface SubscriptionData {
298
- /**
299
- * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
300
- */
301
- billing_mode?: SubscriptionData.BillingMode;
396
+ /**
397
+ * The promotion code to redeem.
398
+ */
399
+ promotion_code?: string;
400
+ }
302
401
 
303
- /**
304
- * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
305
- */
306
- description?: string;
402
+ namespace AddDiscount {
403
+ interface DiscountEnd {
404
+ /**
405
+ * The type of calculation made to determine when the discount ends.
406
+ */
407
+ type: 'line_ends_at';
408
+ }
409
+ }
307
410
 
308
- /**
309
- * When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted.
310
- */
311
- effective_date?: Stripe.Emptyable<'current_period_end' | number>;
411
+ interface AddItem {
412
+ /**
413
+ * The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
414
+ */
415
+ discounts?: Array<AddItem.Discount>;
312
416
 
313
- /**
314
- * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
315
- */
316
- metadata?: Stripe.MetadataParam;
417
+ /**
418
+ * 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`.
419
+ */
420
+ metadata?: Stripe.MetadataParam;
317
421
 
318
- /**
319
- * Integer representing the number of trial period days before the customer is charged for the first time.
320
- */
321
- trial_period_days?: Stripe.Emptyable<number>;
322
- }
422
+ /**
423
+ * The ID of the price object.
424
+ */
425
+ price: string;
323
426
 
324
- namespace SubscriptionData {
325
- interface BillingMode {
326
- /**
327
- * Configure behavior for flexible billing mode.
328
- */
329
- flexible?: BillingMode.Flexible;
427
+ /**
428
+ * Quantity for this item.
429
+ */
430
+ quantity?: number;
330
431
 
331
- /**
332
- * Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`.
333
- */
334
- type: BillingMode.Type;
335
- }
432
+ /**
433
+ * 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`.
434
+ */
435
+ tax_rates?: Array<string>;
336
436
 
337
- namespace BillingMode {
338
- interface Flexible {
339
437
  /**
340
- * Controls how invoices and invoice items display proration amounts and discount amounts.
438
+ * Options that configure the trial on the subscription item.
341
439
  */
342
- proration_discounts?: Flexible.ProrationDiscounts;
440
+ trial?: AddItem.Trial;
343
441
  }
344
442
 
345
- namespace Flexible {
346
- type ProrationDiscounts = 'included' | 'itemized';
443
+ namespace AddItem {
444
+ interface Discount {
445
+ /**
446
+ * ID of the coupon to create a new discount for.
447
+ */
448
+ coupon?: string;
449
+
450
+ /**
451
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
452
+ */
453
+ discount?: string;
454
+
455
+ /**
456
+ * Details to determine how long the discount should be applied for.
457
+ */
458
+ discount_end?: Discount.DiscountEnd;
459
+
460
+ /**
461
+ * ID of the promotion code to create a new discount for.
462
+ */
463
+ promotion_code?: string;
464
+ }
465
+
466
+ namespace Discount {
467
+ interface DiscountEnd {
468
+ /**
469
+ * Time span for the redeemed discount.
470
+ */
471
+ duration?: DiscountEnd.Duration;
472
+
473
+ /**
474
+ * A precise Unix timestamp for the discount to end. Must be in the future.
475
+ */
476
+ timestamp?: number;
477
+
478
+ /**
479
+ * The type of calculation made to determine when the discount ends.
480
+ */
481
+ type: DiscountEnd.Type;
482
+ }
483
+
484
+ namespace DiscountEnd {
485
+ interface Duration {
486
+ /**
487
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
488
+ */
489
+ interval: Duration.Interval;
490
+
491
+ /**
492
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
493
+ */
494
+ interval_count: number;
495
+ }
496
+
497
+ namespace Duration {
498
+ type Interval = 'day' | 'month' | 'week' | 'year';
499
+ }
500
+
501
+ type Type = 'duration' | 'timestamp';
502
+ }
503
+ }
504
+
505
+ interface Trial {
506
+ /**
507
+ * 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.
508
+ */
509
+ converts_to?: Array<string>;
510
+
511
+ /**
512
+ * Determines the type of trial for this item.
513
+ */
514
+ type: Trial.Type;
515
+ }
516
+
517
+ namespace Trial {
518
+ type Type = 'free' | 'paid';
519
+ }
347
520
  }
348
521
 
349
- type Type = 'classic' | 'flexible';
350
- }
351
- }
522
+ interface RemoveDiscount {
523
+ /**
524
+ * The coupon code to remove from the `discounts` array.
525
+ */
526
+ coupon?: string;
352
527
 
353
- interface TransferData {
354
- /**
355
- * The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
356
- */
357
- amount?: number;
528
+ /**
529
+ * The ID of a discount to remove from the `discounts` array.
530
+ */
531
+ discount?: string;
358
532
 
359
- /**
360
- * 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 destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
361
- */
362
- amount_percent?: number;
533
+ /**
534
+ * The ID of a promotion code to remove from the `discounts` array.
535
+ */
536
+ promotion_code?: string;
537
+ }
363
538
 
364
- /**
365
- * ID of an existing, connected Stripe account.
366
- */
367
- destination: string;
368
- }
369
- }
539
+ interface RemoveItem {
540
+ /**
541
+ * ID of a price to remove.
542
+ */
543
+ price: string;
544
+ }
370
545
 
371
- interface QuoteRetrieveParams {
372
- /**
373
- * Specifies which fields in the response should be expanded.
374
- */
375
- expand?: Array<string>;
376
- }
546
+ interface SetDiscount {
547
+ /**
548
+ * The coupon code to replace the `discounts` array with.
549
+ */
550
+ coupon?: string;
377
551
 
378
- interface QuoteUpdateParams {
379
- /**
380
- * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
381
- */
382
- application_fee_amount?: Stripe.Emptyable<number>;
552
+ /**
553
+ * An ID of an existing discount to replace the `discounts` array with.
554
+ */
555
+ discount?: string;
383
556
 
384
- /**
385
- * 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. There must be at least 1 line item with a recurring price to use this field.
386
- */
387
- application_fee_percent?: Stripe.Emptyable<number>;
557
+ /**
558
+ * An ID of an existing promotion code to replace the `discounts` array with.
559
+ */
560
+ promotion_code?: string;
561
+ }
388
562
 
389
- /**
390
- * Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
391
- */
392
- automatic_tax?: QuoteUpdateParams.AutomaticTax;
563
+ interface SetItem {
564
+ /**
565
+ * 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`.
566
+ */
567
+ discounts?: Array<SetItem.Discount>;
393
568
 
394
- /**
395
- * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
396
- */
397
- collection_method?: QuoteUpdateParams.CollectionMethod;
569
+ /**
570
+ * 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`.
571
+ */
572
+ metadata?: Stripe.MetadataParam;
398
573
 
399
- /**
400
- * The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
401
- */
402
- customer?: string;
574
+ /**
575
+ * The ID of the price object.
576
+ */
577
+ price: string;
403
578
 
404
- /**
405
- * The tax rates that will apply to any line item that does not have `tax_rates` set.
406
- */
407
- default_tax_rates?: Stripe.Emptyable<Array<string>>;
579
+ /**
580
+ * 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`.
581
+ */
582
+ quantity?: number;
408
583
 
409
- /**
410
- * A description that will be displayed on the quote PDF.
411
- */
412
- description?: Stripe.Emptyable<string>;
584
+ /**
585
+ * 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`.
586
+ */
587
+ tax_rates?: Array<string>;
413
588
 
414
- /**
415
- * The discounts applied to the quote.
416
- */
417
- discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
589
+ /**
590
+ * 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`.
591
+ */
592
+ trial?: SetItem.Trial;
593
+ }
418
594
 
419
- /**
420
- * Specifies which fields in the response should be expanded.
421
- */
422
- expand?: Array<string>;
595
+ namespace SetItem {
596
+ interface Discount {
597
+ /**
598
+ * ID of the coupon to create a new discount for.
599
+ */
600
+ coupon?: string;
601
+
602
+ /**
603
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
604
+ */
605
+ discount?: string;
606
+
607
+ /**
608
+ * Details to determine how long the discount should be applied for.
609
+ */
610
+ discount_end?: Discount.DiscountEnd;
611
+
612
+ /**
613
+ * ID of the promotion code to create a new discount for.
614
+ */
615
+ promotion_code?: string;
616
+ }
617
+
618
+ namespace Discount {
619
+ interface DiscountEnd {
620
+ /**
621
+ * Time span for the redeemed discount.
622
+ */
623
+ duration?: DiscountEnd.Duration;
624
+
625
+ /**
626
+ * A precise Unix timestamp for the discount to end. Must be in the future.
627
+ */
628
+ timestamp?: number;
629
+
630
+ /**
631
+ * The type of calculation made to determine when the discount ends.
632
+ */
633
+ type: DiscountEnd.Type;
634
+ }
635
+
636
+ namespace DiscountEnd {
637
+ interface Duration {
638
+ /**
639
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
640
+ */
641
+ interval: Duration.Interval;
642
+
643
+ /**
644
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
645
+ */
646
+ interval_count: number;
647
+ }
648
+
649
+ namespace Duration {
650
+ type Interval = 'day' | 'month' | 'week' | 'year';
651
+ }
652
+
653
+ type Type = 'duration' | 'timestamp';
654
+ }
655
+ }
656
+
657
+ interface Trial {
658
+ /**
659
+ * List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
660
+ */
661
+ converts_to?: Array<string>;
662
+
663
+ /**
664
+ * Determines the type of trial for this item.
665
+ */
666
+ type: Trial.Type;
667
+ }
668
+
669
+ namespace Trial {
670
+ type Type = 'free' | 'paid';
671
+ }
672
+ }
423
673
 
424
- /**
425
- * A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
426
- */
427
- expires_at?: number;
674
+ type Type =
675
+ | 'add_discount'
676
+ | 'add_item'
677
+ | 'add_metadata'
678
+ | 'clear_discounts'
679
+ | 'clear_metadata'
680
+ | 'remove_discount'
681
+ | 'remove_item'
682
+ | 'remove_metadata'
683
+ | 'set_discounts'
684
+ | 'set_items'
685
+ | 'set_metadata';
686
+ }
428
687
 
429
- /**
430
- * A footer that will be displayed on the quote PDF.
431
- */
432
- footer?: Stripe.Emptyable<string>;
688
+ interface AppliesTo {
689
+ /**
690
+ * A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
691
+ */
692
+ new_reference?: string;
433
693
 
434
- /**
435
- * A header that will be displayed on the quote PDF.
436
- */
437
- header?: Stripe.Emptyable<string>;
694
+ /**
695
+ * The ID of the schedule the line applies to.
696
+ */
697
+ subscription_schedule?: string;
438
698
 
439
- /**
440
- * All invoices will be billed using the specified settings.
441
- */
442
- invoice_settings?: QuoteUpdateParams.InvoiceSettings;
699
+ /**
700
+ * Describes whether the quote line is affecting a new schedule or an existing schedule.
701
+ */
702
+ type: AppliesTo.Type;
703
+ }
443
704
 
444
- /**
445
- * A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
446
- */
447
- line_items?: Array<QuoteUpdateParams.LineItem>;
705
+ namespace AppliesTo {
706
+ type Type = 'new_reference' | 'subscription_schedule';
707
+ }
448
708
 
449
- /**
450
- * 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`.
451
- */
452
- metadata?: Stripe.MetadataParam;
709
+ type BillingCycleAnchor = 'automatic' | 'line_starts_at';
453
710
 
454
- /**
455
- * The account on behalf of which to charge.
456
- */
457
- on_behalf_of?: Stripe.Emptyable<string>;
711
+ interface CancelSubscriptionSchedule {
712
+ /**
713
+ * Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
714
+ */
715
+ cancel_at: 'line_starts_at';
458
716
 
459
- /**
460
- * When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
461
- */
462
- subscription_data?: QuoteUpdateParams.SubscriptionData;
717
+ /**
718
+ * If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
719
+ */
720
+ invoice_now?: boolean;
463
721
 
464
- /**
465
- * The data with which to automatically create a Transfer for each of the invoices.
466
- */
467
- transfer_data?: Stripe.Emptyable<QuoteUpdateParams.TransferData>;
468
- }
722
+ /**
723
+ * If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
724
+ */
725
+ prorate?: boolean;
726
+ }
469
727
 
470
- namespace QuoteUpdateParams {
471
- interface AutomaticTax {
728
+ interface EndsAt {
729
+ /**
730
+ * Use the `end` time of a given discount.
731
+ */
732
+ discount_end?: EndsAt.DiscountEnd;
733
+
734
+ /**
735
+ * Time span for the quote line starting from the `starts_at` date.
736
+ */
737
+ duration?: EndsAt.Duration;
738
+
739
+ /**
740
+ * A precise Unix timestamp.
741
+ */
742
+ timestamp?: number;
743
+
744
+ /**
745
+ * Select a way to pass in `ends_at`.
746
+ */
747
+ type: EndsAt.Type;
748
+ }
749
+
750
+ namespace EndsAt {
751
+ interface DiscountEnd {
752
+ /**
753
+ * The ID of a specific discount.
754
+ */
755
+ discount: string;
756
+ }
757
+
758
+ interface Duration {
759
+ /**
760
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
761
+ */
762
+ interval: Duration.Interval;
763
+
764
+ /**
765
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
766
+ */
767
+ interval_count: number;
768
+ }
769
+
770
+ namespace Duration {
771
+ type Interval = 'day' | 'month' | 'week' | 'year';
772
+ }
773
+
774
+ type Type =
775
+ | 'billing_period_end'
776
+ | 'discount_end'
777
+ | 'duration'
778
+ | 'quote_acceptance_date'
779
+ | 'schedule_end'
780
+ | 'timestamp'
781
+ | 'upcoming_invoice';
782
+ }
783
+
784
+ type ProrationBehavior =
785
+ | 'always_invoice'
786
+ | 'create_prorations'
787
+ | 'none';
788
+
789
+ interface SetPauseCollection {
790
+ /**
791
+ * Details of the pause_collection behavior to apply to the amendment.
792
+ */
793
+ set?: SetPauseCollection.Set;
794
+
795
+ /**
796
+ * Determines the type of the pause_collection amendment.
797
+ */
798
+ type: SetPauseCollection.Type;
799
+ }
800
+
801
+ namespace SetPauseCollection {
802
+ interface Set {
803
+ /**
804
+ * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
805
+ */
806
+ behavior: Set.Behavior;
807
+ }
808
+
809
+ namespace Set {
810
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
811
+ }
812
+
813
+ type Type = 'remove' | 'set';
814
+ }
815
+
816
+ type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
817
+
818
+ interface StartsAt {
819
+ /**
820
+ * Use the `end` time of a given discount.
821
+ */
822
+ discount_end?: StartsAt.DiscountEnd;
823
+
824
+ /**
825
+ * The timestamp the given line ends at.
826
+ */
827
+ line_ends_at?: StartsAt.LineEndsAt;
828
+
829
+ /**
830
+ * A precise Unix timestamp.
831
+ */
832
+ timestamp?: number;
833
+
834
+ /**
835
+ * Select a way to pass in `starts_at`.
836
+ */
837
+ type: StartsAt.Type;
838
+ }
839
+
840
+ namespace StartsAt {
841
+ interface DiscountEnd {
842
+ /**
843
+ * The ID of a specific discount.
844
+ */
845
+ discount: string;
846
+ }
847
+
848
+ interface LineEndsAt {
849
+ /**
850
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
851
+ */
852
+ index?: number;
853
+ }
854
+
855
+ type Type =
856
+ | 'discount_end'
857
+ | 'line_ends_at'
858
+ | 'now'
859
+ | 'quote_acceptance_date'
860
+ | 'schedule_end'
861
+ | 'timestamp'
862
+ | 'upcoming_invoice';
863
+ }
864
+
865
+ interface TrialSettings {
866
+ /**
867
+ * Defines how the subscription should behave when a trial ends.
868
+ */
869
+ end_behavior?: TrialSettings.EndBehavior;
870
+ }
871
+
872
+ namespace TrialSettings {
873
+ interface EndBehavior {
874
+ /**
875
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
876
+ */
877
+ prorate_up_front?: EndBehavior.ProrateUpFront;
878
+ }
879
+
880
+ namespace EndBehavior {
881
+ type ProrateUpFront = 'defer' | 'include';
882
+ }
883
+ }
884
+ }
885
+
886
+ interface LineItem {
472
887
  /**
473
- * Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
888
+ * The discounts applied to this line item.
474
889
  */
475
- enabled: boolean;
890
+ discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
476
891
 
477
892
  /**
478
- * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
893
+ * The ID of the price object. One of `price` or `price_data` is required.
479
894
  */
480
- liability?: AutomaticTax.Liability;
895
+ price?: string;
896
+
897
+ /**
898
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
899
+ */
900
+ price_data?: LineItem.PriceData;
901
+
902
+ /**
903
+ * The quantity of the line item.
904
+ */
905
+ quantity?: number;
906
+
907
+ /**
908
+ * The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
909
+ */
910
+ tax_rates?: Stripe.Emptyable<Array<string>>;
481
911
  }
482
912
 
483
- namespace AutomaticTax {
484
- interface Liability {
913
+ namespace LineItem {
914
+ interface Discount {
485
915
  /**
486
- * The connected account being referenced when `type` is `account`.
916
+ * ID of the coupon to create a new discount for.
487
917
  */
488
- account?: string;
918
+ coupon?: string;
489
919
 
490
920
  /**
491
- * Type of the account referenced in the request.
921
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
492
922
  */
493
- type: Liability.Type;
923
+ discount?: string;
924
+
925
+ /**
926
+ * Details to determine how long the discount should be applied for.
927
+ */
928
+ discount_end?: Discount.DiscountEnd;
929
+
930
+ /**
931
+ * ID of the promotion code to create a new discount for.
932
+ */
933
+ promotion_code?: string;
494
934
  }
495
935
 
496
- namespace Liability {
497
- type Type = 'account' | 'self';
936
+ namespace Discount {
937
+ interface DiscountEnd {
938
+ /**
939
+ * Time span for the redeemed discount.
940
+ */
941
+ duration?: DiscountEnd.Duration;
942
+
943
+ /**
944
+ * A precise Unix timestamp for the discount to end. Must be in the future.
945
+ */
946
+ timestamp?: number;
947
+
948
+ /**
949
+ * The type of calculation made to determine when the discount ends.
950
+ */
951
+ type: DiscountEnd.Type;
952
+ }
953
+
954
+ namespace DiscountEnd {
955
+ interface Duration {
956
+ /**
957
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
958
+ */
959
+ interval: Duration.Interval;
960
+
961
+ /**
962
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
963
+ */
964
+ interval_count: number;
965
+ }
966
+
967
+ namespace Duration {
968
+ type Interval = 'day' | 'month' | 'week' | 'year';
969
+ }
970
+
971
+ type Type = 'duration' | 'timestamp';
972
+ }
973
+ }
974
+
975
+ interface PriceData {
976
+ /**
977
+ * 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).
978
+ */
979
+ currency: string;
980
+
981
+ /**
982
+ * The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
983
+ */
984
+ product: string;
985
+
986
+ /**
987
+ * The recurring components of a price such as `interval` and `interval_count`.
988
+ */
989
+ recurring?: PriceData.Recurring;
990
+
991
+ /**
992
+ * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
993
+ */
994
+ tax_behavior?: PriceData.TaxBehavior;
995
+
996
+ /**
997
+ * A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
998
+ */
999
+ unit_amount?: number;
1000
+
1001
+ /**
1002
+ * Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
1003
+ */
1004
+ unit_amount_decimal?: string;
1005
+ }
1006
+
1007
+ namespace PriceData {
1008
+ interface Recurring {
1009
+ /**
1010
+ * Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1011
+ */
1012
+ interval: Recurring.Interval;
1013
+
1014
+ /**
1015
+ * The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
1016
+ */
1017
+ interval_count?: number;
1018
+ }
1019
+
1020
+ namespace Recurring {
1021
+ type Interval = 'day' | 'month' | 'week' | 'year';
1022
+ }
1023
+
1024
+ type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
498
1025
  }
499
1026
  }
500
1027
 
501
- type CollectionMethod = 'charge_automatically' | 'send_invoice';
1028
+ interface SubscriptionData {
1029
+ /**
1030
+ * Describes the period to bill for upon accepting the quote.
1031
+ */
1032
+ bill_on_acceptance?: SubscriptionData.BillOnAcceptance;
502
1033
 
503
- interface Discount {
504
1034
  /**
505
- * ID of the coupon to create a new discount for.
1035
+ * 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.
506
1036
  */
507
- coupon?: string;
1037
+ billing_behavior?: SubscriptionData.BillingBehavior;
508
1038
 
509
1039
  /**
510
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
1040
+ * When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
511
1041
  */
512
- discount?: string;
1042
+ billing_cycle_anchor?: Stripe.Emptyable<'reset'>;
1043
+
1044
+ /**
1045
+ * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1046
+ */
1047
+ billing_mode?: SubscriptionData.BillingMode;
1048
+
1049
+ /**
1050
+ * Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
1051
+ */
1052
+ billing_schedules?: Stripe.Emptyable<
1053
+ Array<SubscriptionData.BillingSchedule>
1054
+ >;
1055
+
1056
+ /**
1057
+ * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1058
+ */
1059
+ description?: string;
1060
+
1061
+ /**
1062
+ * When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
1063
+ */
1064
+ effective_date?: Stripe.Emptyable<'current_period_end' | number>;
1065
+
1066
+ /**
1067
+ * Behavior of the subscription schedule and underlying subscription when it ends.
1068
+ */
1069
+ end_behavior?: SubscriptionData.EndBehavior;
1070
+
1071
+ /**
1072
+ * The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden.
1073
+ */
1074
+ from_subscription?: string;
1075
+
1076
+ /**
1077
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
1078
+ */
1079
+ metadata?: Stripe.MetadataParam;
1080
+
1081
+ /**
1082
+ * Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
1083
+ */
1084
+ phase_effective_at?: SubscriptionData.PhaseEffectiveAt;
1085
+
1086
+ /**
1087
+ * If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
1088
+ */
1089
+ prebilling?: Stripe.Emptyable<SubscriptionData.Prebilling>;
1090
+
1091
+ /**
1092
+ * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1093
+ *
1094
+ * When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1095
+ *
1096
+ * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
1097
+ *
1098
+ * Prorations can be disabled by passing `none`.
1099
+ */
1100
+ proration_behavior?: SubscriptionData.ProrationBehavior;
1101
+
1102
+ /**
1103
+ * Integer representing the number of trial period days before the customer is charged for the first time.
1104
+ */
1105
+ trial_period_days?: Stripe.Emptyable<number>;
1106
+ }
1107
+
1108
+ namespace SubscriptionData {
1109
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
1110
+
1111
+ interface BillingMode {
1112
+ /**
1113
+ * Configure behavior for flexible billing mode.
1114
+ */
1115
+ flexible?: BillingMode.Flexible;
1116
+
1117
+ /**
1118
+ * Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`.
1119
+ */
1120
+ type: BillingMode.Type;
1121
+ }
1122
+
1123
+ namespace BillingMode {
1124
+ interface Flexible {
1125
+ /**
1126
+ * Controls how invoices and invoice items display proration amounts and discount amounts.
1127
+ */
1128
+ proration_discounts?: Flexible.ProrationDiscounts;
1129
+ }
1130
+
1131
+ namespace Flexible {
1132
+ type ProrationDiscounts = 'included' | 'itemized';
1133
+ }
1134
+
1135
+ type Type = 'classic' | 'flexible';
1136
+ }
1137
+
1138
+ interface BillingSchedule {
1139
+ /**
1140
+ * Configure billing schedule differently for individual subscription items.
1141
+ */
1142
+ applies_to?: Array<BillingSchedule.AppliesTo>;
1143
+
1144
+ /**
1145
+ * The start of the period to bill from when the Quote is accepted.
1146
+ */
1147
+ bill_from: BillingSchedule.BillFrom;
1148
+
1149
+ /**
1150
+ * The end of the period to bill until when the Quote is accepted.
1151
+ */
1152
+ bill_until: BillingSchedule.BillUntil;
1153
+
1154
+ /**
1155
+ * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
1156
+ */
1157
+ key?: string;
1158
+ }
1159
+
1160
+ namespace BillingSchedule {
1161
+ interface AppliesTo {
1162
+ /**
1163
+ * The ID of the price object.
1164
+ */
1165
+ price?: string;
1166
+
1167
+ /**
1168
+ * Controls which subscription items the billing schedule applies to.
1169
+ */
1170
+ type: 'price';
1171
+ }
1172
+
1173
+ interface BillFrom {
1174
+ /**
1175
+ * Details of a Quote line to start the bill period from.
1176
+ */
1177
+ line_starts_at?: BillFrom.LineStartsAt;
1178
+
1179
+ /**
1180
+ * A precise Unix timestamp.
1181
+ */
1182
+ timestamp?: number;
1183
+
1184
+ /**
1185
+ * The type of method to specify the `bill_from` time.
1186
+ */
1187
+ type: BillFrom.Type;
1188
+ }
1189
+
1190
+ namespace BillFrom {
1191
+ interface LineStartsAt {
1192
+ /**
1193
+ * The ID of a quote line.
1194
+ */
1195
+ id?: string;
1196
+
1197
+ /**
1198
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1199
+ */
1200
+ index?: number;
1201
+ }
1202
+
1203
+ type Type =
1204
+ | 'line_starts_at'
1205
+ | 'now'
1206
+ | 'pause_collection_start'
1207
+ | 'quote_acceptance_date'
1208
+ | 'timestamp';
1209
+ }
1210
+
1211
+ interface BillUntil {
1212
+ /**
1213
+ * Details of the duration over which to bill.
1214
+ */
1215
+ duration?: BillUntil.Duration;
1216
+
1217
+ /**
1218
+ * Details of a Quote line item from which to bill until.
1219
+ */
1220
+ line_ends_at?: BillUntil.LineEndsAt;
1221
+
1222
+ /**
1223
+ * A precise Unix timestamp.
1224
+ */
1225
+ timestamp?: number;
1226
+
1227
+ /**
1228
+ * The type of method to specify the `bill_until` time.
1229
+ */
1230
+ type: BillUntil.Type;
1231
+ }
1232
+
1233
+ namespace BillUntil {
1234
+ interface Duration {
1235
+ /**
1236
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1237
+ */
1238
+ interval: Duration.Interval;
1239
+
1240
+ /**
1241
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1242
+ */
1243
+ interval_count: number;
1244
+ }
1245
+
1246
+ namespace Duration {
1247
+ type Interval = 'day' | 'month' | 'week' | 'year';
1248
+ }
1249
+
1250
+ interface LineEndsAt {
1251
+ /**
1252
+ * The ID of a quote line.
1253
+ */
1254
+ id?: string;
1255
+
1256
+ /**
1257
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1258
+ */
1259
+ index?: number;
1260
+ }
1261
+
1262
+ type Type =
1263
+ | 'duration'
1264
+ | 'line_ends_at'
1265
+ | 'schedule_end'
1266
+ | 'timestamp'
1267
+ | 'upcoming_invoice';
1268
+ }
1269
+ }
1270
+
1271
+ interface BillOnAcceptance {
1272
+ /**
1273
+ * The start of the period to bill from when the Quote is accepted.
1274
+ */
1275
+ bill_from?: BillOnAcceptance.BillFrom;
1276
+
1277
+ /**
1278
+ * The end of the period to bill until when the Quote is accepted.
1279
+ */
1280
+ bill_until?: BillOnAcceptance.BillUntil;
1281
+ }
1282
+
1283
+ namespace BillOnAcceptance {
1284
+ interface BillFrom {
1285
+ /**
1286
+ * Details of a Quote line to start the bill period from.
1287
+ */
1288
+ line_starts_at?: BillFrom.LineStartsAt;
1289
+
1290
+ /**
1291
+ * A precise Unix timestamp.
1292
+ */
1293
+ timestamp?: number;
1294
+
1295
+ /**
1296
+ * The type of method to specify the `bill_from` time.
1297
+ */
1298
+ type: BillFrom.Type;
1299
+ }
1300
+
1301
+ namespace BillFrom {
1302
+ interface LineStartsAt {
1303
+ /**
1304
+ * The ID of a quote line.
1305
+ */
1306
+ id?: string;
1307
+
1308
+ /**
1309
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1310
+ */
1311
+ index?: number;
1312
+ }
1313
+
1314
+ type Type =
1315
+ | 'line_starts_at'
1316
+ | 'now'
1317
+ | 'pause_collection_start'
1318
+ | 'quote_acceptance_date'
1319
+ | 'timestamp';
1320
+ }
1321
+
1322
+ interface BillUntil {
1323
+ /**
1324
+ * Details of the duration over which to bill.
1325
+ */
1326
+ duration?: BillUntil.Duration;
1327
+
1328
+ /**
1329
+ * Details of a Quote line item from which to bill until.
1330
+ */
1331
+ line_ends_at?: BillUntil.LineEndsAt;
1332
+
1333
+ /**
1334
+ * A precise Unix timestamp.
1335
+ */
1336
+ timestamp?: number;
1337
+
1338
+ /**
1339
+ * The type of method to specify the `bill_until` time.
1340
+ */
1341
+ type: BillUntil.Type;
1342
+ }
1343
+
1344
+ namespace BillUntil {
1345
+ interface Duration {
1346
+ /**
1347
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1348
+ */
1349
+ interval: Duration.Interval;
1350
+
1351
+ /**
1352
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1353
+ */
1354
+ interval_count: number;
1355
+ }
1356
+
1357
+ namespace Duration {
1358
+ type Interval = 'day' | 'month' | 'week' | 'year';
1359
+ }
1360
+
1361
+ interface LineEndsAt {
1362
+ /**
1363
+ * The ID of a quote line.
1364
+ */
1365
+ id?: string;
1366
+
1367
+ /**
1368
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1369
+ */
1370
+ index?: number;
1371
+ }
1372
+
1373
+ type Type =
1374
+ | 'duration'
1375
+ | 'line_ends_at'
1376
+ | 'schedule_end'
1377
+ | 'timestamp'
1378
+ | 'upcoming_invoice';
1379
+ }
1380
+ }
1381
+
1382
+ type EndBehavior = 'cancel' | 'release';
1383
+
1384
+ type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
1385
+
1386
+ interface Prebilling {
1387
+ /**
1388
+ * This is used to determine the number of billing cycles to prebill.
1389
+ */
1390
+ iterations: number;
1391
+ }
1392
+
1393
+ type ProrationBehavior =
1394
+ | 'always_invoice'
1395
+ | 'create_prorations'
1396
+ | 'none';
1397
+ }
1398
+
1399
+ interface SubscriptionDataOverride {
1400
+ /**
1401
+ * Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
1402
+ */
1403
+ applies_to: SubscriptionDataOverride.AppliesTo;
1404
+
1405
+ /**
1406
+ * Describes the period to bill for upon accepting the quote.
1407
+ */
1408
+ bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance;
1409
+
1410
+ /**
1411
+ * 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.
1412
+ */
1413
+ billing_behavior?: SubscriptionDataOverride.BillingBehavior;
1414
+
1415
+ /**
1416
+ * Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
1417
+ */
1418
+ billing_schedules?: Stripe.Emptyable<
1419
+ Array<SubscriptionDataOverride.BillingSchedule>
1420
+ >;
1421
+
1422
+ /**
1423
+ * The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
1424
+ */
1425
+ customer?: string;
1426
+
1427
+ /**
1428
+ * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1429
+ */
1430
+ description?: string;
1431
+
1432
+ /**
1433
+ * Behavior of the subscription schedule and underlying subscription when it ends.
1434
+ */
1435
+ end_behavior?: SubscriptionDataOverride.EndBehavior;
1436
+
1437
+ /**
1438
+ * Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
1439
+ */
1440
+ phase_effective_at?: SubscriptionDataOverride.PhaseEffectiveAt;
1441
+
1442
+ /**
1443
+ * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1444
+ *
1445
+ * When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1446
+ *
1447
+ * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
1448
+ *
1449
+ * Prorations can be disabled by passing `none`.
1450
+ */
1451
+ proration_behavior?: SubscriptionDataOverride.ProrationBehavior;
1452
+ }
1453
+
1454
+ namespace SubscriptionDataOverride {
1455
+ interface AppliesTo {
1456
+ /**
1457
+ * A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
1458
+ */
1459
+ new_reference?: string;
1460
+
1461
+ /**
1462
+ * The ID of the schedule the line applies to.
1463
+ */
1464
+ subscription_schedule?: string;
1465
+
1466
+ /**
1467
+ * Describes whether the quote line is affecting a new schedule or an existing schedule.
1468
+ */
1469
+ type: AppliesTo.Type;
1470
+ }
1471
+
1472
+ namespace AppliesTo {
1473
+ type Type = 'new_reference' | 'subscription_schedule';
1474
+ }
1475
+
1476
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
1477
+
1478
+ interface BillingSchedule {
1479
+ /**
1480
+ * Configure billing schedule differently for individual subscription items.
1481
+ */
1482
+ applies_to?: Array<BillingSchedule.AppliesTo>;
1483
+
1484
+ /**
1485
+ * The start of the period to bill from when the Quote is accepted.
1486
+ */
1487
+ bill_from: BillingSchedule.BillFrom;
1488
+
1489
+ /**
1490
+ * The end of the period to bill until when the Quote is accepted.
1491
+ */
1492
+ bill_until: BillingSchedule.BillUntil;
1493
+
1494
+ /**
1495
+ * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
1496
+ */
1497
+ key?: string;
1498
+ }
1499
+
1500
+ namespace BillingSchedule {
1501
+ interface AppliesTo {
1502
+ /**
1503
+ * The ID of the price object.
1504
+ */
1505
+ price?: string;
1506
+
1507
+ /**
1508
+ * Controls which subscription items the billing schedule applies to.
1509
+ */
1510
+ type: 'price';
1511
+ }
1512
+
1513
+ interface BillFrom {
1514
+ /**
1515
+ * Details of a Quote line to start the bill period from.
1516
+ */
1517
+ line_starts_at?: BillFrom.LineStartsAt;
1518
+
1519
+ /**
1520
+ * A precise Unix timestamp.
1521
+ */
1522
+ timestamp?: number;
1523
+
1524
+ /**
1525
+ * The type of method to specify the `bill_from` time.
1526
+ */
1527
+ type: BillFrom.Type;
1528
+ }
1529
+
1530
+ namespace BillFrom {
1531
+ interface LineStartsAt {
1532
+ /**
1533
+ * The ID of a quote line.
1534
+ */
1535
+ id?: string;
1536
+
1537
+ /**
1538
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1539
+ */
1540
+ index?: number;
1541
+ }
1542
+
1543
+ type Type =
1544
+ | 'line_starts_at'
1545
+ | 'now'
1546
+ | 'pause_collection_start'
1547
+ | 'quote_acceptance_date'
1548
+ | 'timestamp';
1549
+ }
1550
+
1551
+ interface BillUntil {
1552
+ /**
1553
+ * Details of the duration over which to bill.
1554
+ */
1555
+ duration?: BillUntil.Duration;
1556
+
1557
+ /**
1558
+ * Details of a Quote line item from which to bill until.
1559
+ */
1560
+ line_ends_at?: BillUntil.LineEndsAt;
1561
+
1562
+ /**
1563
+ * A precise Unix timestamp.
1564
+ */
1565
+ timestamp?: number;
1566
+
1567
+ /**
1568
+ * The type of method to specify the `bill_until` time.
1569
+ */
1570
+ type: BillUntil.Type;
1571
+ }
1572
+
1573
+ namespace BillUntil {
1574
+ interface Duration {
1575
+ /**
1576
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1577
+ */
1578
+ interval: Duration.Interval;
1579
+
1580
+ /**
1581
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1582
+ */
1583
+ interval_count: number;
1584
+ }
1585
+
1586
+ namespace Duration {
1587
+ type Interval = 'day' | 'month' | 'week' | 'year';
1588
+ }
1589
+
1590
+ interface LineEndsAt {
1591
+ /**
1592
+ * The ID of a quote line.
1593
+ */
1594
+ id?: string;
1595
+
1596
+ /**
1597
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1598
+ */
1599
+ index?: number;
1600
+ }
1601
+
1602
+ type Type =
1603
+ | 'duration'
1604
+ | 'line_ends_at'
1605
+ | 'schedule_end'
1606
+ | 'timestamp'
1607
+ | 'upcoming_invoice';
1608
+ }
1609
+ }
1610
+
1611
+ interface BillOnAcceptance {
1612
+ /**
1613
+ * The start of the period to bill from when the Quote is accepted.
1614
+ */
1615
+ bill_from?: BillOnAcceptance.BillFrom;
1616
+
1617
+ /**
1618
+ * The end of the period to bill until when the Quote is accepted.
1619
+ */
1620
+ bill_until?: BillOnAcceptance.BillUntil;
1621
+ }
1622
+
1623
+ namespace BillOnAcceptance {
1624
+ interface BillFrom {
1625
+ /**
1626
+ * Details of a Quote line to start the bill period from.
1627
+ */
1628
+ line_starts_at?: BillFrom.LineStartsAt;
1629
+
1630
+ /**
1631
+ * A precise Unix timestamp.
1632
+ */
1633
+ timestamp?: number;
1634
+
1635
+ /**
1636
+ * The type of method to specify the `bill_from` time.
1637
+ */
1638
+ type: BillFrom.Type;
1639
+ }
1640
+
1641
+ namespace BillFrom {
1642
+ interface LineStartsAt {
1643
+ /**
1644
+ * The ID of a quote line.
1645
+ */
1646
+ id?: string;
1647
+
1648
+ /**
1649
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1650
+ */
1651
+ index?: number;
1652
+ }
1653
+
1654
+ type Type =
1655
+ | 'line_starts_at'
1656
+ | 'now'
1657
+ | 'pause_collection_start'
1658
+ | 'quote_acceptance_date'
1659
+ | 'timestamp';
1660
+ }
1661
+
1662
+ interface BillUntil {
1663
+ /**
1664
+ * Details of the duration over which to bill.
1665
+ */
1666
+ duration?: BillUntil.Duration;
1667
+
1668
+ /**
1669
+ * Details of a Quote line item from which to bill until.
1670
+ */
1671
+ line_ends_at?: BillUntil.LineEndsAt;
1672
+
1673
+ /**
1674
+ * A precise Unix timestamp.
1675
+ */
1676
+ timestamp?: number;
1677
+
1678
+ /**
1679
+ * The type of method to specify the `bill_until` time.
1680
+ */
1681
+ type: BillUntil.Type;
1682
+ }
1683
+
1684
+ namespace BillUntil {
1685
+ interface Duration {
1686
+ /**
1687
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1688
+ */
1689
+ interval: Duration.Interval;
1690
+
1691
+ /**
1692
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1693
+ */
1694
+ interval_count: number;
1695
+ }
1696
+
1697
+ namespace Duration {
1698
+ type Interval = 'day' | 'month' | 'week' | 'year';
1699
+ }
1700
+
1701
+ interface LineEndsAt {
1702
+ /**
1703
+ * The ID of a quote line.
1704
+ */
1705
+ id?: string;
1706
+
1707
+ /**
1708
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1709
+ */
1710
+ index?: number;
1711
+ }
1712
+
1713
+ type Type =
1714
+ | 'duration'
1715
+ | 'line_ends_at'
1716
+ | 'schedule_end'
1717
+ | 'timestamp'
1718
+ | 'upcoming_invoice';
1719
+ }
1720
+ }
1721
+
1722
+ type EndBehavior = 'cancel' | 'release';
1723
+
1724
+ type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
1725
+
1726
+ type ProrationBehavior =
1727
+ | 'always_invoice'
1728
+ | 'create_prorations'
1729
+ | 'none';
1730
+ }
1731
+
1732
+ interface TransferData {
1733
+ /**
1734
+ * The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
1735
+ */
1736
+ amount?: number;
1737
+
1738
+ /**
1739
+ * 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 destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
1740
+ */
1741
+ amount_percent?: number;
1742
+
1743
+ /**
1744
+ * ID of an existing, connected Stripe account.
1745
+ */
1746
+ destination: string;
1747
+ }
1748
+ }
1749
+
1750
+ interface QuoteRetrieveParams {
1751
+ /**
1752
+ * Specifies which fields in the response should be expanded.
1753
+ */
1754
+ expand?: Array<string>;
1755
+ }
1756
+
1757
+ interface QuoteUpdateParams {
1758
+ /**
1759
+ * Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
1760
+ */
1761
+ allow_backdated_lines?: boolean;
1762
+
1763
+ /**
1764
+ * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
1765
+ */
1766
+ application_fee_amount?: Stripe.Emptyable<number>;
1767
+
1768
+ /**
1769
+ * 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. There must be at least 1 line item with a recurring price to use this field.
1770
+ */
1771
+ application_fee_percent?: Stripe.Emptyable<number>;
1772
+
1773
+ /**
1774
+ * Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
1775
+ */
1776
+ automatic_tax?: QuoteUpdateParams.AutomaticTax;
1777
+
1778
+ /**
1779
+ * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
1780
+ */
1781
+ collection_method?: QuoteUpdateParams.CollectionMethod;
1782
+
1783
+ /**
1784
+ * The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
1785
+ */
1786
+ customer?: string;
1787
+
1788
+ /**
1789
+ * The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
1790
+ */
1791
+ customer_account?: string;
1792
+
1793
+ /**
1794
+ * The tax rates that will apply to any line item that does not have `tax_rates` set.
1795
+ */
1796
+ default_tax_rates?: Stripe.Emptyable<Array<string>>;
1797
+
1798
+ /**
1799
+ * A description that will be displayed on the quote PDF.
1800
+ */
1801
+ description?: Stripe.Emptyable<string>;
1802
+
1803
+ /**
1804
+ * The discounts applied to the quote.
1805
+ */
1806
+ discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
1807
+
1808
+ /**
1809
+ * Specifies which fields in the response should be expanded.
1810
+ */
1811
+ expand?: Array<string>;
1812
+
1813
+ /**
1814
+ * A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
1815
+ */
1816
+ expires_at?: number;
1817
+
1818
+ /**
1819
+ * A footer that will be displayed on the quote PDF.
1820
+ */
1821
+ footer?: Stripe.Emptyable<string>;
1822
+
1823
+ /**
1824
+ * A header that will be displayed on the quote PDF.
1825
+ */
1826
+ header?: Stripe.Emptyable<string>;
1827
+
1828
+ /**
1829
+ * All invoices will be billed using the specified settings.
1830
+ */
1831
+ invoice_settings?: QuoteUpdateParams.InvoiceSettings;
1832
+
1833
+ /**
1834
+ * A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
1835
+ */
1836
+ line_items?: Array<QuoteUpdateParams.LineItem>;
1837
+
1838
+ /**
1839
+ * A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
1840
+ */
1841
+ lines?: Array<QuoteUpdateParams.Line>;
1842
+
1843
+ /**
1844
+ * 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`.
1845
+ */
1846
+ metadata?: Stripe.MetadataParam;
1847
+
1848
+ /**
1849
+ * The account on behalf of which to charge.
1850
+ */
1851
+ on_behalf_of?: Stripe.Emptyable<string>;
1852
+
1853
+ /**
1854
+ * When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
1855
+ */
1856
+ subscription_data?: QuoteUpdateParams.SubscriptionData;
1857
+
1858
+ /**
1859
+ * List representing overrides for `subscription_data` configurations for specific subscription schedules.
1860
+ */
1861
+ subscription_data_overrides?: Stripe.Emptyable<
1862
+ Array<QuoteUpdateParams.SubscriptionDataOverride>
1863
+ >;
1864
+
1865
+ /**
1866
+ * The data with which to automatically create a Transfer for each of the invoices.
1867
+ */
1868
+ transfer_data?: Stripe.Emptyable<QuoteUpdateParams.TransferData>;
1869
+ }
1870
+
1871
+ namespace QuoteUpdateParams {
1872
+ interface AutomaticTax {
1873
+ /**
1874
+ * Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
1875
+ */
1876
+ enabled: boolean;
1877
+
1878
+ /**
1879
+ * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
1880
+ */
1881
+ liability?: AutomaticTax.Liability;
1882
+ }
1883
+
1884
+ namespace AutomaticTax {
1885
+ interface Liability {
1886
+ /**
1887
+ * The connected account being referenced when `type` is `account`.
1888
+ */
1889
+ account?: string;
1890
+
1891
+ /**
1892
+ * Type of the account referenced in the request.
1893
+ */
1894
+ type: Liability.Type;
1895
+ }
1896
+
1897
+ namespace Liability {
1898
+ type Type = 'account' | 'self';
1899
+ }
1900
+ }
1901
+
1902
+ type CollectionMethod = 'charge_automatically' | 'send_invoice';
1903
+
1904
+ interface Discount {
1905
+ /**
1906
+ * ID of the coupon to create a new discount for.
1907
+ */
1908
+ coupon?: string;
1909
+
1910
+ /**
1911
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
1912
+ */
1913
+ discount?: string;
1914
+
1915
+ /**
1916
+ * Details to determine how long the discount should be applied for.
1917
+ */
1918
+ discount_end?: Discount.DiscountEnd;
1919
+
1920
+ /**
1921
+ * ID of the promotion code to create a new discount for.
1922
+ */
1923
+ promotion_code?: string;
1924
+ }
1925
+
1926
+ namespace Discount {
1927
+ interface DiscountEnd {
1928
+ /**
1929
+ * Time span for the redeemed discount.
1930
+ */
1931
+ duration?: DiscountEnd.Duration;
1932
+
1933
+ /**
1934
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1935
+ */
1936
+ timestamp?: number;
1937
+
1938
+ /**
1939
+ * The type of calculation made to determine when the discount ends.
1940
+ */
1941
+ type: DiscountEnd.Type;
1942
+ }
1943
+
1944
+ namespace DiscountEnd {
1945
+ interface Duration {
1946
+ /**
1947
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1948
+ */
1949
+ interval: Duration.Interval;
1950
+
1951
+ /**
1952
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1953
+ */
1954
+ interval_count: number;
1955
+ }
1956
+
1957
+ namespace Duration {
1958
+ type Interval = 'day' | 'month' | 'week' | 'year';
1959
+ }
1960
+
1961
+ type Type = 'duration' | 'timestamp';
1962
+ }
1963
+ }
1964
+
1965
+ interface InvoiceSettings {
1966
+ /**
1967
+ * Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
1968
+ */
1969
+ days_until_due?: number;
1970
+
1971
+ /**
1972
+ * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1973
+ */
1974
+ issuer?: InvoiceSettings.Issuer;
1975
+ }
1976
+
1977
+ namespace InvoiceSettings {
1978
+ interface Issuer {
1979
+ /**
1980
+ * The connected account being referenced when `type` is `account`.
1981
+ */
1982
+ account?: string;
1983
+
1984
+ /**
1985
+ * Type of the account referenced in the request.
1986
+ */
1987
+ type: Issuer.Type;
1988
+ }
1989
+
1990
+ namespace Issuer {
1991
+ type Type = 'account' | 'self';
1992
+ }
1993
+ }
1994
+
1995
+ interface Line {
1996
+ /**
1997
+ * An array of operations the quote line performs.
1998
+ */
1999
+ actions?: Array<Line.Action>;
2000
+
2001
+ /**
2002
+ * Details to identify the subscription schedule the quote line applies to.
2003
+ */
2004
+ applies_to?: Line.AppliesTo;
2005
+
2006
+ /**
2007
+ * For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
2008
+ */
2009
+ billing_cycle_anchor?: Line.BillingCycleAnchor;
2010
+
2011
+ /**
2012
+ * A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
2013
+ */
2014
+ cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
2015
+
2016
+ /**
2017
+ * Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
2018
+ */
2019
+ ends_at?: Line.EndsAt;
2020
+
2021
+ /**
2022
+ * The ID of an existing line on the quote.
2023
+ */
2024
+ id?: string;
2025
+
2026
+ /**
2027
+ * Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
2028
+ */
2029
+ proration_behavior?: Line.ProrationBehavior;
2030
+
2031
+ /**
2032
+ * Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2033
+ */
2034
+ set_pause_collection?: Line.SetPauseCollection;
2035
+
2036
+ /**
2037
+ * Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
2038
+ */
2039
+ set_schedule_end?: Line.SetScheduleEnd;
2040
+
2041
+ /**
2042
+ * Details to identify the earliest timestamp where the proposed change should take effect.
2043
+ */
2044
+ starts_at?: Line.StartsAt;
2045
+
2046
+ /**
2047
+ * Settings related to subscription trials.
2048
+ */
2049
+ trial_settings?: Line.TrialSettings;
2050
+ }
2051
+
2052
+ namespace Line {
2053
+ interface Action {
2054
+ /**
2055
+ * Details for the `add_discount` type.
2056
+ */
2057
+ add_discount?: Action.AddDiscount;
2058
+
2059
+ /**
2060
+ * Details for the `add_item` type.
2061
+ */
2062
+ add_item?: Action.AddItem;
2063
+
2064
+ /**
2065
+ * Details for the `add_metadata` type: specify a hash of key-value pairs.
2066
+ */
2067
+ add_metadata?: {
2068
+ [key: string]: string;
2069
+ };
2070
+
2071
+ /**
2072
+ * Details for the `remove_discount` type.
2073
+ */
2074
+ remove_discount?: Action.RemoveDiscount;
2075
+
2076
+ /**
2077
+ * Details for the `remove_item` type.
2078
+ */
2079
+ remove_item?: Action.RemoveItem;
2080
+
2081
+ /**
2082
+ * Details for the `remove_metadata` type: specify an array of metadata keys.
2083
+ */
2084
+ remove_metadata?: Array<string>;
2085
+
2086
+ /**
2087
+ * Details for the `set_discounts` type.
2088
+ */
2089
+ set_discounts?: Array<Action.SetDiscount>;
2090
+
2091
+ /**
2092
+ * Details for the `set_items` type.
2093
+ */
2094
+ set_items?: Array<Action.SetItem>;
2095
+
2096
+ /**
2097
+ * Details for the `set_metadata` type: specify an array of key-value pairs.
2098
+ */
2099
+ set_metadata?: Stripe.Emptyable<{
2100
+ [key: string]: string;
2101
+ }>;
2102
+
2103
+ /**
2104
+ * The type of action the quote line performs.
2105
+ */
2106
+ type: Action.Type;
2107
+ }
2108
+
2109
+ namespace Action {
2110
+ interface AddDiscount {
2111
+ /**
2112
+ * The coupon code to redeem.
2113
+ */
2114
+ coupon?: string;
2115
+
2116
+ /**
2117
+ * An ID of an existing discount for a coupon that was already redeemed.
2118
+ */
2119
+ discount?: string;
2120
+
2121
+ /**
2122
+ * Details to determine how long the discount should be applied for.
2123
+ */
2124
+ discount_end?: AddDiscount.DiscountEnd;
2125
+
2126
+ /**
2127
+ * 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.
2128
+ */
2129
+ index?: number;
2130
+
2131
+ /**
2132
+ * The promotion code to redeem.
2133
+ */
2134
+ promotion_code?: string;
2135
+ }
2136
+
2137
+ namespace AddDiscount {
2138
+ interface DiscountEnd {
2139
+ /**
2140
+ * The type of calculation made to determine when the discount ends.
2141
+ */
2142
+ type: 'line_ends_at';
2143
+ }
2144
+ }
2145
+
2146
+ interface AddItem {
2147
+ /**
2148
+ * The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
2149
+ */
2150
+ discounts?: Array<AddItem.Discount>;
2151
+
2152
+ /**
2153
+ * 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`.
2154
+ */
2155
+ metadata?: Stripe.MetadataParam;
2156
+
2157
+ /**
2158
+ * The ID of the price object.
2159
+ */
2160
+ price: string;
2161
+
2162
+ /**
2163
+ * Quantity for this item.
2164
+ */
2165
+ quantity?: number;
2166
+
2167
+ /**
2168
+ * 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`.
2169
+ */
2170
+ tax_rates?: Array<string>;
2171
+
2172
+ /**
2173
+ * Options that configure the trial on the subscription item.
2174
+ */
2175
+ trial?: AddItem.Trial;
2176
+ }
2177
+
2178
+ namespace AddItem {
2179
+ interface Discount {
2180
+ /**
2181
+ * ID of the coupon to create a new discount for.
2182
+ */
2183
+ coupon?: string;
2184
+
2185
+ /**
2186
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
2187
+ */
2188
+ discount?: string;
2189
+
2190
+ /**
2191
+ * Details to determine how long the discount should be applied for.
2192
+ */
2193
+ discount_end?: Discount.DiscountEnd;
2194
+
2195
+ /**
2196
+ * ID of the promotion code to create a new discount for.
2197
+ */
2198
+ promotion_code?: string;
2199
+ }
2200
+
2201
+ namespace Discount {
2202
+ interface DiscountEnd {
2203
+ /**
2204
+ * Time span for the redeemed discount.
2205
+ */
2206
+ duration?: DiscountEnd.Duration;
2207
+
2208
+ /**
2209
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2210
+ */
2211
+ timestamp?: number;
2212
+
2213
+ /**
2214
+ * The type of calculation made to determine when the discount ends.
2215
+ */
2216
+ type: DiscountEnd.Type;
2217
+ }
2218
+
2219
+ namespace DiscountEnd {
2220
+ interface Duration {
2221
+ /**
2222
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2223
+ */
2224
+ interval: Duration.Interval;
2225
+
2226
+ /**
2227
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2228
+ */
2229
+ interval_count: number;
2230
+ }
2231
+
2232
+ namespace Duration {
2233
+ type Interval = 'day' | 'month' | 'week' | 'year';
2234
+ }
2235
+
2236
+ type Type = 'duration' | 'timestamp';
2237
+ }
2238
+ }
2239
+
2240
+ interface Trial {
2241
+ /**
2242
+ * 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.
2243
+ */
2244
+ converts_to?: Array<string>;
2245
+
2246
+ /**
2247
+ * Determines the type of trial for this item.
2248
+ */
2249
+ type: Trial.Type;
2250
+ }
2251
+
2252
+ namespace Trial {
2253
+ type Type = 'free' | 'paid';
2254
+ }
2255
+ }
2256
+
2257
+ interface RemoveDiscount {
2258
+ /**
2259
+ * The coupon code to remove from the `discounts` array.
2260
+ */
2261
+ coupon?: string;
2262
+
2263
+ /**
2264
+ * The ID of a discount to remove from the `discounts` array.
2265
+ */
2266
+ discount?: string;
2267
+
2268
+ /**
2269
+ * The ID of a promotion code to remove from the `discounts` array.
2270
+ */
2271
+ promotion_code?: string;
2272
+ }
2273
+
2274
+ interface RemoveItem {
2275
+ /**
2276
+ * ID of a price to remove.
2277
+ */
2278
+ price: string;
2279
+ }
2280
+
2281
+ interface SetDiscount {
2282
+ /**
2283
+ * The coupon code to replace the `discounts` array with.
2284
+ */
2285
+ coupon?: string;
2286
+
2287
+ /**
2288
+ * An ID of an existing discount to replace the `discounts` array with.
2289
+ */
2290
+ discount?: string;
2291
+
2292
+ /**
2293
+ * An ID of an existing promotion code to replace the `discounts` array with.
2294
+ */
2295
+ promotion_code?: string;
2296
+ }
2297
+
2298
+ interface SetItem {
2299
+ /**
2300
+ * 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`.
2301
+ */
2302
+ discounts?: Array<SetItem.Discount>;
2303
+
2304
+ /**
2305
+ * 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`.
2306
+ */
2307
+ metadata?: Stripe.MetadataParam;
2308
+
2309
+ /**
2310
+ * The ID of the price object.
2311
+ */
2312
+ price: string;
2313
+
2314
+ /**
2315
+ * 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`.
2316
+ */
2317
+ quantity?: number;
2318
+
2319
+ /**
2320
+ * 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`.
2321
+ */
2322
+ tax_rates?: Array<string>;
2323
+
2324
+ /**
2325
+ * 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`.
2326
+ */
2327
+ trial?: SetItem.Trial;
2328
+ }
2329
+
2330
+ namespace SetItem {
2331
+ interface Discount {
2332
+ /**
2333
+ * ID of the coupon to create a new discount for.
2334
+ */
2335
+ coupon?: string;
2336
+
2337
+ /**
2338
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
2339
+ */
2340
+ discount?: string;
2341
+
2342
+ /**
2343
+ * Details to determine how long the discount should be applied for.
2344
+ */
2345
+ discount_end?: Discount.DiscountEnd;
2346
+
2347
+ /**
2348
+ * ID of the promotion code to create a new discount for.
2349
+ */
2350
+ promotion_code?: string;
2351
+ }
2352
+
2353
+ namespace Discount {
2354
+ interface DiscountEnd {
2355
+ /**
2356
+ * Time span for the redeemed discount.
2357
+ */
2358
+ duration?: DiscountEnd.Duration;
2359
+
2360
+ /**
2361
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2362
+ */
2363
+ timestamp?: number;
2364
+
2365
+ /**
2366
+ * The type of calculation made to determine when the discount ends.
2367
+ */
2368
+ type: DiscountEnd.Type;
2369
+ }
2370
+
2371
+ namespace DiscountEnd {
2372
+ interface Duration {
2373
+ /**
2374
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2375
+ */
2376
+ interval: Duration.Interval;
2377
+
2378
+ /**
2379
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2380
+ */
2381
+ interval_count: number;
2382
+ }
2383
+
2384
+ namespace Duration {
2385
+ type Interval = 'day' | 'month' | 'week' | 'year';
2386
+ }
2387
+
2388
+ type Type = 'duration' | 'timestamp';
2389
+ }
2390
+ }
2391
+
2392
+ interface Trial {
2393
+ /**
2394
+ * 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.
2395
+ */
2396
+ converts_to?: Array<string>;
2397
+
2398
+ /**
2399
+ * Determines the type of trial for this item.
2400
+ */
2401
+ type: Trial.Type;
2402
+ }
2403
+
2404
+ namespace Trial {
2405
+ type Type = 'free' | 'paid';
2406
+ }
2407
+ }
2408
+
2409
+ type Type =
2410
+ | 'add_discount'
2411
+ | 'add_item'
2412
+ | 'add_metadata'
2413
+ | 'clear_discounts'
2414
+ | 'clear_metadata'
2415
+ | 'remove_discount'
2416
+ | 'remove_item'
2417
+ | 'remove_metadata'
2418
+ | 'set_discounts'
2419
+ | 'set_items'
2420
+ | 'set_metadata';
2421
+ }
2422
+
2423
+ interface AppliesTo {
2424
+ /**
2425
+ * A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
2426
+ */
2427
+ new_reference?: string;
2428
+
2429
+ /**
2430
+ * The ID of the schedule the line applies to.
2431
+ */
2432
+ subscription_schedule?: string;
2433
+
2434
+ /**
2435
+ * Describes whether the quote line is affecting a new schedule or an existing schedule.
2436
+ */
2437
+ type: AppliesTo.Type;
2438
+ }
2439
+
2440
+ namespace AppliesTo {
2441
+ type Type = 'new_reference' | 'subscription_schedule';
2442
+ }
2443
+
2444
+ type BillingCycleAnchor = 'automatic' | 'line_starts_at';
2445
+
2446
+ interface CancelSubscriptionSchedule {
2447
+ /**
2448
+ * Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
2449
+ */
2450
+ cancel_at: 'line_starts_at';
2451
+
2452
+ /**
2453
+ * If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
2454
+ */
2455
+ invoice_now?: boolean;
2456
+
2457
+ /**
2458
+ * If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
2459
+ */
2460
+ prorate?: boolean;
2461
+ }
2462
+
2463
+ interface EndsAt {
2464
+ /**
2465
+ * Use the `end` time of a given discount.
2466
+ */
2467
+ discount_end?: EndsAt.DiscountEnd;
2468
+
2469
+ /**
2470
+ * Time span for the quote line starting from the `starts_at` date.
2471
+ */
2472
+ duration?: EndsAt.Duration;
2473
+
2474
+ /**
2475
+ * A precise Unix timestamp.
2476
+ */
2477
+ timestamp?: number;
2478
+
2479
+ /**
2480
+ * Select a way to pass in `ends_at`.
2481
+ */
2482
+ type: EndsAt.Type;
2483
+ }
2484
+
2485
+ namespace EndsAt {
2486
+ interface DiscountEnd {
2487
+ /**
2488
+ * The ID of a specific discount.
2489
+ */
2490
+ discount: string;
2491
+ }
2492
+
2493
+ interface Duration {
2494
+ /**
2495
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2496
+ */
2497
+ interval: Duration.Interval;
2498
+
2499
+ /**
2500
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2501
+ */
2502
+ interval_count: number;
2503
+ }
2504
+
2505
+ namespace Duration {
2506
+ type Interval = 'day' | 'month' | 'week' | 'year';
2507
+ }
2508
+
2509
+ type Type =
2510
+ | 'billing_period_end'
2511
+ | 'discount_end'
2512
+ | 'duration'
2513
+ | 'quote_acceptance_date'
2514
+ | 'schedule_end'
2515
+ | 'timestamp'
2516
+ | 'upcoming_invoice';
2517
+ }
2518
+
2519
+ type ProrationBehavior =
2520
+ | 'always_invoice'
2521
+ | 'create_prorations'
2522
+ | 'none';
2523
+
2524
+ interface SetPauseCollection {
2525
+ /**
2526
+ * Details of the pause_collection behavior to apply to the amendment.
2527
+ */
2528
+ set?: SetPauseCollection.Set;
2529
+
2530
+ /**
2531
+ * Determines the type of the pause_collection amendment.
2532
+ */
2533
+ type: SetPauseCollection.Type;
2534
+ }
2535
+
2536
+ namespace SetPauseCollection {
2537
+ interface Set {
2538
+ /**
2539
+ * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
2540
+ */
2541
+ behavior: Set.Behavior;
2542
+ }
2543
+
2544
+ namespace Set {
2545
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
2546
+ }
2547
+
2548
+ type Type = 'remove' | 'set';
2549
+ }
2550
+
2551
+ type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
2552
+
2553
+ interface StartsAt {
2554
+ /**
2555
+ * Use the `end` time of a given discount.
2556
+ */
2557
+ discount_end?: StartsAt.DiscountEnd;
2558
+
2559
+ /**
2560
+ * The timestamp the given line ends at.
2561
+ */
2562
+ line_ends_at?: StartsAt.LineEndsAt;
2563
+
2564
+ /**
2565
+ * A precise Unix timestamp.
2566
+ */
2567
+ timestamp?: number;
2568
+
2569
+ /**
2570
+ * Select a way to pass in `starts_at`.
2571
+ */
2572
+ type: StartsAt.Type;
2573
+ }
2574
+
2575
+ namespace StartsAt {
2576
+ interface DiscountEnd {
2577
+ /**
2578
+ * The ID of a specific discount.
2579
+ */
2580
+ discount: string;
2581
+ }
2582
+
2583
+ interface LineEndsAt {
2584
+ /**
2585
+ * The ID of a quote line.
2586
+ */
2587
+ id?: string;
2588
+
2589
+ /**
2590
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2591
+ */
2592
+ index?: number;
2593
+ }
2594
+
2595
+ type Type =
2596
+ | 'discount_end'
2597
+ | 'line_ends_at'
2598
+ | 'now'
2599
+ | 'quote_acceptance_date'
2600
+ | 'schedule_end'
2601
+ | 'timestamp'
2602
+ | 'upcoming_invoice';
2603
+ }
2604
+
2605
+ interface TrialSettings {
2606
+ /**
2607
+ * Defines how the subscription should behave when a trial ends.
2608
+ */
2609
+ end_behavior?: TrialSettings.EndBehavior;
2610
+ }
2611
+
2612
+ namespace TrialSettings {
2613
+ interface EndBehavior {
2614
+ /**
2615
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2616
+ */
2617
+ prorate_up_front?: EndBehavior.ProrateUpFront;
2618
+ }
2619
+
2620
+ namespace EndBehavior {
2621
+ type ProrateUpFront = 'defer' | 'include';
2622
+ }
2623
+ }
2624
+ }
2625
+
2626
+ interface LineItem {
2627
+ /**
2628
+ * The discounts applied to this line item.
2629
+ */
2630
+ discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
2631
+
2632
+ /**
2633
+ * The ID of an existing line item on the quote.
2634
+ */
2635
+ id?: string;
2636
+
2637
+ /**
2638
+ * The ID of the price object. One of `price` or `price_data` is required.
2639
+ */
2640
+ price?: string;
2641
+
2642
+ /**
2643
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
2644
+ */
2645
+ price_data?: LineItem.PriceData;
2646
+
2647
+ /**
2648
+ * The quantity of the line item.
2649
+ */
2650
+ quantity?: number;
2651
+
2652
+ /**
2653
+ * The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
2654
+ */
2655
+ tax_rates?: Stripe.Emptyable<Array<string>>;
2656
+ }
2657
+
2658
+ namespace LineItem {
2659
+ interface Discount {
2660
+ /**
2661
+ * ID of the coupon to create a new discount for.
2662
+ */
2663
+ coupon?: string;
2664
+
2665
+ /**
2666
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
2667
+ */
2668
+ discount?: string;
2669
+
2670
+ /**
2671
+ * Details to determine how long the discount should be applied for.
2672
+ */
2673
+ discount_end?: Discount.DiscountEnd;
2674
+
2675
+ /**
2676
+ * ID of the promotion code to create a new discount for.
2677
+ */
2678
+ promotion_code?: string;
2679
+ }
2680
+
2681
+ namespace Discount {
2682
+ interface DiscountEnd {
2683
+ /**
2684
+ * Time span for the redeemed discount.
2685
+ */
2686
+ duration?: DiscountEnd.Duration;
2687
+
2688
+ /**
2689
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2690
+ */
2691
+ timestamp?: number;
2692
+
2693
+ /**
2694
+ * The type of calculation made to determine when the discount ends.
2695
+ */
2696
+ type: DiscountEnd.Type;
2697
+ }
2698
+
2699
+ namespace DiscountEnd {
2700
+ interface Duration {
2701
+ /**
2702
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2703
+ */
2704
+ interval: Duration.Interval;
2705
+
2706
+ /**
2707
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2708
+ */
2709
+ interval_count: number;
2710
+ }
2711
+
2712
+ namespace Duration {
2713
+ type Interval = 'day' | 'month' | 'week' | 'year';
2714
+ }
2715
+
2716
+ type Type = 'duration' | 'timestamp';
2717
+ }
2718
+ }
2719
+
2720
+ interface PriceData {
2721
+ /**
2722
+ * 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).
2723
+ */
2724
+ currency: string;
2725
+
2726
+ /**
2727
+ * The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
2728
+ */
2729
+ product: string;
2730
+
2731
+ /**
2732
+ * The recurring components of a price such as `interval` and `interval_count`.
2733
+ */
2734
+ recurring?: PriceData.Recurring;
2735
+
2736
+ /**
2737
+ * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
2738
+ */
2739
+ tax_behavior?: PriceData.TaxBehavior;
2740
+
2741
+ /**
2742
+ * A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
2743
+ */
2744
+ unit_amount?: number;
2745
+
2746
+ /**
2747
+ * Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
2748
+ */
2749
+ unit_amount_decimal?: string;
2750
+ }
2751
+
2752
+ namespace PriceData {
2753
+ interface Recurring {
2754
+ /**
2755
+ * Specifies billing frequency. Either `day`, `week`, `month` or `year`.
2756
+ */
2757
+ interval: Recurring.Interval;
2758
+
2759
+ /**
2760
+ * The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
2761
+ */
2762
+ interval_count?: number;
2763
+ }
2764
+
2765
+ namespace Recurring {
2766
+ type Interval = 'day' | 'month' | 'week' | 'year';
2767
+ }
2768
+
2769
+ type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
2770
+ }
2771
+ }
2772
+
2773
+ interface SubscriptionData {
2774
+ /**
2775
+ * Describes the period to bill for upon accepting the quote.
2776
+ */
2777
+ bill_on_acceptance?: Stripe.Emptyable<
2778
+ SubscriptionData.BillOnAcceptance
2779
+ >;
2780
+
2781
+ /**
2782
+ * 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.
2783
+ */
2784
+ billing_behavior?: SubscriptionData.BillingBehavior;
2785
+
2786
+ /**
2787
+ * When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
2788
+ */
2789
+ billing_cycle_anchor?: Stripe.Emptyable<'reset'>;
2790
+
2791
+ /**
2792
+ * Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
2793
+ */
2794
+ billing_schedules?: Stripe.Emptyable<
2795
+ Array<SubscriptionData.BillingSchedule>
2796
+ >;
2797
+
2798
+ /**
2799
+ * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
2800
+ */
2801
+ description?: Stripe.Emptyable<string>;
2802
+
2803
+ /**
2804
+ * When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
2805
+ */
2806
+ effective_date?: Stripe.Emptyable<'current_period_end' | number>;
2807
+
2808
+ /**
2809
+ * Behavior of the subscription schedule and underlying subscription when it ends.
2810
+ */
2811
+ end_behavior?: SubscriptionData.EndBehavior;
2812
+
2813
+ /**
2814
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
2815
+ */
2816
+ metadata?: Stripe.MetadataParam;
2817
+
2818
+ /**
2819
+ * Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
2820
+ */
2821
+ phase_effective_at?: SubscriptionData.PhaseEffectiveAt;
2822
+
2823
+ /**
2824
+ * If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
2825
+ */
2826
+ prebilling?: Stripe.Emptyable<SubscriptionData.Prebilling>;
2827
+
2828
+ /**
2829
+ * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
2830
+ *
2831
+ * When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
2832
+ *
2833
+ * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
2834
+ *
2835
+ * Prorations can be disabled by passing `none`.
2836
+ */
2837
+ proration_behavior?: SubscriptionData.ProrationBehavior;
2838
+
2839
+ /**
2840
+ * Integer representing the number of trial period days before the customer is charged for the first time.
2841
+ */
2842
+ trial_period_days?: Stripe.Emptyable<number>;
2843
+ }
2844
+
2845
+ namespace SubscriptionData {
2846
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
2847
+
2848
+ interface BillingSchedule {
2849
+ /**
2850
+ * Configure billing schedule differently for individual subscription items.
2851
+ */
2852
+ applies_to?: Array<BillingSchedule.AppliesTo>;
2853
+
2854
+ /**
2855
+ * The start of the period to bill from when the Quote is accepted.
2856
+ */
2857
+ bill_from?: BillingSchedule.BillFrom;
2858
+
2859
+ /**
2860
+ * The end of the period to bill until when the Quote is accepted.
2861
+ */
2862
+ bill_until?: BillingSchedule.BillUntil;
2863
+
2864
+ /**
2865
+ * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
2866
+ */
2867
+ key?: string;
2868
+ }
2869
+
2870
+ namespace BillingSchedule {
2871
+ interface AppliesTo {
2872
+ /**
2873
+ * The ID of the price object.
2874
+ */
2875
+ price?: string;
2876
+
2877
+ /**
2878
+ * Controls which subscription items the billing schedule applies to.
2879
+ */
2880
+ type: 'price';
2881
+ }
2882
+
2883
+ interface BillFrom {
2884
+ /**
2885
+ * Details of a Quote line to start the bill period from.
2886
+ */
2887
+ line_starts_at?: BillFrom.LineStartsAt;
2888
+
2889
+ /**
2890
+ * A precise Unix timestamp.
2891
+ */
2892
+ timestamp?: number;
2893
+
2894
+ /**
2895
+ * The type of method to specify the `bill_from` time.
2896
+ */
2897
+ type: BillFrom.Type;
2898
+ }
2899
+
2900
+ namespace BillFrom {
2901
+ interface LineStartsAt {
2902
+ /**
2903
+ * The ID of a quote line.
2904
+ */
2905
+ id?: string;
2906
+
2907
+ /**
2908
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2909
+ */
2910
+ index?: number;
2911
+ }
2912
+
2913
+ type Type =
2914
+ | 'line_starts_at'
2915
+ | 'now'
2916
+ | 'pause_collection_start'
2917
+ | 'quote_acceptance_date'
2918
+ | 'timestamp';
2919
+ }
2920
+
2921
+ interface BillUntil {
2922
+ /**
2923
+ * Details of the duration over which to bill.
2924
+ */
2925
+ duration?: BillUntil.Duration;
2926
+
2927
+ /**
2928
+ * Details of a Quote line item from which to bill until.
2929
+ */
2930
+ line_ends_at?: BillUntil.LineEndsAt;
2931
+
2932
+ /**
2933
+ * A precise Unix timestamp.
2934
+ */
2935
+ timestamp?: number;
2936
+
2937
+ /**
2938
+ * The type of method to specify the `bill_until` time.
2939
+ */
2940
+ type: BillUntil.Type;
2941
+ }
2942
+
2943
+ namespace BillUntil {
2944
+ interface Duration {
2945
+ /**
2946
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2947
+ */
2948
+ interval: Duration.Interval;
2949
+
2950
+ /**
2951
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2952
+ */
2953
+ interval_count: number;
2954
+ }
2955
+
2956
+ namespace Duration {
2957
+ type Interval = 'day' | 'month' | 'week' | 'year';
2958
+ }
2959
+
2960
+ interface LineEndsAt {
2961
+ /**
2962
+ * The ID of a quote line.
2963
+ */
2964
+ id?: string;
2965
+
2966
+ /**
2967
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2968
+ */
2969
+ index?: number;
2970
+ }
2971
+
2972
+ type Type =
2973
+ | 'duration'
2974
+ | 'line_ends_at'
2975
+ | 'schedule_end'
2976
+ | 'timestamp'
2977
+ | 'upcoming_invoice';
2978
+ }
2979
+ }
2980
+
2981
+ interface BillOnAcceptance {
2982
+ /**
2983
+ * The start of the period to bill from when the Quote is accepted.
2984
+ */
2985
+ bill_from?: BillOnAcceptance.BillFrom;
2986
+
2987
+ /**
2988
+ * The end of the period to bill until when the Quote is accepted.
2989
+ */
2990
+ bill_until?: BillOnAcceptance.BillUntil;
2991
+ }
2992
+
2993
+ namespace BillOnAcceptance {
2994
+ interface BillFrom {
2995
+ /**
2996
+ * Details of a Quote line to start the bill period from.
2997
+ */
2998
+ line_starts_at?: BillFrom.LineStartsAt;
2999
+
3000
+ /**
3001
+ * A precise Unix timestamp.
3002
+ */
3003
+ timestamp?: number;
3004
+
3005
+ /**
3006
+ * The type of method to specify the `bill_from` time.
3007
+ */
3008
+ type: BillFrom.Type;
3009
+ }
3010
+
3011
+ namespace BillFrom {
3012
+ interface LineStartsAt {
3013
+ /**
3014
+ * The ID of a quote line.
3015
+ */
3016
+ id?: string;
3017
+
3018
+ /**
3019
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
3020
+ */
3021
+ index?: number;
3022
+ }
3023
+
3024
+ type Type =
3025
+ | 'line_starts_at'
3026
+ | 'now'
3027
+ | 'pause_collection_start'
3028
+ | 'quote_acceptance_date'
3029
+ | 'timestamp';
3030
+ }
3031
+
3032
+ interface BillUntil {
3033
+ /**
3034
+ * Details of the duration over which to bill.
3035
+ */
3036
+ duration?: BillUntil.Duration;
3037
+
3038
+ /**
3039
+ * Details of a Quote line item from which to bill until.
3040
+ */
3041
+ line_ends_at?: BillUntil.LineEndsAt;
3042
+
3043
+ /**
3044
+ * A precise Unix timestamp.
3045
+ */
3046
+ timestamp?: number;
3047
+
3048
+ /**
3049
+ * The type of method to specify the `bill_until` time.
3050
+ */
3051
+ type: BillUntil.Type;
3052
+ }
3053
+
3054
+ namespace BillUntil {
3055
+ interface Duration {
3056
+ /**
3057
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3058
+ */
3059
+ interval: Duration.Interval;
3060
+
3061
+ /**
3062
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3063
+ */
3064
+ interval_count: number;
3065
+ }
3066
+
3067
+ namespace Duration {
3068
+ type Interval = 'day' | 'month' | 'week' | 'year';
3069
+ }
3070
+
3071
+ interface LineEndsAt {
3072
+ /**
3073
+ * The ID of a quote line.
3074
+ */
3075
+ id?: string;
3076
+
3077
+ /**
3078
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
3079
+ */
3080
+ index?: number;
3081
+ }
3082
+
3083
+ type Type =
3084
+ | 'duration'
3085
+ | 'line_ends_at'
3086
+ | 'schedule_end'
3087
+ | 'timestamp'
3088
+ | 'upcoming_invoice';
3089
+ }
3090
+ }
3091
+
3092
+ type EndBehavior = 'cancel' | 'release';
3093
+
3094
+ type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
3095
+
3096
+ interface Prebilling {
3097
+ /**
3098
+ * This is used to determine the number of billing cycles to prebill.
3099
+ */
3100
+ iterations: number;
3101
+ }
513
3102
 
514
- /**
515
- * ID of the promotion code to create a new discount for.
516
- */
517
- promotion_code?: string;
3103
+ type ProrationBehavior =
3104
+ | 'always_invoice'
3105
+ | 'create_prorations'
3106
+ | 'none';
518
3107
  }
519
3108
 
520
- interface InvoiceSettings {
3109
+ interface SubscriptionDataOverride {
521
3110
  /**
522
- * Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
3111
+ * Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
523
3112
  */
524
- days_until_due?: number;
3113
+ applies_to: SubscriptionDataOverride.AppliesTo;
525
3114
 
526
3115
  /**
527
- * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
3116
+ * Describes the period to bill for upon accepting the quote.
528
3117
  */
529
- issuer?: InvoiceSettings.Issuer;
530
- }
531
-
532
- namespace InvoiceSettings {
533
- interface Issuer {
534
- /**
535
- * The connected account being referenced when `type` is `account`.
536
- */
537
- account?: string;
538
-
539
- /**
540
- * Type of the account referenced in the request.
541
- */
542
- type: Issuer.Type;
543
- }
3118
+ bill_on_acceptance?: Stripe.Emptyable<
3119
+ SubscriptionDataOverride.BillOnAcceptance
3120
+ >;
544
3121
 
545
- namespace Issuer {
546
- type Type = 'account' | 'self';
547
- }
548
- }
3122
+ /**
3123
+ * 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.
3124
+ */
3125
+ billing_behavior?: SubscriptionDataOverride.BillingBehavior;
549
3126
 
550
- interface LineItem {
551
3127
  /**
552
- * The discounts applied to this line item.
3128
+ * Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
553
3129
  */
554
- discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
3130
+ billing_schedules?: Stripe.Emptyable<
3131
+ Array<SubscriptionDataOverride.BillingSchedule>
3132
+ >;
555
3133
 
556
3134
  /**
557
- * The ID of an existing line item on the quote.
3135
+ * The customer the Subscription Data override applies to.
558
3136
  */
559
- id?: string;
3137
+ customer?: string;
560
3138
 
561
3139
  /**
562
- * The ID of the price object. One of `price` or `price_data` is required.
3140
+ * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
563
3141
  */
564
- price?: string;
3142
+ description?: Stripe.Emptyable<string>;
565
3143
 
566
3144
  /**
567
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
3145
+ * Behavior of the subscription schedule and underlying subscription when it ends.
568
3146
  */
569
- price_data?: LineItem.PriceData;
3147
+ end_behavior?: SubscriptionDataOverride.EndBehavior;
570
3148
 
571
3149
  /**
572
- * The quantity of the line item.
3150
+ * Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
573
3151
  */
574
- quantity?: number;
3152
+ phase_effective_at?: SubscriptionDataOverride.PhaseEffectiveAt;
575
3153
 
576
3154
  /**
577
- * The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
3155
+ * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
3156
+ *
3157
+ * When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
3158
+ *
3159
+ * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
3160
+ *
3161
+ * Prorations can be disabled by passing `none`.
578
3162
  */
579
- tax_rates?: Stripe.Emptyable<Array<string>>;
3163
+ proration_behavior?: SubscriptionDataOverride.ProrationBehavior;
580
3164
  }
581
3165
 
582
- namespace LineItem {
583
- interface Discount {
3166
+ namespace SubscriptionDataOverride {
3167
+ interface AppliesTo {
584
3168
  /**
585
- * ID of the coupon to create a new discount for.
3169
+ * A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
586
3170
  */
587
- coupon?: string;
3171
+ new_reference?: string;
588
3172
 
589
3173
  /**
590
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
3174
+ * The ID of the schedule the line applies to.
591
3175
  */
592
- discount?: string;
3176
+ subscription_schedule?: string;
593
3177
 
594
3178
  /**
595
- * ID of the promotion code to create a new discount for.
3179
+ * Describes whether the quote line is affecting a new schedule or an existing schedule.
596
3180
  */
597
- promotion_code?: string;
3181
+ type: AppliesTo.Type;
598
3182
  }
599
3183
 
600
- interface PriceData {
3184
+ namespace AppliesTo {
3185
+ type Type = 'new_reference' | 'subscription_schedule';
3186
+ }
3187
+
3188
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
3189
+
3190
+ interface BillingSchedule {
601
3191
  /**
602
- * 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).
3192
+ * Configure billing schedule differently for individual subscription items.
603
3193
  */
604
- currency: string;
3194
+ applies_to?: Array<BillingSchedule.AppliesTo>;
605
3195
 
606
3196
  /**
607
- * The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
3197
+ * The start of the period to bill from when the Quote is accepted.
608
3198
  */
609
- product: string;
3199
+ bill_from?: BillingSchedule.BillFrom;
610
3200
 
611
3201
  /**
612
- * The recurring components of a price such as `interval` and `interval_count`.
3202
+ * The end of the period to bill until when the Quote is accepted.
613
3203
  */
614
- recurring?: PriceData.Recurring;
3204
+ bill_until?: BillingSchedule.BillUntil;
615
3205
 
616
3206
  /**
617
- * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
3207
+ * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
618
3208
  */
619
- tax_behavior?: PriceData.TaxBehavior;
3209
+ key?: string;
3210
+ }
3211
+
3212
+ namespace BillingSchedule {
3213
+ interface AppliesTo {
3214
+ /**
3215
+ * The ID of the price object.
3216
+ */
3217
+ price?: string;
3218
+
3219
+ /**
3220
+ * Controls which subscription items the billing schedule applies to.
3221
+ */
3222
+ type: 'price';
3223
+ }
3224
+
3225
+ interface BillFrom {
3226
+ /**
3227
+ * Details of a Quote line to start the bill period from.
3228
+ */
3229
+ line_starts_at?: BillFrom.LineStartsAt;
3230
+
3231
+ /**
3232
+ * A precise Unix timestamp.
3233
+ */
3234
+ timestamp?: number;
3235
+
3236
+ /**
3237
+ * The type of method to specify the `bill_from` time.
3238
+ */
3239
+ type: BillFrom.Type;
3240
+ }
3241
+
3242
+ namespace BillFrom {
3243
+ interface LineStartsAt {
3244
+ /**
3245
+ * The ID of a quote line.
3246
+ */
3247
+ id?: string;
3248
+
3249
+ /**
3250
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
3251
+ */
3252
+ index?: number;
3253
+ }
3254
+
3255
+ type Type =
3256
+ | 'line_starts_at'
3257
+ | 'now'
3258
+ | 'pause_collection_start'
3259
+ | 'quote_acceptance_date'
3260
+ | 'timestamp';
3261
+ }
3262
+
3263
+ interface BillUntil {
3264
+ /**
3265
+ * Details of the duration over which to bill.
3266
+ */
3267
+ duration?: BillUntil.Duration;
3268
+
3269
+ /**
3270
+ * Details of a Quote line item from which to bill until.
3271
+ */
3272
+ line_ends_at?: BillUntil.LineEndsAt;
3273
+
3274
+ /**
3275
+ * A precise Unix timestamp.
3276
+ */
3277
+ timestamp?: number;
3278
+
3279
+ /**
3280
+ * The type of method to specify the `bill_until` time.
3281
+ */
3282
+ type: BillUntil.Type;
3283
+ }
3284
+
3285
+ namespace BillUntil {
3286
+ interface Duration {
3287
+ /**
3288
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3289
+ */
3290
+ interval: Duration.Interval;
3291
+
3292
+ /**
3293
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3294
+ */
3295
+ interval_count: number;
3296
+ }
3297
+
3298
+ namespace Duration {
3299
+ type Interval = 'day' | 'month' | 'week' | 'year';
3300
+ }
3301
+
3302
+ interface LineEndsAt {
3303
+ /**
3304
+ * The ID of a quote line.
3305
+ */
3306
+ id?: string;
3307
+
3308
+ /**
3309
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
3310
+ */
3311
+ index?: number;
3312
+ }
3313
+
3314
+ type Type =
3315
+ | 'duration'
3316
+ | 'line_ends_at'
3317
+ | 'schedule_end'
3318
+ | 'timestamp'
3319
+ | 'upcoming_invoice';
3320
+ }
3321
+ }
620
3322
 
3323
+ interface BillOnAcceptance {
621
3324
  /**
622
- * A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
3325
+ * The start of the period to bill from when the Quote is accepted.
623
3326
  */
624
- unit_amount?: number;
3327
+ bill_from?: BillOnAcceptance.BillFrom;
625
3328
 
626
3329
  /**
627
- * Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
3330
+ * The end of the period to bill until when the Quote is accepted.
628
3331
  */
629
- unit_amount_decimal?: string;
3332
+ bill_until?: BillOnAcceptance.BillUntil;
630
3333
  }
631
3334
 
632
- namespace PriceData {
633
- interface Recurring {
3335
+ namespace BillOnAcceptance {
3336
+ interface BillFrom {
634
3337
  /**
635
- * Specifies billing frequency. Either `day`, `week`, `month` or `year`.
3338
+ * Details of a Quote line to start the bill period from.
636
3339
  */
637
- interval: Recurring.Interval;
3340
+ line_starts_at?: BillFrom.LineStartsAt;
638
3341
 
639
3342
  /**
640
- * The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
3343
+ * A precise Unix timestamp.
641
3344
  */
642
- interval_count?: number;
3345
+ timestamp?: number;
3346
+
3347
+ /**
3348
+ * The type of method to specify the `bill_from` time.
3349
+ */
3350
+ type: BillFrom.Type;
643
3351
  }
644
3352
 
645
- namespace Recurring {
646
- type Interval = 'day' | 'month' | 'week' | 'year';
3353
+ namespace BillFrom {
3354
+ interface LineStartsAt {
3355
+ /**
3356
+ * The ID of a quote line.
3357
+ */
3358
+ id?: string;
3359
+
3360
+ /**
3361
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
3362
+ */
3363
+ index?: number;
3364
+ }
3365
+
3366
+ type Type =
3367
+ | 'line_starts_at'
3368
+ | 'now'
3369
+ | 'pause_collection_start'
3370
+ | 'quote_acceptance_date'
3371
+ | 'timestamp';
647
3372
  }
648
3373
 
649
- type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
650
- }
651
- }
3374
+ interface BillUntil {
3375
+ /**
3376
+ * Details of the duration over which to bill.
3377
+ */
3378
+ duration?: BillUntil.Duration;
652
3379
 
653
- interface SubscriptionData {
654
- /**
655
- * The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
656
- */
657
- description?: Stripe.Emptyable<string>;
3380
+ /**
3381
+ * Details of a Quote line item from which to bill until.
3382
+ */
3383
+ line_ends_at?: BillUntil.LineEndsAt;
658
3384
 
659
- /**
660
- * When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted.
661
- */
662
- effective_date?: Stripe.Emptyable<'current_period_end' | number>;
3385
+ /**
3386
+ * A precise Unix timestamp.
3387
+ */
3388
+ timestamp?: number;
663
3389
 
664
- /**
665
- * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
666
- */
667
- metadata?: Stripe.MetadataParam;
3390
+ /**
3391
+ * The type of method to specify the `bill_until` time.
3392
+ */
3393
+ type: BillUntil.Type;
3394
+ }
668
3395
 
669
- /**
670
- * Integer representing the number of trial period days before the customer is charged for the first time.
671
- */
672
- trial_period_days?: Stripe.Emptyable<number>;
3396
+ namespace BillUntil {
3397
+ interface Duration {
3398
+ /**
3399
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3400
+ */
3401
+ interval: Duration.Interval;
3402
+
3403
+ /**
3404
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3405
+ */
3406
+ interval_count: number;
3407
+ }
3408
+
3409
+ namespace Duration {
3410
+ type Interval = 'day' | 'month' | 'week' | 'year';
3411
+ }
3412
+
3413
+ interface LineEndsAt {
3414
+ /**
3415
+ * The ID of a quote line.
3416
+ */
3417
+ id?: string;
3418
+
3419
+ /**
3420
+ * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
3421
+ */
3422
+ index?: number;
3423
+ }
3424
+
3425
+ type Type =
3426
+ | 'duration'
3427
+ | 'line_ends_at'
3428
+ | 'schedule_end'
3429
+ | 'timestamp'
3430
+ | 'upcoming_invoice';
3431
+ }
3432
+ }
3433
+
3434
+ type EndBehavior = 'cancel' | 'release';
3435
+
3436
+ type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
3437
+
3438
+ type ProrationBehavior =
3439
+ | 'always_invoice'
3440
+ | 'create_prorations'
3441
+ | 'none';
673
3442
  }
674
3443
 
675
3444
  interface TransferData {
@@ -696,11 +3465,21 @@ declare module 'stripe' {
696
3465
  */
697
3466
  customer?: string;
698
3467
 
3468
+ /**
3469
+ * The ID of the account whose quotes will be retrieved.
3470
+ */
3471
+ customer_account?: string;
3472
+
699
3473
  /**
700
3474
  * Specifies which fields in the response should be expanded.
701
3475
  */
702
3476
  expand?: Array<string>;
703
3477
 
3478
+ /**
3479
+ * The subscription which the quote updates.
3480
+ */
3481
+ from_subscription?: string;
3482
+
704
3483
  /**
705
3484
  * The status of the quote.
706
3485
  */
@@ -713,7 +3492,13 @@ declare module 'stripe' {
713
3492
  }
714
3493
 
715
3494
  namespace QuoteListParams {
716
- type Status = 'accepted' | 'canceled' | 'draft' | 'open';
3495
+ type Status =
3496
+ | 'accepted'
3497
+ | 'accepting'
3498
+ | 'canceled'
3499
+ | 'draft'
3500
+ | 'open'
3501
+ | 'stale';
717
3502
  }
718
3503
 
719
3504
  interface QuoteAcceptParams {
@@ -742,6 +3527,13 @@ declare module 'stripe' {
742
3527
  expires_at?: number;
743
3528
  }
744
3529
 
3530
+ interface QuoteListPreviewInvoiceLinesParams extends PaginationParams {
3531
+ /**
3532
+ * Specifies which fields in the response should be expanded.
3533
+ */
3534
+ expand?: Array<string>;
3535
+ }
3536
+
745
3537
  interface QuoteListComputedUpfrontLineItemsParams extends PaginationParams {
746
3538
  /**
747
3539
  * Specifies which fields in the response should be expanded.
@@ -756,6 +3548,47 @@ declare module 'stripe' {
756
3548
  expand?: Array<string>;
757
3549
  }
758
3550
 
3551
+ interface QuoteListLinesParams extends PaginationParams {
3552
+ /**
3553
+ * Specifies which fields in the response should be expanded.
3554
+ */
3555
+ expand?: Array<string>;
3556
+ }
3557
+
3558
+ interface QuoteListPreviewInvoicesParams extends PaginationParams {
3559
+ /**
3560
+ * Specifies which fields in the response should be expanded.
3561
+ */
3562
+ expand?: Array<string>;
3563
+ }
3564
+
3565
+ interface QuoteListPreviewSubscriptionSchedulesParams
3566
+ extends PaginationParams {
3567
+ /**
3568
+ * Specifies which fields in the response should be expanded.
3569
+ */
3570
+ expand?: Array<string>;
3571
+ }
3572
+
3573
+ interface QuoteMarkDraftParams {
3574
+ /**
3575
+ * Specifies which fields in the response should be expanded.
3576
+ */
3577
+ expand?: Array<string>;
3578
+ }
3579
+
3580
+ interface QuoteMarkStaleParams {
3581
+ /**
3582
+ * Specifies which fields in the response should be expanded.
3583
+ */
3584
+ expand?: Array<string>;
3585
+
3586
+ /**
3587
+ * Reason the Quote is being marked stale.
3588
+ */
3589
+ reason?: string;
3590
+ }
3591
+
759
3592
  interface QuotePdfParams {
760
3593
  /**
761
3594
  * Specifies which fields in the response should be expanded.
@@ -763,6 +3596,13 @@ declare module 'stripe' {
763
3596
  expand?: Array<string>;
764
3597
  }
765
3598
 
3599
+ interface QuoteReestimateParams {
3600
+ /**
3601
+ * Specifies which fields in the response should be expanded.
3602
+ */
3603
+ expand?: Array<string>;
3604
+ }
3605
+
766
3606
  class QuotesResource {
767
3607
  /**
768
3608
  * A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote).
@@ -843,6 +3683,21 @@ declare module 'stripe' {
843
3683
  options?: RequestOptions
844
3684
  ): Promise<Stripe.Response<Stripe.Quote>>;
845
3685
 
3686
+ /**
3687
+ * Preview the invoice line items that would be generated by accepting the quote.
3688
+ */
3689
+ listPreviewInvoiceLines(
3690
+ quoteId: string,
3691
+ id: string,
3692
+ params?: QuoteListPreviewInvoiceLinesParams,
3693
+ options?: RequestOptions
3694
+ ): ApiListPromise<Stripe.InvoiceLineItem>;
3695
+ listPreviewInvoiceLines(
3696
+ quoteId: string,
3697
+ id: string,
3698
+ options?: RequestOptions
3699
+ ): ApiListPromise<Stripe.InvoiceLineItem>;
3700
+
846
3701
  /**
847
3702
  * When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
848
3703
  */
@@ -869,6 +3724,71 @@ declare module 'stripe' {
869
3724
  options?: RequestOptions
870
3725
  ): ApiListPromise<Stripe.LineItem>;
871
3726
 
3727
+ /**
3728
+ * Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
3729
+ */
3730
+ listLines(
3731
+ id: string,
3732
+ params?: QuoteListLinesParams,
3733
+ options?: RequestOptions
3734
+ ): ApiListPromise<Stripe.QuoteLine>;
3735
+ listLines(
3736
+ id: string,
3737
+ options?: RequestOptions
3738
+ ): ApiListPromise<Stripe.QuoteLine>;
3739
+
3740
+ /**
3741
+ * Preview the invoices that would be generated by accepting the quote.
3742
+ */
3743
+ listPreviewInvoices(
3744
+ id: string,
3745
+ params?: QuoteListPreviewInvoicesParams,
3746
+ options?: RequestOptions
3747
+ ): ApiListPromise<Stripe.QuotePreviewInvoice>;
3748
+ listPreviewInvoices(
3749
+ id: string,
3750
+ options?: RequestOptions
3751
+ ): ApiListPromise<Stripe.QuotePreviewInvoice>;
3752
+
3753
+ /**
3754
+ * Preview the schedules that would be generated by accepting the quote
3755
+ */
3756
+ listPreviewSubscriptionSchedules(
3757
+ id: string,
3758
+ params?: QuoteListPreviewSubscriptionSchedulesParams,
3759
+ options?: RequestOptions
3760
+ ): ApiListPromise<Stripe.QuotePreviewSubscriptionSchedule>;
3761
+ listPreviewSubscriptionSchedules(
3762
+ id: string,
3763
+ options?: RequestOptions
3764
+ ): ApiListPromise<Stripe.QuotePreviewSubscriptionSchedule>;
3765
+
3766
+ /**
3767
+ * Converts a stale quote to draft.
3768
+ */
3769
+ markDraft(
3770
+ id: string,
3771
+ params?: QuoteMarkDraftParams,
3772
+ options?: RequestOptions
3773
+ ): Promise<Stripe.Response<Stripe.Quote>>;
3774
+ markDraft(
3775
+ id: string,
3776
+ options?: RequestOptions
3777
+ ): Promise<Stripe.Response<Stripe.Quote>>;
3778
+
3779
+ /**
3780
+ * Converts a draft or open quote to stale.
3781
+ */
3782
+ markStale(
3783
+ id: string,
3784
+ params?: QuoteMarkStaleParams,
3785
+ options?: RequestOptions
3786
+ ): Promise<Stripe.Response<Stripe.Quote>>;
3787
+ markStale(
3788
+ id: string,
3789
+ options?: RequestOptions
3790
+ ): Promise<Stripe.Response<Stripe.Quote>>;
3791
+
872
3792
  /**
873
3793
  * Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
874
3794
  */
@@ -878,6 +3798,19 @@ declare module 'stripe' {
878
3798
  options?: RequestOptions
879
3799
  ): Promise<StripeStreamResponse>;
880
3800
  pdf(id: string, options?: RequestOptions): Promise<StripeStreamResponse>;
3801
+
3802
+ /**
3803
+ * Recompute the upcoming invoice estimate for the quote.
3804
+ */
3805
+ reestimate(
3806
+ id: string,
3807
+ params?: QuoteReestimateParams,
3808
+ options?: RequestOptions
3809
+ ): Promise<Stripe.Response<Stripe.Quote>>;
3810
+ reestimate(
3811
+ id: string,
3812
+ options?: RequestOptions
3813
+ ): Promise<Stripe.Response<Stripe.Quote>>;
881
3814
  }
882
3815
  }
883
3816
  }