stripe 19.1.0 → 19.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (412) hide show
  1. package/CHANGELOG.md +1538 -18
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +1 -0
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +115 -1
  6. package/cjs/apiVersion.js +2 -3
  7. package/cjs/resources/AccountNotices.js +21 -0
  8. package/cjs/resources/Billing/Analytics/MeterUsage.js +12 -0
  9. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  10. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  11. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  12. package/cjs/resources/ExternalAccounts.js +23 -0
  13. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  14. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  15. package/cjs/resources/FxQuotes.js +15 -0
  16. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  17. package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
  18. package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
  19. package/cjs/resources/Mandates.js +5 -0
  20. package/cjs/resources/Margins.js +22 -0
  21. package/cjs/resources/Orders.js +24 -0
  22. package/cjs/resources/PaymentAttemptRecords.js +17 -0
  23. package/cjs/resources/PaymentIntents.js +13 -0
  24. package/cjs/resources/PaymentRecords.js +33 -0
  25. package/cjs/resources/Privacy/RedactionJobs.js +42 -0
  26. package/cjs/resources/Quotes.js +32 -0
  27. package/cjs/resources/SubscriptionSchedules.js +4 -0
  28. package/cjs/resources/Subscriptions.js +4 -0
  29. package/cjs/resources/Tax/Associations.js +9 -0
  30. package/cjs/resources/Tax/Forms.js +20 -0
  31. package/cjs/resources/Terminal/OnboardingLinks.js +12 -0
  32. package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
  33. package/cjs/resources/V2/Billing/BillSettings/Versions.js +17 -0
  34. package/cjs/resources/V2/Billing/BillSettings.js +27 -0
  35. package/cjs/resources/V2/Billing/Cadences.js +23 -0
  36. package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +17 -0
  37. package/cjs/resources/V2/Billing/CollectionSettings.js +30 -0
  38. package/cjs/resources/V2/Billing/CustomPricingUnits.js +25 -0
  39. package/cjs/resources/V2/Billing/Intents/Actions.js +17 -0
  40. package/cjs/resources/V2/Billing/Intents.js +36 -0
  41. package/cjs/resources/V2/Billing/LicenseFeeSubscriptions.js +12 -0
  42. package/cjs/resources/V2/Billing/LicenseFees/Versions.js +17 -0
  43. package/cjs/resources/V2/Billing/LicenseFees.js +27 -0
  44. package/cjs/resources/V2/Billing/LicensedItems.js +25 -0
  45. package/cjs/resources/V2/Billing/MeteredItems.js +22 -0
  46. package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +21 -0
  47. package/cjs/resources/V2/Billing/PricingPlans/Components.js +29 -0
  48. package/cjs/resources/V2/Billing/PricingPlans/Versions.js +17 -0
  49. package/cjs/resources/V2/Billing/PricingPlans.js +29 -0
  50. package/cjs/resources/V2/Billing/Profiles.js +19 -0
  51. package/cjs/resources/V2/Billing/RateCardSubscriptions.js +29 -0
  52. package/cjs/resources/V2/Billing/RateCards/Rates.js +25 -0
  53. package/cjs/resources/V2/Billing/RateCards/Versions.js +17 -0
  54. package/cjs/resources/V2/Billing/RateCards.js +29 -0
  55. package/cjs/resources/V2/Billing/ServiceActions.js +20 -0
  56. package/cjs/resources/V2/Core/AccountLinks.js +9 -0
  57. package/cjs/resources/V2/Core/Accounts/Persons.js +29 -0
  58. package/cjs/resources/V2/Core/Accounts.js +25 -0
  59. package/cjs/resources/V2/Core/ClaimableSandboxes.js +16 -0
  60. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +28 -0
  61. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +24 -0
  62. package/cjs/resources/V2/MoneyManagement/Adjustments.js +17 -0
  63. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +25 -0
  64. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +21 -0
  65. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +21 -0
  66. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +16 -0
  67. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +25 -0
  68. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +29 -0
  69. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +25 -0
  70. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +25 -0
  71. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +12 -0
  72. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +17 -0
  73. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +17 -0
  74. package/cjs/resources/V2/MoneyManagement/RecipientVerifications.js +20 -0
  75. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +17 -0
  76. package/cjs/resources/V2/MoneyManagement/Transactions.js +17 -0
  77. package/cjs/resources/V2/Payments/OffSessionPayments.js +29 -0
  78. package/cjs/resources/V2/Tax/AutomaticRules.js +22 -0
  79. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
  80. package/cjs/resources/V2/TestHelpers/MoneyManagement.js +12 -0
  81. package/cjs/resources.js +140 -8
  82. package/cjs/stripe.core.js +1 -1
  83. package/esm/Error.js +100 -0
  84. package/esm/apiVersion.js +1 -2
  85. package/esm/resources/AccountNotices.js +18 -0
  86. package/esm/resources/Billing/Analytics/MeterUsage.js +9 -0
  87. package/esm/resources/Capital/FinancingOffers.js +18 -0
  88. package/esm/resources/Capital/FinancingSummary.js +9 -0
  89. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  90. package/esm/resources/ExternalAccounts.js +20 -0
  91. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  92. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  93. package/esm/resources/FxQuotes.js +12 -0
  94. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  95. package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
  96. package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
  97. package/esm/resources/Mandates.js +5 -0
  98. package/esm/resources/Margins.js +19 -0
  99. package/esm/resources/Orders.js +21 -0
  100. package/esm/resources/PaymentAttemptRecords.js +14 -0
  101. package/esm/resources/PaymentIntents.js +13 -0
  102. package/esm/resources/PaymentRecords.js +30 -0
  103. package/esm/resources/Privacy/RedactionJobs.js +39 -0
  104. package/esm/resources/Quotes.js +32 -0
  105. package/esm/resources/SubscriptionSchedules.js +4 -0
  106. package/esm/resources/Subscriptions.js +4 -0
  107. package/esm/resources/Tax/Associations.js +6 -0
  108. package/esm/resources/Tax/Forms.js +17 -0
  109. package/esm/resources/Terminal/OnboardingLinks.js +9 -0
  110. package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
  111. package/esm/resources/V2/Billing/BillSettings/Versions.js +14 -0
  112. package/esm/resources/V2/Billing/BillSettings.js +24 -0
  113. package/esm/resources/V2/Billing/Cadences.js +20 -0
  114. package/esm/resources/V2/Billing/CollectionSettings/Versions.js +14 -0
  115. package/esm/resources/V2/Billing/CollectionSettings.js +27 -0
  116. package/esm/resources/V2/Billing/CustomPricingUnits.js +22 -0
  117. package/esm/resources/V2/Billing/Intents/Actions.js +14 -0
  118. package/esm/resources/V2/Billing/Intents.js +33 -0
  119. package/esm/resources/V2/Billing/LicenseFeeSubscriptions.js +9 -0
  120. package/esm/resources/V2/Billing/LicenseFees/Versions.js +14 -0
  121. package/esm/resources/V2/Billing/LicenseFees.js +24 -0
  122. package/esm/resources/V2/Billing/LicensedItems.js +22 -0
  123. package/esm/resources/V2/Billing/MeteredItems.js +19 -0
  124. package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +18 -0
  125. package/esm/resources/V2/Billing/PricingPlans/Components.js +26 -0
  126. package/esm/resources/V2/Billing/PricingPlans/Versions.js +14 -0
  127. package/esm/resources/V2/Billing/PricingPlans.js +26 -0
  128. package/esm/resources/V2/Billing/Profiles.js +16 -0
  129. package/esm/resources/V2/Billing/RateCardSubscriptions.js +26 -0
  130. package/esm/resources/V2/Billing/RateCards/Rates.js +22 -0
  131. package/esm/resources/V2/Billing/RateCards/Versions.js +14 -0
  132. package/esm/resources/V2/Billing/RateCards.js +26 -0
  133. package/esm/resources/V2/Billing/ServiceActions.js +17 -0
  134. package/esm/resources/V2/Core/AccountLinks.js +6 -0
  135. package/esm/resources/V2/Core/Accounts/Persons.js +26 -0
  136. package/esm/resources/V2/Core/Accounts.js +22 -0
  137. package/esm/resources/V2/Core/ClaimableSandboxes.js +13 -0
  138. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +25 -0
  139. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +21 -0
  140. package/esm/resources/V2/MoneyManagement/Adjustments.js +14 -0
  141. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +22 -0
  142. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +18 -0
  143. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +18 -0
  144. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +13 -0
  145. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +22 -0
  146. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +26 -0
  147. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +22 -0
  148. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +22 -0
  149. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +9 -0
  150. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +14 -0
  151. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +14 -0
  152. package/esm/resources/V2/MoneyManagement/RecipientVerifications.js +17 -0
  153. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +14 -0
  154. package/esm/resources/V2/MoneyManagement/Transactions.js +14 -0
  155. package/esm/resources/V2/Payments/OffSessionPayments.js +26 -0
  156. package/esm/resources/V2/Tax/AutomaticRules.js +19 -0
  157. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
  158. package/esm/resources/V2/TestHelpers/MoneyManagement.js +9 -0
  159. package/esm/resources.js +125 -0
  160. package/esm/stripe.core.js +1 -1
  161. package/package.json +1 -1
  162. package/types/AccountLinksResource.d.ts +5 -1
  163. package/types/AccountNotices.d.ts +113 -0
  164. package/types/AccountNoticesResource.d.ts +98 -0
  165. package/types/AccountSessions.d.ts +45 -0
  166. package/types/AccountSessionsResource.d.ts +264 -0
  167. package/types/Accounts.d.ts +212 -1
  168. package/types/AccountsResource.d.ts +544 -0
  169. package/types/Billing/AlertTriggereds.d.ts +16 -1
  170. package/types/Billing/Alerts.d.ts +116 -1
  171. package/types/Billing/AlertsResource.d.ts +149 -2
  172. package/types/Billing/Analytics/MeterUsage.d.ts +31 -0
  173. package/types/Billing/Analytics/MeterUsageResource.d.ts +689 -0
  174. package/types/Billing/Analytics/MeterUsageRows.d.ts +51 -0
  175. package/types/Billing/CreditBalanceSummary.d.ts +123 -2
  176. package/types/Billing/CreditBalanceSummaryResource.d.ts +20 -3
  177. package/types/Billing/CreditBalanceTransactions.d.ts +118 -2
  178. package/types/Billing/CreditBalanceTransactionsResource.d.ts +12 -4
  179. package/types/Billing/CreditGrants.d.ts +76 -1
  180. package/types/Billing/CreditGrantsResource.d.ts +43 -2
  181. package/types/BillingPortal/Sessions.d.ts +5 -0
  182. package/types/BillingPortal/SessionsResource.d.ts +12 -4
  183. package/types/Capital/FinancingOffers.d.ts +188 -0
  184. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  185. package/types/Capital/FinancingSummary.d.ts +106 -0
  186. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  187. package/types/Capital/FinancingTransactions.d.ts +135 -0
  188. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  189. package/types/Cards.d.ts +5 -0
  190. package/types/CashBalances.d.ts +5 -0
  191. package/types/Charges.d.ts +171 -0
  192. package/types/ChargesResource.d.ts +1406 -0
  193. package/types/Checkout/Sessions.d.ts +427 -2
  194. package/types/Checkout/SessionsResource.d.ts +684 -2
  195. package/types/ConfirmationTokens.d.ts +125 -0
  196. package/types/Coupons.d.ts +33 -0
  197. package/types/CouponsResource.d.ts +21 -0
  198. package/types/CreditNoteLineItems.d.ts +17 -0
  199. package/types/CreditNotes.d.ts +31 -0
  200. package/types/CreditNotesResource.d.ts +83 -0
  201. package/types/CustomerBalanceTransactions.d.ts +2 -0
  202. package/types/CustomerCashBalanceTransactions.d.ts +2 -0
  203. package/types/CustomerSessions.d.ts +5 -0
  204. package/types/CustomerSessionsResource.d.ts +6 -1
  205. package/types/Customers.d.ts +2 -0
  206. package/types/CustomersResource.d.ts +8 -0
  207. package/types/Discounts.d.ts +10 -0
  208. package/types/Disputes.d.ts +40 -0
  209. package/types/DisputesResource.d.ts +11 -0
  210. package/types/Errors.d.ts +85 -0
  211. package/types/EventTypes.d.ts +664 -0
  212. package/types/Events.d.ts +97 -0
  213. package/types/ExternalAccountsResource.d.ts +304 -0
  214. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  215. package/types/FinancialConnections/Accounts.d.ts +36 -1
  216. package/types/FinancialConnections/AccountsResource.d.ts +40 -3
  217. package/types/FinancialConnections/Institutions.d.ts +98 -0
  218. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  219. package/types/FinancialConnections/Sessions.d.ts +51 -1
  220. package/types/FinancialConnections/SessionsResource.d.ts +43 -1
  221. package/types/FxQuotes.d.ts +155 -0
  222. package/types/FxQuotesResource.d.ts +130 -0
  223. package/types/Identity/VerificationSessions.d.ts +5 -0
  224. package/types/Identity/VerificationSessionsResource.d.ts +7 -0
  225. package/types/InvoiceItems.d.ts +114 -2
  226. package/types/InvoiceItemsResource.d.ts +117 -6
  227. package/types/InvoiceLineItems.d.ts +158 -3
  228. package/types/InvoicePayments.d.ts +5 -0
  229. package/types/InvoicePaymentsResource.d.ts +10 -1
  230. package/types/Invoices.d.ts +204 -4
  231. package/types/InvoicesResource.d.ts +1652 -22
  232. package/types/Issuing/CardholdersResource.d.ts +2 -1
  233. package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
  234. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
  235. package/types/Issuing/DisputeSettlementDetails.d.ts +85 -0
  236. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
  237. package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
  238. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
  239. package/types/Issuing/Settlements.d.ts +113 -0
  240. package/types/Issuing/Transactions.d.ts +5 -0
  241. package/types/Issuing/TransactionsResource.d.ts +5 -0
  242. package/types/LineItems.d.ts +49 -0
  243. package/types/Mandates.d.ts +135 -1
  244. package/types/MandatesResource.d.ts +31 -0
  245. package/types/Margins.d.ts +56 -0
  246. package/types/MarginsResource.d.ts +114 -0
  247. package/types/Orders.d.ts +1163 -0
  248. package/types/OrdersResource.d.ts +3139 -0
  249. package/types/PaymentAttemptRecords.d.ts +2360 -0
  250. package/types/PaymentAttemptRecordsResource.d.ts +52 -0
  251. package/types/PaymentIntentAmountDetailsLineItems.d.ts +116 -0
  252. package/types/PaymentIntents.d.ts +825 -3
  253. package/types/PaymentIntentsResource.d.ts +11753 -5914
  254. package/types/PaymentLinks.d.ts +7 -0
  255. package/types/PaymentLinksResource.d.ts +14 -0
  256. package/types/PaymentMethodConfigurations.d.ts +216 -0
  257. package/types/PaymentMethodConfigurationsResource.d.ts +300 -0
  258. package/types/PaymentMethods.d.ts +130 -0
  259. package/types/PaymentMethodsResource.d.ts +167 -2
  260. package/types/PaymentRecords.d.ts +2353 -0
  261. package/types/PaymentRecordsResource.d.ts +559 -0
  262. package/types/Prices.d.ts +22 -0
  263. package/types/PricesResource.d.ts +22 -0
  264. package/types/Privacy/RedactionJobValidationErrors.d.ts +60 -0
  265. package/types/Privacy/RedactionJobs.d.ts +111 -0
  266. package/types/Privacy/RedactionJobsResource.d.ts +230 -0
  267. package/types/PromotionCodes.d.ts +5 -0
  268. package/types/PromotionCodesResource.d.ts +10 -0
  269. package/types/QuoteLines.d.ts +634 -0
  270. package/types/QuotePreviewInvoices.d.ts +1770 -0
  271. package/types/QuotePreviewSubscriptionSchedules.d.ts +908 -0
  272. package/types/Quotes.d.ts +594 -1
  273. package/types/QuotesResource.d.ts +2588 -243
  274. package/types/Refunds.d.ts +14 -0
  275. package/types/SetupAttempts.d.ts +51 -1
  276. package/types/SetupIntents.d.ts +210 -2
  277. package/types/SetupIntentsResource.d.ts +938 -4
  278. package/types/Sources.d.ts +29 -0
  279. package/types/SubscriptionItems.d.ts +26 -0
  280. package/types/SubscriptionItemsResource.d.ts +109 -0
  281. package/types/SubscriptionSchedules.d.ts +205 -0
  282. package/types/SubscriptionSchedulesResource.d.ts +1233 -5
  283. package/types/Subscriptions.d.ts +263 -1
  284. package/types/SubscriptionsResource.d.ts +747 -8
  285. package/types/Tax/Associations.d.ts +82 -0
  286. package/types/Tax/AssociationsResource.d.ts +29 -0
  287. package/types/Tax/Forms.d.ts +220 -0
  288. package/types/Tax/FormsResource.d.ts +107 -0
  289. package/types/TaxIds.d.ts +10 -0
  290. package/types/TaxIdsResource.d.ts +10 -0
  291. package/types/Terminal/Configurations.d.ts +9 -0
  292. package/types/Terminal/ConfigurationsResource.d.ts +28 -0
  293. package/types/Terminal/OnboardingLinks.d.ts +57 -0
  294. package/types/Terminal/OnboardingLinksResource.d.ts +62 -0
  295. package/types/Terminal/ReaderCollectedData.d.ts +51 -0
  296. package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
  297. package/types/Terminal/Readers.d.ts +20 -0
  298. package/types/TestHelpers/ConfirmationTokensResource.d.ts +126 -0
  299. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  300. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  301. package/types/Transfers.d.ts +5 -0
  302. package/types/TransfersResource.d.ts +5 -0
  303. package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
  304. package/types/Treasury/FinancialAccounts.d.ts +5 -0
  305. package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
  306. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  307. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  308. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  309. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  310. package/types/V2/Billing/BillSettingVersions.d.ts +97 -0
  311. package/types/V2/Billing/BillSettings/VersionsResource.d.ts +58 -0
  312. package/types/V2/Billing/BillSettings.d.ts +120 -0
  313. package/types/V2/Billing/BillSettingsResource.d.ts +241 -0
  314. package/types/V2/Billing/Cadences.d.ts +731 -0
  315. package/types/V2/Billing/CadencesResource.d.ts +516 -0
  316. package/types/V2/Billing/CollectionSettingVersions.d.ts +314 -0
  317. package/types/V2/Billing/CollectionSettings/VersionsResource.d.ts +62 -0
  318. package/types/V2/Billing/CollectionSettings.d.ts +337 -0
  319. package/types/V2/Billing/CollectionSettingsResource.d.ts +675 -0
  320. package/types/V2/Billing/CustomPricingUnits.d.ts +56 -0
  321. package/types/V2/Billing/CustomPricingUnitsResource.d.ts +122 -0
  322. package/types/V2/Billing/IntentActions.d.ts +459 -0
  323. package/types/V2/Billing/Intents/ActionsResource.d.ts +58 -0
  324. package/types/V2/Billing/Intents.d.ts +117 -0
  325. package/types/V2/Billing/IntentsResource.d.ts +575 -0
  326. package/types/V2/Billing/LicenseFeeSubscriptions.d.ts +64 -0
  327. package/types/V2/Billing/LicenseFeeSubscriptionsResource.d.ts +28 -0
  328. package/types/V2/Billing/LicenseFeeVersions.d.ts +106 -0
  329. package/types/V2/Billing/LicenseFees/VersionsResource.d.ts +58 -0
  330. package/types/V2/Billing/LicenseFees.d.ts +164 -0
  331. package/types/V2/Billing/LicenseFeesResource.d.ts +290 -0
  332. package/types/V2/Billing/LicensedItems.d.ts +73 -0
  333. package/types/V2/Billing/LicensedItemsResource.d.ts +157 -0
  334. package/types/V2/Billing/MeteredItems.d.ts +101 -0
  335. package/types/V2/Billing/MeteredItemsResource.d.ts +189 -0
  336. package/types/V2/Billing/PricingPlanComponents.d.ts +109 -0
  337. package/types/V2/Billing/PricingPlanSubscriptions.d.ts +144 -0
  338. package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +118 -0
  339. package/types/V2/Billing/PricingPlanVersions.d.ts +49 -0
  340. package/types/V2/Billing/PricingPlans/ComponentsResource.d.ts +197 -0
  341. package/types/V2/Billing/PricingPlans/VersionsResource.d.ts +58 -0
  342. package/types/V2/Billing/PricingPlans.d.ts +84 -0
  343. package/types/V2/Billing/PricingPlansResource.d.ts +151 -0
  344. package/types/V2/Billing/Profiles.d.ts +70 -0
  345. package/types/V2/Billing/ProfilesResource.d.ts +150 -0
  346. package/types/V2/Billing/RateCardRates.d.ts +144 -0
  347. package/types/V2/Billing/RateCardSubscriptions.d.ts +144 -0
  348. package/types/V2/Billing/RateCardSubscriptionsResource.d.ts +157 -0
  349. package/types/V2/Billing/RateCardVersions.d.ts +39 -0
  350. package/types/V2/Billing/RateCards/RatesResource.d.ts +203 -0
  351. package/types/V2/Billing/RateCards/VersionsResource.d.ts +58 -0
  352. package/types/V2/Billing/RateCards.d.ts +98 -0
  353. package/types/V2/Billing/RateCardsResource.d.ts +162 -0
  354. package/types/V2/Billing/ServiceActions.d.ts +274 -0
  355. package/types/V2/Billing/ServiceActionsResource.d.ts +370 -0
  356. package/types/V2/Core/AccountLinks.d.ts +168 -0
  357. package/types/V2/Core/AccountLinksResource.d.ts +152 -0
  358. package/types/V2/Core/AccountPersons.d.ts +615 -0
  359. package/types/V2/Core/Accounts/PersonsResource.d.ts +1153 -0
  360. package/types/V2/Core/Accounts.d.ts +5978 -0
  361. package/types/V2/Core/AccountsResource.d.ts +5023 -0
  362. package/types/V2/Core/ClaimableSandboxes.d.ts +132 -0
  363. package/types/V2/Core/ClaimableSandboxesResource.d.ts +74 -0
  364. package/types/V2/Core/EventTypes.d.ts +8452 -10
  365. package/types/V2/Core/Events.d.ts +12 -0
  366. package/types/V2/Core/Vault/GbBankAccounts.d.ts +160 -0
  367. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +172 -0
  368. package/types/V2/Core/Vault/UsBankAccounts.d.ts +70 -0
  369. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +123 -0
  370. package/types/V2/FinancialAddressCreditSimulations.d.ts +27 -0
  371. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +32 -0
  372. package/types/V2/MoneyManagement/Adjustments.d.ts +110 -0
  373. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +83 -0
  374. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +148 -0
  375. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +147 -0
  376. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +178 -0
  377. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +126 -0
  378. package/types/V2/MoneyManagement/InboundTransfers.d.ts +206 -0
  379. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +144 -0
  380. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +170 -0
  381. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +115 -0
  382. package/types/V2/MoneyManagement/OutboundPayments.d.ts +283 -0
  383. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +247 -0
  384. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +97 -0
  385. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +330 -0
  386. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +256 -0
  387. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +213 -0
  388. package/types/V2/MoneyManagement/PayoutMethods.d.ts +201 -0
  389. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +93 -0
  390. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +41 -0
  391. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +113 -0
  392. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +302 -0
  393. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +78 -0
  394. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +181 -0
  395. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +48 -0
  396. package/types/V2/MoneyManagement/RecipientVerifications.d.ts +112 -0
  397. package/types/V2/MoneyManagement/RecipientVerificationsResource.d.ts +77 -0
  398. package/types/V2/MoneyManagement/TransactionEntries.d.ts +162 -0
  399. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +82 -0
  400. package/types/V2/MoneyManagement/Transactions.d.ts +177 -0
  401. package/types/V2/MoneyManagement/TransactionsResource.d.ts +83 -0
  402. package/types/V2/Payments/OffSessionPayments.d.ts +326 -0
  403. package/types/V2/Payments/OffSessionPaymentsResource.d.ts +401 -0
  404. package/types/V2/Tax/AutomaticRules.d.ts +53 -0
  405. package/types/V2/Tax/AutomaticRulesResource.d.ts +102 -0
  406. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +73 -0
  407. package/types/V2/TestHelpers/MoneyManagementResource.d.ts +48 -0
  408. package/types/WebhookEndpointsResource.d.ts +78 -0
  409. package/types/Webhooks.d.ts +2 -0
  410. package/types/apiVersion.d.ts +1 -2
  411. package/types/index.d.ts +218 -0
  412. package/types/lib.d.ts +10 -0
