stripe 20.1.2 → 20.2.0-alpha.2

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