stripe 22.2.0 → 22.3.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (789) hide show
  1. package/CHANGELOG.md +1753 -76
  2. package/README.md +57 -65
  3. package/VERSION +1 -1
  4. package/cjs/Error.d.ts +50 -0
  5. package/cjs/Error.js +125 -1
  6. package/cjs/Error.js.map +1 -1
  7. package/cjs/RequestSender.d.ts +0 -1
  8. package/cjs/RequestSender.js +0 -8
  9. package/cjs/RequestSender.js.map +1 -1
  10. package/cjs/StripeEventNotificationHandler.d.ts +19 -0
  11. package/cjs/StripeEventNotificationHandler.js +148 -0
  12. package/cjs/StripeEventNotificationHandler.js.map +1 -0
  13. package/cjs/Types.d.ts +4 -2
  14. package/cjs/Types.js.map +1 -1
  15. package/cjs/apiVersion.d.ts +1 -2
  16. package/cjs/apiVersion.js +2 -3
  17. package/cjs/apiVersion.js.map +1 -1
  18. package/cjs/resources/AccountLinks.d.ts +1 -1
  19. package/cjs/resources/AccountNotices.d.ts +140 -0
  20. package/cjs/resources/AccountNotices.js +29 -0
  21. package/cjs/resources/AccountNotices.js.map +1 -0
  22. package/cjs/resources/AccountSessions.d.ts +262 -0
  23. package/cjs/resources/AccountSessions.js.map +1 -1
  24. package/cjs/resources/Accounts.d.ts +827 -3
  25. package/cjs/resources/Accounts.js +14 -0
  26. package/cjs/resources/Accounts.js.map +1 -1
  27. package/cjs/resources/Balance.d.ts +67 -0
  28. package/cjs/resources/BankAccounts.d.ts +2 -2
  29. package/cjs/resources/Billing/AlertTriggereds.d.ts +2 -1
  30. package/cjs/resources/Billing/Analytics/MeterUsage.d.ts +84 -0
  31. package/cjs/resources/Billing/Analytics/MeterUsage.js +15 -0
  32. package/cjs/resources/Billing/Analytics/MeterUsage.js.map +1 -0
  33. package/cjs/resources/Billing/Analytics/MeterUsageRows.d.ts +32 -0
  34. package/cjs/resources/Billing/Analytics/MeterUsageRows.js +4 -0
  35. package/cjs/resources/Billing/Analytics/MeterUsageRows.js.map +1 -0
  36. package/cjs/resources/Billing/Analytics/index.d.ts +15 -0
  37. package/cjs/resources/Billing/Analytics/index.js +13 -0
  38. package/cjs/resources/Billing/Analytics/index.js.map +1 -0
  39. package/cjs/resources/Billing/index.d.ts +3 -0
  40. package/cjs/resources/Billing/index.js +2 -0
  41. package/cjs/resources/Billing/index.js.map +1 -1
  42. package/cjs/resources/Capabilities.d.ts +2 -2
  43. package/cjs/resources/Capital/FinancingOffers.d.ts +191 -0
  44. package/cjs/resources/Capital/FinancingOffers.js +30 -0
  45. package/cjs/resources/Capital/FinancingOffers.js.map +1 -0
  46. package/cjs/resources/Capital/FinancingSummary.d.ts +98 -0
  47. package/cjs/resources/Capital/FinancingSummary.js +15 -0
  48. package/cjs/resources/Capital/FinancingSummary.js.map +1 -0
  49. package/cjs/resources/Capital/FinancingTransactions.d.ts +143 -0
  50. package/cjs/resources/Capital/FinancingTransactions.js +24 -0
  51. package/cjs/resources/Capital/FinancingTransactions.js.map +1 -0
  52. package/cjs/resources/Capital/index.d.ts +25 -0
  53. package/cjs/resources/Capital/index.js +17 -0
  54. package/cjs/resources/Capital/index.js.map +1 -0
  55. package/cjs/resources/Cards.d.ts +4 -0
  56. package/cjs/resources/Charges.d.ts +3064 -70
  57. package/cjs/resources/Checkout/Sessions.d.ts +390 -4
  58. package/cjs/resources/ConfirmationTokens.d.ts +67 -1
  59. package/cjs/resources/Coupons.d.ts +53 -0
  60. package/cjs/resources/Coupons.js +13 -0
  61. package/cjs/resources/Coupons.js.map +1 -1
  62. package/cjs/resources/CreditNoteLineItems.d.ts +15 -1
  63. package/cjs/resources/CreditNotes.d.ts +1 -1
  64. package/cjs/resources/CustomerSessions.d.ts +68 -0
  65. package/cjs/resources/Customers.d.ts +7 -1
  66. package/cjs/resources/Customers.js +14 -0
  67. package/cjs/resources/Customers.js.map +1 -1
  68. package/cjs/resources/Disputes.d.ts +29 -0
  69. package/cjs/resources/Events.d.ts +547 -2
  70. package/cjs/resources/ExternalAccounts.d.ts +212 -1
  71. package/cjs/resources/ExternalAccounts.js +44 -0
  72. package/cjs/resources/ExternalAccounts.js.map +1 -1
  73. package/cjs/resources/FinancialConnections/AccountInferredBalances.d.ts +24 -0
  74. package/cjs/resources/FinancialConnections/AccountInferredBalances.js +4 -0
  75. package/cjs/resources/FinancialConnections/AccountInferredBalances.js.map +1 -0
  76. package/cjs/resources/FinancialConnections/Accounts.d.ts +74 -4
  77. package/cjs/resources/FinancialConnections/Accounts.js +8 -0
  78. package/cjs/resources/FinancialConnections/Accounts.js.map +1 -1
  79. package/cjs/resources/FinancialConnections/Authorizations.d.ts +87 -0
  80. package/cjs/resources/FinancialConnections/Authorizations.js +15 -0
  81. package/cjs/resources/FinancialConnections/Authorizations.js.map +1 -0
  82. package/cjs/resources/FinancialConnections/Institutions.d.ts +101 -0
  83. package/cjs/resources/FinancialConnections/Institutions.js +23 -0
  84. package/cjs/resources/FinancialConnections/Institutions.js.map +1 -0
  85. package/cjs/resources/FinancialConnections/Sessions.d.ts +155 -7
  86. package/cjs/resources/FinancialConnections/index.d.ts +21 -6
  87. package/cjs/resources/FinancialConnections/index.js +4 -0
  88. package/cjs/resources/FinancialConnections/index.js.map +1 -1
  89. package/cjs/resources/FxQuotes.d.ts +212 -0
  90. package/cjs/resources/FxQuotes.js +29 -0
  91. package/cjs/resources/FxQuotes.js.map +1 -0
  92. package/cjs/resources/InvoiceItems.d.ts +85 -0
  93. package/cjs/resources/InvoiceItems.js.map +1 -1
  94. package/cjs/resources/InvoiceLineItems.d.ts +40 -2
  95. package/cjs/resources/Invoices.d.ts +1337 -19
  96. package/cjs/resources/Invoices.js +41 -0
  97. package/cjs/resources/Invoices.js.map +1 -1
  98. package/cjs/resources/Issuing/Cardholders.d.ts +2 -1
  99. package/cjs/resources/Issuing/CreditUnderwritingRecords.d.ts +640 -0
  100. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +47 -0
  101. package/cjs/resources/Issuing/CreditUnderwritingRecords.js.map +1 -0
  102. package/cjs/resources/Issuing/DisputeSettlementDetails.d.ts +95 -0
  103. package/cjs/resources/Issuing/DisputeSettlementDetails.js +23 -0
  104. package/cjs/resources/Issuing/DisputeSettlementDetails.js.map +1 -0
  105. package/cjs/resources/Issuing/FraudLiabilityDebits.d.ts +68 -0
  106. package/cjs/resources/Issuing/FraudLiabilityDebits.js +23 -0
  107. package/cjs/resources/Issuing/FraudLiabilityDebits.js.map +1 -0
  108. package/cjs/resources/Issuing/Settlements.d.ts +85 -0
  109. package/cjs/resources/Issuing/Settlements.js +4 -0
  110. package/cjs/resources/Issuing/Settlements.js.map +1 -0
  111. package/cjs/resources/Issuing/Transactions.d.ts +9 -0
  112. package/cjs/resources/Issuing/Transactions.js.map +1 -1
  113. package/cjs/resources/Issuing/index.d.ts +47 -22
  114. package/cjs/resources/Issuing/index.js +6 -0
  115. package/cjs/resources/Issuing/index.js.map +1 -1
  116. package/cjs/resources/LineItems.d.ts +29 -2
  117. package/cjs/resources/Mandates.d.ts +33 -1
  118. package/cjs/resources/Mandates.js +8 -0
  119. package/cjs/resources/Mandates.js.map +1 -1
  120. package/cjs/resources/Margins.d.ts +115 -0
  121. package/cjs/resources/Margins.js +35 -0
  122. package/cjs/resources/Margins.js.map +1 -0
  123. package/cjs/resources/Orders.d.ts +4693 -0
  124. package/cjs/resources/Orders.js +457 -0
  125. package/cjs/resources/Orders.js.map +1 -0
  126. package/cjs/resources/PaymentAttemptRecords.d.ts +82 -0
  127. package/cjs/resources/PaymentIntents.d.ts +13239 -2321
  128. package/cjs/resources/PaymentIntents.js +27 -0
  129. package/cjs/resources/PaymentIntents.js.map +1 -1
  130. package/cjs/resources/PaymentLinks.d.ts +19 -3
  131. package/cjs/resources/PaymentMethodConfigurations.d.ts +350 -0
  132. package/cjs/resources/PaymentMethods.d.ts +151 -3
  133. package/cjs/resources/PaymentMethods.js.map +1 -1
  134. package/cjs/resources/PaymentRecords.d.ts +82 -0
  135. package/cjs/resources/Persons.d.ts +2 -2
  136. package/cjs/resources/Plans.d.ts +16 -0
  137. package/cjs/resources/Prices.d.ts +52 -0
  138. package/cjs/resources/Privacy/RedactionJobValidationErrors.d.ts +37 -0
  139. package/cjs/resources/Privacy/RedactionJobValidationErrors.js +4 -0
  140. package/cjs/resources/Privacy/RedactionJobValidationErrors.js.map +1 -0
  141. package/cjs/resources/Privacy/RedactionJobs.d.ts +229 -0
  142. package/cjs/resources/Privacy/RedactionJobs.js +73 -0
  143. package/cjs/resources/Privacy/RedactionJobs.js.map +1 -0
  144. package/cjs/resources/Privacy/index.d.ts +22 -0
  145. package/cjs/resources/Privacy/index.js +13 -0
  146. package/cjs/resources/Privacy/index.js.map +1 -0
  147. package/cjs/resources/ProductCatalog/TrialOffers.d.ts +127 -0
  148. package/cjs/resources/ProductCatalog/TrialOffers.js +15 -0
  149. package/cjs/resources/ProductCatalog/TrialOffers.js.map +1 -0
  150. package/cjs/resources/ProductCatalog/index.d.ts +12 -0
  151. package/cjs/resources/ProductCatalog/index.js +13 -0
  152. package/cjs/resources/ProductCatalog/index.js.map +1 -0
  153. package/cjs/resources/Products.d.ts +42 -0
  154. package/cjs/resources/PromotionCodes.d.ts +12 -0
  155. package/cjs/resources/PromotionCodes.js +27 -0
  156. package/cjs/resources/PromotionCodes.js.map +1 -1
  157. package/cjs/resources/QuoteLines.d.ts +507 -0
  158. package/cjs/resources/QuoteLines.js +4 -0
  159. package/cjs/resources/QuoteLines.js.map +1 -0
  160. package/cjs/resources/QuotePreviewInvoices.d.ts +1120 -0
  161. package/cjs/resources/QuotePreviewInvoices.js +4 -0
  162. package/cjs/resources/QuotePreviewInvoices.js.map +1 -0
  163. package/cjs/resources/QuotePreviewSubscriptionSchedules.d.ts +737 -0
  164. package/cjs/resources/QuotePreviewSubscriptionSchedules.js +4 -0
  165. package/cjs/resources/QuotePreviewSubscriptionSchedules.js.map +1 -0
  166. package/cjs/resources/Quotes.d.ts +2266 -57
  167. package/cjs/resources/Quotes.js +1184 -16
  168. package/cjs/resources/Quotes.js.map +1 -1
  169. package/cjs/resources/Radar/PaymentEvaluations.d.ts +1 -1
  170. package/cjs/resources/Refunds.d.ts +11 -0
  171. package/cjs/resources/Reserve/Holds.d.ts +53 -1
  172. package/cjs/resources/Reserve/Holds.js +19 -0
  173. package/cjs/resources/Reserve/Holds.js.map +1 -1
  174. package/cjs/resources/Reserve/Plans.d.ts +16 -0
  175. package/cjs/resources/Reserve/Plans.js +11 -0
  176. package/cjs/resources/Reserve/Plans.js.map +1 -1
  177. package/cjs/resources/Reserve/Releases.d.ts +41 -1
  178. package/cjs/resources/Reserve/Releases.js +19 -0
  179. package/cjs/resources/Reserve/Releases.js.map +1 -1
  180. package/cjs/resources/Reserve/index.d.ts +14 -3
  181. package/cjs/resources/Reserve/index.js +10 -2
  182. package/cjs/resources/Reserve/index.js.map +1 -1
  183. package/cjs/resources/SetupAttempts.d.ts +26 -1
  184. package/cjs/resources/SetupIntents.d.ts +330 -11
  185. package/cjs/resources/SharedPayment/GrantedTokens.d.ts +1095 -0
  186. package/cjs/resources/SharedPayment/GrantedTokens.js +15 -0
  187. package/cjs/resources/SharedPayment/GrantedTokens.js.map +1 -0
  188. package/cjs/resources/SharedPayment/IssuedTokens.d.ts +308 -0
  189. package/cjs/resources/SharedPayment/IssuedTokens.js +27 -0
  190. package/cjs/resources/SharedPayment/IssuedTokens.js.map +1 -0
  191. package/cjs/resources/SharedPayment/index.d.ts +19 -0
  192. package/cjs/resources/SharedPayment/index.js +15 -0
  193. package/cjs/resources/SharedPayment/index.js.map +1 -0
  194. package/cjs/resources/Sources.d.ts +16 -1
  195. package/cjs/resources/SubscriptionItems.d.ts +143 -0
  196. package/cjs/resources/SubscriptionSchedules.d.ts +1152 -0
  197. package/cjs/resources/SubscriptionSchedules.js +6 -0
  198. package/cjs/resources/SubscriptionSchedules.js.map +1 -1
  199. package/cjs/resources/Subscriptions.d.ts +571 -6
  200. package/cjs/resources/Subscriptions.js +145 -0
  201. package/cjs/resources/Subscriptions.js.map +1 -1
  202. package/cjs/resources/Tax/CalculationLineItems.d.ts +6 -2
  203. package/cjs/resources/Tax/Calculations.d.ts +7 -3
  204. package/cjs/resources/Tax/Forms.d.ts +230 -0
  205. package/cjs/resources/Tax/Forms.js +32 -0
  206. package/cjs/resources/Tax/Forms.js.map +1 -0
  207. package/cjs/resources/Tax/Locations.d.ts +108 -0
  208. package/cjs/resources/Tax/Locations.js +33 -0
  209. package/cjs/resources/Tax/Locations.js.map +1 -0
  210. package/cjs/resources/Tax/Registrations.d.ts +138 -2
  211. package/cjs/resources/Tax/Transactions.d.ts +2 -2
  212. package/cjs/resources/Tax/index.d.ts +27 -13
  213. package/cjs/resources/Tax/index.js +4 -0
  214. package/cjs/resources/Tax/index.js.map +1 -1
  215. package/cjs/resources/TaxCodes.d.ts +15 -0
  216. package/cjs/resources/Terminal/Configurations.d.ts +27 -0
  217. package/cjs/resources/Terminal/ReaderCollectedData.d.ts +52 -0
  218. package/cjs/resources/Terminal/ReaderCollectedData.js +15 -0
  219. package/cjs/resources/Terminal/ReaderCollectedData.js.map +1 -0
  220. package/cjs/resources/Terminal/Readers.d.ts +17 -1
  221. package/cjs/resources/Terminal/index.d.ts +5 -0
  222. package/cjs/resources/Terminal/index.js +2 -0
  223. package/cjs/resources/Terminal/index.js.map +1 -1
  224. package/cjs/resources/TestHelpers/ConfirmationTokens.d.ts +78 -1
  225. package/cjs/resources/TestHelpers/SharedPayment/GrantedTokens.d.ts +68 -0
  226. package/cjs/resources/TestHelpers/SharedPayment/GrantedTokens.js +21 -0
  227. package/cjs/resources/TestHelpers/SharedPayment/GrantedTokens.js.map +1 -0
  228. package/cjs/resources/TestHelpers/SharedPayment/index.d.ts +8 -0
  229. package/cjs/resources/TestHelpers/SharedPayment/index.js +13 -0
  230. package/cjs/resources/TestHelpers/SharedPayment/index.js.map +1 -0
  231. package/cjs/resources/TestHelpers/Treasury/ReceivedCredits.d.ts +22 -0
  232. package/cjs/resources/TestHelpers/Treasury/ReceivedDebits.d.ts +22 -0
  233. package/cjs/resources/TestHelpers/index.d.ts +3 -0
  234. package/cjs/resources/TestHelpers/index.js +6 -4
  235. package/cjs/resources/TestHelpers/index.js.map +1 -1
  236. package/cjs/resources/Transfers.d.ts +8 -0
  237. package/cjs/resources/Treasury/FinancialAccountFeatures.d.ts +5 -0
  238. package/cjs/resources/Treasury/FinancialAccounts.d.ts +34 -1
  239. package/cjs/resources/Treasury/OutboundPayments.d.ts +8 -0
  240. package/cjs/resources/Treasury/OutboundTransfers.d.ts +44 -0
  241. package/cjs/resources/Treasury/ReceivedCredits.d.ts +22 -0
  242. package/cjs/resources/Treasury/ReceivedDebits.d.ts +26 -0
  243. package/cjs/resources/V2/Billing/BillSettingVersions.d.ts +75 -0
  244. package/cjs/resources/V2/Billing/BillSettingVersions.js +4 -0
  245. package/cjs/resources/V2/Billing/BillSettingVersions.js.map +1 -0
  246. package/cjs/resources/V2/Billing/BillSettings/Versions.d.ts +33 -0
  247. package/cjs/resources/V2/Billing/BillSettings/Versions.js +23 -0
  248. package/cjs/resources/V2/Billing/BillSettings/Versions.js.map +1 -0
  249. package/cjs/resources/V2/Billing/BillSettings.d.ts +284 -0
  250. package/cjs/resources/V2/Billing/BillSettings.js +41 -0
  251. package/cjs/resources/V2/Billing/BillSettings.js.map +1 -0
  252. package/cjs/resources/V2/Billing/Cadences.d.ts +951 -0
  253. package/cjs/resources/V2/Billing/Cadences.js +198 -0
  254. package/cjs/resources/V2/Billing/Cadences.js.map +1 -0
  255. package/cjs/resources/V2/Billing/CollectionSettingVersions.d.ts +240 -0
  256. package/cjs/resources/V2/Billing/CollectionSettingVersions.js +4 -0
  257. package/cjs/resources/V2/Billing/CollectionSettingVersions.js.map +1 -0
  258. package/cjs/resources/V2/Billing/CollectionSettings/Versions.d.ts +33 -0
  259. package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +70 -0
  260. package/cjs/resources/V2/Billing/CollectionSettings/Versions.js.map +1 -0
  261. package/cjs/resources/V2/Billing/CollectionSettings.d.ts +779 -0
  262. package/cjs/resources/V2/Billing/CollectionSettings.js +166 -0
  263. package/cjs/resources/V2/Billing/CollectionSettings.js.map +1 -0
  264. package/cjs/resources/V2/Billing/Profiles.d.ts +166 -0
  265. package/cjs/resources/V2/Billing/Profiles.js +35 -0
  266. package/cjs/resources/V2/Billing/Profiles.js.map +1 -0
  267. package/cjs/resources/V2/Billing/index.d.ts +45 -6
  268. package/cjs/resources/V2/Billing/index.js +8 -0
  269. package/cjs/resources/V2/Billing/index.js.map +1 -1
  270. package/cjs/resources/V2/Core/AccountLinks.d.ts +4 -4
  271. package/cjs/resources/V2/Core/AccountTokens.d.ts +10 -0
  272. package/cjs/resources/V2/Core/Accounts.d.ts +1177 -167
  273. package/cjs/resources/V2/Core/BatchJobs.d.ts +373 -0
  274. package/cjs/resources/V2/Core/BatchJobs.js +225 -0
  275. package/cjs/resources/V2/Core/BatchJobs.js.map +1 -0
  276. package/cjs/resources/V2/Core/Events.d.ts +1123 -4
  277. package/cjs/resources/V2/Core/Vault/GbBankAccounts.d.ts +285 -0
  278. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +54 -0
  279. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js.map +1 -0
  280. package/cjs/resources/V2/Core/Vault/UsBankAccounts.d.ts +254 -0
  281. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +62 -0
  282. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js.map +1 -0
  283. package/cjs/resources/V2/Core/Vault/index.d.ts +28 -0
  284. package/cjs/resources/V2/Core/Vault/index.js +15 -0
  285. package/cjs/resources/V2/Core/Vault/index.js.map +1 -0
  286. package/cjs/resources/V2/Core/index.d.ts +19 -9
  287. package/cjs/resources/V2/Core/index.js +4 -0
  288. package/cjs/resources/V2/Core/index.js.map +1 -1
  289. package/cjs/resources/V2/Data/Reporting/QueryRuns.d.ts +156 -0
  290. package/cjs/resources/V2/Data/Reporting/QueryRuns.js +46 -0
  291. package/cjs/resources/V2/Data/Reporting/QueryRuns.js.map +1 -0
  292. package/cjs/resources/V2/Data/Reporting/index.d.ts +13 -0
  293. package/cjs/resources/V2/Data/Reporting/index.js +13 -0
  294. package/cjs/resources/V2/Data/Reporting/index.js.map +1 -0
  295. package/cjs/resources/V2/Data/index.d.ts +10 -0
  296. package/cjs/resources/V2/Data/index.js +13 -0
  297. package/cjs/resources/V2/Data/index.js.map +1 -0
  298. package/cjs/resources/V2/EventMisc.d.ts +0 -0
  299. package/cjs/resources/V2/EventMisc.js +2 -0
  300. package/cjs/resources/V2/EventMisc.js.map +1 -0
  301. package/cjs/resources/V2/Extend/WorkflowRuns.d.ts +166 -0
  302. package/cjs/resources/V2/Extend/WorkflowRuns.js +23 -0
  303. package/cjs/resources/V2/Extend/WorkflowRuns.js.map +1 -0
  304. package/cjs/resources/V2/Extend/Workflows.d.ts +123 -0
  305. package/cjs/resources/V2/Extend/Workflows.js +30 -0
  306. package/cjs/resources/V2/Extend/Workflows.js.map +1 -0
  307. package/cjs/resources/V2/Extend/index.d.ts +20 -0
  308. package/cjs/resources/V2/Extend/index.js +15 -0
  309. package/cjs/resources/V2/Extend/index.js.map +1 -0
  310. package/cjs/resources/V2/FinancialAddressCreditSimulations.d.ts +14 -0
  311. package/cjs/resources/V2/FinancialAddressCreditSimulations.js +4 -0
  312. package/cjs/resources/V2/FinancialAddressCreditSimulations.js.map +1 -0
  313. package/cjs/resources/V2/FinancialAddressGeneratedMicrodeposits.d.ts +19 -0
  314. package/cjs/resources/V2/FinancialAddressGeneratedMicrodeposits.js +4 -0
  315. package/cjs/resources/V2/FinancialAddressGeneratedMicrodeposits.js.map +1 -0
  316. package/cjs/resources/V2/Iam/ActivityLogs.d.ts +214 -0
  317. package/cjs/resources/V2/Iam/ActivityLogs.js +23 -0
  318. package/cjs/resources/V2/Iam/ActivityLogs.js.map +1 -0
  319. package/cjs/resources/V2/Iam/index.d.ts +13 -0
  320. package/cjs/resources/V2/Iam/index.js +13 -0
  321. package/cjs/resources/V2/Iam/index.js.map +1 -0
  322. package/cjs/resources/V2/MoneyManagement/Adjustments.d.ts +135 -0
  323. package/cjs/resources/V2/MoneyManagement/Adjustments.js +23 -0
  324. package/cjs/resources/V2/MoneyManagement/Adjustments.js.map +1 -0
  325. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.d.ts +244 -0
  326. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +44 -0
  327. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js.map +1 -0
  328. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.d.ts +215 -0
  329. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +31 -0
  330. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js.map +1 -0
  331. package/cjs/resources/V2/MoneyManagement/InboundTransfers.d.ts +254 -0
  332. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +30 -0
  333. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js.map +1 -0
  334. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +212 -0
  335. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +22 -0
  336. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js.map +1 -0
  337. package/cjs/resources/V2/MoneyManagement/OutboundPayments.d.ts +388 -0
  338. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +41 -0
  339. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js.map +1 -0
  340. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.d.ts +300 -0
  341. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +49 -0
  342. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js.map +1 -0
  343. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.d.ts +330 -0
  344. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +39 -0
  345. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js.map +1 -0
  346. package/cjs/resources/V2/MoneyManagement/PayoutMethods.d.ts +243 -0
  347. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +44 -0
  348. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js.map +1 -0
  349. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +96 -0
  350. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +17 -0
  351. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js.map +1 -0
  352. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.d.ts +295 -0
  353. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +23 -0
  354. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js.map +1 -0
  355. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.d.ts +161 -0
  356. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +23 -0
  357. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js.map +1 -0
  358. package/cjs/resources/V2/MoneyManagement/TransactionEntries.d.ts +165 -0
  359. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +23 -0
  360. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js.map +1 -0
  361. package/cjs/resources/V2/MoneyManagement/Transactions.d.ts +196 -0
  362. package/cjs/resources/V2/MoneyManagement/Transactions.js +23 -0
  363. package/cjs/resources/V2/MoneyManagement/Transactions.js.map +1 -0
  364. package/cjs/resources/V2/MoneyManagement/index.d.ts +104 -0
  365. package/cjs/resources/V2/MoneyManagement/index.js +39 -0
  366. package/cjs/resources/V2/MoneyManagement/index.js.map +1 -0
  367. package/cjs/resources/V2/Network/BusinessProfiles.d.ts +96 -0
  368. package/cjs/resources/V2/Network/BusinessProfiles.js +21 -0
  369. package/cjs/resources/V2/Network/BusinessProfiles.js.map +1 -0
  370. package/cjs/resources/V2/Network/index.d.ts +13 -0
  371. package/cjs/resources/V2/Network/index.js +13 -0
  372. package/cjs/resources/V2/Network/index.js.map +1 -0
  373. package/cjs/resources/V2/OrchestratedCommerce/Agreements.d.ts +147 -0
  374. package/cjs/resources/V2/OrchestratedCommerce/Agreements.js +41 -0
  375. package/cjs/resources/V2/OrchestratedCommerce/Agreements.js.map +1 -0
  376. package/cjs/resources/V2/OrchestratedCommerce/index.d.ts +16 -0
  377. package/cjs/resources/V2/OrchestratedCommerce/index.js +13 -0
  378. package/cjs/resources/V2/OrchestratedCommerce/index.js.map +1 -0
  379. package/cjs/resources/V2/TestHelpers/FinancialAddresses.d.ts +44 -0
  380. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +23 -0
  381. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js.map +1 -0
  382. package/cjs/resources/V2/TestHelpers/index.d.ts +8 -0
  383. package/cjs/resources/V2/TestHelpers/index.js +13 -0
  384. package/cjs/resources/V2/TestHelpers/index.js.map +1 -0
  385. package/cjs/resources/V2/index.d.ts +27 -0
  386. package/cjs/resources/V2/index.js +14 -0
  387. package/cjs/resources/V2/index.js.map +1 -1
  388. package/cjs/resources/WebhookEndpoints.d.ts +2 -2
  389. package/cjs/resources.d.ts +10 -0
  390. package/cjs/resources.js +146 -10
  391. package/cjs/resources.js.map +1 -1
  392. package/cjs/stripe.core.d.ts +61 -24
  393. package/cjs/stripe.core.js +55 -31
  394. package/cjs/stripe.core.js.map +1 -1
  395. package/esm/Error.d.ts +50 -0
  396. package/esm/Error.js +109 -0
  397. package/esm/Error.js.map +1 -1
  398. package/esm/RequestSender.d.ts +0 -1
  399. package/esm/RequestSender.js +0 -8
  400. package/esm/RequestSender.js.map +1 -1
  401. package/esm/StripeEventNotificationHandler.d.ts +19 -0
  402. package/esm/StripeEventNotificationHandler.js +144 -0
  403. package/esm/StripeEventNotificationHandler.js.map +1 -0
  404. package/esm/Types.d.ts +4 -2
  405. package/esm/Types.js.map +1 -1
  406. package/esm/apiVersion.d.ts +1 -2
  407. package/esm/apiVersion.js +1 -2
  408. package/esm/apiVersion.js.map +1 -1
  409. package/esm/resources/AccountLinks.d.ts +1 -1
  410. package/esm/resources/AccountNotices.d.ts +140 -0
  411. package/esm/resources/AccountNotices.js +25 -0
  412. package/esm/resources/AccountNotices.js.map +1 -0
  413. package/esm/resources/AccountSessions.d.ts +262 -0
  414. package/esm/resources/AccountSessions.js.map +1 -1
  415. package/esm/resources/Accounts.d.ts +827 -3
  416. package/esm/resources/Accounts.js +14 -0
  417. package/esm/resources/Accounts.js.map +1 -1
  418. package/esm/resources/Balance.d.ts +67 -0
  419. package/esm/resources/BankAccounts.d.ts +2 -2
  420. package/esm/resources/Billing/AlertTriggereds.d.ts +2 -1
  421. package/esm/resources/Billing/Analytics/MeterUsage.d.ts +84 -0
  422. package/esm/resources/Billing/Analytics/MeterUsage.js +11 -0
  423. package/esm/resources/Billing/Analytics/MeterUsage.js.map +1 -0
  424. package/esm/resources/Billing/Analytics/MeterUsageRows.d.ts +32 -0
  425. package/esm/resources/Billing/Analytics/MeterUsageRows.js +3 -0
  426. package/esm/resources/Billing/Analytics/MeterUsageRows.js.map +1 -0
  427. package/esm/resources/Billing/Analytics/index.d.ts +15 -0
  428. package/esm/resources/Billing/Analytics/index.js +9 -0
  429. package/esm/resources/Billing/Analytics/index.js.map +1 -0
  430. package/esm/resources/Billing/index.d.ts +3 -0
  431. package/esm/resources/Billing/index.js +2 -0
  432. package/esm/resources/Billing/index.js.map +1 -1
  433. package/esm/resources/Capabilities.d.ts +2 -2
  434. package/esm/resources/Capital/FinancingOffers.d.ts +191 -0
  435. package/esm/resources/Capital/FinancingOffers.js +26 -0
  436. package/esm/resources/Capital/FinancingOffers.js.map +1 -0
  437. package/esm/resources/Capital/FinancingSummary.d.ts +98 -0
  438. package/esm/resources/Capital/FinancingSummary.js +11 -0
  439. package/esm/resources/Capital/FinancingSummary.js.map +1 -0
  440. package/esm/resources/Capital/FinancingTransactions.d.ts +143 -0
  441. package/esm/resources/Capital/FinancingTransactions.js +20 -0
  442. package/esm/resources/Capital/FinancingTransactions.js.map +1 -0
  443. package/esm/resources/Capital/index.d.ts +25 -0
  444. package/esm/resources/Capital/index.js +13 -0
  445. package/esm/resources/Capital/index.js.map +1 -0
  446. package/esm/resources/Cards.d.ts +4 -0
  447. package/esm/resources/Charges.d.ts +3064 -70
  448. package/esm/resources/Checkout/Sessions.d.ts +390 -4
  449. package/esm/resources/ConfirmationTokens.d.ts +67 -1
  450. package/esm/resources/Coupons.d.ts +53 -0
  451. package/esm/resources/Coupons.js +13 -0
  452. package/esm/resources/Coupons.js.map +1 -1
  453. package/esm/resources/CreditNoteLineItems.d.ts +15 -1
  454. package/esm/resources/CreditNotes.d.ts +1 -1
  455. package/esm/resources/CustomerSessions.d.ts +68 -0
  456. package/esm/resources/Customers.d.ts +7 -1
  457. package/esm/resources/Customers.js +14 -0
  458. package/esm/resources/Customers.js.map +1 -1
  459. package/esm/resources/Disputes.d.ts +29 -0
  460. package/esm/resources/Events.d.ts +547 -2
  461. package/esm/resources/ExternalAccounts.d.ts +212 -1
  462. package/esm/resources/ExternalAccounts.js +42 -1
  463. package/esm/resources/ExternalAccounts.js.map +1 -1
  464. package/esm/resources/FinancialConnections/AccountInferredBalances.d.ts +24 -0
  465. package/esm/resources/FinancialConnections/AccountInferredBalances.js +3 -0
  466. package/esm/resources/FinancialConnections/AccountInferredBalances.js.map +1 -0
  467. package/esm/resources/FinancialConnections/Accounts.d.ts +74 -4
  468. package/esm/resources/FinancialConnections/Accounts.js +8 -0
  469. package/esm/resources/FinancialConnections/Accounts.js.map +1 -1
  470. package/esm/resources/FinancialConnections/Authorizations.d.ts +87 -0
  471. package/esm/resources/FinancialConnections/Authorizations.js +11 -0
  472. package/esm/resources/FinancialConnections/Authorizations.js.map +1 -0
  473. package/esm/resources/FinancialConnections/Institutions.d.ts +101 -0
  474. package/esm/resources/FinancialConnections/Institutions.js +19 -0
  475. package/esm/resources/FinancialConnections/Institutions.js.map +1 -0
  476. package/esm/resources/FinancialConnections/Sessions.d.ts +155 -7
  477. package/esm/resources/FinancialConnections/index.d.ts +21 -6
  478. package/esm/resources/FinancialConnections/index.js +4 -0
  479. package/esm/resources/FinancialConnections/index.js.map +1 -1
  480. package/esm/resources/FxQuotes.d.ts +212 -0
  481. package/esm/resources/FxQuotes.js +25 -0
  482. package/esm/resources/FxQuotes.js.map +1 -0
  483. package/esm/resources/InvoiceItems.d.ts +85 -0
  484. package/esm/resources/InvoiceItems.js.map +1 -1
  485. package/esm/resources/InvoiceLineItems.d.ts +40 -2
  486. package/esm/resources/Invoices.d.ts +1337 -19
  487. package/esm/resources/Invoices.js +41 -0
  488. package/esm/resources/Invoices.js.map +1 -1
  489. package/esm/resources/Issuing/Cardholders.d.ts +2 -1
  490. package/esm/resources/Issuing/CreditUnderwritingRecords.d.ts +640 -0
  491. package/esm/resources/Issuing/CreditUnderwritingRecords.js +43 -0
  492. package/esm/resources/Issuing/CreditUnderwritingRecords.js.map +1 -0
  493. package/esm/resources/Issuing/DisputeSettlementDetails.d.ts +95 -0
  494. package/esm/resources/Issuing/DisputeSettlementDetails.js +19 -0
  495. package/esm/resources/Issuing/DisputeSettlementDetails.js.map +1 -0
  496. package/esm/resources/Issuing/FraudLiabilityDebits.d.ts +68 -0
  497. package/esm/resources/Issuing/FraudLiabilityDebits.js +19 -0
  498. package/esm/resources/Issuing/FraudLiabilityDebits.js.map +1 -0
  499. package/esm/resources/Issuing/Settlements.d.ts +85 -0
  500. package/esm/resources/Issuing/Settlements.js +3 -0
  501. package/esm/resources/Issuing/Settlements.js.map +1 -0
  502. package/esm/resources/Issuing/Transactions.d.ts +9 -0
  503. package/esm/resources/Issuing/Transactions.js.map +1 -1
  504. package/esm/resources/Issuing/index.d.ts +47 -22
  505. package/esm/resources/Issuing/index.js +6 -0
  506. package/esm/resources/Issuing/index.js.map +1 -1
  507. package/esm/resources/LineItems.d.ts +29 -2
  508. package/esm/resources/Mandates.d.ts +33 -1
  509. package/esm/resources/Mandates.js +8 -0
  510. package/esm/resources/Mandates.js.map +1 -1
  511. package/esm/resources/Margins.d.ts +115 -0
  512. package/esm/resources/Margins.js +31 -0
  513. package/esm/resources/Margins.js.map +1 -0
  514. package/esm/resources/Orders.d.ts +4693 -0
  515. package/esm/resources/Orders.js +453 -0
  516. package/esm/resources/Orders.js.map +1 -0
  517. package/esm/resources/PaymentAttemptRecords.d.ts +82 -0
  518. package/esm/resources/PaymentIntents.d.ts +13239 -2321
  519. package/esm/resources/PaymentIntents.js +27 -0
  520. package/esm/resources/PaymentIntents.js.map +1 -1
  521. package/esm/resources/PaymentLinks.d.ts +19 -3
  522. package/esm/resources/PaymentMethodConfigurations.d.ts +350 -0
  523. package/esm/resources/PaymentMethods.d.ts +151 -3
  524. package/esm/resources/PaymentMethods.js.map +1 -1
  525. package/esm/resources/PaymentRecords.d.ts +82 -0
  526. package/esm/resources/Persons.d.ts +2 -2
  527. package/esm/resources/Plans.d.ts +16 -0
  528. package/esm/resources/Prices.d.ts +52 -0
  529. package/esm/resources/Privacy/RedactionJobValidationErrors.d.ts +37 -0
  530. package/esm/resources/Privacy/RedactionJobValidationErrors.js +3 -0
  531. package/esm/resources/Privacy/RedactionJobValidationErrors.js.map +1 -0
  532. package/esm/resources/Privacy/RedactionJobs.d.ts +229 -0
  533. package/esm/resources/Privacy/RedactionJobs.js +69 -0
  534. package/esm/resources/Privacy/RedactionJobs.js.map +1 -0
  535. package/esm/resources/Privacy/index.d.ts +22 -0
  536. package/esm/resources/Privacy/index.js +9 -0
  537. package/esm/resources/Privacy/index.js.map +1 -0
  538. package/esm/resources/ProductCatalog/TrialOffers.d.ts +127 -0
  539. package/esm/resources/ProductCatalog/TrialOffers.js +11 -0
  540. package/esm/resources/ProductCatalog/TrialOffers.js.map +1 -0
  541. package/esm/resources/ProductCatalog/index.d.ts +12 -0
  542. package/esm/resources/ProductCatalog/index.js +9 -0
  543. package/esm/resources/ProductCatalog/index.js.map +1 -0
  544. package/esm/resources/Products.d.ts +42 -0
  545. package/esm/resources/PromotionCodes.d.ts +12 -0
  546. package/esm/resources/PromotionCodes.js +27 -0
  547. package/esm/resources/PromotionCodes.js.map +1 -1
  548. package/esm/resources/QuoteLines.d.ts +507 -0
  549. package/esm/resources/QuoteLines.js +3 -0
  550. package/esm/resources/QuoteLines.js.map +1 -0
  551. package/esm/resources/QuotePreviewInvoices.d.ts +1120 -0
  552. package/esm/resources/QuotePreviewInvoices.js +3 -0
  553. package/esm/resources/QuotePreviewInvoices.js.map +1 -0
  554. package/esm/resources/QuotePreviewSubscriptionSchedules.d.ts +737 -0
  555. package/esm/resources/QuotePreviewSubscriptionSchedules.js +3 -0
  556. package/esm/resources/QuotePreviewSubscriptionSchedules.js.map +1 -0
  557. package/esm/resources/Quotes.d.ts +2266 -57
  558. package/esm/resources/Quotes.js +1184 -16
  559. package/esm/resources/Quotes.js.map +1 -1
  560. package/esm/resources/Radar/PaymentEvaluations.d.ts +1 -1
  561. package/esm/resources/Refunds.d.ts +11 -0
  562. package/esm/resources/Reserve/Holds.d.ts +53 -1
  563. package/esm/resources/Reserve/Holds.js +17 -1
  564. package/esm/resources/Reserve/Holds.js.map +1 -1
  565. package/esm/resources/Reserve/Plans.d.ts +16 -0
  566. package/esm/resources/Reserve/Plans.js +9 -1
  567. package/esm/resources/Reserve/Plans.js.map +1 -1
  568. package/esm/resources/Reserve/Releases.d.ts +41 -1
  569. package/esm/resources/Reserve/Releases.js +17 -1
  570. package/esm/resources/Reserve/Releases.js.map +1 -1
  571. package/esm/resources/Reserve/index.d.ts +14 -3
  572. package/esm/resources/Reserve/index.js +10 -2
  573. package/esm/resources/Reserve/index.js.map +1 -1
  574. package/esm/resources/SetupAttempts.d.ts +26 -1
  575. package/esm/resources/SetupIntents.d.ts +330 -11
  576. package/esm/resources/SharedPayment/GrantedTokens.d.ts +1095 -0
  577. package/esm/resources/SharedPayment/GrantedTokens.js +11 -0
  578. package/esm/resources/SharedPayment/GrantedTokens.js.map +1 -0
  579. package/esm/resources/SharedPayment/IssuedTokens.d.ts +308 -0
  580. package/esm/resources/SharedPayment/IssuedTokens.js +23 -0
  581. package/esm/resources/SharedPayment/IssuedTokens.js.map +1 -0
  582. package/esm/resources/SharedPayment/index.d.ts +19 -0
  583. package/esm/resources/SharedPayment/index.js +11 -0
  584. package/esm/resources/SharedPayment/index.js.map +1 -0
  585. package/esm/resources/Sources.d.ts +16 -1
  586. package/esm/resources/SubscriptionItems.d.ts +143 -0
  587. package/esm/resources/SubscriptionSchedules.d.ts +1152 -0
  588. package/esm/resources/SubscriptionSchedules.js +6 -0
  589. package/esm/resources/SubscriptionSchedules.js.map +1 -1
  590. package/esm/resources/Subscriptions.d.ts +571 -6
  591. package/esm/resources/Subscriptions.js +145 -0
  592. package/esm/resources/Subscriptions.js.map +1 -1
  593. package/esm/resources/Tax/CalculationLineItems.d.ts +6 -2
  594. package/esm/resources/Tax/Calculations.d.ts +7 -3
  595. package/esm/resources/Tax/Forms.d.ts +230 -0
  596. package/esm/resources/Tax/Forms.js +28 -0
  597. package/esm/resources/Tax/Forms.js.map +1 -0
  598. package/esm/resources/Tax/Locations.d.ts +108 -0
  599. package/esm/resources/Tax/Locations.js +29 -0
  600. package/esm/resources/Tax/Locations.js.map +1 -0
  601. package/esm/resources/Tax/Registrations.d.ts +138 -2
  602. package/esm/resources/Tax/Transactions.d.ts +2 -2
  603. package/esm/resources/Tax/index.d.ts +27 -13
  604. package/esm/resources/Tax/index.js +4 -0
  605. package/esm/resources/Tax/index.js.map +1 -1
  606. package/esm/resources/TaxCodes.d.ts +15 -0
  607. package/esm/resources/Terminal/Configurations.d.ts +27 -0
  608. package/esm/resources/Terminal/ReaderCollectedData.d.ts +52 -0
  609. package/esm/resources/Terminal/ReaderCollectedData.js +11 -0
  610. package/esm/resources/Terminal/ReaderCollectedData.js.map +1 -0
  611. package/esm/resources/Terminal/Readers.d.ts +17 -1
  612. package/esm/resources/Terminal/index.d.ts +5 -0
  613. package/esm/resources/Terminal/index.js +2 -0
  614. package/esm/resources/Terminal/index.js.map +1 -1
  615. package/esm/resources/TestHelpers/ConfirmationTokens.d.ts +78 -1
  616. package/esm/resources/TestHelpers/SharedPayment/GrantedTokens.d.ts +68 -0
  617. package/esm/resources/TestHelpers/SharedPayment/GrantedTokens.js +17 -0
  618. package/esm/resources/TestHelpers/SharedPayment/GrantedTokens.js.map +1 -0
  619. package/esm/resources/TestHelpers/SharedPayment/index.d.ts +8 -0
  620. package/esm/resources/TestHelpers/SharedPayment/index.js +9 -0
  621. package/esm/resources/TestHelpers/SharedPayment/index.js.map +1 -0
  622. package/esm/resources/TestHelpers/Treasury/ReceivedCredits.d.ts +22 -0
  623. package/esm/resources/TestHelpers/Treasury/ReceivedDebits.d.ts +22 -0
  624. package/esm/resources/TestHelpers/index.d.ts +3 -0
  625. package/esm/resources/TestHelpers/index.js +2 -0
  626. package/esm/resources/TestHelpers/index.js.map +1 -1
  627. package/esm/resources/Transfers.d.ts +8 -0
  628. package/esm/resources/Treasury/FinancialAccountFeatures.d.ts +5 -0
  629. package/esm/resources/Treasury/FinancialAccounts.d.ts +34 -1
  630. package/esm/resources/Treasury/OutboundPayments.d.ts +8 -0
  631. package/esm/resources/Treasury/OutboundTransfers.d.ts +44 -0
  632. package/esm/resources/Treasury/ReceivedCredits.d.ts +22 -0
  633. package/esm/resources/Treasury/ReceivedDebits.d.ts +26 -0
  634. package/esm/resources/V2/Billing/BillSettingVersions.d.ts +75 -0
  635. package/esm/resources/V2/Billing/BillSettingVersions.js +3 -0
  636. package/esm/resources/V2/Billing/BillSettingVersions.js.map +1 -0
  637. package/esm/resources/V2/Billing/BillSettings/Versions.d.ts +33 -0
  638. package/esm/resources/V2/Billing/BillSettings/Versions.js +19 -0
  639. package/esm/resources/V2/Billing/BillSettings/Versions.js.map +1 -0
  640. package/esm/resources/V2/Billing/BillSettings.d.ts +284 -0
  641. package/esm/resources/V2/Billing/BillSettings.js +37 -0
  642. package/esm/resources/V2/Billing/BillSettings.js.map +1 -0
  643. package/esm/resources/V2/Billing/Cadences.d.ts +951 -0
  644. package/esm/resources/V2/Billing/Cadences.js +194 -0
  645. package/esm/resources/V2/Billing/Cadences.js.map +1 -0
  646. package/esm/resources/V2/Billing/CollectionSettingVersions.d.ts +240 -0
  647. package/esm/resources/V2/Billing/CollectionSettingVersions.js +3 -0
  648. package/esm/resources/V2/Billing/CollectionSettingVersions.js.map +1 -0
  649. package/esm/resources/V2/Billing/CollectionSettings/Versions.d.ts +33 -0
  650. package/esm/resources/V2/Billing/CollectionSettings/Versions.js +66 -0
  651. package/esm/resources/V2/Billing/CollectionSettings/Versions.js.map +1 -0
  652. package/esm/resources/V2/Billing/CollectionSettings.d.ts +779 -0
  653. package/esm/resources/V2/Billing/CollectionSettings.js +162 -0
  654. package/esm/resources/V2/Billing/CollectionSettings.js.map +1 -0
  655. package/esm/resources/V2/Billing/Profiles.d.ts +166 -0
  656. package/esm/resources/V2/Billing/Profiles.js +31 -0
  657. package/esm/resources/V2/Billing/Profiles.js.map +1 -0
  658. package/esm/resources/V2/Billing/index.d.ts +45 -6
  659. package/esm/resources/V2/Billing/index.js +8 -0
  660. package/esm/resources/V2/Billing/index.js.map +1 -1
  661. package/esm/resources/V2/Core/AccountLinks.d.ts +4 -4
  662. package/esm/resources/V2/Core/AccountTokens.d.ts +10 -0
  663. package/esm/resources/V2/Core/Accounts.d.ts +1177 -167
  664. package/esm/resources/V2/Core/BatchJobs.d.ts +373 -0
  665. package/esm/resources/V2/Core/BatchJobs.js +221 -0
  666. package/esm/resources/V2/Core/BatchJobs.js.map +1 -0
  667. package/esm/resources/V2/Core/Events.d.ts +1123 -4
  668. package/esm/resources/V2/Core/Vault/GbBankAccounts.d.ts +285 -0
  669. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +50 -0
  670. package/esm/resources/V2/Core/Vault/GbBankAccounts.js.map +1 -0
  671. package/esm/resources/V2/Core/Vault/UsBankAccounts.d.ts +254 -0
  672. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +58 -0
  673. package/esm/resources/V2/Core/Vault/UsBankAccounts.js.map +1 -0
  674. package/esm/resources/V2/Core/Vault/index.d.ts +28 -0
  675. package/esm/resources/V2/Core/Vault/index.js +11 -0
  676. package/esm/resources/V2/Core/Vault/index.js.map +1 -0
  677. package/esm/resources/V2/Core/index.d.ts +19 -9
  678. package/esm/resources/V2/Core/index.js +4 -0
  679. package/esm/resources/V2/Core/index.js.map +1 -1
  680. package/esm/resources/V2/Data/Reporting/QueryRuns.d.ts +156 -0
  681. package/esm/resources/V2/Data/Reporting/QueryRuns.js +42 -0
  682. package/esm/resources/V2/Data/Reporting/QueryRuns.js.map +1 -0
  683. package/esm/resources/V2/Data/Reporting/index.d.ts +13 -0
  684. package/esm/resources/V2/Data/Reporting/index.js +9 -0
  685. package/esm/resources/V2/Data/Reporting/index.js.map +1 -0
  686. package/esm/resources/V2/Data/index.d.ts +10 -0
  687. package/esm/resources/V2/Data/index.js +9 -0
  688. package/esm/resources/V2/Data/index.js.map +1 -0
  689. package/esm/resources/V2/EventMisc.d.ts +0 -0
  690. package/esm/resources/V2/EventMisc.js +2 -0
  691. package/esm/resources/V2/EventMisc.js.map +1 -0
  692. package/esm/resources/V2/Extend/WorkflowRuns.d.ts +166 -0
  693. package/esm/resources/V2/Extend/WorkflowRuns.js +19 -0
  694. package/esm/resources/V2/Extend/WorkflowRuns.js.map +1 -0
  695. package/esm/resources/V2/Extend/Workflows.d.ts +123 -0
  696. package/esm/resources/V2/Extend/Workflows.js +26 -0
  697. package/esm/resources/V2/Extend/Workflows.js.map +1 -0
  698. package/esm/resources/V2/Extend/index.d.ts +20 -0
  699. package/esm/resources/V2/Extend/index.js +11 -0
  700. package/esm/resources/V2/Extend/index.js.map +1 -0
  701. package/esm/resources/V2/FinancialAddressCreditSimulations.d.ts +14 -0
  702. package/esm/resources/V2/FinancialAddressCreditSimulations.js +3 -0
  703. package/esm/resources/V2/FinancialAddressCreditSimulations.js.map +1 -0
  704. package/esm/resources/V2/FinancialAddressGeneratedMicrodeposits.d.ts +19 -0
  705. package/esm/resources/V2/FinancialAddressGeneratedMicrodeposits.js +3 -0
  706. package/esm/resources/V2/FinancialAddressGeneratedMicrodeposits.js.map +1 -0
  707. package/esm/resources/V2/Iam/ActivityLogs.d.ts +214 -0
  708. package/esm/resources/V2/Iam/ActivityLogs.js +19 -0
  709. package/esm/resources/V2/Iam/ActivityLogs.js.map +1 -0
  710. package/esm/resources/V2/Iam/index.d.ts +13 -0
  711. package/esm/resources/V2/Iam/index.js +9 -0
  712. package/esm/resources/V2/Iam/index.js.map +1 -0
  713. package/esm/resources/V2/MoneyManagement/Adjustments.d.ts +135 -0
  714. package/esm/resources/V2/MoneyManagement/Adjustments.js +19 -0
  715. package/esm/resources/V2/MoneyManagement/Adjustments.js.map +1 -0
  716. package/esm/resources/V2/MoneyManagement/FinancialAccounts.d.ts +244 -0
  717. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +40 -0
  718. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js.map +1 -0
  719. package/esm/resources/V2/MoneyManagement/FinancialAddresses.d.ts +215 -0
  720. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +27 -0
  721. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js.map +1 -0
  722. package/esm/resources/V2/MoneyManagement/InboundTransfers.d.ts +254 -0
  723. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +26 -0
  724. package/esm/resources/V2/MoneyManagement/InboundTransfers.js.map +1 -0
  725. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +212 -0
  726. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +18 -0
  727. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js.map +1 -0
  728. package/esm/resources/V2/MoneyManagement/OutboundPayments.d.ts +388 -0
  729. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +37 -0
  730. package/esm/resources/V2/MoneyManagement/OutboundPayments.js.map +1 -0
  731. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.d.ts +300 -0
  732. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +45 -0
  733. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js.map +1 -0
  734. package/esm/resources/V2/MoneyManagement/OutboundTransfers.d.ts +330 -0
  735. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +35 -0
  736. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js.map +1 -0
  737. package/esm/resources/V2/MoneyManagement/PayoutMethods.d.ts +243 -0
  738. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +40 -0
  739. package/esm/resources/V2/MoneyManagement/PayoutMethods.js.map +1 -0
  740. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +96 -0
  741. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +13 -0
  742. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js.map +1 -0
  743. package/esm/resources/V2/MoneyManagement/ReceivedCredits.d.ts +295 -0
  744. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +19 -0
  745. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js.map +1 -0
  746. package/esm/resources/V2/MoneyManagement/ReceivedDebits.d.ts +161 -0
  747. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +19 -0
  748. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js.map +1 -0
  749. package/esm/resources/V2/MoneyManagement/TransactionEntries.d.ts +165 -0
  750. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +19 -0
  751. package/esm/resources/V2/MoneyManagement/TransactionEntries.js.map +1 -0
  752. package/esm/resources/V2/MoneyManagement/Transactions.d.ts +196 -0
  753. package/esm/resources/V2/MoneyManagement/Transactions.js +19 -0
  754. package/esm/resources/V2/MoneyManagement/Transactions.js.map +1 -0
  755. package/esm/resources/V2/MoneyManagement/index.d.ts +104 -0
  756. package/esm/resources/V2/MoneyManagement/index.js +35 -0
  757. package/esm/resources/V2/MoneyManagement/index.js.map +1 -0
  758. package/esm/resources/V2/Network/BusinessProfiles.d.ts +96 -0
  759. package/esm/resources/V2/Network/BusinessProfiles.js +17 -0
  760. package/esm/resources/V2/Network/BusinessProfiles.js.map +1 -0
  761. package/esm/resources/V2/Network/index.d.ts +13 -0
  762. package/esm/resources/V2/Network/index.js +9 -0
  763. package/esm/resources/V2/Network/index.js.map +1 -0
  764. package/esm/resources/V2/OrchestratedCommerce/Agreements.d.ts +147 -0
  765. package/esm/resources/V2/OrchestratedCommerce/Agreements.js +37 -0
  766. package/esm/resources/V2/OrchestratedCommerce/Agreements.js.map +1 -0
  767. package/esm/resources/V2/OrchestratedCommerce/index.d.ts +16 -0
  768. package/esm/resources/V2/OrchestratedCommerce/index.js +9 -0
  769. package/esm/resources/V2/OrchestratedCommerce/index.js.map +1 -0
  770. package/esm/resources/V2/TestHelpers/FinancialAddresses.d.ts +44 -0
  771. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +19 -0
  772. package/esm/resources/V2/TestHelpers/FinancialAddresses.js.map +1 -0
  773. package/esm/resources/V2/TestHelpers/index.d.ts +8 -0
  774. package/esm/resources/V2/TestHelpers/index.js +9 -0
  775. package/esm/resources/V2/TestHelpers/index.js.map +1 -0
  776. package/esm/resources/V2/index.d.ts +27 -0
  777. package/esm/resources/V2/index.js +14 -0
  778. package/esm/resources/V2/index.js.map +1 -1
  779. package/esm/resources/WebhookEndpoints.d.ts +2 -2
  780. package/esm/resources.d.ts +10 -0
  781. package/esm/resources.js +131 -0
  782. package/esm/resources.js.map +1 -1
  783. package/esm/stripe.core.d.ts +61 -24
  784. package/esm/stripe.core.js +25 -1
  785. package/esm/stripe.core.js.map +1 -1
  786. package/esm/stripe.esm.node.d.ts +62 -24
  787. package/esm/stripe.esm.node.js +25 -1
  788. package/esm/stripe.esm.node.js.map +1 -1
  789. package/package.json +1 -1
