stripe 18.2.0 → 18.3.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/CHANGELOG.md +1241 -11
  2. package/README.md +1 -0
  3. package/VERSION +1 -1
  4. package/cjs/Error.js +91 -1
  5. package/cjs/apiVersion.js +1 -1
  6. package/cjs/resources/AccountNotices.js +21 -0
  7. package/cjs/resources/BalanceSettings.js +10 -0
  8. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  9. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  10. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  11. package/cjs/resources/ExternalAccounts.js +23 -0
  12. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  13. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  14. package/cjs/resources/FxQuotes.js +15 -0
  15. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  16. package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
  17. package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
  18. package/cjs/resources/Margins.js +22 -0
  19. package/cjs/resources/Orders.js +24 -0
  20. package/cjs/resources/{InvoicePayments.js → PaymentAttemptRecords.js} +4 -4
  21. package/cjs/resources/PaymentIntents.js +13 -0
  22. package/cjs/resources/PaymentRecords.js +29 -0
  23. package/cjs/resources/Privacy/RedactionJobs.js +42 -0
  24. package/cjs/resources/Quotes.js +32 -0
  25. package/cjs/resources/SubscriptionSchedules.js +4 -0
  26. package/cjs/resources/Subscriptions.js +4 -0
  27. package/cjs/resources/Tax/Associations.js +9 -0
  28. package/cjs/resources/Tax/Forms.js +20 -0
  29. package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
  30. package/cjs/resources/Terminal/Readers.js +8 -0
  31. package/cjs/resources/V2/Core/AccountLinks.js +9 -0
  32. package/cjs/resources/V2/Core/Accounts/Persons.js +29 -0
  33. package/cjs/resources/V2/Core/Accounts.js +25 -0
  34. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +28 -0
  35. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +24 -0
  36. package/cjs/resources/V2/MoneyManagement/Adjustments.js +17 -0
  37. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +17 -0
  38. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +21 -0
  39. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +21 -0
  40. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +16 -0
  41. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +25 -0
  42. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +29 -0
  43. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +25 -0
  44. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +25 -0
  45. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +12 -0
  46. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +17 -0
  47. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +17 -0
  48. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +17 -0
  49. package/cjs/resources/V2/MoneyManagement/Transactions.js +17 -0
  50. package/cjs/resources/V2/Payments/OffSessionPayments.js +25 -0
  51. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
  52. package/cjs/resources.js +98 -10
  53. package/cjs/stripe.core.js +1 -1
  54. package/esm/Error.js +79 -0
  55. package/esm/apiVersion.js +1 -1
  56. package/esm/resources/AccountNotices.js +18 -0
  57. package/esm/resources/BalanceSettings.js +7 -0
  58. package/esm/resources/Capital/FinancingOffers.js +18 -0
  59. package/esm/resources/Capital/FinancingSummary.js +9 -0
  60. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  61. package/esm/resources/ExternalAccounts.js +20 -0
  62. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  63. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  64. package/esm/resources/FxQuotes.js +12 -0
  65. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  66. package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
  67. package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
  68. package/esm/resources/Margins.js +19 -0
  69. package/esm/resources/Orders.js +21 -0
  70. package/esm/resources/{InvoicePayments.js → PaymentAttemptRecords.js} +3 -3
  71. package/esm/resources/PaymentIntents.js +13 -0
  72. package/esm/resources/PaymentRecords.js +26 -0
  73. package/esm/resources/Privacy/RedactionJobs.js +39 -0
  74. package/esm/resources/Quotes.js +32 -0
  75. package/esm/resources/SubscriptionSchedules.js +4 -0
  76. package/esm/resources/Subscriptions.js +4 -0
  77. package/esm/resources/Tax/Associations.js +6 -0
  78. package/esm/resources/Tax/Forms.js +17 -0
  79. package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
  80. package/esm/resources/Terminal/Readers.js +8 -0
  81. package/esm/resources/V2/Core/AccountLinks.js +6 -0
  82. package/esm/resources/V2/Core/Accounts/Persons.js +26 -0
  83. package/esm/resources/V2/Core/Accounts.js +22 -0
  84. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +25 -0
  85. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +21 -0
  86. package/esm/resources/V2/MoneyManagement/Adjustments.js +14 -0
  87. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +14 -0
  88. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +18 -0
  89. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +18 -0
  90. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +13 -0
  91. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +22 -0
  92. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +26 -0
  93. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +22 -0
  94. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +22 -0
  95. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +9 -0
  96. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +14 -0
  97. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +14 -0
  98. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +14 -0
  99. package/esm/resources/V2/MoneyManagement/Transactions.js +14 -0
  100. package/esm/resources/V2/Payments/OffSessionPayments.js +22 -0
  101. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
  102. package/esm/resources.js +82 -1
  103. package/esm/stripe.core.js +1 -1
  104. package/package.json +1 -1
  105. package/types/AccountLinksResource.d.ts +5 -1
  106. package/types/AccountNotices.d.ts +113 -0
  107. package/types/AccountNoticesResource.d.ts +98 -0
  108. package/types/AccountSessions.d.ts +45 -0
  109. package/types/AccountSessionsResource.d.ts +264 -0
  110. package/types/Accounts.d.ts +212 -1
  111. package/types/AccountsResource.d.ts +544 -0
  112. package/types/BalanceSettings.d.ts +89 -0
  113. package/types/BalanceSettingsResource.d.ts +108 -0
  114. package/types/Billing/CreditBalanceSummary.d.ts +5 -0
  115. package/types/Billing/CreditBalanceSummaryResource.d.ts +8 -3
  116. package/types/Billing/CreditBalanceTransactionsResource.d.ts +12 -4
  117. package/types/Billing/CreditGrants.d.ts +5 -0
  118. package/types/Billing/CreditGrantsResource.d.ts +11 -1
  119. package/types/BillingPortal/Sessions.d.ts +5 -0
  120. package/types/BillingPortal/SessionsResource.d.ts +12 -4
  121. package/types/Capital/FinancingOffers.d.ts +188 -0
  122. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  123. package/types/Capital/FinancingSummary.d.ts +106 -0
  124. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  125. package/types/Capital/FinancingTransactions.d.ts +135 -0
  126. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  127. package/types/Cards.d.ts +5 -0
  128. package/types/CashBalances.d.ts +5 -0
  129. package/types/Charges.d.ts +166 -0
  130. package/types/ChargesResource.d.ts +1406 -0
  131. package/types/Checkout/Sessions.d.ts +314 -1
  132. package/types/Checkout/SessionsResource.d.ts +340 -1
  133. package/types/ConfirmationTokens.d.ts +125 -0
  134. package/types/Coupons.d.ts +33 -0
  135. package/types/CouponsResource.d.ts +21 -0
  136. package/types/CreditNoteLineItems.d.ts +17 -0
  137. package/types/CreditNotes.d.ts +5 -0
  138. package/types/CreditNotesResource.d.ts +5 -0
  139. package/types/CustomerBalanceTransactions.d.ts +2 -0
  140. package/types/CustomerCashBalanceTransactions.d.ts +2 -0
  141. package/types/CustomerSessions.d.ts +5 -0
  142. package/types/CustomerSessionsResource.d.ts +6 -1
  143. package/types/Customers.d.ts +2 -0
  144. package/types/CustomersResource.d.ts +8 -0
  145. package/types/Discounts.d.ts +10 -0
  146. package/types/Errors.d.ts +69 -2
  147. package/types/EventTypes.d.ts +681 -0
  148. package/types/Events.d.ts +98 -0
  149. package/types/ExternalAccountsResource.d.ts +304 -0
  150. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  151. package/types/FinancialConnections/Accounts.d.ts +36 -1
  152. package/types/FinancialConnections/AccountsResource.d.ts +40 -3
  153. package/types/FinancialConnections/Institutions.d.ts +98 -0
  154. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  155. package/types/FinancialConnections/Sessions.d.ts +51 -1
  156. package/types/FinancialConnections/SessionsResource.d.ts +43 -1
  157. package/types/FxQuotes.d.ts +153 -0
  158. package/types/FxQuotesResource.d.ts +130 -0
  159. package/types/Identity/VerificationSessions.d.ts +5 -0
  160. package/types/Identity/VerificationSessionsResource.d.ts +7 -0
  161. package/types/InvoiceItems.d.ts +10 -0
  162. package/types/InvoiceItemsResource.d.ts +117 -6
  163. package/types/InvoiceLineItems.d.ts +45 -1
  164. package/types/InvoicePayments.d.ts +5 -0
  165. package/types/Invoices.d.ts +133 -3
  166. package/types/InvoicesResource.d.ts +1458 -13
  167. package/types/Issuing/CardholdersResource.d.ts +2 -1
  168. package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
  169. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
  170. package/types/Issuing/DisputeSettlementDetails.d.ts +85 -0
  171. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
  172. package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
  173. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
  174. package/types/Issuing/Settlements.d.ts +113 -0
  175. package/types/Issuing/Transactions.d.ts +5 -0
  176. package/types/Issuing/TransactionsResource.d.ts +5 -0
  177. package/types/LineItems.d.ts +49 -0
  178. package/types/Mandates.d.ts +77 -0
  179. package/types/Margins.d.ts +56 -0
  180. package/types/MarginsResource.d.ts +114 -0
  181. package/types/Orders.d.ts +1159 -0
  182. package/types/OrdersResource.d.ts +2967 -0
  183. package/types/PaymentAttemptRecords.d.ts +2132 -0
  184. package/types/PaymentAttemptRecordsResource.d.ts +47 -0
  185. package/types/PaymentIntentAmountDetailsLineItems.d.ts +116 -0
  186. package/types/PaymentIntents.d.ts +764 -2
  187. package/types/PaymentIntentsResource.d.ts +8819 -4111
  188. package/types/PaymentLinks.d.ts +6 -0
  189. package/types/PaymentLinksResource.d.ts +12 -0
  190. package/types/PaymentMethodConfigurations.d.ts +180 -0
  191. package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
  192. package/types/PaymentMethods.d.ts +125 -0
  193. package/types/PaymentMethodsResource.d.ts +167 -2
  194. package/types/PaymentRecords.d.ts +2125 -0
  195. package/types/PaymentRecordsResource.d.ts +455 -0
  196. package/types/Payouts.d.ts +5 -0
  197. package/types/PayoutsResource.d.ts +5 -0
  198. package/types/Prices.d.ts +22 -0
  199. package/types/PricesResource.d.ts +22 -0
  200. package/types/Privacy/RedactionJobValidationErrors.d.ts +60 -0
  201. package/types/Privacy/RedactionJobs.d.ts +111 -0
  202. package/types/Privacy/RedactionJobsResource.d.ts +230 -0
  203. package/types/PromotionCodes.d.ts +5 -0
  204. package/types/PromotionCodesResource.d.ts +10 -0
  205. package/types/QuoteLines.d.ts +634 -0
  206. package/types/QuotePreviewInvoices.d.ts +1695 -0
  207. package/types/QuotePreviewSubscriptionSchedules.d.ts +831 -0
  208. package/types/Quotes.d.ts +603 -1
  209. package/types/QuotesResource.d.ts +2572 -218
  210. package/types/Refunds.d.ts +14 -0
  211. package/types/SetupAttempts.d.ts +47 -1
  212. package/types/SetupIntents.d.ts +118 -2
  213. package/types/SetupIntentsResource.d.ts +730 -3
  214. package/types/Sources.d.ts +29 -0
  215. package/types/SubscriptionItems.d.ts +30 -0
  216. package/types/SubscriptionItemsResource.d.ts +109 -0
  217. package/types/SubscriptionSchedules.d.ts +212 -0
  218. package/types/SubscriptionSchedulesResource.d.ts +1240 -5
  219. package/types/Subscriptions.d.ts +116 -1
  220. package/types/SubscriptionsResource.d.ts +424 -10
  221. package/types/Tax/Associations.d.ts +82 -0
  222. package/types/Tax/AssociationsResource.d.ts +29 -0
  223. package/types/Tax/Forms.d.ts +220 -0
  224. package/types/Tax/FormsResource.d.ts +107 -0
  225. package/types/TaxIds.d.ts +10 -0
  226. package/types/TaxIdsResource.d.ts +10 -0
  227. package/types/Terminal/ReaderCollectedData.d.ts +51 -0
  228. package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
  229. package/types/Terminal/Readers.d.ts +102 -0
  230. package/types/Terminal/ReadersResource.d.ts +96 -0
  231. package/types/TestHelpers/ConfirmationTokensResource.d.ts +126 -0
  232. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  233. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  234. package/types/Transfers.d.ts +5 -0
  235. package/types/TransfersResource.d.ts +5 -0
  236. package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
  237. package/types/Treasury/FinancialAccounts.d.ts +5 -0
  238. package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
  239. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  240. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  241. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  242. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  243. package/types/V2/Core/AccountLinks.d.ts +106 -0
  244. package/types/V2/Core/AccountLinksResource.d.ts +90 -0
  245. package/types/V2/Core/Accounts/PersonsResource.d.ts +3770 -0
  246. package/types/V2/Core/Accounts.d.ts +8169 -0
  247. package/types/V2/Core/AccountsResource.d.ts +10203 -0
  248. package/types/V2/Core/Persons.d.ts +1867 -0
  249. package/types/V2/Core/Vault/GbBankAccounts.d.ts +160 -0
  250. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +172 -0
  251. package/types/V2/Core/Vault/UsBankAccounts.d.ts +70 -0
  252. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +123 -0
  253. package/types/V2/EventTypes.d.ts +907 -5
  254. package/types/V2/FinancialAddressCreditSimulations.d.ts +27 -0
  255. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +32 -0
  256. package/types/V2/MoneyManagement/Adjustments.d.ts +110 -0
  257. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +83 -0
  258. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +546 -0
  259. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +52 -0
  260. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +314 -0
  261. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +288 -0
  262. package/types/V2/MoneyManagement/InboundTransfers.d.ts +206 -0
  263. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +144 -0
  264. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +168 -0
  265. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +115 -0
  266. package/types/V2/MoneyManagement/OutboundPayments.d.ts +278 -0
  267. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +242 -0
  268. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +97 -0
  269. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +296 -0
  270. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +251 -0
  271. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +207 -0
  272. package/types/V2/MoneyManagement/PayoutMethods.d.ts +151 -0
  273. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +41 -0
  274. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +87 -0
  275. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +113 -0
  276. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +243 -0
  277. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +78 -0
  278. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +176 -0
  279. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +48 -0
  280. package/types/V2/MoneyManagement/TransactionEntries.d.ts +155 -0
  281. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +82 -0
  282. package/types/V2/MoneyManagement/Transactions.d.ts +170 -0
  283. package/types/V2/MoneyManagement/TransactionsResource.d.ts +83 -0
  284. package/types/V2/Payments/OffSessionPayments.d.ts +167 -0
  285. package/types/V2/Payments/OffSessionPaymentsResource.d.ts +159 -0
  286. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +66 -0
  287. package/types/WebhookEndpointsResource.d.ts +80 -0
  288. package/types/index.d.ts +141 -5
  289. package/types/lib.d.ts +11 -1
  290. package/types/test/typescriptTest.ts +3 -3
  291. package/types/InvoicePaymentsResource.d.ts +0 -74
