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
@@ -4,6 +4,7 @@ import { Discount, DeletedDiscount } from './Discounts.js';
4
4
  import { TaxId, DeletedTaxId } from './TaxIds.js';
5
5
  import { Application, DeletedApplication } from './Applications.js';
6
6
  import { Customer, DeletedCustomer } from './Customers.js';
7
+ import { Margin } from './Margins.js';
7
8
  import { PaymentMethod } from './PaymentMethods.js';
8
9
  import { CustomerSource } from './CustomerSources.js';
9
10
  import { TaxRate } from './TaxRates.js';
@@ -67,6 +68,10 @@ export declare class InvoiceResource extends StripeResource {
67
68
  * See: [Partial payments](https://docs.stripe.com/docs/invoicing/partial-payments) to learn more.
68
69
  */
69
70
  attachPayment(id: string, params?: InvoiceAttachPaymentParams, options?: RequestOptions): Promise<Response<Invoice>>;
71
+ /**
72
+ * Detaches a payment from the invoice, removing it from the list of payments
73
+ */
74
+ detachPayment(id: string, params?: InvoiceDetachPaymentParams, options?: RequestOptions): Promise<Response<Invoice>>;
70
75
  /**
71
76
  * Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
72
77
  */
@@ -168,6 +173,10 @@ export interface Invoice {
168
173
  * This is the sum of all the shipping amounts.
169
174
  */
170
175
  amount_shipping: number;
176
+ /**
177
+ * List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
178
+ */
179
+ amounts_due?: Array<Invoice.AmountsDue> | null;
171
180
  /**
172
181
  * ID of the Connect Application that created the invoice.
173
182
  */
@@ -257,6 +266,10 @@ export interface Invoice {
257
266
  * The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
258
267
  */
259
268
  customer_tax_ids?: Array<Invoice.CustomerTaxId> | null;
269
+ /**
270
+ * The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
271
+ */
272
+ default_margins?: Array<string | Margin> | null;
260
273
  /**
261
274
  * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
262
275
  */
@@ -421,6 +434,10 @@ export interface Invoice {
421
434
  * The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
422
435
  */
423
436
  total_excluding_tax: number | null;
437
+ /**
438
+ * The aggregate amounts calculated per margin across all line items.
439
+ */
440
+ total_margin_amounts?: Array<Invoice.TotalMarginAmount> | null;
424
441
  /**
425
442
  * Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
426
443
  */
@@ -449,6 +466,40 @@ export interface DeletedInvoice {
449
466
  deleted: true;
450
467
  }
451
468
  export declare namespace Invoice {
469
+ interface AmountsDue {
470
+ /**
471
+ * Incremental amount due for this payment in cents (or local equivalent).
472
+ */
473
+ amount: number;
474
+ /**
475
+ * The amount in cents (or local equivalent) that was paid for this payment.
476
+ */
477
+ amount_paid: number;
478
+ /**
479
+ * The difference between the payment's amount and amount_paid, in cents (or local equivalent).
480
+ */
481
+ amount_remaining: number;
482
+ /**
483
+ * Number of days from when invoice is finalized until the payment is due.
484
+ */
485
+ days_until_due: number | null;
486
+ /**
487
+ * An arbitrary string attached to the object. Often useful for displaying to users.
488
+ */
489
+ description: string | null;
490
+ /**
491
+ * Date on which a payment plan's payment is due.
492
+ */
493
+ due_date: number | null;
494
+ /**
495
+ * Timestamp when the payment was paid.
496
+ */
497
+ paid_at: number | null;
498
+ /**
499
+ * The status of the payment, one of `open`, `paid`, or `past_due`
500
+ */
501
+ status: AmountsDue.Status;
502
+ }
452
503
  interface AutomaticTax {
453
504
  /**
454
505
  * If Stripe disabled automatic tax, this enum describes why.
@@ -766,6 +817,16 @@ export declare namespace Invoice {
766
817
  */
767
818
  discount: string | Discount | DeletedDiscount;
768
819
  }
820
+ interface TotalMarginAmount {
821
+ /**
822
+ * The amount, in cents (or local equivalent), of the reduction in line item amount.
823
+ */
824
+ amount: number;
825
+ /**
826
+ * The margin that was applied to get this margin amount.
827
+ */
828
+ margin: string | Margin;
829
+ }
769
830
  interface TotalPretaxCreditAmount {
770
831
  /**
771
832
  * The amount, in cents (or local equivalent), of the pretax credit amount.
@@ -779,6 +840,10 @@ export declare namespace Invoice {
779
840
  * The discount that was applied to get this pretax credit amount.
780
841
  */
781
842
  discount?: string | Discount | DeletedDiscount;
843
+ /**
844
+ * The margin that was applied to get this pretax credit amount.
845
+ */
846
+ margin?: string | Margin;
782
847
  /**
783
848
  * Type of the pretax credit amount referenced.
784
849
  */
@@ -810,6 +875,9 @@ export declare namespace Invoice {
810
875
  */
811
876
  type: 'tax_rate_details';
812
877
  }
878
+ namespace AmountsDue {
879
+ type Status = 'open' | 'paid' | 'past_due';
880
+ }
813
881
  namespace AutomaticTax {
814
882
  type DisabledReason = 'finalization_requires_location_inputs' | 'finalization_system_error';
815
883
  interface Liability {
@@ -834,7 +902,7 @@ export declare namespace Invoice {
834
902
  type Type = 'account' | 'self';
835
903
  }
836
904
  namespace LastFinalizationError {
837
- type Code = 'account_closed' | 'account_country_invalid_address' | 'account_error_country_change_requires_additional_steps' | 'account_information_mismatch' | 'account_invalid' | 'account_number_invalid' | 'account_token_required_for_v2_account' | 'acss_debit_session_incomplete' | 'action_blocked' | 'alipay_upgrade_required' | 'amount_too_large' | 'amount_too_small' | 'api_key_expired' | 'application_fees_not_allowed' | 'approval_required' | 'authentication_required' | 'balance_insufficient' | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' | 'bank_account_restricted' | 'bank_account_unusable' | 'bank_account_unverified' | 'bank_account_verification_failed' | 'billing_invalid_mandate' | 'bitcoin_upgrade_required' | 'capture_charge_authorization_expired' | 'capture_unauthorized_payment' | 'card_decline_rate_limit_exceeded' | 'card_declined' | 'cardholder_phone_number_required' | 'charge_already_captured' | 'charge_already_refunded' | 'charge_disputed' | 'charge_exceeds_source_limit' | 'charge_exceeds_transaction_limit' | 'charge_expired_for_capture' | 'charge_invalid_parameter' | 'charge_not_refundable' | 'clearing_code_unsupported' | 'country_code_invalid' | 'country_unsupported' | 'coupon_expired' | 'customer_max_payment_methods' | 'customer_max_subscriptions' | 'customer_session_expired' | 'customer_tax_location_invalid' | 'debit_not_authorized' | 'email_invalid' | 'expired_card' | 'financial_connections_account_inactive' | 'financial_connections_account_pending_account_numbers' | 'financial_connections_account_unavailable_account_numbers' | 'financial_connections_no_successful_transaction_refresh' | 'forwarding_api_inactive' | 'forwarding_api_invalid_parameter' | 'forwarding_api_retryable_upstream_error' | 'forwarding_api_upstream_connection_error' | 'forwarding_api_upstream_connection_timeout' | 'forwarding_api_upstream_error' | 'idempotency_key_in_use' | 'incorrect_address' | 'incorrect_cvc' | 'incorrect_number' | 'incorrect_zip' | 'india_recurring_payment_mandate_canceled' | 'instant_payouts_config_disabled' | 'instant_payouts_currency_disabled' | 'instant_payouts_limit_exceeded' | 'instant_payouts_unsupported' | 'insufficient_funds' | 'intent_invalid_state' | 'intent_verification_method_missing' | 'invalid_card_type' | 'invalid_characters' | 'invalid_charge_amount' | 'invalid_cvc' | 'invalid_expiry_month' | 'invalid_expiry_year' | 'invalid_mandate_reference_prefix_format' | 'invalid_number' | 'invalid_source_usage' | 'invalid_tax_location' | 'invoice_no_customer_line_items' | 'invoice_no_payment_method_types' | 'invoice_no_subscription_line_items' | 'invoice_not_editable' | 'invoice_on_behalf_of_not_editable' | 'invoice_payment_intent_requires_action' | 'invoice_upcoming_none' | 'livemode_mismatch' | 'lock_timeout' | 'missing' | 'no_account' | 'not_allowed_on_standard_account' | 'out_of_inventory' | 'ownership_declaration_not_allowed' | 'parameter_invalid_empty' | 'parameter_invalid_integer' | 'parameter_invalid_string_blank' | 'parameter_invalid_string_empty' | 'parameter_missing' | 'parameter_unknown' | 'parameters_exclusive' | 'payment_intent_action_required' | 'payment_intent_authentication_failure' | 'payment_intent_incompatible_payment_method' | 'payment_intent_invalid_parameter' | 'payment_intent_konbini_rejected_confirmation_number' | 'payment_intent_mandate_invalid' | 'payment_intent_payment_attempt_expired' | 'payment_intent_payment_attempt_failed' | 'payment_intent_rate_limit_exceeded' | 'payment_intent_unexpected_state' | 'payment_method_bank_account_already_verified' | 'payment_method_bank_account_blocked' | 'payment_method_billing_details_address_missing' | 'payment_method_configuration_failures' | 'payment_method_currency_mismatch' | 'payment_method_customer_decline' | 'payment_method_invalid_parameter' | 'payment_method_invalid_parameter_testmode' | 'payment_method_microdeposit_failed' | 'payment_method_microdeposit_processing_error' | 'payment_method_microdeposit_verification_amounts_invalid' | 'payment_method_microdeposit_verification_amounts_mismatch' | 'payment_method_microdeposit_verification_attempts_exceeded' | 'payment_method_microdeposit_verification_descriptor_code_mismatch' | 'payment_method_microdeposit_verification_timeout' | 'payment_method_not_available' | 'payment_method_provider_decline' | 'payment_method_provider_timeout' | 'payment_method_unactivated' | 'payment_method_unexpected_state' | 'payment_method_unsupported_type' | 'payout_reconciliation_not_ready' | 'payouts_limit_exceeded' | 'payouts_not_allowed' | 'platform_account_required' | 'platform_api_key_expired' | 'postal_code_invalid' | 'processing_error' | 'product_inactive' | 'progressive_onboarding_limit_exceeded' | 'rate_limit' | 'refer_to_customer' | 'refund_disputed_payment' | 'request_blocked' | 'resource_already_exists' | 'resource_missing' | 'return_intent_already_processed' | 'routing_number_invalid' | 'secret_key_required' | 'sepa_unsupported_account' | 'service_period_coupon_with_metered_tiered_item_unsupported' | 'setup_attempt_failed' | 'setup_intent_authentication_failure' | 'setup_intent_invalid_parameter' | 'setup_intent_mandate_invalid' | 'setup_intent_mobile_wallet_unsupported' | 'setup_intent_setup_attempt_expired' | 'setup_intent_unexpected_state' | 'shipping_address_invalid' | 'shipping_calculation_failed' | 'siret_invalid' | 'sku_inactive' | 'state_unsupported' | 'status_transition_invalid' | 'storer_capability_missing' | 'storer_capability_not_active' | 'stripe_tax_inactive' | 'tax_id_invalid' | 'tax_id_prohibited' | 'taxes_calculation_failed' | 'terminal_location_country_unsupported' | 'terminal_reader_busy' | 'terminal_reader_hardware_fault' | 'terminal_reader_invalid_location_for_activation' | 'terminal_reader_invalid_location_for_payment' | 'terminal_reader_offline' | 'terminal_reader_timeout' | 'testmode_charges_only' | 'tls_version_unsupported' | 'token_already_used' | 'token_card_network_invalid' | 'token_in_use' | 'transfer_source_balance_parameters_mismatch' | 'transfers_not_allowed' | 'url_invalid';
905
+ type Code = 'account_closed' | 'account_country_invalid_address' | 'account_error_country_change_requires_additional_steps' | 'account_information_mismatch' | 'account_invalid' | 'account_number_invalid' | 'account_token_required_for_v2_account' | 'acss_debit_session_incomplete' | 'action_blocked' | 'alipay_upgrade_required' | 'amount_too_large' | 'amount_too_small' | 'api_key_expired' | 'application_fees_not_allowed' | 'approval_required' | 'authentication_required' | 'balance_insufficient' | 'balance_invalid_parameter' | 'bank_account_bad_routing_numbers' | 'bank_account_declined' | 'bank_account_exists' | 'bank_account_restricted' | 'bank_account_unusable' | 'bank_account_unverified' | 'bank_account_verification_failed' | 'billing_invalid_mandate' | 'bitcoin_upgrade_required' | 'capture_charge_authorization_expired' | 'capture_unauthorized_payment' | 'card_decline_rate_limit_exceeded' | 'card_declined' | 'cardholder_phone_number_required' | 'charge_already_captured' | 'charge_already_refunded' | 'charge_disputed' | 'charge_exceeds_source_limit' | 'charge_exceeds_transaction_limit' | 'charge_expired_for_capture' | 'charge_invalid_parameter' | 'charge_not_refundable' | 'clearing_code_unsupported' | 'country_code_invalid' | 'country_unsupported' | 'coupon_expired' | 'customer_max_payment_methods' | 'customer_max_subscriptions' | 'customer_session_expired' | 'customer_tax_location_invalid' | 'debit_not_authorized' | 'email_invalid' | 'expired_card' | 'financial_connections_account_inactive' | 'financial_connections_account_pending_account_numbers' | 'financial_connections_account_unavailable_account_numbers' | 'financial_connections_institution_unavailable' | 'financial_connections_no_successful_transaction_refresh' | 'forwarding_api_inactive' | 'forwarding_api_invalid_parameter' | 'forwarding_api_retryable_upstream_error' | 'forwarding_api_upstream_connection_error' | 'forwarding_api_upstream_connection_timeout' | 'forwarding_api_upstream_error' | 'idempotency_key_in_use' | 'incorrect_address' | 'incorrect_cvc' | 'incorrect_number' | 'incorrect_zip' | 'india_recurring_payment_mandate_canceled' | 'instant_payouts_config_disabled' | 'instant_payouts_currency_disabled' | 'instant_payouts_limit_exceeded' | 'instant_payouts_unsupported' | 'insufficient_funds' | 'intent_invalid_state' | 'intent_verification_method_missing' | 'invalid_card_type' | 'invalid_characters' | 'invalid_charge_amount' | 'invalid_cvc' | 'invalid_expiry_month' | 'invalid_expiry_year' | 'invalid_mandate_reference_prefix_format' | 'invalid_number' | 'invalid_source_usage' | 'invalid_tax_location' | 'invoice_no_customer_line_items' | 'invoice_no_payment_method_types' | 'invoice_no_subscription_line_items' | 'invoice_not_editable' | 'invoice_on_behalf_of_not_editable' | 'invoice_payment_intent_requires_action' | 'invoice_upcoming_none' | 'livemode_mismatch' | 'lock_timeout' | 'missing' | 'no_account' | 'not_allowed_on_standard_account' | 'out_of_inventory' | 'ownership_declaration_not_allowed' | 'parameter_invalid_empty' | 'parameter_invalid_integer' | 'parameter_invalid_string_blank' | 'parameter_invalid_string_empty' | 'parameter_missing' | 'parameter_unknown' | 'parameters_exclusive' | 'payment_intent_action_required' | 'payment_intent_authentication_failure' | 'payment_intent_incompatible_payment_method' | 'payment_intent_invalid_parameter' | 'payment_intent_konbini_rejected_confirmation_number' | 'payment_intent_mandate_invalid' | 'payment_intent_payment_attempt_expired' | 'payment_intent_payment_attempt_failed' | 'payment_intent_rate_limit_exceeded' | 'payment_intent_unexpected_state' | 'payment_method_bank_account_already_verified' | 'payment_method_bank_account_blocked' | 'payment_method_billing_details_address_missing' | 'payment_method_configuration_failures' | 'payment_method_currency_mismatch' | 'payment_method_customer_decline' | 'payment_method_invalid_parameter' | 'payment_method_invalid_parameter_testmode' | 'payment_method_microdeposit_failed' | 'payment_method_microdeposit_processing_error' | 'payment_method_microdeposit_verification_amounts_invalid' | 'payment_method_microdeposit_verification_amounts_mismatch' | 'payment_method_microdeposit_verification_attempts_exceeded' | 'payment_method_microdeposit_verification_descriptor_code_mismatch' | 'payment_method_microdeposit_verification_timeout' | 'payment_method_not_available' | 'payment_method_provider_decline' | 'payment_method_provider_timeout' | 'payment_method_unactivated' | 'payment_method_unexpected_state' | 'payment_method_unsupported_type' | 'payout_reconciliation_not_ready' | 'payouts_limit_exceeded' | 'payouts_not_allowed' | 'platform_account_required' | 'platform_api_key_expired' | 'postal_code_invalid' | 'processing_error' | 'product_inactive' | 'progressive_onboarding_limit_exceeded' | 'rate_limit' | 'refer_to_customer' | 'refund_disputed_payment' | 'request_blocked' | 'resource_already_exists' | 'resource_missing' | 'return_intent_already_processed' | 'routing_number_invalid' | 'secret_key_required' | 'sensitive_data_access_expired' | 'sepa_unsupported_account' | 'service_period_coupon_with_metered_tiered_item_unsupported' | 'setup_attempt_failed' | 'setup_intent_authentication_failure' | 'setup_intent_invalid_parameter' | 'setup_intent_mandate_invalid' | 'setup_intent_mobile_wallet_unsupported' | 'setup_intent_setup_attempt_expired' | 'setup_intent_unexpected_state' | 'shipping_address_invalid' | 'shipping_calculation_failed' | 'siret_invalid' | 'sku_inactive' | 'state_unsupported' | 'status_transition_invalid' | 'storer_capability_missing' | 'storer_capability_not_active' | 'stripe_tax_inactive' | 'tax_id_invalid' | 'tax_id_prohibited' | 'taxes_calculation_failed' | 'terminal_location_country_unsupported' | 'terminal_reader_busy' | 'terminal_reader_collected_data_invalid' | 'terminal_reader_hardware_fault' | 'terminal_reader_invalid_location_for_activation' | 'terminal_reader_invalid_location_for_payment' | 'terminal_reader_offline' | 'terminal_reader_timeout' | 'testmode_charges_only' | 'tls_version_unsupported' | 'token_already_used' | 'token_card_network_invalid' | 'token_in_use' | 'transfer_source_balance_parameters_mismatch' | 'transfers_not_allowed' | 'url_invalid' | 'v2_account_disconnection_unsupported' | 'v2_account_missing_configuration';
838
906
  type Type = 'api_error' | 'card_error' | 'idempotency_error' | 'invalid_request_error';
839
907
  }
840
908
  namespace Parent {
@@ -850,6 +918,10 @@ export declare namespace Invoice {
850
918
  * *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
851
919
  */
852
920
  metadata: Metadata | null;
921
+ /**
922
+ * 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).
923
+ */
924
+ pause_collection?: SubscriptionDetails.PauseCollection | null;
853
925
  /**
854
926
  * The subscription that generated this invoice
855
927
  */
@@ -860,6 +932,21 @@ export declare namespace Invoice {
860
932
  subscription_proration_date?: number;
861
933
  }
862
934
  type Type = 'quote_details' | 'subscription_details';
935
+ namespace SubscriptionDetails {
936
+ interface PauseCollection {
937
+ /**
938
+ * The payment collection behavior for this subscription while paused.
939
+ */
940
+ behavior: PauseCollection.Behavior | null;
941
+ /**
942
+ * The time after which the subscription will resume collecting payments.
943
+ */
944
+ resumes_at: number | null;
945
+ }
946
+ namespace PauseCollection {
947
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
948
+ }
949
+ }
863
950
  }
864
951
  namespace PaymentSettings {
865
952
  interface PaymentMethodOptions {
@@ -871,6 +958,10 @@ export declare namespace Invoice {
871
958
  * If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
872
959
  */
873
960
  bancontact: PaymentMethodOptions.Bancontact | null;
961
+ /**
962
+ * If paying by `blik`, this sub-hash contains details about the Blik payment method options to pass to the invoice's PaymentIntent.
963
+ */
964
+ blik?: PaymentMethodOptions.Blik | null;
874
965
  /**
875
966
  * If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
876
967
  */
@@ -879,6 +970,10 @@ export declare namespace Invoice {
879
970
  * If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
880
971
  */
881
972
  customer_balance: PaymentMethodOptions.CustomerBalance | null;
973
+ /**
974
+ * If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
975
+ */
976
+ id_bank_transfer?: PaymentMethodOptions.IdBankTransfer | null;
882
977
  /**
883
978
  * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
884
979
  */
@@ -904,7 +999,7 @@ export declare namespace Invoice {
904
999
  */
905
1000
  us_bank_account: PaymentMethodOptions.UsBankAccount | null;
906
1001
  }
907
- type PaymentMethodType = 'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'affirm' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'jp_credit_transfer' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'payto' | 'pix' | 'promptpay' | 'revolut_pay' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'upi' | 'us_bank_account' | 'wechat_pay';
1002
+ type PaymentMethodType = 'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'affirm' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'blik' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'id_bank_transfer' | 'ideal' | 'jp_credit_transfer' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'payto' | 'pix' | 'promptpay' | 'revolut_pay' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'stripe_balance' | 'swish' | 'twint' | 'upi' | 'us_bank_account' | 'wechat_pay';
908
1003
  namespace PaymentMethodOptions {
909
1004
  interface AcssDebit {
910
1005
  mandate_options?: AcssDebit.MandateOptions;
@@ -919,6 +1014,8 @@ export declare namespace Invoice {
919
1014
  */
920
1015
  preferred_language: Bancontact.PreferredLanguage;
921
1016
  }
1017
+ interface Blik {
1018
+ }
922
1019
  interface Card {
923
1020
  installments?: Card.Installments;
924
1021
  /**
@@ -933,6 +1030,8 @@ export declare namespace Invoice {
933
1030
  */
934
1031
  funding_type: 'bank_transfer' | null;
935
1032
  }
1033
+ interface IdBankTransfer {
1034
+ }
936
1035
  interface Konbini {
937
1036
  }
938
1037
  interface Payto {
@@ -1069,9 +1168,13 @@ export declare namespace Invoice {
1069
1168
  * The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
1070
1169
  */
1071
1170
  account_subcategories?: Array<Filters.AccountSubcategory>;
1171
+ /**
1172
+ * The institution to use to filter for possible accounts to link.
1173
+ */
1174
+ institution?: string;
1072
1175
  }
1073
1176
  type Permission = 'balances' | 'ownership' | 'payment_method' | 'transactions';
1074
- type Prefetch = 'balances' | 'ownership' | 'transactions';
1177
+ type Prefetch = 'balances' | 'inferred_balances' | 'ownership' | 'transactions';
1075
1178
  namespace Filters {
1076
1179
  type AccountSubcategory = 'checking' | 'savings';
1077
1180
  }
@@ -1128,7 +1231,7 @@ export declare namespace Invoice {
1128
1231
  }
1129
1232
  }
1130
1233
  namespace TotalPretaxCreditAmount {
1131
- type Type = 'credit_balance_transaction' | 'discount';
1234
+ type Type = 'credit_balance_transaction' | 'discount' | 'margin';
1132
1235
  }
1133
1236
  namespace TotalTax {
1134
1237
  type TaxBehavior = 'exclusive' | 'inclusive';
@@ -1136,7 +1239,7 @@ export declare namespace Invoice {
1136
1239
  /**
1137
1240
  * ID of the tax rate
1138
1241
  */
1139
- tax_rate: string;
1242
+ tax_rate: string | TaxRate;
1140
1243
  }
1141
1244
  type TaxabilityReason = 'customer_exempt' | 'not_available' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated';
1142
1245
  }
@@ -1146,6 +1249,10 @@ export interface InvoiceCreateParams {
1146
1249
  * The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
1147
1250
  */
1148
1251
  account_tax_ids?: Emptyable<Array<string>>;
1252
+ /**
1253
+ * List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
1254
+ */
1255
+ amounts_due?: Emptyable<Array<InvoiceCreateParams.AmountsDue>>;
1149
1256
  /**
1150
1257
  * A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://docs.stripe.com/billing/invoices/connect#collecting-fees).
1151
1258
  */
@@ -1186,6 +1293,10 @@ export interface InvoiceCreateParams {
1186
1293
  * The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
1187
1294
  */
1188
1295
  days_until_due?: number;
1296
+ /**
1297
+ * The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
1298
+ */
1299
+ default_margins?: Array<string>;
1189
1300
  /**
1190
1301
  * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
1191
1302
  */
@@ -1276,6 +1387,24 @@ export interface InvoiceCreateParams {
1276
1387
  transfer_data?: InvoiceCreateParams.TransferData;
1277
1388
  }
1278
1389
  export declare namespace InvoiceCreateParams {
1390
+ interface AmountsDue {
1391
+ /**
1392
+ * The amount in cents (or local equivalent).
1393
+ */
1394
+ amount: number;
1395
+ /**
1396
+ * Number of days from when invoice is finalized until the payment is due.
1397
+ */
1398
+ days_until_due?: number;
1399
+ /**
1400
+ * An arbitrary string attached to the object. Often useful for displaying to users.
1401
+ */
1402
+ description: string;
1403
+ /**
1404
+ * Date on which a payment plan's payment is due.
1405
+ */
1406
+ due_date?: number;
1407
+ }
1279
1408
  interface AutomaticTax {
1280
1409
  /**
1281
1410
  * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://docs.stripe.com/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
@@ -1306,6 +1435,10 @@ export declare namespace InvoiceCreateParams {
1306
1435
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
1307
1436
  */
1308
1437
  discount?: string;
1438
+ /**
1439
+ * Details to determine how long the discount should be applied for.
1440
+ */
1441
+ discount_end?: Discount.DiscountEnd;
1309
1442
  /**
1310
1443
  * ID of the promotion code to create a new discount for.
1311
1444
  */
@@ -1413,6 +1546,38 @@ export declare namespace InvoiceCreateParams {
1413
1546
  type Type = 'account' | 'self';
1414
1547
  }
1415
1548
  }
1549
+ namespace Discount {
1550
+ interface DiscountEnd {
1551
+ /**
1552
+ * Time span for the redeemed discount.
1553
+ */
1554
+ duration?: DiscountEnd.Duration;
1555
+ /**
1556
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1557
+ */
1558
+ timestamp?: number;
1559
+ /**
1560
+ * The type of calculation made to determine when the discount ends.
1561
+ */
1562
+ type: DiscountEnd.Type;
1563
+ }
1564
+ namespace DiscountEnd {
1565
+ interface Duration {
1566
+ /**
1567
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1568
+ */
1569
+ interval: Duration.Interval;
1570
+ /**
1571
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1572
+ */
1573
+ interval_count: number;
1574
+ }
1575
+ type Type = 'duration' | 'timestamp';
1576
+ namespace Duration {
1577
+ type Interval = 'day' | 'month' | 'week' | 'year';
1578
+ }
1579
+ }
1580
+ }
1416
1581
  namespace Issuer {
1417
1582
  type Type = 'account' | 'self';
1418
1583
  }
@@ -1426,6 +1591,10 @@ export declare namespace InvoiceCreateParams {
1426
1591
  * If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
1427
1592
  */
1428
1593
  bancontact?: Emptyable<PaymentMethodOptions.Bancontact>;
1594
+ /**
1595
+ * If paying by `blik`, this sub-hash contains details about the Blik payment method options to pass to the invoice's PaymentIntent.
1596
+ */
1597
+ blik?: Emptyable<PaymentMethodOptions.Blik>;
1429
1598
  /**
1430
1599
  * If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
1431
1600
  */
@@ -1434,6 +1603,10 @@ export declare namespace InvoiceCreateParams {
1434
1603
  * If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
1435
1604
  */
1436
1605
  customer_balance?: Emptyable<PaymentMethodOptions.CustomerBalance>;
1606
+ /**
1607
+ * If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
1608
+ */
1609
+ id_bank_transfer?: Emptyable<PaymentMethodOptions.IdBankTransfer>;
1437
1610
  /**
1438
1611
  * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
1439
1612
  */
@@ -1459,7 +1632,7 @@ export declare namespace InvoiceCreateParams {
1459
1632
  */
1460
1633
  us_bank_account?: Emptyable<PaymentMethodOptions.UsBankAccount>;
1461
1634
  }
1462
- type PaymentMethodType = 'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'affirm' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'jp_credit_transfer' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'payto' | 'pix' | 'promptpay' | 'revolut_pay' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'upi' | 'us_bank_account' | 'wechat_pay';
1635
+ type PaymentMethodType = 'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'affirm' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'blik' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'id_bank_transfer' | 'ideal' | 'jp_credit_transfer' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'payto' | 'pix' | 'promptpay' | 'revolut_pay' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'stripe_balance' | 'swish' | 'twint' | 'upi' | 'us_bank_account' | 'wechat_pay';
1463
1636
  namespace PaymentMethodOptions {
1464
1637
  interface AcssDebit {
1465
1638
  /**
@@ -1477,6 +1650,8 @@ export declare namespace InvoiceCreateParams {
1477
1650
  */
1478
1651
  preferred_language?: Bancontact.PreferredLanguage;
1479
1652
  }
1653
+ interface Blik {
1654
+ }
1480
1655
  interface Card {
1481
1656
  /**
1482
1657
  * Installment configuration for payments attempted on this invoice.
@@ -1499,6 +1674,8 @@ export declare namespace InvoiceCreateParams {
1499
1674
  */
1500
1675
  funding_type?: string;
1501
1676
  }
1677
+ interface IdBankTransfer {
1678
+ }
1502
1679
  interface Konbini {
1503
1680
  }
1504
1681
  interface Payto {
@@ -1667,9 +1844,13 @@ export declare namespace InvoiceCreateParams {
1667
1844
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1668
1845
  */
1669
1846
  account_subcategories?: Array<Filters.AccountSubcategory>;
1847
+ /**
1848
+ * ID of the institution to use to filter for selectable accounts.
1849
+ */
1850
+ institution?: string;
1670
1851
  }
1671
1852
  type Permission = 'balances' | 'ownership' | 'payment_method' | 'transactions';
1672
- type Prefetch = 'balances' | 'ownership' | 'transactions';
1853
+ type Prefetch = 'balances' | 'inferred_balances' | 'ownership' | 'transactions';
1673
1854
  namespace Filters {
1674
1855
  type AccountSubcategory = 'checking' | 'savings';
1675
1856
  }
@@ -1807,6 +1988,10 @@ export interface InvoiceUpdateParams {
1807
1988
  * The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
1808
1989
  */
1809
1990
  account_tax_ids?: Emptyable<Array<string>>;
1991
+ /**
1992
+ * List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
1993
+ */
1994
+ amounts_due?: Emptyable<Array<InvoiceUpdateParams.AmountsDue>>;
1810
1995
  /**
1811
1996
  * A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://docs.stripe.com/billing/invoices/connect#collecting-fees).
1812
1997
  */
@@ -1835,6 +2020,10 @@ export interface InvoiceUpdateParams {
1835
2020
  * The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
1836
2021
  */
1837
2022
  days_until_due?: number;
2023
+ /**
2024
+ * The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
2025
+ */
2026
+ default_margins?: Emptyable<Array<string>>;
1838
2027
  /**
1839
2028
  * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
1840
2029
  */
@@ -1913,6 +2102,24 @@ export interface InvoiceUpdateParams {
1913
2102
  transfer_data?: Emptyable<InvoiceUpdateParams.TransferData>;
1914
2103
  }
1915
2104
  export declare namespace InvoiceUpdateParams {
2105
+ interface AmountsDue {
2106
+ /**
2107
+ * The amount in cents (or local equivalent).
2108
+ */
2109
+ amount: number;
2110
+ /**
2111
+ * Number of days from when invoice is finalized until the payment is due.
2112
+ */
2113
+ days_until_due?: number;
2114
+ /**
2115
+ * An arbitrary string attached to the object. Often useful for displaying to users.
2116
+ */
2117
+ description: string;
2118
+ /**
2119
+ * Date on which a payment plan's payment is due.
2120
+ */
2121
+ due_date?: number;
2122
+ }
1916
2123
  interface AutomaticTax {
1917
2124
  /**
1918
2125
  * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://docs.stripe.com/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
@@ -1943,6 +2150,10 @@ export declare namespace InvoiceUpdateParams {
1943
2150
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
1944
2151
  */
1945
2152
  discount?: string;
2153
+ /**
2154
+ * Details to determine how long the discount should be applied for.
2155
+ */
2156
+ discount_end?: Discount.DiscountEnd;
1946
2157
  /**
1947
2158
  * ID of the promotion code to create a new discount for.
1948
2159
  */
@@ -2039,6 +2250,38 @@ export declare namespace InvoiceUpdateParams {
2039
2250
  type Type = 'account' | 'self';
2040
2251
  }
2041
2252
  }
2253
+ namespace Discount {
2254
+ interface DiscountEnd {
2255
+ /**
2256
+ * Time span for the redeemed discount.
2257
+ */
2258
+ duration?: DiscountEnd.Duration;
2259
+ /**
2260
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2261
+ */
2262
+ timestamp?: number;
2263
+ /**
2264
+ * The type of calculation made to determine when the discount ends.
2265
+ */
2266
+ type: DiscountEnd.Type;
2267
+ }
2268
+ namespace DiscountEnd {
2269
+ interface Duration {
2270
+ /**
2271
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2272
+ */
2273
+ interval: Duration.Interval;
2274
+ /**
2275
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2276
+ */
2277
+ interval_count: number;
2278
+ }
2279
+ type Type = 'duration' | 'timestamp';
2280
+ namespace Duration {
2281
+ type Interval = 'day' | 'month' | 'week' | 'year';
2282
+ }
2283
+ }
2284
+ }
2042
2285
  namespace Issuer {
2043
2286
  type Type = 'account' | 'self';
2044
2287
  }
@@ -2052,6 +2295,10 @@ export declare namespace InvoiceUpdateParams {
2052
2295
  * If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
2053
2296
  */
2054
2297
  bancontact?: Emptyable<PaymentMethodOptions.Bancontact>;
2298
+ /**
2299
+ * If paying by `blik`, this sub-hash contains details about the Blik payment method options to pass to the invoice's PaymentIntent.
2300
+ */
2301
+ blik?: Emptyable<PaymentMethodOptions.Blik>;
2055
2302
  /**
2056
2303
  * If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
2057
2304
  */
@@ -2060,6 +2307,10 @@ export declare namespace InvoiceUpdateParams {
2060
2307
  * If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
2061
2308
  */
2062
2309
  customer_balance?: Emptyable<PaymentMethodOptions.CustomerBalance>;
2310
+ /**
2311
+ * If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
2312
+ */
2313
+ id_bank_transfer?: Emptyable<PaymentMethodOptions.IdBankTransfer>;
2063
2314
  /**
2064
2315
  * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
2065
2316
  */
@@ -2085,7 +2336,7 @@ export declare namespace InvoiceUpdateParams {
2085
2336
  */
2086
2337
  us_bank_account?: Emptyable<PaymentMethodOptions.UsBankAccount>;
2087
2338
  }
2088
- type PaymentMethodType = 'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'affirm' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'jp_credit_transfer' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'payto' | 'pix' | 'promptpay' | 'revolut_pay' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'swish' | 'twint' | 'upi' | 'us_bank_account' | 'wechat_pay';
2339
+ type PaymentMethodType = 'ach_credit_transfer' | 'ach_debit' | 'acss_debit' | 'affirm' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'blik' | 'boleto' | 'card' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'id_bank_transfer' | 'ideal' | 'jp_credit_transfer' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'payto' | 'pix' | 'promptpay' | 'revolut_pay' | 'sepa_credit_transfer' | 'sepa_debit' | 'sofort' | 'stripe_balance' | 'swish' | 'twint' | 'upi' | 'us_bank_account' | 'wechat_pay';
2089
2340
  namespace PaymentMethodOptions {
2090
2341
  interface AcssDebit {
2091
2342
  /**
@@ -2103,6 +2354,8 @@ export declare namespace InvoiceUpdateParams {
2103
2354
  */
2104
2355
  preferred_language?: Bancontact.PreferredLanguage;
2105
2356
  }
2357
+ interface Blik {
2358
+ }
2106
2359
  interface Card {
2107
2360
  /**
2108
2361
  * Installment configuration for payments attempted on this invoice.
@@ -2125,6 +2378,8 @@ export declare namespace InvoiceUpdateParams {
2125
2378
  */
2126
2379
  funding_type?: string;
2127
2380
  }
2381
+ interface IdBankTransfer {
2382
+ }
2128
2383
  interface Konbini {
2129
2384
  }
2130
2385
  interface Payto {
@@ -2293,9 +2548,13 @@ export declare namespace InvoiceUpdateParams {
2293
2548
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
2294
2549
  */
2295
2550
  account_subcategories?: Array<Filters.AccountSubcategory>;
2551
+ /**
2552
+ * ID of the institution to use to filter for selectable accounts.
2553
+ */
2554
+ institution?: string;
2296
2555
  }
2297
2556
  type Permission = 'balances' | 'ownership' | 'payment_method' | 'transactions';
2298
- type Prefetch = 'balances' | 'ownership' | 'transactions';
2557
+ type Prefetch = 'balances' | 'inferred_balances' | 'ownership' | 'transactions';
2299
2558
  namespace Filters {
2300
2559
  type AccountSubcategory = 'checking' | 'savings';
2301
2560
  }
@@ -2497,6 +2756,10 @@ export declare namespace InvoiceAddLinesParams {
2497
2756
  * ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
2498
2757
  */
2499
2758
  invoice_item?: string;
2759
+ /**
2760
+ * The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
2761
+ */
2762
+ margins?: Emptyable<Array<string>>;
2500
2763
  /**
2501
2764
  * 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`.
2502
2765
  */
@@ -2540,6 +2803,10 @@ export declare namespace InvoiceAddLinesParams {
2540
2803
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
2541
2804
  */
2542
2805
  discount?: string;
2806
+ /**
2807
+ * Details to determine how long the discount should be applied for.
2808
+ */
2809
+ discount_end?: Discount.DiscountEnd;
2543
2810
  /**
2544
2811
  * ID of the promotion code to create a new discount for.
2545
2812
  */
@@ -2607,6 +2874,38 @@ export declare namespace InvoiceAddLinesParams {
2607
2874
  */
2608
2875
  taxable_amount: number;
2609
2876
  }
2877
+ namespace Discount {
2878
+ interface DiscountEnd {
2879
+ /**
2880
+ * Time span for the redeemed discount.
2881
+ */
2882
+ duration?: DiscountEnd.Duration;
2883
+ /**
2884
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2885
+ */
2886
+ timestamp?: number;
2887
+ /**
2888
+ * The type of calculation made to determine when the discount ends.
2889
+ */
2890
+ type: DiscountEnd.Type;
2891
+ }
2892
+ namespace DiscountEnd {
2893
+ interface Duration {
2894
+ /**
2895
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2896
+ */
2897
+ interval: Duration.Interval;
2898
+ /**
2899
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2900
+ */
2901
+ interval_count: number;
2902
+ }
2903
+ type Type = 'duration' | 'timestamp';
2904
+ namespace Duration {
2905
+ type Interval = 'day' | 'month' | 'week' | 'year';
2906
+ }
2907
+ }
2908
+ }
2610
2909
  namespace PriceData {
2611
2910
  interface ProductData {
2612
2911
  /**
@@ -2629,12 +2928,28 @@ export declare namespace InvoiceAddLinesParams {
2629
2928
  * A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
2630
2929
  */
2631
2930
  tax_code?: string;
2931
+ /**
2932
+ * Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location.
2933
+ */
2934
+ tax_details?: ProductData.TaxDetails;
2632
2935
  /**
2633
2936
  * A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
2634
2937
  */
2635
2938
  unit_label?: string;
2636
2939
  }
2637
2940
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
2941
+ namespace ProductData {
2942
+ interface TaxDetails {
2943
+ /**
2944
+ * A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
2945
+ */
2946
+ performance_location?: string;
2947
+ /**
2948
+ * A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
2949
+ */
2950
+ tax_code?: Emptyable<string>;
2951
+ }
2952
+ }
2638
2953
  }
2639
2954
  namespace TaxAmount {
2640
2955
  interface TaxRateData {
@@ -2684,6 +2999,10 @@ export declare namespace InvoiceAddLinesParams {
2684
2999
  }
2685
3000
  }
2686
3001
  export interface InvoiceAttachPaymentParams {
3002
+ /**
3003
+ * The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
3004
+ */
3005
+ amount_requested?: number;
2687
3006
  /**
2688
3007
  * Specifies which fields in the response should be expanded.
2689
3008
  */
@@ -2696,6 +3015,38 @@ export interface InvoiceAttachPaymentParams {
2696
3015
  * The ID of the PaymentRecord to attach to the invoice.
2697
3016
  */
2698
3017
  payment_record?: string;
3018
+ /**
3019
+ * The PaymentRecord data for attaching an out of band payment to the invoice.
3020
+ */
3021
+ payment_record_data?: InvoiceAttachPaymentParams.PaymentRecordData;
3022
+ }
3023
+ export declare namespace InvoiceAttachPaymentParams {
3024
+ interface PaymentRecordData {
3025
+ /**
3026
+ * The amount that was paid out of band.
3027
+ */
3028
+ amount: number;
3029
+ /**
3030
+ * The currency that was paid out of band.
3031
+ */
3032
+ currency: string;
3033
+ /**
3034
+ * 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`.
3035
+ */
3036
+ metadata?: Emptyable<MetadataParam>;
3037
+ /**
3038
+ * The type of money movement for this out of band payment record.
3039
+ */
3040
+ money_movement_type: string;
3041
+ /**
3042
+ * The timestamp when this out of band payment was paid.
3043
+ */
3044
+ paid_at?: number;
3045
+ /**
3046
+ * The reference for this out of band payment record.
3047
+ */
3048
+ payment_reference?: string;
3049
+ }
2699
3050
  }
2700
3051
  export interface InvoiceCreatePreviewParams {
2701
3052
  /**
@@ -2801,6 +3152,10 @@ export declare namespace InvoiceCreatePreviewParams {
2801
3152
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
2802
3153
  */
2803
3154
  discount?: string;
3155
+ /**
3156
+ * Details to determine how long the discount should be applied for.
3157
+ */
3158
+ discount_end?: Discount.DiscountEnd;
2804
3159
  /**
2805
3160
  * ID of the promotion code to create a new discount for.
2806
3161
  */
@@ -2888,6 +3243,14 @@ export declare namespace InvoiceCreatePreviewParams {
2888
3243
  }
2889
3244
  type PreviewMode = 'next' | 'recurring';
2890
3245
  interface ScheduleDetails {
3246
+ /**
3247
+ * Changes to apply to the phases of the subscription schedule, in the order provided.
3248
+ */
3249
+ amendments?: Array<ScheduleDetails.Amendment>;
3250
+ /**
3251
+ * 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.
3252
+ */
3253
+ billing_behavior?: ScheduleDetails.BillingBehavior;
2891
3254
  /**
2892
3255
  * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2893
3256
  */
@@ -2900,6 +3263,10 @@ export declare namespace InvoiceCreatePreviewParams {
2900
3263
  * 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.
2901
3264
  */
2902
3265
  phases?: Array<ScheduleDetails.Phase>;
3266
+ /**
3267
+ * Provide any time periods to bill in advance.
3268
+ */
3269
+ prebilling?: Emptyable<Array<ScheduleDetails.Prebilling>>;
2903
3270
  /**
2904
3271
  * In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
2905
3272
  */
@@ -2938,6 +3305,10 @@ export declare namespace InvoiceCreatePreviewParams {
2938
3305
  * A list of up to 20 subscription items, each with an attached price.
2939
3306
  */
2940
3307
  items?: Array<SubscriptionDetails.Item>;
3308
+ /**
3309
+ * The pre-billing to apply to the subscription as a preview.
3310
+ */
3311
+ prebilling?: SubscriptionDetails.Prebilling;
2941
3312
  /**
2942
3313
  * Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
2943
3314
  */
@@ -3010,6 +3381,38 @@ export declare namespace InvoiceCreatePreviewParams {
3010
3381
  type Type = 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'fo_vat' | 'gb_vat' | 'ge_vat' | 'gi_tin' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'it_cf' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'lk_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'pl_nip' | 'py_ruc' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin';
3011
3382
  }
3012
3383
  }
3384
+ namespace Discount {
3385
+ interface DiscountEnd {
3386
+ /**
3387
+ * Time span for the redeemed discount.
3388
+ */
3389
+ duration?: DiscountEnd.Duration;
3390
+ /**
3391
+ * A precise Unix timestamp for the discount to end. Must be in the future.
3392
+ */
3393
+ timestamp?: number;
3394
+ /**
3395
+ * The type of calculation made to determine when the discount ends.
3396
+ */
3397
+ type: DiscountEnd.Type;
3398
+ }
3399
+ namespace DiscountEnd {
3400
+ interface Duration {
3401
+ /**
3402
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3403
+ */
3404
+ interval: Duration.Interval;
3405
+ /**
3406
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3407
+ */
3408
+ interval_count: number;
3409
+ }
3410
+ type Type = 'duration' | 'timestamp';
3411
+ namespace Duration {
3412
+ type Interval = 'day' | 'month' | 'week' | 'year';
3413
+ }
3414
+ }
3415
+ }
3013
3416
  namespace InvoiceItem {
3014
3417
  interface Discount {
3015
3418
  /**
@@ -3020,6 +3423,10 @@ export declare namespace InvoiceCreatePreviewParams {
3020
3423
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
3021
3424
  */
3022
3425
  discount?: string;
3426
+ /**
3427
+ * Details to determine how long the discount should be applied for.
3428
+ */
3429
+ discount_end?: Discount.DiscountEnd;
3023
3430
  /**
3024
3431
  * ID of the promotion code to create a new discount for.
3025
3432
  */
@@ -3058,6 +3465,38 @@ export declare namespace InvoiceCreatePreviewParams {
3058
3465
  unit_amount_decimal?: Decimal;
3059
3466
  }
3060
3467
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
3468
+ namespace Discount {
3469
+ interface DiscountEnd {
3470
+ /**
3471
+ * Time span for the redeemed discount.
3472
+ */
3473
+ duration?: DiscountEnd.Duration;
3474
+ /**
3475
+ * A precise Unix timestamp for the discount to end. Must be in the future.
3476
+ */
3477
+ timestamp?: number;
3478
+ /**
3479
+ * The type of calculation made to determine when the discount ends.
3480
+ */
3481
+ type: DiscountEnd.Type;
3482
+ }
3483
+ namespace DiscountEnd {
3484
+ interface Duration {
3485
+ /**
3486
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3487
+ */
3488
+ interval: Duration.Interval;
3489
+ /**
3490
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3491
+ */
3492
+ interval_count: number;
3493
+ }
3494
+ type Type = 'duration' | 'timestamp';
3495
+ namespace Duration {
3496
+ type Interval = 'day' | 'month' | 'week' | 'year';
3497
+ }
3498
+ }
3499
+ }
3061
3500
  namespace PriceData {
3062
3501
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
3063
3502
  }
@@ -3066,22 +3505,65 @@ export declare namespace InvoiceCreatePreviewParams {
3066
3505
  type Type = 'account' | 'self';
3067
3506
  }
3068
3507
  namespace ScheduleDetails {
3069
- interface BillingMode {
3508
+ interface Amendment {
3070
3509
  /**
3071
- * Configure behavior for flexible billing mode.
3510
+ * 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.
3072
3511
  */
3073
- flexible?: BillingMode.Flexible;
3512
+ amendment_end?: Amendment.AmendmentEnd;
3074
3513
  /**
3075
- * Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`.
3514
+ * Details to identify the earliest timestamp where the proposed change should take effect.
3076
3515
  */
3077
- type: BillingMode.Type;
3078
- }
3079
- type EndBehavior = 'cancel' | 'release';
3080
- interface Phase {
3516
+ amendment_start: Amendment.AmendmentStart;
3081
3517
  /**
3082
- * A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
3518
+ * 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.
3083
3519
  */
3084
- add_invoice_items?: Array<Phase.AddInvoiceItem>;
3520
+ billing_cycle_anchor?: Amendment.BillingCycleAnchor;
3521
+ /**
3522
+ * Changes to the coupons being redeemed or discounts being applied during the amendment time span.
3523
+ */
3524
+ discount_actions?: Array<Amendment.DiscountAction>;
3525
+ /**
3526
+ * Changes to the subscription items during the amendment time span.
3527
+ */
3528
+ item_actions?: Array<Amendment.ItemAction>;
3529
+ /**
3530
+ * Instructions for how to modify phase metadata
3531
+ */
3532
+ metadata_actions?: Array<Amendment.MetadataAction>;
3533
+ /**
3534
+ * 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`.
3535
+ */
3536
+ proration_behavior?: Amendment.ProrationBehavior;
3537
+ /**
3538
+ * Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
3539
+ */
3540
+ set_pause_collection?: Amendment.SetPauseCollection;
3541
+ /**
3542
+ * Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
3543
+ */
3544
+ set_schedule_end?: Amendment.SetScheduleEnd;
3545
+ /**
3546
+ * Settings related to subscription trials.
3547
+ */
3548
+ trial_settings?: Amendment.TrialSettings;
3549
+ }
3550
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
3551
+ interface BillingMode {
3552
+ /**
3553
+ * Configure behavior for flexible billing mode.
3554
+ */
3555
+ flexible?: BillingMode.Flexible;
3556
+ /**
3557
+ * Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`.
3558
+ */
3559
+ type: BillingMode.Type;
3560
+ }
3561
+ type EndBehavior = 'cancel' | 'release';
3562
+ interface Phase {
3563
+ /**
3564
+ * A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
3565
+ */
3566
+ add_invoice_items?: Array<Phase.AddInvoiceItem>;
3085
3567
  /**
3086
3568
  * 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).
3087
3569
  */
@@ -3146,6 +3628,10 @@ export declare namespace InvoiceCreatePreviewParams {
3146
3628
  * The account on behalf of which to charge, for each of the associated subscription's invoices.
3147
3629
  */
3148
3630
  on_behalf_of?: string;
3631
+ /**
3632
+ * 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).
3633
+ */
3634
+ pause_collection?: Phase.PauseCollection;
3149
3635
  /**
3150
3636
  * 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.
3151
3637
  */
@@ -3162,12 +3648,468 @@ export declare namespace InvoiceCreatePreviewParams {
3162
3648
  * If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
3163
3649
  */
3164
3650
  trial?: boolean;
3651
+ /**
3652
+ * Specify trial behavior when crossing phase boundaries
3653
+ */
3654
+ trial_continuation?: Phase.TrialContinuation;
3165
3655
  /**
3166
3656
  * 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`
3167
3657
  */
3168
3658
  trial_end?: number | 'now';
3659
+ /**
3660
+ * Settings related to subscription trials.
3661
+ */
3662
+ trial_settings?: Phase.TrialSettings;
3663
+ }
3664
+ interface Prebilling {
3665
+ /**
3666
+ * The end of the prebilled time period.
3667
+ */
3668
+ bill_until?: Prebilling.BillUntil;
3669
+ /**
3670
+ * This is used to determine the number of billing cycles to prebill.
3671
+ */
3672
+ iterations?: number;
3169
3673
  }
3170
3674
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
3675
+ namespace Amendment {
3676
+ interface AmendmentEnd {
3677
+ /**
3678
+ * Use the `end` time of a given discount.
3679
+ */
3680
+ discount_end?: AmendmentEnd.DiscountEnd;
3681
+ /**
3682
+ * Time span for the amendment starting from the `amendment_start`.
3683
+ */
3684
+ duration?: AmendmentEnd.Duration;
3685
+ /**
3686
+ * A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
3687
+ */
3688
+ timestamp?: number;
3689
+ /**
3690
+ * Select one of three ways to pass the `amendment_end`.
3691
+ */
3692
+ type: AmendmentEnd.Type;
3693
+ }
3694
+ interface AmendmentStart {
3695
+ /**
3696
+ * Details of another amendment in the same array, immediately after which this amendment should begin.
3697
+ */
3698
+ amendment_end?: AmendmentStart.AmendmentEnd;
3699
+ /**
3700
+ * Use the `end` time of a given discount.
3701
+ */
3702
+ discount_end?: AmendmentStart.DiscountEnd;
3703
+ /**
3704
+ * A precise Unix timestamp for the amendment to start.
3705
+ */
3706
+ timestamp?: number;
3707
+ /**
3708
+ * Select one of three ways to pass the `amendment_start`.
3709
+ */
3710
+ type: AmendmentStart.Type;
3711
+ }
3712
+ type BillingCycleAnchor = 'amendment_start' | 'automatic';
3713
+ interface DiscountAction {
3714
+ /**
3715
+ * Details of the discount to add.
3716
+ */
3717
+ add?: DiscountAction.Add;
3718
+ /**
3719
+ * Details of the discount to remove.
3720
+ */
3721
+ remove?: DiscountAction.Remove;
3722
+ /**
3723
+ * Details of the discount to replace the existing discounts with.
3724
+ */
3725
+ set?: DiscountAction.Set;
3726
+ /**
3727
+ * Determines the type of discount action.
3728
+ */
3729
+ type: DiscountAction.Type;
3730
+ }
3731
+ interface ItemAction {
3732
+ /**
3733
+ * 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.
3734
+ */
3735
+ add?: ItemAction.Add;
3736
+ /**
3737
+ * Details of the subscription item to remove.
3738
+ */
3739
+ remove?: ItemAction.Remove;
3740
+ /**
3741
+ * 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.
3742
+ */
3743
+ set?: ItemAction.Set;
3744
+ /**
3745
+ * Determines the type of item action.
3746
+ */
3747
+ type: ItemAction.Type;
3748
+ }
3749
+ interface MetadataAction {
3750
+ /**
3751
+ * Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
3752
+ */
3753
+ add?: {
3754
+ [key: string]: string;
3755
+ };
3756
+ /**
3757
+ * Keys to remove from schedule phase metadata.
3758
+ */
3759
+ remove?: Array<string>;
3760
+ /**
3761
+ * Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
3762
+ */
3763
+ set?: Emptyable<{
3764
+ [key: string]: string;
3765
+ }>;
3766
+ /**
3767
+ * Select one of three ways to update phase-level `metadata` on subscription schedules.
3768
+ */
3769
+ type: MetadataAction.Type;
3770
+ }
3771
+ type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
3772
+ interface SetPauseCollection {
3773
+ /**
3774
+ * Details of the pause_collection behavior to apply to the amendment.
3775
+ */
3776
+ set?: SetPauseCollection.Set;
3777
+ /**
3778
+ * Determines the type of the pause_collection amendment.
3779
+ */
3780
+ type: SetPauseCollection.Type;
3781
+ }
3782
+ type SetScheduleEnd = 'amendment_end' | 'amendment_start';
3783
+ interface TrialSettings {
3784
+ /**
3785
+ * Defines how the subscription should behave when a trial ends.
3786
+ */
3787
+ end_behavior?: TrialSettings.EndBehavior;
3788
+ }
3789
+ namespace AmendmentEnd {
3790
+ interface DiscountEnd {
3791
+ /**
3792
+ * The ID of a specific discount.
3793
+ */
3794
+ discount: string;
3795
+ }
3796
+ interface Duration {
3797
+ /**
3798
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3799
+ */
3800
+ interval: Duration.Interval;
3801
+ /**
3802
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3803
+ */
3804
+ interval_count: number;
3805
+ }
3806
+ type Type = 'discount_end' | 'duration' | 'schedule_end' | 'timestamp' | 'trial_end' | 'trial_start' | 'upcoming_invoice';
3807
+ namespace Duration {
3808
+ type Interval = 'day' | 'month' | 'week' | 'year';
3809
+ }
3810
+ }
3811
+ namespace AmendmentStart {
3812
+ interface AmendmentEnd {
3813
+ /**
3814
+ * 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.
3815
+ */
3816
+ index: number;
3817
+ }
3818
+ interface DiscountEnd {
3819
+ /**
3820
+ * The ID of a specific discount.
3821
+ */
3822
+ discount: string;
3823
+ }
3824
+ type Type = 'amendment_end' | 'discount_end' | 'now' | 'schedule_end' | 'timestamp' | 'trial_end' | 'trial_start' | 'upcoming_invoice';
3825
+ }
3826
+ namespace DiscountAction {
3827
+ interface Add {
3828
+ /**
3829
+ * The coupon code to redeem.
3830
+ */
3831
+ coupon?: string;
3832
+ /**
3833
+ * An ID of an existing discount for a coupon that was already redeemed.
3834
+ */
3835
+ discount?: string;
3836
+ /**
3837
+ * Details to determine how long the discount should be applied for.
3838
+ */
3839
+ discount_end?: Add.DiscountEnd;
3840
+ /**
3841
+ * 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.
3842
+ */
3843
+ index?: number;
3844
+ /**
3845
+ * The promotion code to redeem.
3846
+ */
3847
+ promotion_code?: string;
3848
+ }
3849
+ interface Remove {
3850
+ /**
3851
+ * The coupon code to remove from the `discounts` array.
3852
+ */
3853
+ coupon?: string;
3854
+ /**
3855
+ * The ID of a discount to remove from the `discounts` array.
3856
+ */
3857
+ discount?: string;
3858
+ /**
3859
+ * The ID of a promotion code to remove from the `discounts` array.
3860
+ */
3861
+ promotion_code?: string;
3862
+ }
3863
+ interface Set {
3864
+ /**
3865
+ * The coupon code to replace the `discounts` array with.
3866
+ */
3867
+ coupon?: string;
3868
+ /**
3869
+ * An ID of an existing discount to replace the `discounts` array with.
3870
+ */
3871
+ discount?: string;
3872
+ /**
3873
+ * An ID of an existing promotion code to replace the `discounts` array with.
3874
+ */
3875
+ promotion_code?: string;
3876
+ }
3877
+ type Type = 'add' | 'remove' | 'set';
3878
+ namespace Add {
3879
+ interface DiscountEnd {
3880
+ /**
3881
+ * The type of calculation made to determine when the discount ends.
3882
+ */
3883
+ type: 'amendment_end';
3884
+ }
3885
+ }
3886
+ }
3887
+ namespace ItemAction {
3888
+ interface Add {
3889
+ /**
3890
+ * The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
3891
+ */
3892
+ discounts?: Array<Add.Discount>;
3893
+ /**
3894
+ * 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`.
3895
+ */
3896
+ metadata?: MetadataParam;
3897
+ /**
3898
+ * The ID of the price object.
3899
+ */
3900
+ price: string;
3901
+ /**
3902
+ * Quantity for this item.
3903
+ */
3904
+ quantity?: number;
3905
+ /**
3906
+ * 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`.
3907
+ */
3908
+ tax_rates?: Array<string>;
3909
+ /**
3910
+ * Options that configure the trial on the subscription item.
3911
+ */
3912
+ trial?: Add.Trial;
3913
+ /**
3914
+ * The ID of the trial offer to apply to the configuration item.
3915
+ */
3916
+ trial_offer?: string;
3917
+ }
3918
+ interface Remove {
3919
+ /**
3920
+ * ID of a price to remove.
3921
+ */
3922
+ price: string;
3923
+ }
3924
+ interface Set {
3925
+ /**
3926
+ * 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`.
3927
+ */
3928
+ discounts?: Array<Set.Discount>;
3929
+ /**
3930
+ * 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`.
3931
+ */
3932
+ metadata?: MetadataParam;
3933
+ /**
3934
+ * The ID of the price object.
3935
+ */
3936
+ price: string;
3937
+ /**
3938
+ * 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`.
3939
+ */
3940
+ quantity?: number;
3941
+ /**
3942
+ * 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`.
3943
+ */
3944
+ tax_rates?: Array<string>;
3945
+ /**
3946
+ * 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`.
3947
+ */
3948
+ trial?: Set.Trial;
3949
+ /**
3950
+ * The ID of the trial offer to apply to the configuration item.
3951
+ */
3952
+ trial_offer?: string;
3953
+ }
3954
+ type Type = 'add' | 'remove' | 'set';
3955
+ namespace Add {
3956
+ interface Discount {
3957
+ /**
3958
+ * ID of the coupon to create a new discount for.
3959
+ */
3960
+ coupon?: string;
3961
+ /**
3962
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
3963
+ */
3964
+ discount?: string;
3965
+ /**
3966
+ * Details to determine how long the discount should be applied for.
3967
+ */
3968
+ discount_end?: Discount.DiscountEnd;
3969
+ /**
3970
+ * ID of the promotion code to create a new discount for.
3971
+ */
3972
+ promotion_code?: string;
3973
+ }
3974
+ interface Trial {
3975
+ /**
3976
+ * 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.
3977
+ */
3978
+ converts_to?: Array<string>;
3979
+ /**
3980
+ * Determines the type of trial for this item.
3981
+ */
3982
+ type: Trial.Type;
3983
+ }
3984
+ namespace Discount {
3985
+ interface DiscountEnd {
3986
+ /**
3987
+ * Time span for the redeemed discount.
3988
+ */
3989
+ duration?: DiscountEnd.Duration;
3990
+ /**
3991
+ * A precise Unix timestamp for the discount to end. Must be in the future.
3992
+ */
3993
+ timestamp?: number;
3994
+ /**
3995
+ * The type of calculation made to determine when the discount ends.
3996
+ */
3997
+ type: DiscountEnd.Type;
3998
+ }
3999
+ namespace DiscountEnd {
4000
+ interface Duration {
4001
+ /**
4002
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4003
+ */
4004
+ interval: Duration.Interval;
4005
+ /**
4006
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4007
+ */
4008
+ interval_count: number;
4009
+ }
4010
+ type Type = 'duration' | 'timestamp';
4011
+ namespace Duration {
4012
+ type Interval = 'day' | 'month' | 'week' | 'year';
4013
+ }
4014
+ }
4015
+ }
4016
+ namespace Trial {
4017
+ type Type = 'free' | 'paid';
4018
+ }
4019
+ }
4020
+ namespace Set {
4021
+ interface Discount {
4022
+ /**
4023
+ * ID of the coupon to create a new discount for.
4024
+ */
4025
+ coupon?: string;
4026
+ /**
4027
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
4028
+ */
4029
+ discount?: string;
4030
+ /**
4031
+ * Details to determine how long the discount should be applied for.
4032
+ */
4033
+ discount_end?: Discount.DiscountEnd;
4034
+ /**
4035
+ * ID of the promotion code to create a new discount for.
4036
+ */
4037
+ promotion_code?: string;
4038
+ }
4039
+ interface Trial {
4040
+ /**
4041
+ * 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.
4042
+ */
4043
+ converts_to?: Array<string>;
4044
+ /**
4045
+ * Determines the type of trial for this item.
4046
+ */
4047
+ type: Trial.Type;
4048
+ }
4049
+ namespace Discount {
4050
+ interface DiscountEnd {
4051
+ /**
4052
+ * Time span for the redeemed discount.
4053
+ */
4054
+ duration?: DiscountEnd.Duration;
4055
+ /**
4056
+ * A precise Unix timestamp for the discount to end. Must be in the future.
4057
+ */
4058
+ timestamp?: number;
4059
+ /**
4060
+ * The type of calculation made to determine when the discount ends.
4061
+ */
4062
+ type: DiscountEnd.Type;
4063
+ }
4064
+ namespace DiscountEnd {
4065
+ interface Duration {
4066
+ /**
4067
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4068
+ */
4069
+ interval: Duration.Interval;
4070
+ /**
4071
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4072
+ */
4073
+ interval_count: number;
4074
+ }
4075
+ type Type = 'duration' | 'timestamp';
4076
+ namespace Duration {
4077
+ type Interval = 'day' | 'month' | 'week' | 'year';
4078
+ }
4079
+ }
4080
+ }
4081
+ namespace Trial {
4082
+ type Type = 'free' | 'paid';
4083
+ }
4084
+ }
4085
+ }
4086
+ namespace MetadataAction {
4087
+ type Type = 'add' | 'remove' | 'set';
4088
+ }
4089
+ namespace SetPauseCollection {
4090
+ interface Set {
4091
+ /**
4092
+ * The payment collection behavior for this subscription while paused.
4093
+ */
4094
+ behavior: Set.Behavior;
4095
+ }
4096
+ type Type = 'remove' | 'set';
4097
+ namespace Set {
4098
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
4099
+ }
4100
+ }
4101
+ namespace TrialSettings {
4102
+ interface EndBehavior {
4103
+ /**
4104
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
4105
+ */
4106
+ prorate_up_front?: EndBehavior.ProrateUpFront;
4107
+ }
4108
+ namespace EndBehavior {
4109
+ type ProrateUpFront = 'defer' | 'include';
4110
+ }
4111
+ }
4112
+ }
3171
4113
  namespace BillingMode {
3172
4114
  interface Flexible {
3173
4115
  /**
@@ -3246,6 +4188,10 @@ export declare namespace InvoiceCreatePreviewParams {
3246
4188
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
3247
4189
  */
3248
4190
  discount?: string;
4191
+ /**
4192
+ * Details to determine how long the discount should be applied for.
4193
+ */
4194
+ discount_end?: Discount.DiscountEnd;
3249
4195
  /**
3250
4196
  * ID of the promotion code to create a new discount for.
3251
4197
  */
@@ -3308,6 +4254,20 @@ export declare namespace InvoiceCreatePreviewParams {
3308
4254
  * 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.
3309
4255
  */
3310
4256
  tax_rates?: Emptyable<Array<string>>;
4257
+ /**
4258
+ * Options that configure the trial on the subscription item.
4259
+ */
4260
+ trial?: Item.Trial;
4261
+ /**
4262
+ * The ID of the trial offer to apply to the configuration item.
4263
+ */
4264
+ trial_offer?: string;
4265
+ }
4266
+ interface PauseCollection {
4267
+ /**
4268
+ * The payment collection behavior for this subscription while paused.
4269
+ */
4270
+ behavior: PauseCollection.Behavior;
3311
4271
  }
3312
4272
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
3313
4273
  interface TransferData {
@@ -3320,6 +4280,13 @@ export declare namespace InvoiceCreatePreviewParams {
3320
4280
  */
3321
4281
  destination: string;
3322
4282
  }
4283
+ type TrialContinuation = 'continue' | 'none';
4284
+ interface TrialSettings {
4285
+ /**
4286
+ * Defines how the subscription should behave when a trial ends.
4287
+ */
4288
+ end_behavior?: TrialSettings.EndBehavior;
4289
+ }
3323
4290
  namespace AddInvoiceItem {
3324
4291
  interface Discount {
3325
4292
  /**
@@ -3330,6 +4297,10 @@ export declare namespace InvoiceCreatePreviewParams {
3330
4297
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
3331
4298
  */
3332
4299
  discount?: string;
4300
+ /**
4301
+ * Details to determine how long the discount should be applied for.
4302
+ */
4303
+ discount_end?: Discount.DiscountEnd;
3333
4304
  /**
3334
4305
  * ID of the promotion code to create a new discount for.
3335
4306
  */
@@ -3367,6 +4338,38 @@ export declare namespace InvoiceCreatePreviewParams {
3367
4338
  */
3368
4339
  unit_amount_decimal?: Decimal;
3369
4340
  }
4341
+ namespace Discount {
4342
+ interface DiscountEnd {
4343
+ /**
4344
+ * Time span for the redeemed discount.
4345
+ */
4346
+ duration?: DiscountEnd.Duration;
4347
+ /**
4348
+ * A precise Unix timestamp for the discount to end. Must be in the future.
4349
+ */
4350
+ timestamp?: number;
4351
+ /**
4352
+ * The type of calculation made to determine when the discount ends.
4353
+ */
4354
+ type: DiscountEnd.Type;
4355
+ }
4356
+ namespace DiscountEnd {
4357
+ interface Duration {
4358
+ /**
4359
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4360
+ */
4361
+ interval: Duration.Interval;
4362
+ /**
4363
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4364
+ */
4365
+ interval_count: number;
4366
+ }
4367
+ type Type = 'duration' | 'timestamp';
4368
+ namespace Duration {
4369
+ type Interval = 'day' | 'month' | 'week' | 'year';
4370
+ }
4371
+ }
4372
+ }
3370
4373
  namespace Period {
3371
4374
  interface End {
3372
4375
  /**
@@ -3414,6 +4417,38 @@ export declare namespace InvoiceCreatePreviewParams {
3414
4417
  type Type = 'account' | 'self';
3415
4418
  }
3416
4419
  }
4420
+ namespace Discount {
4421
+ interface DiscountEnd {
4422
+ /**
4423
+ * Time span for the redeemed discount.
4424
+ */
4425
+ duration?: DiscountEnd.Duration;
4426
+ /**
4427
+ * A precise Unix timestamp for the discount to end. Must be in the future.
4428
+ */
4429
+ timestamp?: number;
4430
+ /**
4431
+ * The type of calculation made to determine when the discount ends.
4432
+ */
4433
+ type: DiscountEnd.Type;
4434
+ }
4435
+ namespace DiscountEnd {
4436
+ interface Duration {
4437
+ /**
4438
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4439
+ */
4440
+ interval: Duration.Interval;
4441
+ /**
4442
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4443
+ */
4444
+ interval_count: number;
4445
+ }
4446
+ type Type = 'duration' | 'timestamp';
4447
+ namespace Duration {
4448
+ type Interval = 'day' | 'month' | 'week' | 'year';
4449
+ }
4450
+ }
4451
+ }
3417
4452
  namespace Duration {
3418
4453
  type Interval = 'day' | 'month' | 'week' | 'year';
3419
4454
  }
@@ -3448,6 +4483,10 @@ export declare namespace InvoiceCreatePreviewParams {
3448
4483
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
3449
4484
  */
3450
4485
  discount?: string;
4486
+ /**
4487
+ * Details to determine how long the discount should be applied for.
4488
+ */
4489
+ discount_end?: Discount.DiscountEnd;
3451
4490
  /**
3452
4491
  * ID of the promotion code to create a new discount for.
3453
4492
  */
@@ -3479,6 +4518,48 @@ export declare namespace InvoiceCreatePreviewParams {
3479
4518
  */
3480
4519
  unit_amount_decimal?: Decimal;
3481
4520
  }
4521
+ interface Trial {
4522
+ /**
4523
+ * 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.
4524
+ */
4525
+ converts_to?: Array<string>;
4526
+ /**
4527
+ * Determines the type of trial for this item.
4528
+ */
4529
+ type: Trial.Type;
4530
+ }
4531
+ namespace Discount {
4532
+ interface DiscountEnd {
4533
+ /**
4534
+ * Time span for the redeemed discount.
4535
+ */
4536
+ duration?: DiscountEnd.Duration;
4537
+ /**
4538
+ * A precise Unix timestamp for the discount to end. Must be in the future.
4539
+ */
4540
+ timestamp?: number;
4541
+ /**
4542
+ * The type of calculation made to determine when the discount ends.
4543
+ */
4544
+ type: DiscountEnd.Type;
4545
+ }
4546
+ namespace DiscountEnd {
4547
+ interface Duration {
4548
+ /**
4549
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4550
+ */
4551
+ interval: Duration.Interval;
4552
+ /**
4553
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4554
+ */
4555
+ interval_count: number;
4556
+ }
4557
+ type Type = 'duration' | 'timestamp';
4558
+ namespace Duration {
4559
+ type Interval = 'day' | 'month' | 'week' | 'year';
4560
+ }
4561
+ }
4562
+ }
3482
4563
  namespace PriceData {
3483
4564
  interface Recurring {
3484
4565
  /**
@@ -3495,6 +4576,65 @@ export declare namespace InvoiceCreatePreviewParams {
3495
4576
  type Interval = 'day' | 'month' | 'week' | 'year';
3496
4577
  }
3497
4578
  }
4579
+ namespace Trial {
4580
+ type Type = 'free' | 'paid';
4581
+ }
4582
+ }
4583
+ namespace PauseCollection {
4584
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
4585
+ }
4586
+ namespace TrialSettings {
4587
+ interface EndBehavior {
4588
+ /**
4589
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
4590
+ */
4591
+ prorate_up_front?: EndBehavior.ProrateUpFront;
4592
+ }
4593
+ namespace EndBehavior {
4594
+ type ProrateUpFront = 'defer' | 'include';
4595
+ }
4596
+ }
4597
+ }
4598
+ namespace Prebilling {
4599
+ interface BillUntil {
4600
+ /**
4601
+ * End the prebilled period when a specified amendment ends.
4602
+ */
4603
+ amendment_end?: BillUntil.AmendmentEnd;
4604
+ /**
4605
+ * Time span for prebilling, starting from `bill_from`.
4606
+ */
4607
+ duration?: BillUntil.Duration;
4608
+ /**
4609
+ * End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
4610
+ */
4611
+ timestamp?: number;
4612
+ /**
4613
+ * Select one of several ways to pass the `bill_until` value.
4614
+ */
4615
+ type: BillUntil.Type;
4616
+ }
4617
+ namespace BillUntil {
4618
+ interface AmendmentEnd {
4619
+ /**
4620
+ * 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.
4621
+ */
4622
+ index: number;
4623
+ }
4624
+ interface Duration {
4625
+ /**
4626
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4627
+ */
4628
+ interval: Duration.Interval;
4629
+ /**
4630
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4631
+ */
4632
+ interval_count: number;
4633
+ }
4634
+ type Type = 'amendment_end' | 'duration' | 'schedule_end' | 'timestamp';
4635
+ namespace Duration {
4636
+ type Interval = 'day' | 'month' | 'week' | 'year';
4637
+ }
3498
4638
  }
3499
4639
  }
3500
4640
  }
@@ -3534,6 +4674,10 @@ export declare namespace InvoiceCreatePreviewParams {
3534
4674
  * Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
3535
4675
  */
3536
4676
  clear_usage?: boolean;
4677
+ /**
4678
+ * The trial offer to apply to this subscription item.
4679
+ */
4680
+ current_trial?: Item.CurrentTrial;
3537
4681
  /**
3538
4682
  * A flag that, if set to `true`, will delete the specified item.
3539
4683
  */
@@ -3571,6 +4715,12 @@ export declare namespace InvoiceCreatePreviewParams {
3571
4715
  */
3572
4716
  tax_rates?: Emptyable<Array<string>>;
3573
4717
  }
4718
+ interface Prebilling {
4719
+ /**
4720
+ * This is used to determine the number of billing cycles to prebill.
4721
+ */
4722
+ iterations: number;
4723
+ }
3574
4724
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
3575
4725
  namespace BillingMode {
3576
4726
  interface Flexible {
@@ -3633,6 +4783,16 @@ export declare namespace InvoiceCreatePreviewParams {
3633
4783
  */
3634
4784
  usage_gte: number;
3635
4785
  }
4786
+ interface CurrentTrial {
4787
+ /**
4788
+ * Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`.
4789
+ */
4790
+ trial_end?: number;
4791
+ /**
4792
+ * The ID of the trial offer to apply to the subscription item.
4793
+ */
4794
+ trial_offer: string;
4795
+ }
3636
4796
  interface Discount {
3637
4797
  /**
3638
4798
  * ID of the coupon to create a new discount for.
@@ -3642,6 +4802,10 @@ export declare namespace InvoiceCreatePreviewParams {
3642
4802
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
3643
4803
  */
3644
4804
  discount?: string;
4805
+ /**
4806
+ * Details to determine how long the discount should be applied for.
4807
+ */
4808
+ discount_end?: Discount.DiscountEnd;
3645
4809
  /**
3646
4810
  * ID of the promotion code to create a new discount for.
3647
4811
  */
@@ -3673,6 +4837,38 @@ export declare namespace InvoiceCreatePreviewParams {
3673
4837
  */
3674
4838
  unit_amount_decimal?: Decimal;
3675
4839
  }
4840
+ namespace Discount {
4841
+ interface DiscountEnd {
4842
+ /**
4843
+ * Time span for the redeemed discount.
4844
+ */
4845
+ duration?: DiscountEnd.Duration;
4846
+ /**
4847
+ * A precise Unix timestamp for the discount to end. Must be in the future.
4848
+ */
4849
+ timestamp?: number;
4850
+ /**
4851
+ * The type of calculation made to determine when the discount ends.
4852
+ */
4853
+ type: DiscountEnd.Type;
4854
+ }
4855
+ namespace DiscountEnd {
4856
+ interface Duration {
4857
+ /**
4858
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4859
+ */
4860
+ interval: Duration.Interval;
4861
+ /**
4862
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4863
+ */
4864
+ interval_count: number;
4865
+ }
4866
+ type Type = 'duration' | 'timestamp';
4867
+ namespace Duration {
4868
+ type Interval = 'day' | 'month' | 'week' | 'year';
4869
+ }
4870
+ }
4871
+ }
3676
4872
  namespace PriceData {
3677
4873
  interface Recurring {
3678
4874
  /**
@@ -3692,6 +4888,16 @@ export declare namespace InvoiceCreatePreviewParams {
3692
4888
  }
3693
4889
  }
3694
4890
  }
4891
+ export interface InvoiceDetachPaymentParams {
4892
+ /**
4893
+ * Specifies which fields in the response should be expanded.
4894
+ */
4895
+ expand?: Array<string>;
4896
+ /**
4897
+ * The ID of the PaymentIntent to detach from the invoice.
4898
+ */
4899
+ payment_intent?: string;
4900
+ }
3695
4901
  export interface InvoiceFinalizeInvoiceParams {
3696
4902
  /**
3697
4903
  * Controls whether Stripe performs [automatic collection](https://docs.stripe.com/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
@@ -3839,6 +5045,10 @@ export declare namespace InvoiceUpdateLinesParams {
3839
5045
  * ID of an existing line item on the invoice.
3840
5046
  */
3841
5047
  id: string;
5048
+ /**
5049
+ * The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
5050
+ */
5051
+ margins?: Emptyable<Array<string>>;
3842
5052
  /**
3843
5053
  * 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`. For [type=subscription](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
3844
5054
  */
@@ -3882,6 +5092,10 @@ export declare namespace InvoiceUpdateLinesParams {
3882
5092
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
3883
5093
  */
3884
5094
  discount?: string;
5095
+ /**
5096
+ * Details to determine how long the discount should be applied for.
5097
+ */
5098
+ discount_end?: Discount.DiscountEnd;
3885
5099
  /**
3886
5100
  * ID of the promotion code to create a new discount for.
3887
5101
  */
@@ -3949,6 +5163,38 @@ export declare namespace InvoiceUpdateLinesParams {
3949
5163
  */
3950
5164
  taxable_amount: number;
3951
5165
  }
5166
+ namespace Discount {
5167
+ interface DiscountEnd {
5168
+ /**
5169
+ * Time span for the redeemed discount.
5170
+ */
5171
+ duration?: DiscountEnd.Duration;
5172
+ /**
5173
+ * A precise Unix timestamp for the discount to end. Must be in the future.
5174
+ */
5175
+ timestamp?: number;
5176
+ /**
5177
+ * The type of calculation made to determine when the discount ends.
5178
+ */
5179
+ type: DiscountEnd.Type;
5180
+ }
5181
+ namespace DiscountEnd {
5182
+ interface Duration {
5183
+ /**
5184
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
5185
+ */
5186
+ interval: Duration.Interval;
5187
+ /**
5188
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
5189
+ */
5190
+ interval_count: number;
5191
+ }
5192
+ type Type = 'duration' | 'timestamp';
5193
+ namespace Duration {
5194
+ type Interval = 'day' | 'month' | 'week' | 'year';
5195
+ }
5196
+ }
5197
+ }
3952
5198
  namespace PriceData {
3953
5199
  interface ProductData {
3954
5200
  /**
@@ -3971,12 +5217,28 @@ export declare namespace InvoiceUpdateLinesParams {
3971
5217
  * A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
3972
5218
  */
3973
5219
  tax_code?: string;
5220
+ /**
5221
+ * Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location.
5222
+ */
5223
+ tax_details?: ProductData.TaxDetails;
3974
5224
  /**
3975
5225
  * A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
3976
5226
  */
3977
5227
  unit_label?: string;
3978
5228
  }
3979
5229
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
5230
+ namespace ProductData {
5231
+ interface TaxDetails {
5232
+ /**
5233
+ * A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
5234
+ */
5235
+ performance_location?: string;
5236
+ /**
5237
+ * A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
5238
+ */
5239
+ tax_code?: Emptyable<string>;
5240
+ }
5241
+ }
3980
5242
  }
3981
5243
  namespace TaxAmount {
3982
5244
  interface TaxRateData {
@@ -4046,6 +5308,10 @@ export interface InvoiceUpdateLineItemParams {
4046
5308
  * Specifies which fields in the response should be expanded.
4047
5309
  */
4048
5310
  expand?: Array<string>;
5311
+ /**
5312
+ * The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
5313
+ */
5314
+ margins?: Emptyable<Array<string>>;
4049
5315
  /**
4050
5316
  * 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`. For [type=subscription](https://docs.stripe.com/api/invoices/line_item) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](https://docs.stripe.com/api/invoices/line_item) line items, where any existing metadata on the invoice line is merged with the incoming data.
4051
5317
  */
@@ -4089,6 +5355,10 @@ export declare namespace InvoiceUpdateLineItemParams {
4089
5355
  * ID of an existing discount on the object (or one of its ancestors) to reuse.
4090
5356
  */
4091
5357
  discount?: string;
5358
+ /**
5359
+ * Details to determine how long the discount should be applied for.
5360
+ */
5361
+ discount_end?: Discount.DiscountEnd;
4092
5362
  /**
4093
5363
  * ID of the promotion code to create a new discount for.
4094
5364
  */
@@ -4156,6 +5426,38 @@ export declare namespace InvoiceUpdateLineItemParams {
4156
5426
  */
4157
5427
  taxable_amount: number;
4158
5428
  }
5429
+ namespace Discount {
5430
+ interface DiscountEnd {
5431
+ /**
5432
+ * Time span for the redeemed discount.
5433
+ */
5434
+ duration?: DiscountEnd.Duration;
5435
+ /**
5436
+ * A precise Unix timestamp for the discount to end. Must be in the future.
5437
+ */
5438
+ timestamp?: number;
5439
+ /**
5440
+ * The type of calculation made to determine when the discount ends.
5441
+ */
5442
+ type: DiscountEnd.Type;
5443
+ }
5444
+ namespace DiscountEnd {
5445
+ interface Duration {
5446
+ /**
5447
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
5448
+ */
5449
+ interval: Duration.Interval;
5450
+ /**
5451
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
5452
+ */
5453
+ interval_count: number;
5454
+ }
5455
+ type Type = 'duration' | 'timestamp';
5456
+ namespace Duration {
5457
+ type Interval = 'day' | 'month' | 'week' | 'year';
5458
+ }
5459
+ }
5460
+ }
4159
5461
  namespace PriceData {
4160
5462
  interface ProductData {
4161
5463
  /**
@@ -4178,12 +5480,28 @@ export declare namespace InvoiceUpdateLineItemParams {
4178
5480
  * A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
4179
5481
  */
4180
5482
  tax_code?: string;
5483
+ /**
5484
+ * Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location.
5485
+ */
5486
+ tax_details?: ProductData.TaxDetails;
4181
5487
  /**
4182
5488
  * A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
4183
5489
  */
4184
5490
  unit_label?: string;
4185
5491
  }
4186
5492
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
5493
+ namespace ProductData {
5494
+ interface TaxDetails {
5495
+ /**
5496
+ * A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
5497
+ */
5498
+ performance_location?: string;
5499
+ /**
5500
+ * A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
5501
+ */
5502
+ tax_code?: Emptyable<string>;
5503
+ }
5504
+ }
4187
5505
  }
4188
5506
  namespace TaxAmount {
4189
5507
  interface TaxRateData {