@@ -10,6 +10,7 @@ import { Price, DeletedPrice } from './Prices.js';
10
10
  import { Coupon } from './Coupons.js';
11
11
  import { PromotionCode } from './PromotionCodes.js';
12
12
  import { Plan, DeletedPlan } from './Plans.js';
13
+ import { Invoice } from './Invoices.js';
13
14
  import * as TestHelpers from './TestHelpers/index.js';
14
15
  import { Emptyable, MetadataParam, Decimal, PaginationParams, RangeQueryParam, Metadata } from '../shared.js';
15
16
  import { RequestOptions, ApiListPromise, Response } from '../lib.js';
@@ -30,6 +31,10 @@ export declare class SubscriptionScheduleResource extends StripeResource {
30
31
  * Updates an existing subscription schedule.
31
32
  */
32
33
  update(id: string, params?: SubscriptionScheduleUpdateParams, options?: RequestOptions): Promise<Response<SubscriptionSchedule>>;
34
+ /**
35
+ * Amends an existing subscription schedule.
36
+ */
37
+ amend(id: string, params?: SubscriptionScheduleAmendParams, options?: RequestOptions): Promise<Response<SubscriptionSchedule>>;
33
38
  /**
34
39
  * Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
35
40
  */
@@ -52,6 +57,10 @@ export interface SubscriptionSchedule {
52
57
  * ID of the Connect Application that created the schedule.
53
58
  */
54
59
  application: string | Application | DeletedApplication | null;
60
+ /**
61
+ * 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.
62
+ */
63
+ billing_behavior?: SubscriptionSchedule.BillingBehavior;
55
64
  /**
56
65
  * The billing mode of the subscription.
57
66
  */
@@ -85,6 +94,10 @@ export interface SubscriptionSchedule {
85
94
  * Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
86
95
  */
87
96
  end_behavior: SubscriptionSchedule.EndBehavior;
97
+ /**
98
+ * Details of the most recent price migration that failed for the subscription schedule.
99
+ */
100
+ last_price_migration_error?: SubscriptionSchedule.LastPriceMigrationError | null;
88
101
  /**
89
102
  * If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
90
103
  */
@@ -97,6 +110,10 @@ export interface SubscriptionSchedule {
97
110
  * Configuration for the subscription schedule's phases.
98
111
  */
99
112
  phases: Array<SubscriptionSchedule.Phase>;
113
+ /**
114
+ * Time period and invoice for a Subscription billed in advance.
115
+ */
116
+ prebilling?: SubscriptionSchedule.Prebilling | null;
100
117
  /**
101
118
  * Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
102
119
  */
@@ -119,6 +136,7 @@ export interface SubscriptionSchedule {
119
136
  test_clock: string | TestHelpers.TestClock | null;
120
137
  }
121
138
  export declare namespace SubscriptionSchedule {
139
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
122
140
  interface BillingMode {
123
141
  /**
124
142
  * Configure behavior for flexible billing mode
@@ -180,6 +198,20 @@ export declare namespace SubscriptionSchedule {
180
198
  transfer_data: DefaultSettings.TransferData | null;
181
199
  }
182
200
  type EndBehavior = 'cancel' | 'none' | 'release' | 'renew';
201
+ interface LastPriceMigrationError {
202
+ /**
203
+ * The time at which the price migration encountered an error.
204
+ */
205
+ errored_at: number;
206
+ /**
207
+ * The involved price pairs in each failed transition.
208
+ */
209
+ failed_transitions: Array<LastPriceMigrationError.FailedTransition>;
210
+ /**
211
+ * The type of error encountered by the price migration.
212
+ */
213
+ type: 'price_uniqueness_violation';
214
+ }
183
215
  interface Phase {
184
216
  /**
185
217
  * A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
@@ -242,6 +274,10 @@ export declare namespace SubscriptionSchedule {
242
274
  * The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
243
275
  */
244
276
  on_behalf_of: string | Account | null;
277
+ /**
278
+ * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment).
279
+ */
280
+ pause_collection?: Phase.PauseCollection | null;
245
281
  /**
246
282
  * When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
247
283
  */
@@ -254,10 +290,36 @@ export declare namespace SubscriptionSchedule {
254
290
  * The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
255
291
  */
256
292
  transfer_data: Phase.TransferData | null;
293
+ /**
294
+ * Specify behavior of the trial when crossing schedule phase boundaries
295
+ */
296
+ trial_continuation?: Phase.TrialContinuation | null;
257
297
  /**
258
298
  * When the trial ends within the phase.
259
299
  */
260
300
  trial_end: number | null;
301
+ /**
302
+ * Settings related to any trials on the subscription during this phase.
303
+ */
304
+ trial_settings?: Phase.TrialSettings | null;
305
+ }
306
+ interface Prebilling {
307
+ /**
308
+ * ID of the prebilling invoice.
309
+ */
310
+ invoice: string | Invoice;
311
+ /**
312
+ * The end of the last period for which the invoice pre-bills.
313
+ */
314
+ period_end: number;
315
+ /**
316
+ * The start of the first period for which the invoice pre-bills.
317
+ */
318
+ period_start: number;
319
+ /**
320
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
321
+ */
322
+ update_behavior?: Prebilling.UpdateBehavior;
261
323
  }
262
324
  type Status = 'active' | 'canceled' | 'completed' | 'not_started' | 'released';
263
325
  namespace BillingMode {
@@ -351,6 +413,18 @@ export declare namespace SubscriptionSchedule {
351
413
  }
352
414
  }
353
415
  }
416
+ namespace LastPriceMigrationError {
417
+ interface FailedTransition {
418
+ /**
419
+ * The original price to be migrated.
420
+ */
421
+ source_price: string;
422
+ /**
423
+ * The intended resulting price of the migration.
424
+ */
425
+ target_price: string;
426
+ }
427
+ }
354
428
  namespace Phase {
355
429
  interface AddInvoiceItem {
356
430
  /**
@@ -414,6 +488,10 @@ export declare namespace SubscriptionSchedule {
414
488
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
415
489
  */
416
490
  discount: string | Discount | null;
491
+ /**
492
+ * Details to determine how long the discount should be applied for.
493
+ */
494
+ discount_end?: Discount.DiscountEnd | null;
417
495
  /**
418
496
  * ID of the promotion code to create a new discount for.
419
497
  */
@@ -462,6 +540,20 @@ export declare namespace SubscriptionSchedule {
462
540
  * The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.
463
541
  */
464
542
  tax_rates?: Array<TaxRate> | null;
543
+ /**
544
+ * Options that configure the trial on the subscription item.
545
+ */
546
+ trial?: Item.Trial | null;
547
+ /**
548
+ * The ID of the trial offer to apply to the configuration item.
549
+ */
550
+ trial_offer?: string | null;
551
+ }
552
+ interface PauseCollection {
553
+ /**
554
+ * The payment collection behavior for this subscription while paused.
555
+ */
556
+ behavior: PauseCollection.Behavior;
465
557
  }
466
558
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
467
559
  interface TransferData {
@@ -474,6 +566,13 @@ export declare namespace SubscriptionSchedule {
474
566
  */
475
567
  destination: string | Account;
476
568
  }
569
+ type TrialContinuation = 'continue' | 'none';
570
+ interface TrialSettings {
571
+ /**
572
+ * Defines how the subscription should behave when a trial ends.
573
+ */
574
+ end_behavior: TrialSettings.EndBehavior | null;
575
+ }
477
576
  namespace AddInvoiceItem {
478
577
  interface Discount {
479
578
  /**
@@ -484,6 +583,10 @@ export declare namespace SubscriptionSchedule {
484
583
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
485
584
  */
486
585
  discount: string | Discount | null;
586
+ /**
587
+ * Details to determine how long the discount should be applied for.
588
+ */
589
+ discount_end?: Discount.DiscountEnd | null;
487
590
  /**
488
591
  * ID of the promotion code to create a new discount for.
489
592
  */
@@ -493,6 +596,18 @@ export declare namespace SubscriptionSchedule {
493
596
  end: Period.End;
494
597
  start: Period.Start;
495
598
  }
599
+ namespace Discount {
600
+ interface DiscountEnd {
601
+ /**
602
+ * The discount end timestamp.
603
+ */
604
+ timestamp: number | null;
605
+ /**
606
+ * The discount end type.
607
+ */
608
+ type: 'timestamp';
609
+ }
610
+ }
496
611
  namespace Period {
497
612
  interface End {
498
613
  /**
@@ -537,6 +652,18 @@ export declare namespace SubscriptionSchedule {
537
652
  type Type = 'account' | 'self';
538
653
  }
539
654
  }
655
+ namespace Discount {
656
+ interface DiscountEnd {
657
+ /**
658
+ * The discount end timestamp.
659
+ */
660
+ timestamp: number | null;
661
+ /**
662
+ * The discount end type.
663
+ */
664
+ type: 'timestamp';
665
+ }
666
+ }
540
667
  namespace InvoiceSettings {
541
668
  interface Issuer {
542
669
  /**
@@ -568,15 +695,65 @@ export declare namespace SubscriptionSchedule {
568
695
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
569
696
  */
570
697
  discount: string | Discount | null;
698
+ /**
699
+ * Details to determine how long the discount should be applied for.
700
+ */
701
+ discount_end?: Discount.DiscountEnd | null;
571
702
  /**
572
703
  * ID of the promotion code to create a new discount for.
573
704
  */
574
705
  promotion_code: string | PromotionCode | null;
575
706
  }
707
+ interface Trial {
708
+ /**
709
+ * List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
710
+ */
711
+ converts_to?: Array<string> | null;
712
+ /**
713
+ * Determines the type of trial for this item.
714
+ */
715
+ type: Trial.Type;
716
+ }
717
+ namespace Discount {
718
+ interface DiscountEnd {
719
+ /**
720
+ * The discount end timestamp.
721
+ */
722
+ timestamp: number | null;
723
+ /**
724
+ * The discount end type.
725
+ */
726
+ type: 'timestamp';
727
+ }
728
+ }
729
+ namespace Trial {
730
+ type Type = 'free' | 'paid';
731
+ }
732
+ }
733
+ namespace PauseCollection {
734
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
735
+ }
736
+ namespace TrialSettings {
737
+ interface EndBehavior {
738
+ /**
739
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
740
+ */
741
+ prorate_up_front: EndBehavior.ProrateUpFront | null;
742
+ }
743
+ namespace EndBehavior {
744
+ type ProrateUpFront = 'defer' | 'include';
745
+ }
576
746
  }
577
747
  }
748
+ namespace Prebilling {
749
+ type UpdateBehavior = 'prebill' | 'reset';
750
+ }
578
751
  }
579
752
  export interface SubscriptionScheduleCreateParams {
753
+ /**
754
+ * 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.
755
+ */
756
+ billing_behavior?: SubscriptionScheduleCreateParams.BillingBehavior;
580
757
  /**
581
758
  * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
582
759
  */
@@ -613,12 +790,17 @@ export interface SubscriptionScheduleCreateParams {
613
790
  * List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
614
791
  */
615
792
  phases?: Array<SubscriptionScheduleCreateParams.Phase>;
793
+ /**
794
+ * If specified, the invoicing for the given billing cycle iterations will be processed now.
795
+ */
796
+ prebilling?: SubscriptionScheduleCreateParams.Prebilling;
616
797
  /**
617
798
  * When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
618
799
  */
619
800
  start_date?: number | 'now';
620
801
  }
621
802
  export declare namespace SubscriptionScheduleCreateParams {
803
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
622
804
  interface BillingMode {
623
805
  /**
624
806
  * Configure behavior for flexible billing mode.
@@ -741,6 +923,10 @@ export declare namespace SubscriptionScheduleCreateParams {
741
923
  * The account on behalf of which to charge, for each of the associated subscription's invoices.
742
924
  */
743
925
  on_behalf_of?: string;
926
+ /**
927
+ * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment).
928
+ */
929
+ pause_collection?: Phase.PauseCollection;
744
930
  /**
745
931
  * Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
746
932
  */
@@ -753,10 +939,28 @@ export declare namespace SubscriptionScheduleCreateParams {
753
939
  * If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
754
940
  */
755
941
  trial?: boolean;
942
+ /**
943
+ * Specify trial behavior when crossing phase boundaries
944
+ */
945
+ trial_continuation?: Phase.TrialContinuation;
756
946
  /**
757
947
  * Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
758
948
  */
759
949
  trial_end?: number;
950
+ /**
951
+ * Settings related to subscription trials.
952
+ */
953
+ trial_settings?: Phase.TrialSettings;
954
+ }
955
+ interface Prebilling {
956
+ /**
957
+ * This is used to determine the number of billing cycles to prebill.
958
+ */
959
+ iterations: number;
960
+ /**
961
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
962
+ */
963
+ update_behavior?: Prebilling.UpdateBehavior;
760
964
  }
761
965
  namespace BillingMode {
762
966
  interface Flexible {
@@ -914,6 +1118,10 @@ export declare namespace SubscriptionScheduleCreateParams {
914
1118
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
915
1119
  */
916
1120
  discount?: string;
1121
+ /**
1122
+ * Details to determine how long the discount should be applied for.
1123
+ */
1124
+ discount_end?: Discount.DiscountEnd;
917
1125
  /**
918
1126
  * ID of the promotion code to create a new discount for.
919
1127
  */
@@ -976,6 +1184,20 @@ export declare namespace SubscriptionScheduleCreateParams {
976
1184
  * A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
977
1185
  */
978
1186
  tax_rates?: Emptyable<Array<string>>;
1187
+ /**
1188
+ * Options that configure the trial on the subscription item.
1189
+ */
1190
+ trial?: Item.Trial;
1191
+ /**
1192
+ * The ID of the trial offer to apply to the configuration item.
1193
+ */
1194
+ trial_offer?: string;
1195
+ }
1196
+ interface PauseCollection {
1197
+ /**
1198
+ * The payment collection behavior for this subscription while paused.
1199
+ */
1200
+ behavior: PauseCollection.Behavior;
979
1201
  }
980
1202
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
981
1203
  interface TransferData {
@@ -988,6 +1210,13 @@ export declare namespace SubscriptionScheduleCreateParams {
988
1210
  */
989
1211
  destination: string;
990
1212
  }
1213
+ type TrialContinuation = 'continue' | 'none';
1214
+ interface TrialSettings {
1215
+ /**
1216
+ * Defines how the subscription should behave when a trial ends.
1217
+ */
1218
+ end_behavior?: TrialSettings.EndBehavior;
1219
+ }
991
1220
  namespace AddInvoiceItem {
992
1221
  interface Discount {
993
1222
  /**
@@ -998,6 +1227,10 @@ export declare namespace SubscriptionScheduleCreateParams {
998
1227
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
999
1228
  */
1000
1229
  discount?: string;
1230
+ /**
1231
+ * Details to determine how long the discount should be applied for.
1232
+ */
1233
+ discount_end?: Discount.DiscountEnd;
1001
1234
  /**
1002
1235
  * ID of the promotion code to create a new discount for.
1003
1236
  */
@@ -1035,6 +1268,38 @@ export declare namespace SubscriptionScheduleCreateParams {
1035
1268
  */
1036
1269
  unit_amount_decimal?: Decimal;
1037
1270
  }
1271
+ namespace Discount {
1272
+ interface DiscountEnd {
1273
+ /**
1274
+ * Time span for the redeemed discount.
1275
+ */
1276
+ duration?: DiscountEnd.Duration;
1277
+ /**
1278
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1279
+ */
1280
+ timestamp?: number;
1281
+ /**
1282
+ * The type of calculation made to determine when the discount ends.
1283
+ */
1284
+ type: DiscountEnd.Type;
1285
+ }
1286
+ namespace DiscountEnd {
1287
+ interface Duration {
1288
+ /**
1289
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1290
+ */
1291
+ interval: Duration.Interval;
1292
+ /**
1293
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1294
+ */
1295
+ interval_count: number;
1296
+ }
1297
+ type Type = 'duration' | 'timestamp';
1298
+ namespace Duration {
1299
+ type Interval = 'day' | 'month' | 'week' | 'year';
1300
+ }
1301
+ }
1302
+ }
1038
1303
  namespace Period {
1039
1304
  interface End {
1040
1305
  /**
@@ -1082,6 +1347,38 @@ export declare namespace SubscriptionScheduleCreateParams {
1082
1347
  type Type = 'account' | 'self';
1083
1348
  }
1084
1349
  }
1350
+ namespace Discount {
1351
+ interface DiscountEnd {
1352
+ /**
1353
+ * Time span for the redeemed discount.
1354
+ */
1355
+ duration?: DiscountEnd.Duration;
1356
+ /**
1357
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1358
+ */
1359
+ timestamp?: number;
1360
+ /**
1361
+ * The type of calculation made to determine when the discount ends.
1362
+ */
1363
+ type: DiscountEnd.Type;
1364
+ }
1365
+ namespace DiscountEnd {
1366
+ interface Duration {
1367
+ /**
1368
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1369
+ */
1370
+ interval: Duration.Interval;
1371
+ /**
1372
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1373
+ */
1374
+ interval_count: number;
1375
+ }
1376
+ type Type = 'duration' | 'timestamp';
1377
+ namespace Duration {
1378
+ type Interval = 'day' | 'month' | 'week' | 'year';
1379
+ }
1380
+ }
1381
+ }
1085
1382
  namespace Duration {
1086
1383
  type Interval = 'day' | 'month' | 'week' | 'year';
1087
1384
  }
@@ -1116,6 +1413,10 @@ export declare namespace SubscriptionScheduleCreateParams {
1116
1413
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
1117
1414
  */
1118
1415
  discount?: string;
1416
+ /**
1417
+ * Details to determine how long the discount should be applied for.
1418
+ */
1419
+ discount_end?: Discount.DiscountEnd;
1119
1420
  /**
1120
1421
  * ID of the promotion code to create a new discount for.
1121
1422
  */
@@ -1147,6 +1448,48 @@ export declare namespace SubscriptionScheduleCreateParams {
1147
1448
  */
1148
1449
  unit_amount_decimal?: Decimal;
1149
1450
  }
1451
+ interface Trial {
1452
+ /**
1453
+ * 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.
1454
+ */
1455
+ converts_to?: Array<string>;
1456
+ /**
1457
+ * Determines the type of trial for this item.
1458
+ */
1459
+ type: Trial.Type;
1460
+ }
1461
+ namespace Discount {
1462
+ interface DiscountEnd {
1463
+ /**
1464
+ * Time span for the redeemed discount.
1465
+ */
1466
+ duration?: DiscountEnd.Duration;
1467
+ /**
1468
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1469
+ */
1470
+ timestamp?: number;
1471
+ /**
1472
+ * The type of calculation made to determine when the discount ends.
1473
+ */
1474
+ type: DiscountEnd.Type;
1475
+ }
1476
+ namespace DiscountEnd {
1477
+ interface Duration {
1478
+ /**
1479
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1480
+ */
1481
+ interval: Duration.Interval;
1482
+ /**
1483
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1484
+ */
1485
+ interval_count: number;
1486
+ }
1487
+ type Type = 'duration' | 'timestamp';
1488
+ namespace Duration {
1489
+ type Interval = 'day' | 'month' | 'week' | 'year';
1490
+ }
1491
+ }
1492
+ }
1150
1493
  namespace PriceData {
1151
1494
  interface Recurring {
1152
1495
  /**
@@ -1163,8 +1506,28 @@ export declare namespace SubscriptionScheduleCreateParams {
1163
1506
  type Interval = 'day' | 'month' | 'week' | 'year';
1164
1507
  }
1165
1508
  }
1509
+ namespace Trial {
1510
+ type Type = 'free' | 'paid';
1511
+ }
1512
+ }
1513
+ namespace PauseCollection {
1514
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
1515
+ }
1516
+ namespace TrialSettings {
1517
+ interface EndBehavior {
1518
+ /**
1519
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1520
+ */
1521
+ prorate_up_front?: EndBehavior.ProrateUpFront;
1522
+ }
1523
+ namespace EndBehavior {
1524
+ type ProrateUpFront = 'defer' | 'include';
1525
+ }
1166
1526
  }
1167
1527
  }
1528
+ namespace Prebilling {
1529
+ type UpdateBehavior = 'prebill' | 'reset';
1530
+ }
1168
1531
  }
1169
1532
  export interface SubscriptionScheduleRetrieveParams {
1170
1533
  /**
@@ -1173,6 +1536,10 @@ export interface SubscriptionScheduleRetrieveParams {
1173
1536
  expand?: Array<string>;
1174
1537
  }
1175
1538
  export interface SubscriptionScheduleUpdateParams {
1539
+ /**
1540
+ * 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.
1541
+ */
1542
+ billing_behavior?: SubscriptionScheduleUpdateParams.BillingBehavior;
1176
1543
  /**
1177
1544
  * Object representing the subscription schedule's default settings.
1178
1545
  */
@@ -1193,12 +1560,17 @@ export interface SubscriptionScheduleUpdateParams {
1193
1560
  * List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
1194
1561
  */
1195
1562
  phases?: Array<SubscriptionScheduleUpdateParams.Phase>;
1563
+ /**
1564
+ * If specified, the invoicing for the given billing cycle iterations will be processed now.
1565
+ */
1566
+ prebilling?: SubscriptionScheduleUpdateParams.Prebilling;
1196
1567
  /**
1197
1568
  * If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
1198
1569
  */
1199
1570
  proration_behavior?: SubscriptionScheduleUpdateParams.ProrationBehavior;
1200
1571
  }
1201
1572
  export declare namespace SubscriptionScheduleUpdateParams {
1573
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
1202
1574
  interface DefaultSettings {
1203
1575
  /**
1204
1576
  * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
@@ -1311,6 +1683,10 @@ export declare namespace SubscriptionScheduleUpdateParams {
1311
1683
  * The account on behalf of which to charge, for each of the associated subscription's invoices.
1312
1684
  */
1313
1685
  on_behalf_of?: string;
1686
+ /**
1687
+ * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment).
1688
+ */
1689
+ pause_collection?: Phase.PauseCollection;
1314
1690
  /**
1315
1691
  * Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
1316
1692
  */
@@ -1327,10 +1703,28 @@ export declare namespace SubscriptionScheduleUpdateParams {
1327
1703
  * If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1328
1704
  */
1329
1705
  trial?: boolean;
1706
+ /**
1707
+ * Specify trial behavior when crossing phase boundaries
1708
+ */
1709
+ trial_continuation?: Phase.TrialContinuation;
1330
1710
  /**
1331
1711
  * Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
1332
1712
  */
1333
1713
  trial_end?: number | 'now';
1714
+ /**
1715
+ * Settings related to subscription trials.
1716
+ */
1717
+ trial_settings?: Phase.TrialSettings;
1718
+ }
1719
+ interface Prebilling {
1720
+ /**
1721
+ * This is used to determine the number of billing cycles to prebill.
1722
+ */
1723
+ iterations: number;
1724
+ /**
1725
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1726
+ */
1727
+ update_behavior?: Prebilling.UpdateBehavior;
1334
1728
  }
1335
1729
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
1336
1730
  namespace DefaultSettings {
@@ -1477,6 +1871,10 @@ export declare namespace SubscriptionScheduleUpdateParams {
1477
1871
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
1478
1872
  */
1479
1873
  discount?: string;
1874
+ /**
1875
+ * Details to determine how long the discount should be applied for.
1876
+ */
1877
+ discount_end?: Discount.DiscountEnd;
1480
1878
  /**
1481
1879
  * ID of the promotion code to create a new discount for.
1482
1880
  */
@@ -1539,6 +1937,20 @@ export declare namespace SubscriptionScheduleUpdateParams {
1539
1937
  * A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
1540
1938
  */
1541
1939
  tax_rates?: Emptyable<Array<string>>;
1940
+ /**
1941
+ * Options that configure the trial on the subscription item.
1942
+ */
1943
+ trial?: Item.Trial;
1944
+ /**
1945
+ * The ID of the trial offer to apply to the configuration item.
1946
+ */
1947
+ trial_offer?: string;
1948
+ }
1949
+ interface PauseCollection {
1950
+ /**
1951
+ * The payment collection behavior for this subscription while paused.
1952
+ */
1953
+ behavior: PauseCollection.Behavior;
1542
1954
  }
1543
1955
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
1544
1956
  interface TransferData {
@@ -1551,6 +1963,13 @@ export declare namespace SubscriptionScheduleUpdateParams {
1551
1963
  */
1552
1964
  destination: string;
1553
1965
  }
1966
+ type TrialContinuation = 'continue' | 'none';
1967
+ interface TrialSettings {
1968
+ /**
1969
+ * Defines how the subscription should behave when a trial ends.
1970
+ */
1971
+ end_behavior?: TrialSettings.EndBehavior;
1972
+ }
1554
1973
  namespace AddInvoiceItem {
1555
1974
  interface Discount {
1556
1975
  /**
@@ -1561,6 +1980,10 @@ export declare namespace SubscriptionScheduleUpdateParams {
1561
1980
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
1562
1981
  */
1563
1982
  discount?: string;
1983
+ /**
1984
+ * Details to determine how long the discount should be applied for.
1985
+ */
1986
+ discount_end?: Discount.DiscountEnd;
1564
1987
  /**
1565
1988
  * ID of the promotion code to create a new discount for.
1566
1989
  */
@@ -1598,6 +2021,38 @@ export declare namespace SubscriptionScheduleUpdateParams {
1598
2021
  */
1599
2022
  unit_amount_decimal?: Decimal;
1600
2023
  }
2024
+ namespace Discount {
2025
+ interface DiscountEnd {
2026
+ /**
2027
+ * Time span for the redeemed discount.
2028
+ */
2029
+ duration?: DiscountEnd.Duration;
2030
+ /**
2031
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2032
+ */
2033
+ timestamp?: number;
2034
+ /**
2035
+ * The type of calculation made to determine when the discount ends.
2036
+ */
2037
+ type: DiscountEnd.Type;
2038
+ }
2039
+ namespace DiscountEnd {
2040
+ interface Duration {
2041
+ /**
2042
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2043
+ */
2044
+ interval: Duration.Interval;
2045
+ /**
2046
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2047
+ */
2048
+ interval_count: number;
2049
+ }
2050
+ type Type = 'duration' | 'timestamp';
2051
+ namespace Duration {
2052
+ type Interval = 'day' | 'month' | 'week' | 'year';
2053
+ }
2054
+ }
2055
+ }
1601
2056
  namespace Period {
1602
2057
  interface End {
1603
2058
  /**
@@ -1645,6 +2100,38 @@ export declare namespace SubscriptionScheduleUpdateParams {
1645
2100
  type Type = 'account' | 'self';
1646
2101
  }
1647
2102
  }
2103
+ namespace Discount {
2104
+ interface DiscountEnd {
2105
+ /**
2106
+ * Time span for the redeemed discount.
2107
+ */
2108
+ duration?: DiscountEnd.Duration;
2109
+ /**
2110
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2111
+ */
2112
+ timestamp?: number;
2113
+ /**
2114
+ * The type of calculation made to determine when the discount ends.
2115
+ */
2116
+ type: DiscountEnd.Type;
2117
+ }
2118
+ namespace DiscountEnd {
2119
+ interface Duration {
2120
+ /**
2121
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2122
+ */
2123
+ interval: Duration.Interval;
2124
+ /**
2125
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2126
+ */
2127
+ interval_count: number;
2128
+ }
2129
+ type Type = 'duration' | 'timestamp';
2130
+ namespace Duration {
2131
+ type Interval = 'day' | 'month' | 'week' | 'year';
2132
+ }
2133
+ }
2134
+ }
1648
2135
  namespace Duration {
1649
2136
  type Interval = 'day' | 'month' | 'week' | 'year';
1650
2137
  }
@@ -1679,6 +2166,10 @@ export declare namespace SubscriptionScheduleUpdateParams {
1679
2166
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
1680
2167
  */
1681
2168
  discount?: string;
2169
+ /**
2170
+ * Details to determine how long the discount should be applied for.
2171
+ */
2172
+ discount_end?: Discount.DiscountEnd;
1682
2173
  /**
1683
2174
  * ID of the promotion code to create a new discount for.
1684
2175
  */
@@ -1710,6 +2201,48 @@ export declare namespace SubscriptionScheduleUpdateParams {
1710
2201
  */
1711
2202
  unit_amount_decimal?: Decimal;
1712
2203
  }
2204
+ interface Trial {
2205
+ /**
2206
+ * 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.
2207
+ */
2208
+ converts_to?: Array<string>;
2209
+ /**
2210
+ * Determines the type of trial for this item.
2211
+ */
2212
+ type: Trial.Type;
2213
+ }
2214
+ namespace Discount {
2215
+ interface DiscountEnd {
2216
+ /**
2217
+ * Time span for the redeemed discount.
2218
+ */
2219
+ duration?: DiscountEnd.Duration;
2220
+ /**
2221
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2222
+ */
2223
+ timestamp?: number;
2224
+ /**
2225
+ * The type of calculation made to determine when the discount ends.
2226
+ */
2227
+ type: DiscountEnd.Type;
2228
+ }
2229
+ namespace DiscountEnd {
2230
+ interface Duration {
2231
+ /**
2232
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2233
+ */
2234
+ interval: Duration.Interval;
2235
+ /**
2236
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2237
+ */
2238
+ interval_count: number;
2239
+ }
2240
+ type Type = 'duration' | 'timestamp';
2241
+ namespace Duration {
2242
+ type Interval = 'day' | 'month' | 'week' | 'year';
2243
+ }
2244
+ }
2245
+ }
1713
2246
  namespace PriceData {
1714
2247
  interface Recurring {
1715
2248
  /**
@@ -1726,8 +2259,28 @@ export declare namespace SubscriptionScheduleUpdateParams {
1726
2259
  type Interval = 'day' | 'month' | 'week' | 'year';
1727
2260
  }
1728
2261
  }
2262
+ namespace Trial {
2263
+ type Type = 'free' | 'paid';
2264
+ }
2265
+ }
2266
+ namespace PauseCollection {
2267
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
2268
+ }
2269
+ namespace TrialSettings {
2270
+ interface EndBehavior {
2271
+ /**
2272
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2273
+ */
2274
+ prorate_up_front?: EndBehavior.ProrateUpFront;
2275
+ }
2276
+ namespace EndBehavior {
2277
+ type ProrateUpFront = 'defer' | 'include';
2278
+ }
1729
2279
  }
1730
2280
  }
2281
+ namespace Prebilling {
2282
+ type UpdateBehavior = 'prebill' | 'reset';
2283
+ }
1731
2284
  }
1732
2285
  export interface SubscriptionScheduleListParams extends PaginationParams {
1733
2286
  /**
@@ -1763,6 +2316,605 @@ export interface SubscriptionScheduleListParams extends PaginationParams {
1763
2316
  */
1764
2317
  scheduled?: boolean;
1765
2318
  }
2319
+ export interface SubscriptionScheduleAmendParams {
2320
+ /**
2321
+ * Changes to apply to the phases of the subscription schedule, in the order provided.
2322
+ */
2323
+ amendments?: Array<SubscriptionScheduleAmendParams.Amendment>;
2324
+ /**
2325
+ * Specifies which fields in the response should be expanded.
2326
+ */
2327
+ expand?: Array<string>;
2328
+ /**
2329
+ * Provide any time periods to bill in advance.
2330
+ */
2331
+ prebilling?: Emptyable<Array<SubscriptionScheduleAmendParams.Prebilling>>;
2332
+ /**
2333
+ * In cases where the amendment changes the currently active phase,
2334
+ * specifies if and how to prorate at the time of the request.
2335
+ */
2336
+ proration_behavior?: SubscriptionScheduleAmendParams.ProrationBehavior;
2337
+ /**
2338
+ * Changes to apply to the subscription schedule.
2339
+ */
2340
+ schedule_settings?: SubscriptionScheduleAmendParams.ScheduleSettings;
2341
+ }
2342
+ export declare namespace SubscriptionScheduleAmendParams {
2343
+ interface Amendment {
2344
+ /**
2345
+ * Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
2346
+ */
2347
+ amendment_end?: Amendment.AmendmentEnd;
2348
+ /**
2349
+ * Details to identify the earliest timestamp where the proposed change should take effect.
2350
+ */
2351
+ amendment_start: Amendment.AmendmentStart;
2352
+ /**
2353
+ * For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
2354
+ */
2355
+ billing_cycle_anchor?: Amendment.BillingCycleAnchor;
2356
+ /**
2357
+ * Changes to the coupons being redeemed or discounts being applied during the amendment time span.
2358
+ */
2359
+ discount_actions?: Array<Amendment.DiscountAction>;
2360
+ /**
2361
+ * Changes to the subscription items during the amendment time span.
2362
+ */
2363
+ item_actions?: Array<Amendment.ItemAction>;
2364
+ /**
2365
+ * Instructions for how to modify phase metadata
2366
+ */
2367
+ metadata_actions?: Array<Amendment.MetadataAction>;
2368
+ /**
2369
+ * Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
2370
+ */
2371
+ proration_behavior?: Amendment.ProrationBehavior;
2372
+ /**
2373
+ * Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2374
+ */
2375
+ set_pause_collection?: Amendment.SetPauseCollection;
2376
+ /**
2377
+ * Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2378
+ */
2379
+ set_schedule_end?: Amendment.SetScheduleEnd;
2380
+ /**
2381
+ * Settings related to subscription trials.
2382
+ */
2383
+ trial_settings?: Amendment.TrialSettings;
2384
+ }
2385
+ interface Prebilling {
2386
+ /**
2387
+ * The beginning of the prebilled time period. The default value is `now`.
2388
+ */
2389
+ bill_from?: Prebilling.BillFrom;
2390
+ /**
2391
+ * The end of the prebilled time period.
2392
+ */
2393
+ bill_until?: Prebilling.BillUntil;
2394
+ /**
2395
+ * When the prebilling invoice should be created. The default value is `now`.
2396
+ */
2397
+ invoice_at?: 'now';
2398
+ /**
2399
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2400
+ */
2401
+ update_behavior?: Prebilling.UpdateBehavior;
2402
+ }
2403
+ type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
2404
+ interface ScheduleSettings {
2405
+ /**
2406
+ * Behavior of the subscription schedule and underlying subscription when it ends.
2407
+ */
2408
+ end_behavior?: ScheduleSettings.EndBehavior;
2409
+ }
2410
+ namespace Amendment {
2411
+ interface AmendmentEnd {
2412
+ /**
2413
+ * Use the `end` time of a given discount.
2414
+ */
2415
+ discount_end?: AmendmentEnd.DiscountEnd;
2416
+ /**
2417
+ * Time span for the amendment starting from the `amendment_start`.
2418
+ */
2419
+ duration?: AmendmentEnd.Duration;
2420
+ /**
2421
+ * A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
2422
+ */
2423
+ timestamp?: number;
2424
+ /**
2425
+ * Select one of three ways to pass the `amendment_end`.
2426
+ */
2427
+ type: AmendmentEnd.Type;
2428
+ }
2429
+ interface AmendmentStart {
2430
+ /**
2431
+ * Details of another amendment in the same array, immediately after which this amendment should begin.
2432
+ */
2433
+ amendment_end?: AmendmentStart.AmendmentEnd;
2434
+ /**
2435
+ * Use the `end` time of a given discount.
2436
+ */
2437
+ discount_end?: AmendmentStart.DiscountEnd;
2438
+ /**
2439
+ * A precise Unix timestamp for the amendment to start.
2440
+ */
2441
+ timestamp?: number;
2442
+ /**
2443
+ * Select one of three ways to pass the `amendment_start`.
2444
+ */
2445
+ type: AmendmentStart.Type;
2446
+ }
2447
+ type BillingCycleAnchor = 'amendment_start' | 'automatic';
2448
+ interface DiscountAction {
2449
+ /**
2450
+ * Details of the discount to add.
2451
+ */
2452
+ add?: DiscountAction.Add;
2453
+ /**
2454
+ * Details of the discount to remove.
2455
+ */
2456
+ remove?: DiscountAction.Remove;
2457
+ /**
2458
+ * Details of the discount to replace the existing discounts with.
2459
+ */
2460
+ set?: DiscountAction.Set;
2461
+ /**
2462
+ * Determines the type of discount action.
2463
+ */
2464
+ type: DiscountAction.Type;
2465
+ }
2466
+ interface ItemAction {
2467
+ /**
2468
+ * Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
2469
+ */
2470
+ add?: ItemAction.Add;
2471
+ /**
2472
+ * Details of the subscription item to remove.
2473
+ */
2474
+ remove?: ItemAction.Remove;
2475
+ /**
2476
+ * Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
2477
+ */
2478
+ set?: ItemAction.Set;
2479
+ /**
2480
+ * Determines the type of item action.
2481
+ */
2482
+ type: ItemAction.Type;
2483
+ }
2484
+ interface MetadataAction {
2485
+ /**
2486
+ * Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
2487
+ */
2488
+ add?: {
2489
+ [key: string]: string;
2490
+ };
2491
+ /**
2492
+ * Keys to remove from schedule phase metadata.
2493
+ */
2494
+ remove?: Array<string>;
2495
+ /**
2496
+ * Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
2497
+ */
2498
+ set?: Emptyable<{
2499
+ [key: string]: string;
2500
+ }>;
2501
+ /**
2502
+ * Select one of three ways to update phase-level `metadata` on subscription schedules.
2503
+ */
2504
+ type: MetadataAction.Type;
2505
+ }
2506
+ type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
2507
+ interface SetPauseCollection {
2508
+ /**
2509
+ * Details of the pause_collection behavior to apply to the amendment.
2510
+ */
2511
+ set?: SetPauseCollection.Set;
2512
+ /**
2513
+ * Determines the type of the pause_collection amendment.
2514
+ */
2515
+ type: SetPauseCollection.Type;
2516
+ }
2517
+ type SetScheduleEnd = 'amendment_end' | 'amendment_start';
2518
+ interface TrialSettings {
2519
+ /**
2520
+ * Defines how the subscription should behave when a trial ends.
2521
+ */
2522
+ end_behavior?: TrialSettings.EndBehavior;
2523
+ }
2524
+ namespace AmendmentEnd {
2525
+ interface DiscountEnd {
2526
+ /**
2527
+ * The ID of a specific discount.
2528
+ */
2529
+ discount: string;
2530
+ }
2531
+ interface Duration {
2532
+ /**
2533
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2534
+ */
2535
+ interval: Duration.Interval;
2536
+ /**
2537
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2538
+ */
2539
+ interval_count: number;
2540
+ }
2541
+ type Type = 'discount_end' | 'duration' | 'schedule_end' | 'timestamp' | 'trial_end' | 'trial_start' | 'upcoming_invoice';
2542
+ namespace Duration {
2543
+ type Interval = 'day' | 'month' | 'week' | 'year';
2544
+ }
2545
+ }
2546
+ namespace AmendmentStart {
2547
+ interface AmendmentEnd {
2548
+ /**
2549
+ * The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
2550
+ */
2551
+ index: number;
2552
+ }
2553
+ interface DiscountEnd {
2554
+ /**
2555
+ * The ID of a specific discount.
2556
+ */
2557
+ discount: string;
2558
+ }
2559
+ type Type = 'amendment_end' | 'discount_end' | 'now' | 'schedule_end' | 'timestamp' | 'trial_end' | 'trial_start' | 'upcoming_invoice';
2560
+ }
2561
+ namespace DiscountAction {
2562
+ interface Add {
2563
+ /**
2564
+ * The coupon code to redeem.
2565
+ */
2566
+ coupon?: string;
2567
+ /**
2568
+ * An ID of an existing discount for a coupon that was already redeemed.
2569
+ */
2570
+ discount?: string;
2571
+ /**
2572
+ * Details to determine how long the discount should be applied for.
2573
+ */
2574
+ discount_end?: Add.DiscountEnd;
2575
+ /**
2576
+ * 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.
2577
+ */
2578
+ index?: number;
2579
+ /**
2580
+ * The promotion code to redeem.
2581
+ */
2582
+ promotion_code?: string;
2583
+ }
2584
+ interface Remove {
2585
+ /**
2586
+ * The coupon code to remove from the `discounts` array.
2587
+ */
2588
+ coupon?: string;
2589
+ /**
2590
+ * The ID of a discount to remove from the `discounts` array.
2591
+ */
2592
+ discount?: string;
2593
+ /**
2594
+ * The ID of a promotion code to remove from the `discounts` array.
2595
+ */
2596
+ promotion_code?: string;
2597
+ }
2598
+ interface Set {
2599
+ /**
2600
+ * The coupon code to replace the `discounts` array with.
2601
+ */
2602
+ coupon?: string;
2603
+ /**
2604
+ * An ID of an existing discount to replace the `discounts` array with.
2605
+ */
2606
+ discount?: string;
2607
+ /**
2608
+ * An ID of an existing promotion code to replace the `discounts` array with.
2609
+ */
2610
+ promotion_code?: string;
2611
+ }
2612
+ type Type = 'add' | 'remove' | 'set';
2613
+ namespace Add {
2614
+ interface DiscountEnd {
2615
+ /**
2616
+ * The type of calculation made to determine when the discount ends.
2617
+ */
2618
+ type: 'amendment_end';
2619
+ }
2620
+ }
2621
+ }
2622
+ namespace ItemAction {
2623
+ interface Add {
2624
+ /**
2625
+ * The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
2626
+ */
2627
+ discounts?: Array<Add.Discount>;
2628
+ /**
2629
+ * 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`.
2630
+ */
2631
+ metadata?: MetadataParam;
2632
+ /**
2633
+ * The ID of the price object.
2634
+ */
2635
+ price: string;
2636
+ /**
2637
+ * Quantity for this item.
2638
+ */
2639
+ quantity?: number;
2640
+ /**
2641
+ * 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`.
2642
+ */
2643
+ tax_rates?: Array<string>;
2644
+ /**
2645
+ * Options that configure the trial on the subscription item.
2646
+ */
2647
+ trial?: Add.Trial;
2648
+ /**
2649
+ * The ID of the trial offer to apply to the configuration item.
2650
+ */
2651
+ trial_offer?: string;
2652
+ }
2653
+ interface Remove {
2654
+ /**
2655
+ * ID of a price to remove.
2656
+ */
2657
+ price: string;
2658
+ }
2659
+ interface Set {
2660
+ /**
2661
+ * 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`.
2662
+ */
2663
+ discounts?: Array<Set.Discount>;
2664
+ /**
2665
+ * 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`.
2666
+ */
2667
+ metadata?: MetadataParam;
2668
+ /**
2669
+ * The ID of the price object.
2670
+ */
2671
+ price: string;
2672
+ /**
2673
+ * 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`.
2674
+ */
2675
+ quantity?: number;
2676
+ /**
2677
+ * 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`.
2678
+ */
2679
+ tax_rates?: Array<string>;
2680
+ /**
2681
+ * 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`.
2682
+ */
2683
+ trial?: Set.Trial;
2684
+ /**
2685
+ * The ID of the trial offer to apply to the configuration item.
2686
+ */
2687
+ trial_offer?: string;
2688
+ }
2689
+ type Type = 'add' | 'remove' | 'set';
2690
+ namespace Add {
2691
+ interface Discount {
2692
+ /**
2693
+ * ID of the coupon to create a new discount for.
2694
+ */
2695
+ coupon?: string;
2696
+ /**
2697
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
2698
+ */
2699
+ discount?: string;
2700
+ /**
2701
+ * Details to determine how long the discount should be applied for.
2702
+ */
2703
+ discount_end?: Discount.DiscountEnd;
2704
+ /**
2705
+ * ID of the promotion code to create a new discount for.
2706
+ */
2707
+ promotion_code?: string;
2708
+ }
2709
+ interface Trial {
2710
+ /**
2711
+ * 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.
2712
+ */
2713
+ converts_to?: Array<string>;
2714
+ /**
2715
+ * Determines the type of trial for this item.
2716
+ */
2717
+ type: Trial.Type;
2718
+ }
2719
+ namespace Discount {
2720
+ interface DiscountEnd {
2721
+ /**
2722
+ * Time span for the redeemed discount.
2723
+ */
2724
+ duration?: DiscountEnd.Duration;
2725
+ /**
2726
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2727
+ */
2728
+ timestamp?: number;
2729
+ /**
2730
+ * The type of calculation made to determine when the discount ends.
2731
+ */
2732
+ type: DiscountEnd.Type;
2733
+ }
2734
+ namespace DiscountEnd {
2735
+ interface Duration {
2736
+ /**
2737
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2738
+ */
2739
+ interval: Duration.Interval;
2740
+ /**
2741
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2742
+ */
2743
+ interval_count: number;
2744
+ }
2745
+ type Type = 'duration' | 'timestamp';
2746
+ namespace Duration {
2747
+ type Interval = 'day' | 'month' | 'week' | 'year';
2748
+ }
2749
+ }
2750
+ }
2751
+ namespace Trial {
2752
+ type Type = 'free' | 'paid';
2753
+ }
2754
+ }
2755
+ namespace Set {
2756
+ interface Discount {
2757
+ /**
2758
+ * ID of the coupon to create a new discount for.
2759
+ */
2760
+ coupon?: string;
2761
+ /**
2762
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
2763
+ */
2764
+ discount?: string;
2765
+ /**
2766
+ * Details to determine how long the discount should be applied for.
2767
+ */
2768
+ discount_end?: Discount.DiscountEnd;
2769
+ /**
2770
+ * ID of the promotion code to create a new discount for.
2771
+ */
2772
+ promotion_code?: string;
2773
+ }
2774
+ interface Trial {
2775
+ /**
2776
+ * 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.
2777
+ */
2778
+ converts_to?: Array<string>;
2779
+ /**
2780
+ * Determines the type of trial for this item.
2781
+ */
2782
+ type: Trial.Type;
2783
+ }
2784
+ namespace Discount {
2785
+ interface DiscountEnd {
2786
+ /**
2787
+ * Time span for the redeemed discount.
2788
+ */
2789
+ duration?: DiscountEnd.Duration;
2790
+ /**
2791
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2792
+ */
2793
+ timestamp?: number;
2794
+ /**
2795
+ * The type of calculation made to determine when the discount ends.
2796
+ */
2797
+ type: DiscountEnd.Type;
2798
+ }
2799
+ namespace DiscountEnd {
2800
+ interface Duration {
2801
+ /**
2802
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2803
+ */
2804
+ interval: Duration.Interval;
2805
+ /**
2806
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2807
+ */
2808
+ interval_count: number;
2809
+ }
2810
+ type Type = 'duration' | 'timestamp';
2811
+ namespace Duration {
2812
+ type Interval = 'day' | 'month' | 'week' | 'year';
2813
+ }
2814
+ }
2815
+ }
2816
+ namespace Trial {
2817
+ type Type = 'free' | 'paid';
2818
+ }
2819
+ }
2820
+ }
2821
+ namespace MetadataAction {
2822
+ type Type = 'add' | 'remove' | 'set';
2823
+ }
2824
+ namespace SetPauseCollection {
2825
+ interface Set {
2826
+ /**
2827
+ * The payment collection behavior for this subscription while paused.
2828
+ */
2829
+ behavior: Set.Behavior;
2830
+ }
2831
+ type Type = 'remove' | 'set';
2832
+ namespace Set {
2833
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
2834
+ }
2835
+ }
2836
+ namespace TrialSettings {
2837
+ interface EndBehavior {
2838
+ /**
2839
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2840
+ */
2841
+ prorate_up_front?: EndBehavior.ProrateUpFront;
2842
+ }
2843
+ namespace EndBehavior {
2844
+ type ProrateUpFront = 'defer' | 'include';
2845
+ }
2846
+ }
2847
+ }
2848
+ namespace Prebilling {
2849
+ interface BillFrom {
2850
+ /**
2851
+ * Start the prebilled period when a specified amendment begins.
2852
+ */
2853
+ amendment_start?: BillFrom.AmendmentStart;
2854
+ /**
2855
+ * Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2856
+ */
2857
+ timestamp?: number;
2858
+ /**
2859
+ * Select one of several ways to pass the `bill_from` value.
2860
+ */
2861
+ type: BillFrom.Type;
2862
+ }
2863
+ interface BillUntil {
2864
+ /**
2865
+ * End the prebilled period when a specified amendment ends.
2866
+ */
2867
+ amendment_end?: BillUntil.AmendmentEnd;
2868
+ /**
2869
+ * Time span for prebilling, starting from `bill_from`.
2870
+ */
2871
+ duration?: BillUntil.Duration;
2872
+ /**
2873
+ * End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2874
+ */
2875
+ timestamp?: number;
2876
+ /**
2877
+ * Select one of several ways to pass the `bill_until` value.
2878
+ */
2879
+ type: BillUntil.Type;
2880
+ }
2881
+ type UpdateBehavior = 'prebill' | 'reset';
2882
+ namespace BillFrom {
2883
+ interface AmendmentStart {
2884
+ /**
2885
+ * The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments.
2886
+ */
2887
+ index: number;
2888
+ }
2889
+ type Type = 'amendment_start' | 'now' | 'timestamp';
2890
+ }
2891
+ namespace BillUntil {
2892
+ interface AmendmentEnd {
2893
+ /**
2894
+ * The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
2895
+ */
2896
+ index: number;
2897
+ }
2898
+ interface Duration {
2899
+ /**
2900
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2901
+ */
2902
+ interval: Duration.Interval;
2903
+ /**
2904
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2905
+ */
2906
+ interval_count: number;
2907
+ }
2908
+ type Type = 'amendment_end' | 'duration' | 'schedule_end' | 'timestamp';
2909
+ namespace Duration {
2910
+ type Interval = 'day' | 'month' | 'week' | 'year';
2911
+ }
2912
+ }
2913
+ }
2914
+ namespace ScheduleSettings {
2915
+ type EndBehavior = 'cancel' | 'release';
2916
+ }
2917
+ }
1766
2918
  export interface SubscriptionScheduleCancelParams {
1767
2919
  /**
1768
2920
  * Specifies which fields in the response should be expanded.