@@ -3,11 +3,26 @@
3
3
  declare module 'stripe' {
4
4
  namespace Stripe {
5
5
  interface SubscriptionScheduleCreateParams {
6
+ /**
7
+ * 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.
8
+ */
9
+ billing_behavior?: SubscriptionScheduleCreateParams.BillingBehavior;
10
+
11
+ /**
12
+ * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
13
+ */
14
+ billing_mode?: SubscriptionScheduleCreateParams.BillingMode;
15
+
6
16
  /**
7
17
  * The identifier of the customer to create the subscription schedule for.
8
18
  */
9
19
  customer?: string;
10
20
 
21
+ /**
22
+ * The identifier of the account to create the subscription schedule for.
23
+ */
24
+ customer_account?: string;
25
+
11
26
  /**
12
27
  * Object representing the subscription schedule's default settings.
13
28
  */
@@ -38,6 +53,11 @@ declare module 'stripe' {
38
53
  */
39
54
  phases?: Array<SubscriptionScheduleCreateParams.Phase>;
40
55
 
56
+ /**
57
+ * If specified, the invoicing for the given billing cycle iterations will be processed now.
58
+ */
59
+ prebilling?: SubscriptionScheduleCreateParams.Prebilling;
60
+
41
61
  /**
42
62
  * When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
43
63
  */
@@ -45,6 +65,10 @@ declare module 'stripe' {
45
65
  }
46
66
 
47
67
  namespace SubscriptionScheduleCreateParams {
68
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
69
+
70
+ type BillingMode = 'classic' | 'flexible';
71
+
48
72
  interface DefaultSettings {
49
73
  /**
50
74
  * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
@@ -282,6 +306,11 @@ declare module 'stripe' {
282
306
  */
283
307
  on_behalf_of?: string;
284
308
 
309
+ /**
310
+ * 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).
311
+ */
312
+ pause_collection?: Phase.PauseCollection;
313
+
285
314
  /**
286
315
  * 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.
287
316
  */
@@ -297,10 +326,20 @@ declare module 'stripe' {
297
326
  */
298
327
  trial?: boolean;
299
328
 
329
+ /**
330
+ * Specify trial behavior when crossing phase boundaries
331
+ */
332
+ trial_continuation?: Phase.TrialContinuation;
333
+
300
334
  /**
301
335
  * 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`
302
336
  */
303
337
  trial_end?: number;
338
+
339
+ /**
340
+ * Settings related to subscription trials.
341
+ */
342
+ trial_settings?: Phase.TrialSettings;
304
343
  }
305
344
 
306
345
  namespace Phase {
@@ -343,12 +382,56 @@ declare module 'stripe' {
343
382
  */
344
383
  discount?: string;
345
384
 
385
+ /**
386
+ * Details to determine how long the discount should be applied for.
387
+ */
388
+ discount_end?: Discount.DiscountEnd;
389
+
346
390
  /**
347
391
  * ID of the promotion code to create a new discount for.
348
392
  */
349
393
  promotion_code?: string;
350
394
  }
351
395
 
396
+ namespace Discount {
397
+ interface DiscountEnd {
398
+ /**
399
+ * Time span for the redeemed discount.
400
+ */
401
+ duration?: DiscountEnd.Duration;
402
+
403
+ /**
404
+ * A precise Unix timestamp for the discount to end. Must be in the future.
405
+ */
406
+ timestamp?: number;
407
+
408
+ /**
409
+ * The type of calculation made to determine when the discount ends.
410
+ */
411
+ type: DiscountEnd.Type;
412
+ }
413
+
414
+ namespace DiscountEnd {
415
+ interface Duration {
416
+ /**
417
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
418
+ */
419
+ interval: Duration.Interval;
420
+
421
+ /**
422
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
423
+ */
424
+ interval_count: number;
425
+ }
426
+
427
+ namespace Duration {
428
+ type Interval = 'day' | 'month' | 'week' | 'year';
429
+ }
430
+
431
+ type Type = 'duration' | 'timestamp';
432
+ }
433
+ }
434
+
352
435
  interface PriceData {
353
436
  /**
354
437
  * 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).
@@ -438,12 +521,56 @@ declare module 'stripe' {
438
521
  */
439
522
  discount?: string;
440
523
 
524
+ /**
525
+ * Details to determine how long the discount should be applied for.
526
+ */
527
+ discount_end?: Discount.DiscountEnd;
528
+
441
529
  /**
442
530
  * ID of the promotion code to create a new discount for.
443
531
  */
444
532
  promotion_code?: string;
445
533
  }
446
534
 
535
+ namespace Discount {
536
+ interface DiscountEnd {
537
+ /**
538
+ * Time span for the redeemed discount.
539
+ */
540
+ duration?: DiscountEnd.Duration;
541
+
542
+ /**
543
+ * A precise Unix timestamp for the discount to end. Must be in the future.
544
+ */
545
+ timestamp?: number;
546
+
547
+ /**
548
+ * The type of calculation made to determine when the discount ends.
549
+ */
550
+ type: DiscountEnd.Type;
551
+ }
552
+
553
+ namespace DiscountEnd {
554
+ interface Duration {
555
+ /**
556
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
557
+ */
558
+ interval: Duration.Interval;
559
+
560
+ /**
561
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
562
+ */
563
+ interval_count: number;
564
+ }
565
+
566
+ namespace Duration {
567
+ type Interval = 'day' | 'month' | 'week' | 'year';
568
+ }
569
+
570
+ type Type = 'duration' | 'timestamp';
571
+ }
572
+ }
573
+
447
574
  interface InvoiceSettings {
448
575
  /**
449
576
  * The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
@@ -519,6 +646,11 @@ declare module 'stripe' {
519
646
  * 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.
520
647
  */
521
648
  tax_rates?: Stripe.Emptyable<Array<string>>;
649
+
650
+ /**
651
+ * Options that configure the trial on the subscription item.
652
+ */
653
+ trial?: Item.Trial;
522
654
  }
523
655
 
524
656
  namespace Item {
@@ -540,12 +672,56 @@ declare module 'stripe' {
540
672
  */
541
673
  discount?: string;
542
674
 
675
+ /**
676
+ * Details to determine how long the discount should be applied for.
677
+ */
678
+ discount_end?: Discount.DiscountEnd;
679
+
543
680
  /**
544
681
  * ID of the promotion code to create a new discount for.
545
682
  */
546
683
  promotion_code?: string;
547
684
  }
548
685
 
686
+ namespace Discount {
687
+ interface DiscountEnd {
688
+ /**
689
+ * Time span for the redeemed discount.
690
+ */
691
+ duration?: DiscountEnd.Duration;
692
+
693
+ /**
694
+ * A precise Unix timestamp for the discount to end. Must be in the future.
695
+ */
696
+ timestamp?: number;
697
+
698
+ /**
699
+ * The type of calculation made to determine when the discount ends.
700
+ */
701
+ type: DiscountEnd.Type;
702
+ }
703
+
704
+ namespace DiscountEnd {
705
+ interface Duration {
706
+ /**
707
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
708
+ */
709
+ interval: Duration.Interval;
710
+
711
+ /**
712
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
713
+ */
714
+ interval_count: number;
715
+ }
716
+
717
+ namespace Duration {
718
+ type Interval = 'day' | 'month' | 'week' | 'year';
719
+ }
720
+
721
+ type Type = 'duration' | 'timestamp';
722
+ }
723
+ }
724
+
549
725
  interface PriceData {
550
726
  /**
551
727
  * 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).
@@ -597,6 +773,33 @@ declare module 'stripe' {
597
773
 
598
774
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
599
775
  }
776
+
777
+ interface Trial {
778
+ /**
779
+ * 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.
780
+ */
781
+ converts_to?: Array<string>;
782
+
783
+ /**
784
+ * Determines the type of trial for this item.
785
+ */
786
+ type: Trial.Type;
787
+ }
788
+
789
+ namespace Trial {
790
+ type Type = 'free' | 'paid';
791
+ }
792
+ }
793
+
794
+ interface PauseCollection {
795
+ /**
796
+ * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
797
+ */
798
+ behavior: PauseCollection.Behavior;
799
+ }
800
+
801
+ namespace PauseCollection {
802
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
600
803
  }
601
804
 
602
805
  type ProrationBehavior =
@@ -615,6 +818,44 @@ declare module 'stripe' {
615
818
  */
616
819
  destination: string;
617
820
  }
821
+
822
+ type TrialContinuation = 'continue' | 'none';
823
+
824
+ interface TrialSettings {
825
+ /**
826
+ * Defines how the subscription should behave when a trial ends.
827
+ */
828
+ end_behavior?: TrialSettings.EndBehavior;
829
+ }
830
+
831
+ namespace TrialSettings {
832
+ interface EndBehavior {
833
+ /**
834
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
835
+ */
836
+ prorate_up_front?: EndBehavior.ProrateUpFront;
837
+ }
838
+
839
+ namespace EndBehavior {
840
+ type ProrateUpFront = 'defer' | 'include';
841
+ }
842
+ }
843
+ }
844
+
845
+ interface Prebilling {
846
+ /**
847
+ * This is used to determine the number of billing cycles to prebill.
848
+ */
849
+ iterations: number;
850
+
851
+ /**
852
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
853
+ */
854
+ update_behavior?: Prebilling.UpdateBehavior;
855
+ }
856
+
857
+ namespace Prebilling {
858
+ type UpdateBehavior = 'prebill' | 'reset';
618
859
  }
619
860
  }
620
861
 
@@ -626,6 +867,11 @@ declare module 'stripe' {
626
867
  }
627
868
 
628
869
  interface SubscriptionScheduleUpdateParams {
870
+ /**
871
+ * 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.
872
+ */
873
+ billing_behavior?: SubscriptionScheduleUpdateParams.BillingBehavior;
874
+
629
875
  /**
630
876
  * Object representing the subscription schedule's default settings.
631
877
  */
@@ -651,6 +897,11 @@ declare module 'stripe' {
651
897
  */
652
898
  phases?: Array<SubscriptionScheduleUpdateParams.Phase>;
653
899
 
900
+ /**
901
+ * If specified, the invoicing for the given billing cycle iterations will be processed now.
902
+ */
903
+ prebilling?: SubscriptionScheduleUpdateParams.Prebilling;
904
+
654
905
  /**
655
906
  * If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
656
907
  */
@@ -658,6 +909,8 @@ declare module 'stripe' {
658
909
  }
659
910
 
660
911
  namespace SubscriptionScheduleUpdateParams {
912
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
913
+
661
914
  interface DefaultSettings {
662
915
  /**
663
916
  * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
@@ -895,6 +1148,11 @@ declare module 'stripe' {
895
1148
  */
896
1149
  on_behalf_of?: string;
897
1150
 
1151
+ /**
1152
+ * 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).
1153
+ */
1154
+ pause_collection?: Phase.PauseCollection;
1155
+
898
1156
  /**
899
1157
  * 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.
900
1158
  */
@@ -915,10 +1173,20 @@ declare module 'stripe' {
915
1173
  */
916
1174
  trial?: boolean;
917
1175
 
1176
+ /**
1177
+ * Specify trial behavior when crossing phase boundaries
1178
+ */
1179
+ trial_continuation?: Phase.TrialContinuation;
1180
+
918
1181
  /**
919
1182
  * 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`
920
1183
  */
921
1184
  trial_end?: number | 'now';
1185
+
1186
+ /**
1187
+ * Settings related to subscription trials.
1188
+ */
1189
+ trial_settings?: Phase.TrialSettings;
922
1190
  }
923
1191
 
924
1192
  namespace Phase {
@@ -961,12 +1229,56 @@ declare module 'stripe' {
961
1229
  */
962
1230
  discount?: string;
963
1231
 
1232
+ /**
1233
+ * Details to determine how long the discount should be applied for.
1234
+ */
1235
+ discount_end?: Discount.DiscountEnd;
1236
+
964
1237
  /**
965
1238
  * ID of the promotion code to create a new discount for.
966
1239
  */
967
1240
  promotion_code?: string;
968
1241
  }
969
1242
 
1243
+ namespace Discount {
1244
+ interface DiscountEnd {
1245
+ /**
1246
+ * Time span for the redeemed discount.
1247
+ */
1248
+ duration?: DiscountEnd.Duration;
1249
+
1250
+ /**
1251
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1252
+ */
1253
+ timestamp?: number;
1254
+
1255
+ /**
1256
+ * The type of calculation made to determine when the discount ends.
1257
+ */
1258
+ type: DiscountEnd.Type;
1259
+ }
1260
+
1261
+ namespace DiscountEnd {
1262
+ interface Duration {
1263
+ /**
1264
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1265
+ */
1266
+ interval: Duration.Interval;
1267
+
1268
+ /**
1269
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1270
+ */
1271
+ interval_count: number;
1272
+ }
1273
+
1274
+ namespace Duration {
1275
+ type Interval = 'day' | 'month' | 'week' | 'year';
1276
+ }
1277
+
1278
+ type Type = 'duration' | 'timestamp';
1279
+ }
1280
+ }
1281
+
970
1282
  interface PriceData {
971
1283
  /**
972
1284
  * 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).
@@ -1056,12 +1368,56 @@ declare module 'stripe' {
1056
1368
  */
1057
1369
  discount?: string;
1058
1370
 
1371
+ /**
1372
+ * Details to determine how long the discount should be applied for.
1373
+ */
1374
+ discount_end?: Discount.DiscountEnd;
1375
+
1059
1376
  /**
1060
1377
  * ID of the promotion code to create a new discount for.
1061
1378
  */
1062
1379
  promotion_code?: string;
1063
1380
  }
1064
1381
 
1382
+ namespace Discount {
1383
+ interface DiscountEnd {
1384
+ /**
1385
+ * Time span for the redeemed discount.
1386
+ */
1387
+ duration?: DiscountEnd.Duration;
1388
+
1389
+ /**
1390
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1391
+ */
1392
+ timestamp?: number;
1393
+
1394
+ /**
1395
+ * The type of calculation made to determine when the discount ends.
1396
+ */
1397
+ type: DiscountEnd.Type;
1398
+ }
1399
+
1400
+ namespace DiscountEnd {
1401
+ interface Duration {
1402
+ /**
1403
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1404
+ */
1405
+ interval: Duration.Interval;
1406
+
1407
+ /**
1408
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1409
+ */
1410
+ interval_count: number;
1411
+ }
1412
+
1413
+ namespace Duration {
1414
+ type Interval = 'day' | 'month' | 'week' | 'year';
1415
+ }
1416
+
1417
+ type Type = 'duration' | 'timestamp';
1418
+ }
1419
+ }
1420
+
1065
1421
  interface InvoiceSettings {
1066
1422
  /**
1067
1423
  * The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
@@ -1137,6 +1493,11 @@ declare module 'stripe' {
1137
1493
  * 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.
1138
1494
  */
1139
1495
  tax_rates?: Stripe.Emptyable<Array<string>>;
1496
+
1497
+ /**
1498
+ * Options that configure the trial on the subscription item.
1499
+ */
1500
+ trial?: Item.Trial;
1140
1501
  }
1141
1502
 
1142
1503
  namespace Item {
@@ -1158,12 +1519,56 @@ declare module 'stripe' {
1158
1519
  */
1159
1520
  discount?: string;
1160
1521
 
1522
+ /**
1523
+ * Details to determine how long the discount should be applied for.
1524
+ */
1525
+ discount_end?: Discount.DiscountEnd;
1526
+
1161
1527
  /**
1162
1528
  * ID of the promotion code to create a new discount for.
1163
1529
  */
1164
1530
  promotion_code?: string;
1165
1531
  }
1166
1532
 
1533
+ namespace Discount {
1534
+ interface DiscountEnd {
1535
+ /**
1536
+ * Time span for the redeemed discount.
1537
+ */
1538
+ duration?: DiscountEnd.Duration;
1539
+
1540
+ /**
1541
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1542
+ */
1543
+ timestamp?: number;
1544
+
1545
+ /**
1546
+ * The type of calculation made to determine when the discount ends.
1547
+ */
1548
+ type: DiscountEnd.Type;
1549
+ }
1550
+
1551
+ namespace DiscountEnd {
1552
+ interface Duration {
1553
+ /**
1554
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1555
+ */
1556
+ interval: Duration.Interval;
1557
+
1558
+ /**
1559
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1560
+ */
1561
+ interval_count: number;
1562
+ }
1563
+
1564
+ namespace Duration {
1565
+ type Interval = 'day' | 'month' | 'week' | 'year';
1566
+ }
1567
+
1568
+ type Type = 'duration' | 'timestamp';
1569
+ }
1570
+ }
1571
+
1167
1572
  interface PriceData {
1168
1573
  /**
1169
1574
  * 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).
@@ -1215,6 +1620,33 @@ declare module 'stripe' {
1215
1620
 
1216
1621
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
1217
1622
  }
1623
+
1624
+ interface Trial {
1625
+ /**
1626
+ * 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.
1627
+ */
1628
+ converts_to?: Array<string>;
1629
+
1630
+ /**
1631
+ * Determines the type of trial for this item.
1632
+ */
1633
+ type: Trial.Type;
1634
+ }
1635
+
1636
+ namespace Trial {
1637
+ type Type = 'free' | 'paid';
1638
+ }
1639
+ }
1640
+
1641
+ interface PauseCollection {
1642
+ /**
1643
+ * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1644
+ */
1645
+ behavior: PauseCollection.Behavior;
1646
+ }
1647
+
1648
+ namespace PauseCollection {
1649
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
1218
1650
  }
1219
1651
 
1220
1652
  type ProrationBehavior =
@@ -1233,6 +1665,44 @@ declare module 'stripe' {
1233
1665
  */
1234
1666
  destination: string;
1235
1667
  }
1668
+
1669
+ type TrialContinuation = 'continue' | 'none';
1670
+
1671
+ interface TrialSettings {
1672
+ /**
1673
+ * Defines how the subscription should behave when a trial ends.
1674
+ */
1675
+ end_behavior?: TrialSettings.EndBehavior;
1676
+ }
1677
+
1678
+ namespace TrialSettings {
1679
+ interface EndBehavior {
1680
+ /**
1681
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1682
+ */
1683
+ prorate_up_front?: EndBehavior.ProrateUpFront;
1684
+ }
1685
+
1686
+ namespace EndBehavior {
1687
+ type ProrateUpFront = 'defer' | 'include';
1688
+ }
1689
+ }
1690
+ }
1691
+
1692
+ interface Prebilling {
1693
+ /**
1694
+ * This is used to determine the number of billing cycles to prebill.
1695
+ */
1696
+ iterations: number;
1697
+
1698
+ /**
1699
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1700
+ */
1701
+ update_behavior?: Prebilling.UpdateBehavior;
1702
+ }
1703
+
1704
+ namespace Prebilling {
1705
+ type UpdateBehavior = 'prebill' | 'reset';
1236
1706
  }
1237
1707
 
1238
1708
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
@@ -1259,6 +1729,11 @@ declare module 'stripe' {
1259
1729
  */
1260
1730
  customer?: string;
1261
1731
 
1732
+ /**
1733
+ * Only return subscription schedules for the given account.
1734
+ */
1735
+ customer_account?: string;
1736
+
1262
1737
  /**
1263
1738
  * Specifies which fields in the response should be expanded.
1264
1739
  */
@@ -1275,21 +1750,768 @@ declare module 'stripe' {
1275
1750
  scheduled?: boolean;
1276
1751
  }
1277
1752
 
1278
- interface SubscriptionScheduleCancelParams {
1753
+ interface SubscriptionScheduleAmendParams {
1754
+ /**
1755
+ * Changes to apply to the phases of the subscription schedule, in the order provided.
1756
+ */
1757
+ amendments?: Array<SubscriptionScheduleAmendParams.Amendment>;
1758
+
1279
1759
  /**
1280
1760
  * Specifies which fields in the response should be expanded.
1281
1761
  */
1282
1762
  expand?: Array<string>;
1283
1763
 
1284
1764
  /**
1285
- * If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
1765
+ * Provide any time periods to bill in advance.
1286
1766
  */
1287
- invoice_now?: boolean;
1767
+ prebilling?: Stripe.Emptyable<
1768
+ Array<SubscriptionScheduleAmendParams.Prebilling>
1769
+ >;
1288
1770
 
1289
1771
  /**
1290
- * If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
1772
+ * In cases where the amendment changes the currently active phase,
1773
+ * specifies if and how to prorate at the time of the request.
1291
1774
  */
1292
- prorate?: boolean;
1775
+ proration_behavior?: SubscriptionScheduleAmendParams.ProrationBehavior;
1776
+
1777
+ /**
1778
+ * Changes to apply to the subscription schedule.
1779
+ */
1780
+ schedule_settings?: SubscriptionScheduleAmendParams.ScheduleSettings;
1781
+ }
1782
+
1783
+ namespace SubscriptionScheduleAmendParams {
1784
+ interface Amendment {
1785
+ /**
1786
+ * 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.
1787
+ */
1788
+ amendment_end?: Amendment.AmendmentEnd;
1789
+
1790
+ /**
1791
+ * Details to identify the earliest timestamp where the proposed change should take effect.
1792
+ */
1793
+ amendment_start: Amendment.AmendmentStart;
1794
+
1795
+ /**
1796
+ * 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.
1797
+ */
1798
+ billing_cycle_anchor?: Amendment.BillingCycleAnchor;
1799
+
1800
+ /**
1801
+ * Changes to the coupons being redeemed or discounts being applied during the amendment time span.
1802
+ */
1803
+ discount_actions?: Array<Amendment.DiscountAction>;
1804
+
1805
+ /**
1806
+ * Changes to the subscription items during the amendment time span.
1807
+ */
1808
+ item_actions?: Array<Amendment.ItemAction>;
1809
+
1810
+ /**
1811
+ * Instructions for how to modify phase metadata
1812
+ */
1813
+ metadata_actions?: Array<Amendment.MetadataAction>;
1814
+
1815
+ /**
1816
+ * 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`.
1817
+ */
1818
+ proration_behavior?: Amendment.ProrationBehavior;
1819
+
1820
+ /**
1821
+ * Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
1822
+ */
1823
+ set_pause_collection?: Amendment.SetPauseCollection;
1824
+
1825
+ /**
1826
+ * Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
1827
+ */
1828
+ set_schedule_end?: Amendment.SetScheduleEnd;
1829
+
1830
+ /**
1831
+ * Settings related to subscription trials.
1832
+ */
1833
+ trial_settings?: Amendment.TrialSettings;
1834
+ }
1835
+
1836
+ namespace Amendment {
1837
+ interface AmendmentEnd {
1838
+ /**
1839
+ * Use the `end` time of a given discount.
1840
+ */
1841
+ discount_end?: AmendmentEnd.DiscountEnd;
1842
+
1843
+ /**
1844
+ * Time span for the amendment starting from the `amendment_start`.
1845
+ */
1846
+ duration?: AmendmentEnd.Duration;
1847
+
1848
+ /**
1849
+ * A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
1850
+ */
1851
+ timestamp?: number;
1852
+
1853
+ /**
1854
+ * Select one of three ways to pass the `amendment_end`.
1855
+ */
1856
+ type: AmendmentEnd.Type;
1857
+ }
1858
+
1859
+ namespace AmendmentEnd {
1860
+ interface DiscountEnd {
1861
+ /**
1862
+ * The ID of a specific discount.
1863
+ */
1864
+ discount: string;
1865
+ }
1866
+
1867
+ interface Duration {
1868
+ /**
1869
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1870
+ */
1871
+ interval: Duration.Interval;
1872
+
1873
+ /**
1874
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1875
+ */
1876
+ interval_count: number;
1877
+ }
1878
+
1879
+ namespace Duration {
1880
+ type Interval = 'day' | 'month' | 'week' | 'year';
1881
+ }
1882
+
1883
+ type Type =
1884
+ | 'discount_end'
1885
+ | 'duration'
1886
+ | 'schedule_end'
1887
+ | 'timestamp'
1888
+ | 'trial_end'
1889
+ | 'trial_start'
1890
+ | 'upcoming_invoice';
1891
+ }
1892
+
1893
+ interface AmendmentStart {
1894
+ /**
1895
+ * Details of another amendment in the same array, immediately after which this amendment should begin.
1896
+ */
1897
+ amendment_end?: AmendmentStart.AmendmentEnd;
1898
+
1899
+ /**
1900
+ * Use the `end` time of a given discount.
1901
+ */
1902
+ discount_end?: AmendmentStart.DiscountEnd;
1903
+
1904
+ /**
1905
+ * A precise Unix timestamp for the amendment to start.
1906
+ */
1907
+ timestamp?: number;
1908
+
1909
+ /**
1910
+ * Select one of three ways to pass the `amendment_start`.
1911
+ */
1912
+ type: AmendmentStart.Type;
1913
+ }
1914
+
1915
+ namespace AmendmentStart {
1916
+ interface AmendmentEnd {
1917
+ /**
1918
+ * 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.
1919
+ */
1920
+ index: number;
1921
+ }
1922
+
1923
+ interface DiscountEnd {
1924
+ /**
1925
+ * The ID of a specific discount.
1926
+ */
1927
+ discount: string;
1928
+ }
1929
+
1930
+ type Type =
1931
+ | 'amendment_end'
1932
+ | 'discount_end'
1933
+ | 'now'
1934
+ | 'schedule_end'
1935
+ | 'timestamp'
1936
+ | 'trial_end'
1937
+ | 'trial_start'
1938
+ | 'upcoming_invoice';
1939
+ }
1940
+
1941
+ type BillingCycleAnchor = 'amendment_start' | 'automatic';
1942
+
1943
+ interface DiscountAction {
1944
+ /**
1945
+ * Details of the discount to add.
1946
+ */
1947
+ add?: DiscountAction.Add;
1948
+
1949
+ /**
1950
+ * Details of the discount to remove.
1951
+ */
1952
+ remove?: DiscountAction.Remove;
1953
+
1954
+ /**
1955
+ * Details of the discount to replace the existing discounts with.
1956
+ */
1957
+ set?: DiscountAction.Set;
1958
+
1959
+ /**
1960
+ * Determines the type of discount action.
1961
+ */
1962
+ type: DiscountAction.Type;
1963
+ }
1964
+
1965
+ namespace DiscountAction {
1966
+ interface Add {
1967
+ /**
1968
+ * The coupon code to redeem.
1969
+ */
1970
+ coupon?: string;
1971
+
1972
+ /**
1973
+ * An ID of an existing discount for a coupon that was already redeemed.
1974
+ */
1975
+ discount?: string;
1976
+
1977
+ /**
1978
+ * Details to determine how long the discount should be applied for.
1979
+ */
1980
+ discount_end?: Add.DiscountEnd;
1981
+
1982
+ /**
1983
+ * 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.
1984
+ */
1985
+ index?: number;
1986
+
1987
+ /**
1988
+ * The promotion code to redeem.
1989
+ */
1990
+ promotion_code?: string;
1991
+ }
1992
+
1993
+ namespace Add {
1994
+ interface DiscountEnd {
1995
+ /**
1996
+ * The type of calculation made to determine when the discount ends.
1997
+ */
1998
+ type: 'amendment_end';
1999
+ }
2000
+ }
2001
+
2002
+ interface Remove {
2003
+ /**
2004
+ * The coupon code to remove from the `discounts` array.
2005
+ */
2006
+ coupon?: string;
2007
+
2008
+ /**
2009
+ * The ID of a discount to remove from the `discounts` array.
2010
+ */
2011
+ discount?: string;
2012
+
2013
+ /**
2014
+ * The ID of a promotion code to remove from the `discounts` array.
2015
+ */
2016
+ promotion_code?: string;
2017
+ }
2018
+
2019
+ interface Set {
2020
+ /**
2021
+ * The coupon code to replace the `discounts` array with.
2022
+ */
2023
+ coupon?: string;
2024
+
2025
+ /**
2026
+ * An ID of an existing discount to replace the `discounts` array with.
2027
+ */
2028
+ discount?: string;
2029
+
2030
+ /**
2031
+ * An ID of an existing promotion code to replace the `discounts` array with.
2032
+ */
2033
+ promotion_code?: string;
2034
+ }
2035
+
2036
+ type Type = 'add' | 'remove' | 'set';
2037
+ }
2038
+
2039
+ interface ItemAction {
2040
+ /**
2041
+ * 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.
2042
+ */
2043
+ add?: ItemAction.Add;
2044
+
2045
+ /**
2046
+ * Details of the subscription item to remove.
2047
+ */
2048
+ remove?: ItemAction.Remove;
2049
+
2050
+ /**
2051
+ * 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.
2052
+ */
2053
+ set?: ItemAction.Set;
2054
+
2055
+ /**
2056
+ * Determines the type of item action.
2057
+ */
2058
+ type: ItemAction.Type;
2059
+ }
2060
+
2061
+ namespace ItemAction {
2062
+ interface Add {
2063
+ /**
2064
+ * The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
2065
+ */
2066
+ discounts?: Array<Add.Discount>;
2067
+
2068
+ /**
2069
+ * 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`.
2070
+ */
2071
+ metadata?: Stripe.MetadataParam;
2072
+
2073
+ /**
2074
+ * The ID of the price object.
2075
+ */
2076
+ price: string;
2077
+
2078
+ /**
2079
+ * Quantity for this item.
2080
+ */
2081
+ quantity?: number;
2082
+
2083
+ /**
2084
+ * 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`.
2085
+ */
2086
+ tax_rates?: Array<string>;
2087
+
2088
+ /**
2089
+ * Options that configure the trial on the subscription item.
2090
+ */
2091
+ trial?: Add.Trial;
2092
+ }
2093
+
2094
+ namespace Add {
2095
+ interface Discount {
2096
+ /**
2097
+ * ID of the coupon to create a new discount for.
2098
+ */
2099
+ coupon?: string;
2100
+
2101
+ /**
2102
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
2103
+ */
2104
+ discount?: string;
2105
+
2106
+ /**
2107
+ * Details to determine how long the discount should be applied for.
2108
+ */
2109
+ discount_end?: Discount.DiscountEnd;
2110
+
2111
+ /**
2112
+ * ID of the promotion code to create a new discount for.
2113
+ */
2114
+ promotion_code?: string;
2115
+ }
2116
+
2117
+ namespace Discount {
2118
+ interface DiscountEnd {
2119
+ /**
2120
+ * Time span for the redeemed discount.
2121
+ */
2122
+ duration?: DiscountEnd.Duration;
2123
+
2124
+ /**
2125
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2126
+ */
2127
+ timestamp?: number;
2128
+
2129
+ /**
2130
+ * The type of calculation made to determine when the discount ends.
2131
+ */
2132
+ type: DiscountEnd.Type;
2133
+ }
2134
+
2135
+ namespace DiscountEnd {
2136
+ interface Duration {
2137
+ /**
2138
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2139
+ */
2140
+ interval: Duration.Interval;
2141
+
2142
+ /**
2143
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2144
+ */
2145
+ interval_count: number;
2146
+ }
2147
+
2148
+ namespace Duration {
2149
+ type Interval = 'day' | 'month' | 'week' | 'year';
2150
+ }
2151
+
2152
+ type Type = 'duration' | 'timestamp';
2153
+ }
2154
+ }
2155
+
2156
+ interface Trial {
2157
+ /**
2158
+ * 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.
2159
+ */
2160
+ converts_to?: Array<string>;
2161
+
2162
+ /**
2163
+ * Determines the type of trial for this item.
2164
+ */
2165
+ type: Trial.Type;
2166
+ }
2167
+
2168
+ namespace Trial {
2169
+ type Type = 'free' | 'paid';
2170
+ }
2171
+ }
2172
+
2173
+ interface Remove {
2174
+ /**
2175
+ * ID of a price to remove.
2176
+ */
2177
+ price: string;
2178
+ }
2179
+
2180
+ interface Set {
2181
+ /**
2182
+ * 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`.
2183
+ */
2184
+ discounts?: Array<Set.Discount>;
2185
+
2186
+ /**
2187
+ * 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`.
2188
+ */
2189
+ metadata?: Stripe.MetadataParam;
2190
+
2191
+ /**
2192
+ * The ID of the price object.
2193
+ */
2194
+ price: string;
2195
+
2196
+ /**
2197
+ * 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`.
2198
+ */
2199
+ quantity?: number;
2200
+
2201
+ /**
2202
+ * 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`.
2203
+ */
2204
+ tax_rates?: Array<string>;
2205
+
2206
+ /**
2207
+ * 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`.
2208
+ */
2209
+ trial?: Set.Trial;
2210
+ }
2211
+
2212
+ namespace Set {
2213
+ interface Discount {
2214
+ /**
2215
+ * ID of the coupon to create a new discount for.
2216
+ */
2217
+ coupon?: string;
2218
+
2219
+ /**
2220
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
2221
+ */
2222
+ discount?: string;
2223
+
2224
+ /**
2225
+ * Details to determine how long the discount should be applied for.
2226
+ */
2227
+ discount_end?: Discount.DiscountEnd;
2228
+
2229
+ /**
2230
+ * ID of the promotion code to create a new discount for.
2231
+ */
2232
+ promotion_code?: string;
2233
+ }
2234
+
2235
+ namespace Discount {
2236
+ interface DiscountEnd {
2237
+ /**
2238
+ * Time span for the redeemed discount.
2239
+ */
2240
+ duration?: DiscountEnd.Duration;
2241
+
2242
+ /**
2243
+ * A precise Unix timestamp for the discount to end. Must be in the future.
2244
+ */
2245
+ timestamp?: number;
2246
+
2247
+ /**
2248
+ * The type of calculation made to determine when the discount ends.
2249
+ */
2250
+ type: DiscountEnd.Type;
2251
+ }
2252
+
2253
+ namespace DiscountEnd {
2254
+ interface Duration {
2255
+ /**
2256
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2257
+ */
2258
+ interval: Duration.Interval;
2259
+
2260
+ /**
2261
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2262
+ */
2263
+ interval_count: number;
2264
+ }
2265
+
2266
+ namespace Duration {
2267
+ type Interval = 'day' | 'month' | 'week' | 'year';
2268
+ }
2269
+
2270
+ type Type = 'duration' | 'timestamp';
2271
+ }
2272
+ }
2273
+
2274
+ interface Trial {
2275
+ /**
2276
+ * 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.
2277
+ */
2278
+ converts_to?: Array<string>;
2279
+
2280
+ /**
2281
+ * Determines the type of trial for this item.
2282
+ */
2283
+ type: Trial.Type;
2284
+ }
2285
+
2286
+ namespace Trial {
2287
+ type Type = 'free' | 'paid';
2288
+ }
2289
+ }
2290
+
2291
+ type Type = 'add' | 'remove' | 'set';
2292
+ }
2293
+
2294
+ interface MetadataAction {
2295
+ /**
2296
+ * Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
2297
+ */
2298
+ add?: {
2299
+ [key: string]: string;
2300
+ };
2301
+
2302
+ /**
2303
+ * Keys to remove from schedule phase metadata.
2304
+ */
2305
+ remove?: Array<string>;
2306
+
2307
+ /**
2308
+ * Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
2309
+ */
2310
+ set?: Stripe.Emptyable<{
2311
+ [key: string]: string;
2312
+ }>;
2313
+
2314
+ /**
2315
+ * Select one of three ways to update phase-level `metadata` on subscription schedules.
2316
+ */
2317
+ type: MetadataAction.Type;
2318
+ }
2319
+
2320
+ namespace MetadataAction {
2321
+ type Type = 'add' | 'remove' | 'set';
2322
+ }
2323
+
2324
+ type ProrationBehavior =
2325
+ | 'always_invoice'
2326
+ | 'create_prorations'
2327
+ | 'none';
2328
+
2329
+ interface SetPauseCollection {
2330
+ /**
2331
+ * Details of the pause_collection behavior to apply to the amendment.
2332
+ */
2333
+ set?: SetPauseCollection.Set;
2334
+
2335
+ /**
2336
+ * Determines the type of the pause_collection amendment.
2337
+ */
2338
+ type: SetPauseCollection.Type;
2339
+ }
2340
+
2341
+ namespace SetPauseCollection {
2342
+ interface Set {
2343
+ /**
2344
+ * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
2345
+ */
2346
+ behavior: Set.Behavior;
2347
+ }
2348
+
2349
+ namespace Set {
2350
+ type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
2351
+ }
2352
+
2353
+ type Type = 'remove' | 'set';
2354
+ }
2355
+
2356
+ type SetScheduleEnd = 'amendment_end' | 'amendment_start';
2357
+
2358
+ interface TrialSettings {
2359
+ /**
2360
+ * Defines how the subscription should behave when a trial ends.
2361
+ */
2362
+ end_behavior?: TrialSettings.EndBehavior;
2363
+ }
2364
+
2365
+ namespace TrialSettings {
2366
+ interface EndBehavior {
2367
+ /**
2368
+ * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2369
+ */
2370
+ prorate_up_front?: EndBehavior.ProrateUpFront;
2371
+ }
2372
+
2373
+ namespace EndBehavior {
2374
+ type ProrateUpFront = 'defer' | 'include';
2375
+ }
2376
+ }
2377
+ }
2378
+
2379
+ interface Prebilling {
2380
+ /**
2381
+ * The beginning of the prebilled time period. The default value is `now`.
2382
+ */
2383
+ bill_from?: Prebilling.BillFrom;
2384
+
2385
+ /**
2386
+ * The end of the prebilled time period.
2387
+ */
2388
+ bill_until?: Prebilling.BillUntil;
2389
+
2390
+ /**
2391
+ * When the prebilling invoice should be created. The default value is `now`.
2392
+ */
2393
+ invoice_at?: 'now';
2394
+
2395
+ /**
2396
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2397
+ */
2398
+ update_behavior?: Prebilling.UpdateBehavior;
2399
+ }
2400
+
2401
+ namespace Prebilling {
2402
+ interface BillFrom {
2403
+ /**
2404
+ * Start the prebilled period when a specified amendment begins.
2405
+ */
2406
+ amendment_start?: BillFrom.AmendmentStart;
2407
+
2408
+ /**
2409
+ * Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2410
+ */
2411
+ timestamp?: number;
2412
+
2413
+ /**
2414
+ * Select one of several ways to pass the `bill_from` value.
2415
+ */
2416
+ type: BillFrom.Type;
2417
+ }
2418
+
2419
+ namespace BillFrom {
2420
+ interface AmendmentStart {
2421
+ /**
2422
+ * The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments.
2423
+ */
2424
+ index: number;
2425
+ }
2426
+
2427
+ type Type = 'amendment_start' | 'now' | 'timestamp';
2428
+ }
2429
+
2430
+ interface BillUntil {
2431
+ /**
2432
+ * End the prebilled period when a specified amendment ends.
2433
+ */
2434
+ amendment_end?: BillUntil.AmendmentEnd;
2435
+
2436
+ /**
2437
+ * Time span for prebilling, starting from `bill_from`.
2438
+ */
2439
+ duration?: BillUntil.Duration;
2440
+
2441
+ /**
2442
+ * End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2443
+ */
2444
+ timestamp?: number;
2445
+
2446
+ /**
2447
+ * Select one of several ways to pass the `bill_until` value.
2448
+ */
2449
+ type: BillUntil.Type;
2450
+ }
2451
+
2452
+ namespace BillUntil {
2453
+ interface AmendmentEnd {
2454
+ /**
2455
+ * 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.
2456
+ */
2457
+ index: number;
2458
+ }
2459
+
2460
+ interface Duration {
2461
+ /**
2462
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2463
+ */
2464
+ interval: Duration.Interval;
2465
+
2466
+ /**
2467
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2468
+ */
2469
+ interval_count: number;
2470
+ }
2471
+
2472
+ namespace Duration {
2473
+ type Interval = 'day' | 'month' | 'week' | 'year';
2474
+ }
2475
+
2476
+ type Type =
2477
+ | 'amendment_end'
2478
+ | 'duration'
2479
+ | 'schedule_end'
2480
+ | 'timestamp';
2481
+ }
2482
+
2483
+ type UpdateBehavior = 'prebill' | 'reset';
2484
+ }
2485
+
2486
+ type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
2487
+
2488
+ interface ScheduleSettings {
2489
+ /**
2490
+ * Behavior of the subscription schedule and underlying subscription when it ends.
2491
+ */
2492
+ end_behavior?: ScheduleSettings.EndBehavior;
2493
+ }
2494
+
2495
+ namespace ScheduleSettings {
2496
+ type EndBehavior = 'cancel' | 'release';
2497
+ }
2498
+ }
2499
+
2500
+ interface SubscriptionScheduleCancelParams {
2501
+ /**
2502
+ * Specifies which fields in the response should be expanded.
2503
+ */
2504
+ expand?: Array<string>;
2505
+
2506
+ /**
2507
+ * If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
2508
+ */
2509
+ invoice_now?: boolean;
2510
+
2511
+ /**
2512
+ * If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
2513
+ */
2514
+ prorate?: boolean;
1293
2515
  }
1294
2516
 
1295
2517
  interface SubscriptionScheduleReleaseParams {
@@ -1349,6 +2571,19 @@ declare module 'stripe' {
1349
2571
  options?: RequestOptions
1350
2572
  ): ApiListPromise<Stripe.SubscriptionSchedule>;
1351
2573
 
2574
+ /**
2575
+ * Amends an existing subscription schedule.
2576
+ */
2577
+ amend(
2578
+ id: string,
2579
+ params?: SubscriptionScheduleAmendParams,
2580
+ options?: RequestOptions
2581
+ ): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
2582
+ amend(
2583
+ id: string,
2584
+ options?: RequestOptions
2585
+ ): Promise<Stripe.Response<Stripe.SubscriptionSchedule>>;
2586
+
1352
2587
  /**
1353
2588
  * Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
1354
2589
  */