@@ -8,6 +8,11 @@ declare module 'stripe' {
8
8
  */
9
9
  account_tax_ids?: Stripe.Emptyable<Array<string>>;
10
10
 
11
+ /**
12
+ * List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
13
+ */
14
+ amounts_due?: Stripe.Emptyable<Array<InvoiceCreateParams.AmountsDue>>;
15
+
11
16
  /**
12
17
  * A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
13
18
  */
@@ -48,11 +53,21 @@ declare module 'stripe' {
48
53
  */
49
54
  customer?: string;
50
55
 
56
+ /**
57
+ * The ID of the account who will be billed.
58
+ */
59
+ customer_account?: string;
60
+
51
61
  /**
52
62
  * The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
53
63
  */
54
64
  days_until_due?: number;
55
65
 
66
+ /**
67
+ * The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
68
+ */
69
+ default_margins?: Array<string>;
70
+
56
71
  /**
57
72
  * 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.
58
73
  */
@@ -165,6 +180,28 @@ declare module 'stripe' {
165
180
  }
166
181
 
167
182
  namespace InvoiceCreateParams {
183
+ interface AmountsDue {
184
+ /**
185
+ * The amount in cents (or local equivalent).
186
+ */
187
+ amount: number;
188
+
189
+ /**
190
+ * Number of days from when invoice is finalized until the payment is due.
191
+ */
192
+ days_until_due?: number;
193
+
194
+ /**
195
+ * An arbitrary string attached to the object. Often useful for displaying to users.
196
+ */
197
+ description: string;
198
+
199
+ /**
200
+ * Date on which a payment plan's payment is due.
201
+ */
202
+ due_date?: number;
203
+ }
204
+
168
205
  interface AutomaticTax {
169
206
  /**
170
207
  * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
@@ -220,12 +257,56 @@ declare module 'stripe' {
220
257
  */
221
258
  discount?: string;
222
259
 
260
+ /**
261
+ * Details to determine how long the discount should be applied for.
262
+ */
263
+ discount_end?: Discount.DiscountEnd;
264
+
223
265
  /**
224
266
  * ID of the promotion code to create a new discount for.
225
267
  */
226
268
  promotion_code?: string;
227
269
  }
228
270
 
271
+ namespace Discount {
272
+ interface DiscountEnd {
273
+ /**
274
+ * Time span for the redeemed discount.
275
+ */
276
+ duration?: DiscountEnd.Duration;
277
+
278
+ /**
279
+ * A precise Unix timestamp for the discount to end. Must be in the future.
280
+ */
281
+ timestamp?: number;
282
+
283
+ /**
284
+ * The type of calculation made to determine when the discount ends.
285
+ */
286
+ type: DiscountEnd.Type;
287
+ }
288
+
289
+ namespace DiscountEnd {
290
+ interface Duration {
291
+ /**
292
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
293
+ */
294
+ interval: Duration.Interval;
295
+
296
+ /**
297
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
298
+ */
299
+ interval_count: number;
300
+ }
301
+
302
+ namespace Duration {
303
+ type Interval = 'day' | 'month' | 'week' | 'year';
304
+ }
305
+
306
+ type Type = 'duration' | 'timestamp';
307
+ }
308
+ }
309
+
229
310
  interface FromInvoice {
230
311
  /**
231
312
  * The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
@@ -297,16 +378,33 @@ declare module 'stripe' {
297
378
  PaymentMethodOptions.CustomerBalance
298
379
  >;
299
380
 
381
+ /**
382
+ * If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
383
+ */
384
+ id_bank_transfer?: Stripe.Emptyable<
385
+ PaymentMethodOptions.IdBankTransfer
386
+ >;
387
+
300
388
  /**
301
389
  * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
302
390
  */
303
391
  konbini?: Stripe.Emptyable<PaymentMethodOptions.Konbini>;
304
392
 
393
+ /**
394
+ * If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent.
395
+ */
396
+ pix?: Stripe.Emptyable<PaymentMethodOptions.Pix>;
397
+
305
398
  /**
306
399
  * If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
307
400
  */
308
401
  sepa_debit?: Stripe.Emptyable<PaymentMethodOptions.SepaDebit>;
309
402
 
403
+ /**
404
+ * If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
405
+ */
406
+ upi?: Stripe.Emptyable<PaymentMethodOptions.Upi>;
407
+
310
408
  /**
311
409
  * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
312
410
  */
@@ -444,10 +542,58 @@ declare module 'stripe' {
444
542
  }
445
543
  }
446
544
 
545
+ interface IdBankTransfer {}
546
+
447
547
  interface Konbini {}
448
548
 
549
+ interface Pix {
550
+ /**
551
+ * Determines if the amount includes the IOF tax. Defaults to `never`.
552
+ */
553
+ amount_includes_iof?: Pix.AmountIncludesIof;
554
+ }
555
+
556
+ namespace Pix {
557
+ type AmountIncludesIof = 'always' | 'never';
558
+ }
559
+
449
560
  interface SepaDebit {}
450
561
 
562
+ interface Upi {
563
+ /**
564
+ * Configuration options for setting up an eMandate
565
+ */
566
+ mandate_options?: Upi.MandateOptions;
567
+ }
568
+
569
+ namespace Upi {
570
+ interface MandateOptions {
571
+ /**
572
+ * Amount to be charged for future payments.
573
+ */
574
+ amount?: number;
575
+
576
+ /**
577
+ * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
578
+ */
579
+ amount_type?: MandateOptions.AmountType;
580
+
581
+ /**
582
+ * A description of the mandate or subscription that is meant to be displayed to the customer.
583
+ */
584
+ description?: string;
585
+
586
+ /**
587
+ * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
588
+ */
589
+ end_date?: number;
590
+ }
591
+
592
+ namespace MandateOptions {
593
+ type AmountType = 'fixed' | 'maximum';
594
+ }
595
+ }
596
+
451
597
  interface UsBankAccount {
452
598
  /**
453
599
  * Additional fields for Financial Connections Session creation
@@ -484,6 +630,11 @@ declare module 'stripe' {
484
630
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
485
631
  */
486
632
  account_subcategories?: Array<Filters.AccountSubcategory>;
633
+
634
+ /**
635
+ * ID of the institution to use to filter for selectable accounts.
636
+ */
637
+ institution?: string;
487
638
  }
488
639
 
489
640
  namespace Filters {
@@ -496,7 +647,11 @@ declare module 'stripe' {
496
647
  | 'payment_method'
497
648
  | 'transactions';
498
649
 
499
- type Prefetch = 'balances' | 'ownership' | 'transactions';
650
+ type Prefetch =
651
+ | 'balances'
652
+ | 'inferred_balances'
653
+ | 'ownership'
654
+ | 'transactions';
500
655
  }
501
656
 
502
657
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -516,11 +671,13 @@ declare module 'stripe' {
516
671
  | 'card'
517
672
  | 'cashapp'
518
673
  | 'crypto'
674
+ | 'custom'
519
675
  | 'customer_balance'
520
676
  | 'eps'
521
677
  | 'fpx'
522
678
  | 'giropay'
523
679
  | 'grabpay'
680
+ | 'id_bank_transfer'
524
681
  | 'ideal'
525
682
  | 'jp_credit_transfer'
526
683
  | 'kakao_pay'
@@ -535,12 +692,15 @@ declare module 'stripe' {
535
692
  | 'payco'
536
693
  | 'paynow'
537
694
  | 'paypal'
695
+ | 'pix'
538
696
  | 'promptpay'
539
697
  | 'revolut_pay'
540
698
  | 'sepa_credit_transfer'
541
699
  | 'sepa_debit'
542
700
  | 'sofort'
701
+ | 'stripe_balance'
543
702
  | 'swish'
703
+ | 'upi'
544
704
  | 'us_bank_account'
545
705
  | 'wechat_pay';
546
706
  }
@@ -767,6 +927,11 @@ declare module 'stripe' {
767
927
  */
768
928
  account_tax_ids?: Stripe.Emptyable<Array<string>>;
769
929
 
930
+ /**
931
+ * List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
932
+ */
933
+ amounts_due?: Stripe.Emptyable<Array<InvoiceUpdateParams.AmountsDue>>;
934
+
770
935
  /**
771
936
  * A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
772
937
  */
@@ -802,6 +967,11 @@ declare module 'stripe' {
802
967
  */
803
968
  days_until_due?: number;
804
969
 
970
+ /**
971
+ * The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
972
+ */
973
+ default_margins?: Stripe.Emptyable<Array<string>>;
974
+
805
975
  /**
806
976
  * 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.
807
977
  */
@@ -899,6 +1069,28 @@ declare module 'stripe' {
899
1069
  }
900
1070
 
901
1071
  namespace InvoiceUpdateParams {
1072
+ interface AmountsDue {
1073
+ /**
1074
+ * The amount in cents (or local equivalent).
1075
+ */
1076
+ amount: number;
1077
+
1078
+ /**
1079
+ * Number of days from when invoice is finalized until the payment is due.
1080
+ */
1081
+ days_until_due?: number;
1082
+
1083
+ /**
1084
+ * An arbitrary string attached to the object. Often useful for displaying to users.
1085
+ */
1086
+ description: string;
1087
+
1088
+ /**
1089
+ * Date on which a payment plan's payment is due.
1090
+ */
1091
+ due_date?: number;
1092
+ }
1093
+
902
1094
  interface AutomaticTax {
903
1095
  /**
904
1096
  * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
@@ -954,12 +1146,56 @@ declare module 'stripe' {
954
1146
  */
955
1147
  discount?: string;
956
1148
 
1149
+ /**
1150
+ * Details to determine how long the discount should be applied for.
1151
+ */
1152
+ discount_end?: Discount.DiscountEnd;
1153
+
957
1154
  /**
958
1155
  * ID of the promotion code to create a new discount for.
959
1156
  */
960
1157
  promotion_code?: string;
961
1158
  }
962
1159
 
1160
+ namespace Discount {
1161
+ interface DiscountEnd {
1162
+ /**
1163
+ * Time span for the redeemed discount.
1164
+ */
1165
+ duration?: DiscountEnd.Duration;
1166
+
1167
+ /**
1168
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1169
+ */
1170
+ timestamp?: number;
1171
+
1172
+ /**
1173
+ * The type of calculation made to determine when the discount ends.
1174
+ */
1175
+ type: DiscountEnd.Type;
1176
+ }
1177
+
1178
+ namespace DiscountEnd {
1179
+ interface Duration {
1180
+ /**
1181
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1182
+ */
1183
+ interval: Duration.Interval;
1184
+
1185
+ /**
1186
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1187
+ */
1188
+ interval_count: number;
1189
+ }
1190
+
1191
+ namespace Duration {
1192
+ type Interval = 'day' | 'month' | 'week' | 'year';
1193
+ }
1194
+
1195
+ type Type = 'duration' | 'timestamp';
1196
+ }
1197
+ }
1198
+
963
1199
  interface Issuer {
964
1200
  /**
965
1201
  * The connected account being referenced when `type` is `account`.
@@ -1019,16 +1255,33 @@ declare module 'stripe' {
1019
1255
  PaymentMethodOptions.CustomerBalance
1020
1256
  >;
1021
1257
 
1258
+ /**
1259
+ * 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.
1260
+ */
1261
+ id_bank_transfer?: Stripe.Emptyable<
1262
+ PaymentMethodOptions.IdBankTransfer
1263
+ >;
1264
+
1022
1265
  /**
1023
1266
  * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
1024
1267
  */
1025
1268
  konbini?: Stripe.Emptyable<PaymentMethodOptions.Konbini>;
1026
1269
 
1270
+ /**
1271
+ * If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent.
1272
+ */
1273
+ pix?: Stripe.Emptyable<PaymentMethodOptions.Pix>;
1274
+
1027
1275
  /**
1028
1276
  * If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
1029
1277
  */
1030
1278
  sepa_debit?: Stripe.Emptyable<PaymentMethodOptions.SepaDebit>;
1031
1279
 
1280
+ /**
1281
+ * If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
1282
+ */
1283
+ upi?: Stripe.Emptyable<PaymentMethodOptions.Upi>;
1284
+
1032
1285
  /**
1033
1286
  * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
1034
1287
  */
@@ -1166,10 +1419,58 @@ declare module 'stripe' {
1166
1419
  }
1167
1420
  }
1168
1421
 
1422
+ interface IdBankTransfer {}
1423
+
1169
1424
  interface Konbini {}
1170
1425
 
1426
+ interface Pix {
1427
+ /**
1428
+ * Determines if the amount includes the IOF tax. Defaults to `never`.
1429
+ */
1430
+ amount_includes_iof?: Pix.AmountIncludesIof;
1431
+ }
1432
+
1433
+ namespace Pix {
1434
+ type AmountIncludesIof = 'always' | 'never';
1435
+ }
1436
+
1171
1437
  interface SepaDebit {}
1172
1438
 
1439
+ interface Upi {
1440
+ /**
1441
+ * Configuration options for setting up an eMandate
1442
+ */
1443
+ mandate_options?: Upi.MandateOptions;
1444
+ }
1445
+
1446
+ namespace Upi {
1447
+ interface MandateOptions {
1448
+ /**
1449
+ * Amount to be charged for future payments.
1450
+ */
1451
+ amount?: number;
1452
+
1453
+ /**
1454
+ * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
1455
+ */
1456
+ amount_type?: MandateOptions.AmountType;
1457
+
1458
+ /**
1459
+ * A description of the mandate or subscription that is meant to be displayed to the customer.
1460
+ */
1461
+ description?: string;
1462
+
1463
+ /**
1464
+ * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
1465
+ */
1466
+ end_date?: number;
1467
+ }
1468
+
1469
+ namespace MandateOptions {
1470
+ type AmountType = 'fixed' | 'maximum';
1471
+ }
1472
+ }
1473
+
1173
1474
  interface UsBankAccount {
1174
1475
  /**
1175
1476
  * Additional fields for Financial Connections Session creation
@@ -1206,6 +1507,11 @@ declare module 'stripe' {
1206
1507
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1207
1508
  */
1208
1509
  account_subcategories?: Array<Filters.AccountSubcategory>;
1510
+
1511
+ /**
1512
+ * ID of the institution to use to filter for selectable accounts.
1513
+ */
1514
+ institution?: string;
1209
1515
  }
1210
1516
 
1211
1517
  namespace Filters {
@@ -1218,7 +1524,11 @@ declare module 'stripe' {
1218
1524
  | 'payment_method'
1219
1525
  | 'transactions';
1220
1526
 
1221
- type Prefetch = 'balances' | 'ownership' | 'transactions';
1527
+ type Prefetch =
1528
+ | 'balances'
1529
+ | 'inferred_balances'
1530
+ | 'ownership'
1531
+ | 'transactions';
1222
1532
  }
1223
1533
 
1224
1534
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -1238,11 +1548,13 @@ declare module 'stripe' {
1238
1548
  | 'card'
1239
1549
  | 'cashapp'
1240
1550
  | 'crypto'
1551
+ | 'custom'
1241
1552
  | 'customer_balance'
1242
1553
  | 'eps'
1243
1554
  | 'fpx'
1244
1555
  | 'giropay'
1245
1556
  | 'grabpay'
1557
+ | 'id_bank_transfer'
1246
1558
  | 'ideal'
1247
1559
  | 'jp_credit_transfer'
1248
1560
  | 'kakao_pay'
@@ -1257,12 +1569,15 @@ declare module 'stripe' {
1257
1569
  | 'payco'
1258
1570
  | 'paynow'
1259
1571
  | 'paypal'
1572
+ | 'pix'
1260
1573
  | 'promptpay'
1261
1574
  | 'revolut_pay'
1262
1575
  | 'sepa_credit_transfer'
1263
1576
  | 'sepa_debit'
1264
1577
  | 'sofort'
1578
+ | 'stripe_balance'
1265
1579
  | 'swish'
1580
+ | 'upi'
1266
1581
  | 'us_bank_account'
1267
1582
  | 'wechat_pay';
1268
1583
  }
@@ -1475,6 +1790,11 @@ declare module 'stripe' {
1475
1790
  }
1476
1791
 
1477
1792
  interface InvoiceListParams extends PaginationParams {
1793
+ /**
1794
+ * Only return invoices for the cadence specified by this billing cadence ID.
1795
+ */
1796
+ billing_cadence?: string;
1797
+
1478
1798
  /**
1479
1799
  * The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
1480
1800
  */
@@ -1490,6 +1810,11 @@ declare module 'stripe' {
1490
1810
  */
1491
1811
  customer?: string;
1492
1812
 
1813
+ /**
1814
+ * Only return invoices for the account specified by this account ID.
1815
+ */
1816
+ customer_account?: string;
1817
+
1493
1818
  due_date?: Stripe.RangeQueryParam | number;
1494
1819
 
1495
1820
  /**
@@ -1562,6 +1887,11 @@ declare module 'stripe' {
1562
1887
  */
1563
1888
  invoice_item?: string;
1564
1889
 
1890
+ /**
1891
+ * 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.
1892
+ */
1893
+ margins?: Stripe.Emptyable<Array<string>>;
1894
+
1565
1895
  /**
1566
1896
  * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
1567
1897
  */
@@ -1610,12 +1940,56 @@ declare module 'stripe' {
1610
1940
  */
1611
1941
  discount?: string;
1612
1942
 
1943
+ /**
1944
+ * Details to determine how long the discount should be applied for.
1945
+ */
1946
+ discount_end?: Discount.DiscountEnd;
1947
+
1613
1948
  /**
1614
1949
  * ID of the promotion code to create a new discount for.
1615
1950
  */
1616
1951
  promotion_code?: string;
1617
1952
  }
1618
1953
 
1954
+ namespace Discount {
1955
+ interface DiscountEnd {
1956
+ /**
1957
+ * Time span for the redeemed discount.
1958
+ */
1959
+ duration?: DiscountEnd.Duration;
1960
+
1961
+ /**
1962
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1963
+ */
1964
+ timestamp?: number;
1965
+
1966
+ /**
1967
+ * The type of calculation made to determine when the discount ends.
1968
+ */
1969
+ type: DiscountEnd.Type;
1970
+ }
1971
+
1972
+ namespace DiscountEnd {
1973
+ interface Duration {
1974
+ /**
1975
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1976
+ */
1977
+ interval: Duration.Interval;
1978
+
1979
+ /**
1980
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1981
+ */
1982
+ interval_count: number;
1983
+ }
1984
+
1985
+ namespace Duration {
1986
+ type Interval = 'day' | 'month' | 'week' | 'year';
1987
+ }
1988
+
1989
+ type Type = 'duration' | 'timestamp';
1990
+ }
1991
+ }
1992
+
1619
1993
  interface Period {
1620
1994
  /**
1621
1995
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -1822,6 +2196,11 @@ declare module 'stripe' {
1822
2196
  }
1823
2197
 
1824
2198
  interface InvoiceAttachPaymentParams {
2199
+ /**
2200
+ * The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
2201
+ */
2202
+ amount_requested?: number;
2203
+
1825
2204
  /**
1826
2205
  * Specifies which fields in the response should be expanded.
1827
2206
  */
@@ -1831,35 +2210,89 @@ declare module 'stripe' {
1831
2210
  * The ID of the PaymentIntent to attach to the invoice.
1832
2211
  */
1833
2212
  payment_intent?: string;
1834
- }
1835
-
1836
- interface InvoiceCreatePreviewParams {
1837
- /**
1838
- * Settings for automatic tax lookup for this invoice preview.
1839
- */
1840
- automatic_tax?: InvoiceCreatePreviewParams.AutomaticTax;
1841
2213
 
1842
2214
  /**
1843
- * The currency to preview this invoice in. Defaults to that of `customer` if not specified.
2215
+ * The ID of the PaymentRecord to attach to the invoice.
1844
2216
  */
1845
- currency?: string;
2217
+ payment_record?: string;
1846
2218
 
1847
2219
  /**
1848
- * The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
2220
+ * The PaymentRecord data for attaching an out of band payment to the invoice.
1849
2221
  */
1850
- customer?: string;
2222
+ payment_record_data?: InvoiceAttachPaymentParams.PaymentRecordData;
2223
+ }
1851
2224
 
1852
- /**
1853
- * Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
1854
- */
1855
- customer_details?: InvoiceCreatePreviewParams.CustomerDetails;
2225
+ namespace InvoiceAttachPaymentParams {
2226
+ interface PaymentRecordData {
2227
+ /**
2228
+ * The amount that was paid out of band.
2229
+ */
2230
+ amount: number;
1856
2231
 
1857
- /**
1858
- * The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
1859
- */
1860
- discounts?: Stripe.Emptyable<Array<InvoiceCreatePreviewParams.Discount>>;
2232
+ /**
2233
+ * The currency that was paid out of band.
2234
+ */
2235
+ currency: string;
1861
2236
 
1862
- /**
2237
+ /**
2238
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2239
+ */
2240
+ metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
2241
+
2242
+ /**
2243
+ * The type of money movement for this out of band payment record.
2244
+ */
2245
+ money_movement_type: string;
2246
+
2247
+ /**
2248
+ * The timestamp when this out of band payment was paid.
2249
+ */
2250
+ paid_at?: number;
2251
+
2252
+ /**
2253
+ * The reference for this out of band payment record.
2254
+ */
2255
+ payment_reference?: string;
2256
+ }
2257
+ }
2258
+
2259
+ interface InvoiceCreatePreviewParams {
2260
+ /**
2261
+ * Settings for automatic tax lookup for this invoice preview.
2262
+ */
2263
+ automatic_tax?: InvoiceCreatePreviewParams.AutomaticTax;
2264
+
2265
+ /**
2266
+ * The identifier of the billing cadence for which you'd like to retrieve the upcoming invoice.Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided.
2267
+ */
2268
+ billing_cadence?: string;
2269
+
2270
+ /**
2271
+ * The currency to preview this invoice in. Defaults to that of `customer` if not specified.
2272
+ */
2273
+ currency?: string;
2274
+
2275
+ /**
2276
+ * The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
2277
+ */
2278
+ customer?: string;
2279
+
2280
+ /**
2281
+ * The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
2282
+ */
2283
+ customer_account?: string;
2284
+
2285
+ /**
2286
+ * Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
2287
+ */
2288
+ customer_details?: InvoiceCreatePreviewParams.CustomerDetails;
2289
+
2290
+ /**
2291
+ * The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
2292
+ */
2293
+ discounts?: Stripe.Emptyable<Array<InvoiceCreatePreviewParams.Discount>>;
2294
+
2295
+ /**
1863
2296
  * Specifies which fields in the response should be expanded.
1864
2297
  */
1865
2298
  expand?: Array<string>;
@@ -2128,12 +2561,56 @@ declare module 'stripe' {
2128
2561
  */
2129
2562
  discount?: string;
2130
2563
 
2564
+ /**
2565
+ * Details to determine how long the discount should be applied for.
2566
+ */
2567
+ discount_end?: Discount.DiscountEnd;
2568
+
2131
2569
  /**
2132
2570
  * ID of the promotion code to create a new discount for.
2133
2571
  */
2134
2572
  promotion_code?: string;
2135
2573
  }
2136
2574
 
2575
+ namespace Discount {
2576
+ interface DiscountEnd {
2577
+ /**
2578
+ * Time span for the redeemed discount.
2579
+ */
2580
+ duration?: DiscountEnd.Duration;
2581
+
2582
+ /**
2583
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2584
+ */
2585
+ timestamp?: number;
2586
+
2587
+ /**
2588
+ * The type of calculation made to determine when the discount ends.
2589
+ */
2590
+ type: DiscountEnd.Type;
2591
+ }
2592
+
2593
+ namespace DiscountEnd {
2594
+ interface Duration {
2595
+ /**
2596
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2597
+ */
2598
+ interval: Duration.Interval;
2599
+
2600
+ /**
2601
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2602
+ */
2603
+ interval_count: number;
2604
+ }
2605
+
2606
+ namespace Duration {
2607
+ type Interval = 'day' | 'month' | 'week' | 'year';
2608
+ }
2609
+
2610
+ type Type = 'duration' | 'timestamp';
2611
+ }
2612
+ }
2613
+
2137
2614
  interface InvoiceItem {
2138
2615
  /**
2139
2616
  * The integer amount in cents (or local equivalent) of previewed invoice item.
@@ -2228,12 +2705,56 @@ declare module 'stripe' {
2228
2705
  */
2229
2706
  discount?: string;
2230
2707
 
2708
+ /**
2709
+ * Details to determine how long the discount should be applied for.
2710
+ */
2711
+ discount_end?: Discount.DiscountEnd;
2712
+
2231
2713
  /**
2232
2714
  * ID of the promotion code to create a new discount for.
2233
2715
  */
2234
2716
  promotion_code?: string;
2235
2717
  }
2236
2718
 
2719
+ namespace Discount {
2720
+ interface DiscountEnd {
2721
+ /**
2722
+ * Time span for the redeemed discount.
2723
+ */
2724
+ duration?: DiscountEnd.Duration;
2725
+
2726
+ /**
2727
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2728
+ */
2729
+ timestamp?: number;
2730
+
2731
+ /**
2732
+ * The type of calculation made to determine when the discount ends.
2733
+ */
2734
+ type: DiscountEnd.Type;
2735
+ }
2736
+
2737
+ namespace DiscountEnd {
2738
+ interface Duration {
2739
+ /**
2740
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2741
+ */
2742
+ interval: Duration.Interval;
2743
+
2744
+ /**
2745
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2746
+ */
2747
+ interval_count: number;
2748
+ }
2749
+
2750
+ namespace Duration {
2751
+ type Interval = 'day' | 'month' | 'week' | 'year';
2752
+ }
2753
+
2754
+ type Type = 'duration' | 'timestamp';
2755
+ }
2756
+ }
2757
+
2237
2758
  interface Period {
2238
2759
  /**
2239
2760
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -2299,6 +2820,16 @@ declare module 'stripe' {
2299
2820
  type PreviewMode = 'next' | 'recurring';
2300
2821
 
2301
2822
  interface ScheduleDetails {
2823
+ /**
2824
+ * Changes to apply to the phases of the subscription schedule, in the order provided.
2825
+ */
2826
+ amendments?: Array<ScheduleDetails.Amendment>;
2827
+
2828
+ /**
2829
+ * 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.
2830
+ */
2831
+ billing_behavior?: ScheduleDetails.BillingBehavior;
2832
+
2302
2833
  /**
2303
2834
  * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2304
2835
  */
@@ -2314,6 +2845,11 @@ declare module 'stripe' {
2314
2845
  */
2315
2846
  phases?: Array<ScheduleDetails.Phase>;
2316
2847
 
2848
+ /**
2849
+ * Provide any time periods to bill in advance.
2850
+ */
2851
+ prebilling?: Stripe.Emptyable<Array<ScheduleDetails.Prebilling>>;
2852
+
2317
2853
  /**
2318
2854
  * In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
2319
2855
  */
@@ -2321,6 +2857,603 @@ declare module 'stripe' {
2321
2857
  }
2322
2858
 
2323
2859
  namespace ScheduleDetails {
2860
+ interface Amendment {
2861
+ /**
2862
+ * 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.
2863
+ */
2864
+ amendment_end?: Amendment.AmendmentEnd;
2865
+
2866
+ /**
2867
+ * Details to identify the earliest timestamp where the proposed change should take effect.
2868
+ */
2869
+ amendment_start: Amendment.AmendmentStart;
2870
+
2871
+ /**
2872
+ * 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.
2873
+ */
2874
+ billing_cycle_anchor?: Amendment.BillingCycleAnchor;
2875
+
2876
+ /**
2877
+ * Changes to the coupons being redeemed or discounts being applied during the amendment time span.
2878
+ */
2879
+ discount_actions?: Array<Amendment.DiscountAction>;
2880
+
2881
+ /**
2882
+ * Changes to the subscription items during the amendment time span.
2883
+ */
2884
+ item_actions?: Array<Amendment.ItemAction>;
2885
+
2886
+ /**
2887
+ * Instructions for how to modify phase metadata
2888
+ */
2889
+ metadata_actions?: Array<Amendment.MetadataAction>;
2890
+
2891
+ /**
2892
+ * 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`.
2893
+ */
2894
+ proration_behavior?: Amendment.ProrationBehavior;
2895
+
2896
+ /**
2897
+ * Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2898
+ */
2899
+ set_pause_collection?: Amendment.SetPauseCollection;
2900
+
2901
+ /**
2902
+ * Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2903
+ */
2904
+ set_schedule_end?: Amendment.SetScheduleEnd;
2905
+
2906
+ /**
2907
+ * Settings related to subscription trials.
2908
+ */
2909
+ trial_settings?: Amendment.TrialSettings;
2910
+ }
2911
+
2912
+ namespace Amendment {
2913
+ interface AmendmentEnd {
2914
+ /**
2915
+ * Use the `end` time of a given discount.
2916
+ */
2917
+ discount_end?: AmendmentEnd.DiscountEnd;
2918
+
2919
+ /**
2920
+ * Time span for the amendment starting from the `amendment_start`.
2921
+ */
2922
+ duration?: AmendmentEnd.Duration;
2923
+
2924
+ /**
2925
+ * A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
2926
+ */
2927
+ timestamp?: number;
2928
+
2929
+ /**
2930
+ * Select one of three ways to pass the `amendment_end`.
2931
+ */
2932
+ type: AmendmentEnd.Type;
2933
+ }
2934
+
2935
+ namespace AmendmentEnd {
2936
+ interface DiscountEnd {
2937
+ /**
2938
+ * The ID of a specific discount.
2939
+ */
2940
+ discount: string;
2941
+ }
2942
+
2943
+ interface Duration {
2944
+ /**
2945
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2946
+ */
2947
+ interval: Duration.Interval;
2948
+
2949
+ /**
2950
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2951
+ */
2952
+ interval_count: number;
2953
+ }
2954
+
2955
+ namespace Duration {
2956
+ type Interval = 'day' | 'month' | 'week' | 'year';
2957
+ }
2958
+
2959
+ type Type =
2960
+ | 'discount_end'
2961
+ | 'duration'
2962
+ | 'schedule_end'
2963
+ | 'timestamp'
2964
+ | 'trial_end'
2965
+ | 'trial_start'
2966
+ | 'upcoming_invoice';
2967
+ }
2968
+
2969
+ interface AmendmentStart {
2970
+ /**
2971
+ * Details of another amendment in the same array, immediately after which this amendment should begin.
2972
+ */
2973
+ amendment_end?: AmendmentStart.AmendmentEnd;
2974
+
2975
+ /**
2976
+ * Use the `end` time of a given discount.
2977
+ */
2978
+ discount_end?: AmendmentStart.DiscountEnd;
2979
+
2980
+ /**
2981
+ * A precise Unix timestamp for the amendment to start.
2982
+ */
2983
+ timestamp?: number;
2984
+
2985
+ /**
2986
+ * Select one of three ways to pass the `amendment_start`.
2987
+ */
2988
+ type: AmendmentStart.Type;
2989
+ }
2990
+
2991
+ namespace AmendmentStart {
2992
+ interface AmendmentEnd {
2993
+ /**
2994
+ * 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.
2995
+ */
2996
+ index: number;
2997
+ }
2998
+
2999
+ interface DiscountEnd {
3000
+ /**
3001
+ * The ID of a specific discount.
3002
+ */
3003
+ discount: string;
3004
+ }
3005
+
3006
+ type Type =
3007
+ | 'amendment_end'
3008
+ | 'discount_end'
3009
+ | 'now'
3010
+ | 'schedule_end'
3011
+ | 'timestamp'
3012
+ | 'trial_end'
3013
+ | 'trial_start'
3014
+ | 'upcoming_invoice';
3015
+ }
3016
+
3017
+ type BillingCycleAnchor = 'amendment_start' | 'automatic';
3018
+
3019
+ interface DiscountAction {
3020
+ /**
3021
+ * Details of the discount to add.
3022
+ */
3023
+ add?: DiscountAction.Add;
3024
+
3025
+ /**
3026
+ * Details of the discount to remove.
3027
+ */
3028
+ remove?: DiscountAction.Remove;
3029
+
3030
+ /**
3031
+ * Details of the discount to replace the existing discounts with.
3032
+ */
3033
+ set?: DiscountAction.Set;
3034
+
3035
+ /**
3036
+ * Determines the type of discount action.
3037
+ */
3038
+ type: DiscountAction.Type;
3039
+ }
3040
+
3041
+ namespace DiscountAction {
3042
+ interface Add {
3043
+ /**
3044
+ * The coupon code to redeem.
3045
+ */
3046
+ coupon?: string;
3047
+
3048
+ /**
3049
+ * An ID of an existing discount for a coupon that was already redeemed.
3050
+ */
3051
+ discount?: string;
3052
+
3053
+ /**
3054
+ * Details to determine how long the discount should be applied for.
3055
+ */
3056
+ discount_end?: Add.DiscountEnd;
3057
+
3058
+ /**
3059
+ * 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.
3060
+ */
3061
+ index?: number;
3062
+
3063
+ /**
3064
+ * The promotion code to redeem.
3065
+ */
3066
+ promotion_code?: string;
3067
+ }
3068
+
3069
+ namespace Add {
3070
+ interface DiscountEnd {
3071
+ /**
3072
+ * The type of calculation made to determine when the discount ends.
3073
+ */
3074
+ type: 'amendment_end';
3075
+ }
3076
+ }
3077
+
3078
+ interface Remove {
3079
+ /**
3080
+ * The coupon code to remove from the `discounts` array.
3081
+ */
3082
+ coupon?: string;
3083
+
3084
+ /**
3085
+ * The ID of a discount to remove from the `discounts` array.
3086
+ */
3087
+ discount?: string;
3088
+
3089
+ /**
3090
+ * The ID of a promotion code to remove from the `discounts` array.
3091
+ */
3092
+ promotion_code?: string;
3093
+ }
3094
+
3095
+ interface Set {
3096
+ /**
3097
+ * The coupon code to replace the `discounts` array with.
3098
+ */
3099
+ coupon?: string;
3100
+
3101
+ /**
3102
+ * An ID of an existing discount to replace the `discounts` array with.
3103
+ */
3104
+ discount?: string;
3105
+
3106
+ /**
3107
+ * An ID of an existing promotion code to replace the `discounts` array with.
3108
+ */
3109
+ promotion_code?: string;
3110
+ }
3111
+
3112
+ type Type = 'add' | 'remove' | 'set';
3113
+ }
3114
+
3115
+ interface ItemAction {
3116
+ /**
3117
+ * 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.
3118
+ */
3119
+ add?: ItemAction.Add;
3120
+
3121
+ /**
3122
+ * Details of the subscription item to remove.
3123
+ */
3124
+ remove?: ItemAction.Remove;
3125
+
3126
+ /**
3127
+ * 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.
3128
+ */
3129
+ set?: ItemAction.Set;
3130
+
3131
+ /**
3132
+ * Determines the type of item action.
3133
+ */
3134
+ type: ItemAction.Type;
3135
+ }
3136
+
3137
+ namespace ItemAction {
3138
+ interface Add {
3139
+ /**
3140
+ * The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
3141
+ */
3142
+ discounts?: Array<Add.Discount>;
3143
+
3144
+ /**
3145
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
3146
+ */
3147
+ metadata?: Stripe.MetadataParam;
3148
+
3149
+ /**
3150
+ * The ID of the price object.
3151
+ */
3152
+ price: string;
3153
+
3154
+ /**
3155
+ * Quantity for this item.
3156
+ */
3157
+ quantity?: number;
3158
+
3159
+ /**
3160
+ * 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`.
3161
+ */
3162
+ tax_rates?: Array<string>;
3163
+
3164
+ /**
3165
+ * Options that configure the trial on the subscription item.
3166
+ */
3167
+ trial?: Add.Trial;
3168
+ }
3169
+
3170
+ namespace Add {
3171
+ interface Discount {
3172
+ /**
3173
+ * ID of the coupon to create a new discount for.
3174
+ */
3175
+ coupon?: string;
3176
+
3177
+ /**
3178
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
3179
+ */
3180
+ discount?: string;
3181
+
3182
+ /**
3183
+ * Details to determine how long the discount should be applied for.
3184
+ */
3185
+ discount_end?: Discount.DiscountEnd;
3186
+
3187
+ /**
3188
+ * ID of the promotion code to create a new discount for.
3189
+ */
3190
+ promotion_code?: string;
3191
+ }
3192
+
3193
+ namespace Discount {
3194
+ interface DiscountEnd {
3195
+ /**
3196
+ * Time span for the redeemed discount.
3197
+ */
3198
+ duration?: DiscountEnd.Duration;
3199
+
3200
+ /**
3201
+ * A precise Unix timestamp for the discount to end. Must be in the future.
3202
+ */
3203
+ timestamp?: number;
3204
+
3205
+ /**
3206
+ * The type of calculation made to determine when the discount ends.
3207
+ */
3208
+ type: DiscountEnd.Type;
3209
+ }
3210
+
3211
+ namespace DiscountEnd {
3212
+ interface Duration {
3213
+ /**
3214
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3215
+ */
3216
+ interval: Duration.Interval;
3217
+
3218
+ /**
3219
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3220
+ */
3221
+ interval_count: number;
3222
+ }
3223
+
3224
+ namespace Duration {
3225
+ type Interval = 'day' | 'month' | 'week' | 'year';
3226
+ }
3227
+
3228
+ type Type = 'duration' | 'timestamp';
3229
+ }
3230
+ }
3231
+
3232
+ interface Trial {
3233
+ /**
3234
+ * 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.
3235
+ */
3236
+ converts_to?: Array<string>;
3237
+
3238
+ /**
3239
+ * Determines the type of trial for this item.
3240
+ */
3241
+ type: Trial.Type;
3242
+ }
3243
+
3244
+ namespace Trial {
3245
+ type Type = 'free' | 'paid';
3246
+ }
3247
+ }
3248
+
3249
+ interface Remove {
3250
+ /**
3251
+ * ID of a price to remove.
3252
+ */
3253
+ price: string;
3254
+ }
3255
+
3256
+ interface Set {
3257
+ /**
3258
+ * 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`.
3259
+ */
3260
+ discounts?: Array<Set.Discount>;
3261
+
3262
+ /**
3263
+ * 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`.
3264
+ */
3265
+ metadata?: Stripe.MetadataParam;
3266
+
3267
+ /**
3268
+ * The ID of the price object.
3269
+ */
3270
+ price: string;
3271
+
3272
+ /**
3273
+ * 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`.
3274
+ */
3275
+ quantity?: number;
3276
+
3277
+ /**
3278
+ * 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`.
3279
+ */
3280
+ tax_rates?: Array<string>;
3281
+
3282
+ /**
3283
+ * 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`.
3284
+ */
3285
+ trial?: Set.Trial;
3286
+ }
3287
+
3288
+ namespace Set {
3289
+ interface Discount {
3290
+ /**
3291
+ * ID of the coupon to create a new discount for.
3292
+ */
3293
+ coupon?: string;
3294
+
3295
+ /**
3296
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
3297
+ */
3298
+ discount?: string;
3299
+
3300
+ /**
3301
+ * Details to determine how long the discount should be applied for.
3302
+ */
3303
+ discount_end?: Discount.DiscountEnd;
3304
+
3305
+ /**
3306
+ * ID of the promotion code to create a new discount for.
3307
+ */
3308
+ promotion_code?: string;
3309
+ }
3310
+
3311
+ namespace Discount {
3312
+ interface DiscountEnd {
3313
+ /**
3314
+ * Time span for the redeemed discount.
3315
+ */
3316
+ duration?: DiscountEnd.Duration;
3317
+
3318
+ /**
3319
+ * A precise Unix timestamp for the discount to end. Must be in the future.
3320
+ */
3321
+ timestamp?: number;
3322
+
3323
+ /**
3324
+ * The type of calculation made to determine when the discount ends.
3325
+ */
3326
+ type: DiscountEnd.Type;
3327
+ }
3328
+
3329
+ namespace DiscountEnd {
3330
+ interface Duration {
3331
+ /**
3332
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3333
+ */
3334
+ interval: Duration.Interval;
3335
+
3336
+ /**
3337
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3338
+ */
3339
+ interval_count: number;
3340
+ }
3341
+
3342
+ namespace Duration {
3343
+ type Interval = 'day' | 'month' | 'week' | 'year';
3344
+ }
3345
+
3346
+ type Type = 'duration' | 'timestamp';
3347
+ }
3348
+ }
3349
+
3350
+ interface Trial {
3351
+ /**
3352
+ * 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.
3353
+ */
3354
+ converts_to?: Array<string>;
3355
+
3356
+ /**
3357
+ * Determines the type of trial for this item.
3358
+ */
3359
+ type: Trial.Type;
3360
+ }
3361
+
3362
+ namespace Trial {
3363
+ type Type = 'free' | 'paid';
3364
+ }
3365
+ }
3366
+
3367
+ type Type = 'add' | 'remove' | 'set';
3368
+ }
3369
+
3370
+ interface MetadataAction {
3371
+ /**
3372
+ * Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
3373
+ */
3374
+ add?: {
3375
+ [key: string]: string;
3376
+ };
3377
+
3378
+ /**
3379
+ * Keys to remove from schedule phase metadata.
3380
+ */
3381
+ remove?: Array<string>;
3382
+
3383
+ /**
3384
+ * Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
3385
+ */
3386
+ set?: Stripe.Emptyable<{
3387
+ [key: string]: string;
3388
+ }>;
3389
+
3390
+ /**
3391
+ * Select one of three ways to update phase-level `metadata` on subscription schedules.
3392
+ */
3393
+ type: MetadataAction.Type;
3394
+ }
3395
+
3396
+ namespace MetadataAction {
3397
+ type Type = 'add' | 'remove' | 'set';
3398
+ }
3399
+
3400
+ type ProrationBehavior =
3401
+ | 'always_invoice'
3402
+ | 'create_prorations'
3403
+ | 'none';
3404
+
3405
+ interface SetPauseCollection {
3406
+ /**
3407
+ * Details of the pause_collection behavior to apply to the amendment.
3408
+ */
3409
+ set?: SetPauseCollection.Set;
3410
+
3411
+ /**
3412
+ * Determines the type of the pause_collection amendment.
3413
+ */
3414
+ type: SetPauseCollection.Type;
3415
+ }
3416
+
3417
+ namespace SetPauseCollection {
3418
+ interface Set {
3419
+ /**
3420
+ * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3421
+ */
3422
+ behavior: Set.Behavior;
3423
+ }
3424
+
3425
+ namespace Set {
3426
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
3427
+ }
3428
+
3429
+ type Type = 'remove' | 'set';
3430
+ }
3431
+
3432
+ type SetScheduleEnd = 'amendment_end' | 'amendment_start';
3433
+
3434
+ interface TrialSettings {
3435
+ /**
3436
+ * Defines how the subscription should behave when a trial ends.
3437
+ */
3438
+ end_behavior?: TrialSettings.EndBehavior;
3439
+ }
3440
+
3441
+ namespace TrialSettings {
3442
+ interface EndBehavior {
3443
+ /**
3444
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3445
+ */
3446
+ prorate_up_front?: EndBehavior.ProrateUpFront;
3447
+ }
3448
+
3449
+ namespace EndBehavior {
3450
+ type ProrateUpFront = 'defer' | 'include';
3451
+ }
3452
+ }
3453
+ }
3454
+
3455
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
3456
+
2324
3457
  interface BillingMode {
2325
3458
  /**
2326
3459
  * Configure behavior for flexible billing mode.
@@ -2436,6 +3569,11 @@ declare module 'stripe' {
2436
3569
  */
2437
3570
  on_behalf_of?: string;
2438
3571
 
3572
+ /**
3573
+ * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
3574
+ */
3575
+ pause_collection?: Phase.PauseCollection;
3576
+
2439
3577
  /**
2440
3578
  * Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/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://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
2441
3579
  */
@@ -2456,10 +3594,20 @@ declare module 'stripe' {
2456
3594
  */
2457
3595
  trial?: boolean;
2458
3596
 
3597
+ /**
3598
+ * Specify trial behavior when crossing phase boundaries
3599
+ */
3600
+ trial_continuation?: Phase.TrialContinuation;
3601
+
2459
3602
  /**
2460
3603
  * 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`
2461
3604
  */
2462
3605
  trial_end?: number | 'now';
3606
+
3607
+ /**
3608
+ * Settings related to subscription trials.
3609
+ */
3610
+ trial_settings?: Phase.TrialSettings;
2463
3611
  }
2464
3612
 
2465
3613
  namespace Phase {
@@ -2512,12 +3660,56 @@ declare module 'stripe' {
2512
3660
  */
2513
3661
  discount?: string;
2514
3662
 
3663
+ /**
3664
+ * Details to determine how long the discount should be applied for.
3665
+ */
3666
+ discount_end?: Discount.DiscountEnd;
3667
+
2515
3668
  /**
2516
3669
  * ID of the promotion code to create a new discount for.
2517
3670
  */
2518
3671
  promotion_code?: string;
2519
3672
  }
2520
3673
 
3674
+ namespace Discount {
3675
+ interface DiscountEnd {
3676
+ /**
3677
+ * Time span for the redeemed discount.
3678
+ */
3679
+ duration?: DiscountEnd.Duration;
3680
+
3681
+ /**
3682
+ * A precise Unix timestamp for the discount to end. Must be in the future.
3683
+ */
3684
+ timestamp?: number;
3685
+
3686
+ /**
3687
+ * The type of calculation made to determine when the discount ends.
3688
+ */
3689
+ type: DiscountEnd.Type;
3690
+ }
3691
+
3692
+ namespace DiscountEnd {
3693
+ interface Duration {
3694
+ /**
3695
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3696
+ */
3697
+ interval: Duration.Interval;
3698
+
3699
+ /**
3700
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3701
+ */
3702
+ interval_count: number;
3703
+ }
3704
+
3705
+ namespace Duration {
3706
+ type Interval = 'day' | 'month' | 'week' | 'year';
3707
+ }
3708
+
3709
+ type Type = 'duration' | 'timestamp';
3710
+ }
3711
+ }
3712
+
2521
3713
  interface Period {
2522
3714
  /**
2523
3715
  * End of the invoice item period.
@@ -2656,12 +3848,56 @@ declare module 'stripe' {
2656
3848
  */
2657
3849
  discount?: string;
2658
3850
 
3851
+ /**
3852
+ * Details to determine how long the discount should be applied for.
3853
+ */
3854
+ discount_end?: Discount.DiscountEnd;
3855
+
2659
3856
  /**
2660
3857
  * ID of the promotion code to create a new discount for.
2661
3858
  */
2662
3859
  promotion_code?: string;
2663
3860
  }
2664
3861
 
3862
+ namespace Discount {
3863
+ interface DiscountEnd {
3864
+ /**
3865
+ * Time span for the redeemed discount.
3866
+ */
3867
+ duration?: DiscountEnd.Duration;
3868
+
3869
+ /**
3870
+ * A precise Unix timestamp for the discount to end. Must be in the future.
3871
+ */
3872
+ timestamp?: number;
3873
+
3874
+ /**
3875
+ * The type of calculation made to determine when the discount ends.
3876
+ */
3877
+ type: DiscountEnd.Type;
3878
+ }
3879
+
3880
+ namespace DiscountEnd {
3881
+ interface Duration {
3882
+ /**
3883
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3884
+ */
3885
+ interval: Duration.Interval;
3886
+
3887
+ /**
3888
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3889
+ */
3890
+ interval_count: number;
3891
+ }
3892
+
3893
+ namespace Duration {
3894
+ type Interval = 'day' | 'month' | 'week' | 'year';
3895
+ }
3896
+
3897
+ type Type = 'duration' | 'timestamp';
3898
+ }
3899
+ }
3900
+
2665
3901
  interface Duration {
2666
3902
  /**
2667
3903
  * Specifies phase duration. Either `day`, `week`, `month` or `year`.
@@ -2753,6 +3989,11 @@ declare module 'stripe' {
2753
3989
  * A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
2754
3990
  */
2755
3991
  tax_rates?: Stripe.Emptyable<Array<string>>;
3992
+
3993
+ /**
3994
+ * Options that configure the trial on the subscription item.
3995
+ */
3996
+ trial?: Item.Trial;
2756
3997
  }
2757
3998
 
2758
3999
  namespace Item {
@@ -2774,12 +4015,56 @@ declare module 'stripe' {
2774
4015
  */
2775
4016
  discount?: string;
2776
4017
 
4018
+ /**
4019
+ * Details to determine how long the discount should be applied for.
4020
+ */
4021
+ discount_end?: Discount.DiscountEnd;
4022
+
2777
4023
  /**
2778
4024
  * ID of the promotion code to create a new discount for.
2779
4025
  */
2780
4026
  promotion_code?: string;
2781
4027
  }
2782
4028
 
4029
+ namespace Discount {
4030
+ interface DiscountEnd {
4031
+ /**
4032
+ * Time span for the redeemed discount.
4033
+ */
4034
+ duration?: DiscountEnd.Duration;
4035
+
4036
+ /**
4037
+ * A precise Unix timestamp for the discount to end. Must be in the future.
4038
+ */
4039
+ timestamp?: number;
4040
+
4041
+ /**
4042
+ * The type of calculation made to determine when the discount ends.
4043
+ */
4044
+ type: DiscountEnd.Type;
4045
+ }
4046
+
4047
+ namespace DiscountEnd {
4048
+ interface Duration {
4049
+ /**
4050
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4051
+ */
4052
+ interval: Duration.Interval;
4053
+
4054
+ /**
4055
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4056
+ */
4057
+ interval_count: number;
4058
+ }
4059
+
4060
+ namespace Duration {
4061
+ type Interval = 'day' | 'month' | 'week' | 'year';
4062
+ }
4063
+
4064
+ type Type = 'duration' | 'timestamp';
4065
+ }
4066
+ }
4067
+
2783
4068
  interface PriceData {
2784
4069
  /**
2785
4070
  * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
@@ -2831,6 +4116,33 @@ declare module 'stripe' {
2831
4116
 
2832
4117
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
2833
4118
  }
4119
+
4120
+ interface Trial {
4121
+ /**
4122
+ * 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.
4123
+ */
4124
+ converts_to?: Array<string>;
4125
+
4126
+ /**
4127
+ * Determines the type of trial for this item.
4128
+ */
4129
+ type: Trial.Type;
4130
+ }
4131
+
4132
+ namespace Trial {
4133
+ type Type = 'free' | 'paid';
4134
+ }
4135
+ }
4136
+
4137
+ interface PauseCollection {
4138
+ /**
4139
+ * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
4140
+ */
4141
+ behavior: PauseCollection.Behavior;
4142
+ }
4143
+
4144
+ namespace PauseCollection {
4145
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
2834
4146
  }
2835
4147
 
2836
4148
  type ProrationBehavior =
@@ -2849,6 +4161,95 @@ declare module 'stripe' {
2849
4161
  */
2850
4162
  destination: string;
2851
4163
  }
4164
+
4165
+ type TrialContinuation = 'continue' | 'none';
4166
+
4167
+ interface TrialSettings {
4168
+ /**
4169
+ * Defines how the subscription should behave when a trial ends.
4170
+ */
4171
+ end_behavior?: TrialSettings.EndBehavior;
4172
+ }
4173
+
4174
+ namespace TrialSettings {
4175
+ interface EndBehavior {
4176
+ /**
4177
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
4178
+ */
4179
+ prorate_up_front?: EndBehavior.ProrateUpFront;
4180
+ }
4181
+
4182
+ namespace EndBehavior {
4183
+ type ProrateUpFront = 'defer' | 'include';
4184
+ }
4185
+ }
4186
+ }
4187
+
4188
+ interface Prebilling {
4189
+ /**
4190
+ * The end of the prebilled time period.
4191
+ */
4192
+ bill_until?: Prebilling.BillUntil;
4193
+
4194
+ /**
4195
+ * This is used to determine the number of billing cycles to prebill.
4196
+ */
4197
+ iterations?: number;
4198
+ }
4199
+
4200
+ namespace Prebilling {
4201
+ interface BillUntil {
4202
+ /**
4203
+ * End the prebilled period when a specified amendment ends.
4204
+ */
4205
+ amendment_end?: BillUntil.AmendmentEnd;
4206
+
4207
+ /**
4208
+ * Time span for prebilling, starting from `bill_from`.
4209
+ */
4210
+ duration?: BillUntil.Duration;
4211
+
4212
+ /**
4213
+ * End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
4214
+ */
4215
+ timestamp?: number;
4216
+
4217
+ /**
4218
+ * Select one of several ways to pass the `bill_until` value.
4219
+ */
4220
+ type: BillUntil.Type;
4221
+ }
4222
+
4223
+ namespace BillUntil {
4224
+ interface AmendmentEnd {
4225
+ /**
4226
+ * 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.
4227
+ */
4228
+ index: number;
4229
+ }
4230
+
4231
+ interface Duration {
4232
+ /**
4233
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4234
+ */
4235
+ interval: Duration.Interval;
4236
+
4237
+ /**
4238
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4239
+ */
4240
+ interval_count: number;
4241
+ }
4242
+
4243
+ namespace Duration {
4244
+ type Interval = 'day' | 'month' | 'week' | 'year';
4245
+ }
4246
+
4247
+ type Type =
4248
+ | 'amendment_end'
4249
+ | 'duration'
4250
+ | 'schedule_end'
4251
+ | 'timestamp';
4252
+ }
2852
4253
  }
2853
4254
 
2854
4255
  type ProrationBehavior =
@@ -2868,6 +4269,13 @@ declare module 'stripe' {
2868
4269
  */
2869
4270
  billing_mode?: SubscriptionDetails.BillingMode;
2870
4271
 
4272
+ /**
4273
+ * Sets the billing schedules for the subscription.
4274
+ */
4275
+ billing_schedules?: Stripe.Emptyable<
4276
+ Array<SubscriptionDetails.BillingSchedule>
4277
+ >;
4278
+
2871
4279
  /**
2872
4280
  * A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
2873
4281
  */
@@ -2893,6 +4301,11 @@ declare module 'stripe' {
2893
4301
  */
2894
4302
  items?: Array<SubscriptionDetails.Item>;
2895
4303
 
4304
+ /**
4305
+ * The pre-billing to apply to the subscription as a preview.
4306
+ */
4307
+ prebilling?: SubscriptionDetails.Prebilling;
4308
+
2896
4309
  /**
2897
4310
  * Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
2898
4311
  */
@@ -2949,6 +4362,74 @@ declare module 'stripe' {
2949
4362
  type Type = 'classic' | 'flexible';
2950
4363
  }
2951
4364
 
4365
+ interface BillingSchedule {
4366
+ /**
4367
+ * Configure billing schedule differently for individual subscription items.
4368
+ */
4369
+ applies_to?: Array<BillingSchedule.AppliesTo>;
4370
+
4371
+ /**
4372
+ * The end date for the billing schedule.
4373
+ */
4374
+ bill_until?: BillingSchedule.BillUntil;
4375
+
4376
+ /**
4377
+ * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
4378
+ */
4379
+ key?: string;
4380
+ }
4381
+
4382
+ namespace BillingSchedule {
4383
+ interface AppliesTo {
4384
+ /**
4385
+ * The ID of the price object.
4386
+ */
4387
+ price?: string;
4388
+
4389
+ /**
4390
+ * Controls which subscription items the billing schedule applies to.
4391
+ */
4392
+ type: 'price';
4393
+ }
4394
+
4395
+ interface BillUntil {
4396
+ /**
4397
+ * Specifies the billing period.
4398
+ */
4399
+ duration?: BillUntil.Duration;
4400
+
4401
+ /**
4402
+ * The end date of the billing schedule.
4403
+ */
4404
+ timestamp?: number;
4405
+
4406
+ /**
4407
+ * Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
4408
+ */
4409
+ type: BillUntil.Type;
4410
+ }
4411
+
4412
+ namespace BillUntil {
4413
+ interface Duration {
4414
+ /**
4415
+ * Specifies billing duration. Either `day`, `week`, `month` or `year`.
4416
+ */
4417
+ interval: Duration.Interval;
4418
+
4419
+ /**
4420
+ * The multiplier applied to the interval.
4421
+ */
4422
+ interval_count?: number;
4423
+ }
4424
+
4425
+ namespace Duration {
4426
+ type Interval = 'day' | 'month' | 'week' | 'year';
4427
+ }
4428
+
4429
+ type Type = 'duration' | 'timestamp';
4430
+ }
4431
+ }
4432
+
2952
4433
  type CancelAt = 'max_period_end' | 'min_period_end';
2953
4434
 
2954
4435
  interface Item {
@@ -3027,12 +4508,56 @@ declare module 'stripe' {
3027
4508
  */
3028
4509
  discount?: string;
3029
4510
 
4511
+ /**
4512
+ * Details to determine how long the discount should be applied for.
4513
+ */
4514
+ discount_end?: Discount.DiscountEnd;
4515
+
3030
4516
  /**
3031
4517
  * ID of the promotion code to create a new discount for.
3032
4518
  */
3033
4519
  promotion_code?: string;
3034
4520
  }
3035
4521
 
4522
+ namespace Discount {
4523
+ interface DiscountEnd {
4524
+ /**
4525
+ * Time span for the redeemed discount.
4526
+ */
4527
+ duration?: DiscountEnd.Duration;
4528
+
4529
+ /**
4530
+ * A precise Unix timestamp for the discount to end. Must be in the future.
4531
+ */
4532
+ timestamp?: number;
4533
+
4534
+ /**
4535
+ * The type of calculation made to determine when the discount ends.
4536
+ */
4537
+ type: DiscountEnd.Type;
4538
+ }
4539
+
4540
+ namespace DiscountEnd {
4541
+ interface Duration {
4542
+ /**
4543
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4544
+ */
4545
+ interval: Duration.Interval;
4546
+
4547
+ /**
4548
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4549
+ */
4550
+ interval_count: number;
4551
+ }
4552
+
4553
+ namespace Duration {
4554
+ type Interval = 'day' | 'month' | 'week' | 'year';
4555
+ }
4556
+
4557
+ type Type = 'duration' | 'timestamp';
4558
+ }
4559
+ }
4560
+
3036
4561
  interface PriceData {
3037
4562
  /**
3038
4563
  * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
@@ -3086,6 +4611,13 @@ declare module 'stripe' {
3086
4611
  }
3087
4612
  }
3088
4613
 
4614
+ interface Prebilling {
4615
+ /**
4616
+ * This is used to determine the number of billing cycles to prebill.
4617
+ */
4618
+ iterations: number;
4619
+ }
4620
+
3089
4621
  type ProrationBehavior =
3090
4622
  | 'always_invoice'
3091
4623
  | 'create_prorations'
@@ -3270,6 +4802,11 @@ declare module 'stripe' {
3270
4802
  */
3271
4803
  id: string;
3272
4804
 
4805
+ /**
4806
+ * 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.
4807
+ */
4808
+ margins?: Stripe.Emptyable<Array<string>>;
4809
+
3273
4810
  /**
3274
4811
  * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
3275
4812
  */
@@ -3318,12 +4855,56 @@ declare module 'stripe' {
3318
4855
  */
3319
4856
  discount?: string;
3320
4857
 
4858
+ /**
4859
+ * Details to determine how long the discount should be applied for.
4860
+ */
4861
+ discount_end?: Discount.DiscountEnd;
4862
+
3321
4863
  /**
3322
4864
  * ID of the promotion code to create a new discount for.
3323
4865
  */
3324
4866
  promotion_code?: string;
3325
4867
  }
3326
4868
 
4869
+ namespace Discount {
4870
+ interface DiscountEnd {
4871
+ /**
4872
+ * Time span for the redeemed discount.
4873
+ */
4874
+ duration?: DiscountEnd.Duration;
4875
+
4876
+ /**
4877
+ * A precise Unix timestamp for the discount to end. Must be in the future.
4878
+ */
4879
+ timestamp?: number;
4880
+
4881
+ /**
4882
+ * The type of calculation made to determine when the discount ends.
4883
+ */
4884
+ type: DiscountEnd.Type;
4885
+ }
4886
+
4887
+ namespace DiscountEnd {
4888
+ interface Duration {
4889
+ /**
4890
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4891
+ */
4892
+ interval: Duration.Interval;
4893
+
4894
+ /**
4895
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4896
+ */
4897
+ interval_count: number;
4898
+ }
4899
+
4900
+ namespace Duration {
4901
+ type Interval = 'day' | 'month' | 'week' | 'year';
4902
+ }
4903
+
4904
+ type Type = 'duration' | 'timestamp';
4905
+ }
4906
+ }
4907
+
3327
4908
  interface Period {
3328
4909
  /**
3329
4910
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -3555,6 +5136,11 @@ declare module 'stripe' {
3555
5136
  */
3556
5137
  expand?: Array<string>;
3557
5138
 
5139
+ /**
5140
+ * 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.
5141
+ */
5142
+ margins?: Stripe.Emptyable<Array<string>>;
5143
+
3558
5144
  /**
3559
5145
  * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
3560
5146
  */
@@ -3605,12 +5191,56 @@ declare module 'stripe' {
3605
5191
  */
3606
5192
  discount?: string;
3607
5193
 
5194
+ /**
5195
+ * Details to determine how long the discount should be applied for.
5196
+ */
5197
+ discount_end?: Discount.DiscountEnd;
5198
+
3608
5199
  /**
3609
5200
  * ID of the promotion code to create a new discount for.
3610
5201
  */
3611
5202
  promotion_code?: string;
3612
5203
  }
3613
5204
 
5205
+ namespace Discount {
5206
+ interface DiscountEnd {
5207
+ /**
5208
+ * Time span for the redeemed discount.
5209
+ */
5210
+ duration?: DiscountEnd.Duration;
5211
+
5212
+ /**
5213
+ * A precise Unix timestamp for the discount to end. Must be in the future.
5214
+ */
5215
+ timestamp?: number;
5216
+
5217
+ /**
5218
+ * The type of calculation made to determine when the discount ends.
5219
+ */
5220
+ type: DiscountEnd.Type;
5221
+ }
5222
+
5223
+ namespace DiscountEnd {
5224
+ interface Duration {
5225
+ /**
5226
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
5227
+ */
5228
+ interval: Duration.Interval;
5229
+
5230
+ /**
5231
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
5232
+ */
5233
+ interval_count: number;
5234
+ }
5235
+
5236
+ namespace Duration {
5237
+ type Interval = 'day' | 'month' | 'week' | 'year';
5238
+ }
5239
+
5240
+ type Type = 'duration' | 'timestamp';
5241
+ }
5242
+ }
5243
+
3614
5244
  interface Period {
3615
5245
  /**
3616
5246
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.