stripe 18.3.0-beta.2 → 18.3.0

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 (296) hide show
  1. package/CHANGELOG.md +59 -1249
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +0 -1
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +1 -91
  6. package/cjs/RequestSender.js +1 -1
  7. package/cjs/apiVersion.js +3 -2
  8. package/cjs/resources/FinancialConnections/Accounts.js +0 -5
  9. package/cjs/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +4 -4
  10. package/cjs/resources/PaymentIntents.js +0 -13
  11. package/cjs/resources/Quotes.js +0 -32
  12. package/cjs/resources/SubscriptionSchedules.js +0 -4
  13. package/cjs/resources.js +10 -98
  14. package/cjs/stripe.core.js +1 -1
  15. package/esm/Error.js +0 -79
  16. package/esm/RequestSender.js +1 -1
  17. package/esm/apiVersion.js +2 -1
  18. package/esm/resources/FinancialConnections/Accounts.js +0 -5
  19. package/esm/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +3 -3
  20. package/esm/resources/PaymentIntents.js +0 -13
  21. package/esm/resources/Quotes.js +0 -32
  22. package/esm/resources/SubscriptionSchedules.js +0 -4
  23. package/esm/resources.js +1 -82
  24. package/esm/stripe.core.js +1 -1
  25. package/package.json +1 -1
  26. package/types/AccountLinksResource.d.ts +1 -5
  27. package/types/AccountSessions.d.ts +31 -76
  28. package/types/AccountSessionsResource.d.ts +48 -312
  29. package/types/Accounts.d.ts +30 -213
  30. package/types/AccountsResource.d.ts +85 -540
  31. package/types/Billing/CreditBalanceSummary.d.ts +0 -5
  32. package/types/Billing/CreditBalanceSummaryResource.d.ts +3 -8
  33. package/types/Billing/CreditBalanceTransactionsResource.d.ts +4 -12
  34. package/types/Billing/CreditGrants.d.ts +0 -5
  35. package/types/Billing/CreditGrantsResource.d.ts +1 -11
  36. package/types/BillingPortal/Sessions.d.ts +1 -6
  37. package/types/BillingPortal/SessionsResource.d.ts +5 -13
  38. package/types/Cards.d.ts +0 -5
  39. package/types/CashBalances.d.ts +0 -5
  40. package/types/Charges.d.ts +52 -182
  41. package/types/ChargesResource.d.ts +0 -1406
  42. package/types/Checkout/Sessions.d.ts +1 -314
  43. package/types/Checkout/SessionsResource.d.ts +62 -340
  44. package/types/ConfirmationTokens.d.ts +22 -136
  45. package/types/Coupons.d.ts +0 -33
  46. package/types/CouponsResource.d.ts +0 -21
  47. package/types/CreditNoteLineItems.d.ts +0 -17
  48. package/types/CreditNotes.d.ts +0 -5
  49. package/types/CreditNotesResource.d.ts +9 -14
  50. package/types/CustomerBalanceTransactions.d.ts +0 -2
  51. package/types/CustomerCashBalanceTransactions.d.ts +0 -2
  52. package/types/CustomerSessions.d.ts +1 -6
  53. package/types/CustomerSessionsResource.d.ts +2 -7
  54. package/types/Customers.d.ts +0 -2
  55. package/types/CustomersResource.d.ts +1 -8
  56. package/types/Discounts.d.ts +0 -10
  57. package/types/Disputes.d.ts +6 -2
  58. package/types/Errors.d.ts +2 -69
  59. package/types/EventTypes.d.ts +0 -664
  60. package/types/Events.d.ts +1 -98
  61. package/types/FinancialConnections/Accounts.d.ts +1 -36
  62. package/types/FinancialConnections/AccountsResource.d.ts +3 -40
  63. package/types/FinancialConnections/Sessions.d.ts +1 -51
  64. package/types/FinancialConnections/SessionsResource.d.ts +1 -43
  65. package/types/Identity/VerificationSessions.d.ts +33 -4
  66. package/types/Identity/VerificationSessionsResource.d.ts +14 -4
  67. package/types/InvoiceItems.d.ts +1 -14
  68. package/types/InvoiceItemsResource.d.ts +6 -117
  69. package/types/InvoiceLineItems.d.ts +1 -45
  70. package/types/InvoicePayments.d.ts +0 -5
  71. package/types/InvoicePaymentsResource.d.ts +74 -0
  72. package/types/Invoices.d.ts +4 -133
  73. package/types/InvoicesResource.d.ts +37 -1446
  74. package/types/Issuing/CardholdersResource.d.ts +1 -2
  75. package/types/Issuing/Transactions.d.ts +0 -5
  76. package/types/Issuing/TransactionsResource.d.ts +0 -5
  77. package/types/LineItems.d.ts +0 -49
  78. package/types/Mandates.d.ts +4 -77
  79. package/types/PaymentIntents.d.ts +35 -770
  80. package/types/PaymentIntentsResource.d.ts +4268 -8619
  81. package/types/PaymentLinks.d.ts +0 -6
  82. package/types/PaymentLinksResource.d.ts +0 -12
  83. package/types/PaymentMethodConfigurations.d.ts +0 -180
  84. package/types/PaymentMethodConfigurationsResource.d.ts +0 -250
  85. package/types/PaymentMethods.d.ts +16 -134
  86. package/types/PaymentMethodsResource.d.ts +12 -167
  87. package/types/Payouts.d.ts +0 -5
  88. package/types/PayoutsResource.d.ts +0 -5
  89. package/types/Prices.d.ts +0 -22
  90. package/types/PricesResource.d.ts +0 -22
  91. package/types/PromotionCodes.d.ts +0 -5
  92. package/types/PromotionCodesResource.d.ts +0 -10
  93. package/types/Quotes.d.ts +8 -592
  94. package/types/QuotesResource.d.ts +278 -2617
  95. package/types/Refunds.d.ts +0 -14
  96. package/types/SetupAttempts.d.ts +4 -48
  97. package/types/SetupIntents.d.ts +17 -119
  98. package/types/SetupIntentsResource.d.ts +413 -660
  99. package/types/Sources.d.ts +0 -29
  100. package/types/SubscriptionItems.d.ts +0 -30
  101. package/types/SubscriptionItemsResource.d.ts +0 -109
  102. package/types/SubscriptionSchedules.d.ts +16 -207
  103. package/types/SubscriptionSchedulesResource.d.ts +14 -1236
  104. package/types/Subscriptions.d.ts +15 -108
  105. package/types/SubscriptionsResource.d.ts +30 -402
  106. package/types/Tax/Registrations.d.ts +9 -0
  107. package/types/Tax/RegistrationsResource.d.ts +12 -0
  108. package/types/TaxIds.d.ts +0 -10
  109. package/types/TaxIdsResource.d.ts +0 -10
  110. package/types/Terminal/Configurations.d.ts +1 -0
  111. package/types/Terminal/LocationsResource.d.ts +1 -1
  112. package/types/Terminal/Readers.d.ts +6 -26
  113. package/types/Terminal/ReadersResource.d.ts +4 -4
  114. package/types/TestHelpers/ConfirmationTokensResource.d.ts +15 -128
  115. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
  116. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
  117. package/types/TokensResource.d.ts +3 -0
  118. package/types/Transfers.d.ts +0 -5
  119. package/types/TransfersResource.d.ts +0 -5
  120. package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
  121. package/types/Treasury/FinancialAccounts.d.ts +0 -5
  122. package/types/Treasury/FinancialAccountsResource.d.ts +9 -37
  123. package/types/Treasury/OutboundTransfers.d.ts +0 -26
  124. package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
  125. package/types/Treasury/ReceivedCredits.d.ts +0 -26
  126. package/types/Treasury/ReceivedDebits.d.ts +0 -31
  127. package/types/V2/EventTypes.d.ts +4 -906
  128. package/types/WebhookEndpointsResource.d.ts +2 -79
  129. package/types/index.d.ts +6 -142
  130. package/types/lib.d.ts +11 -11
  131. package/types/test/typescriptTest.ts +3 -3
  132. package/cjs/resources/AccountNotices.js +0 -21
  133. package/cjs/resources/BalanceSettings.js +0 -10
  134. package/cjs/resources/Capital/FinancingOffers.js +0 -21
  135. package/cjs/resources/Capital/FinancingSummary.js +0 -12
  136. package/cjs/resources/Capital/FinancingTransactions.js +0 -17
  137. package/cjs/resources/ExternalAccounts.js +0 -23
  138. package/cjs/resources/FinancialConnections/Institutions.js +0 -17
  139. package/cjs/resources/FxQuotes.js +0 -15
  140. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
  141. package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
  142. package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
  143. package/cjs/resources/Margins.js +0 -22
  144. package/cjs/resources/Orders.js +0 -24
  145. package/cjs/resources/PaymentRecords.js +0 -29
  146. package/cjs/resources/Privacy/RedactionJobs.js +0 -42
  147. package/cjs/resources/Tax/Associations.js +0 -9
  148. package/cjs/resources/Tax/Forms.js +0 -20
  149. package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
  150. package/cjs/resources/V2/Core/AccountLinks.js +0 -9
  151. package/cjs/resources/V2/Core/Accounts/Persons.js +0 -29
  152. package/cjs/resources/V2/Core/Accounts.js +0 -25
  153. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +0 -28
  154. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +0 -24
  155. package/cjs/resources/V2/MoneyManagement/Adjustments.js +0 -17
  156. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +0 -17
  157. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +0 -21
  158. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +0 -21
  159. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -16
  160. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +0 -25
  161. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -29
  162. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +0 -25
  163. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +0 -25
  164. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -12
  165. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +0 -17
  166. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +0 -17
  167. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +0 -17
  168. package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
  169. package/cjs/resources/V2/Payments/OffSessionPayments.js +0 -25
  170. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
  171. package/esm/resources/AccountNotices.js +0 -18
  172. package/esm/resources/BalanceSettings.js +0 -7
  173. package/esm/resources/Capital/FinancingOffers.js +0 -18
  174. package/esm/resources/Capital/FinancingSummary.js +0 -9
  175. package/esm/resources/Capital/FinancingTransactions.js +0 -14
  176. package/esm/resources/ExternalAccounts.js +0 -20
  177. package/esm/resources/FinancialConnections/Institutions.js +0 -14
  178. package/esm/resources/FxQuotes.js +0 -12
  179. package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
  180. package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
  181. package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
  182. package/esm/resources/Margins.js +0 -19
  183. package/esm/resources/Orders.js +0 -21
  184. package/esm/resources/PaymentRecords.js +0 -26
  185. package/esm/resources/Privacy/RedactionJobs.js +0 -39
  186. package/esm/resources/Tax/Associations.js +0 -6
  187. package/esm/resources/Tax/Forms.js +0 -17
  188. package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
  189. package/esm/resources/V2/Core/AccountLinks.js +0 -6
  190. package/esm/resources/V2/Core/Accounts/Persons.js +0 -26
  191. package/esm/resources/V2/Core/Accounts.js +0 -22
  192. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +0 -25
  193. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +0 -21
  194. package/esm/resources/V2/MoneyManagement/Adjustments.js +0 -14
  195. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +0 -14
  196. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +0 -18
  197. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +0 -18
  198. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -13
  199. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +0 -22
  200. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -26
  201. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +0 -22
  202. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +0 -22
  203. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -9
  204. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +0 -14
  205. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +0 -14
  206. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +0 -14
  207. package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
  208. package/esm/resources/V2/Payments/OffSessionPayments.js +0 -22
  209. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
  210. package/types/AccountNotices.d.ts +0 -113
  211. package/types/AccountNoticesResource.d.ts +0 -98
  212. package/types/BalanceSettings.d.ts +0 -89
  213. package/types/BalanceSettingsResource.d.ts +0 -108
  214. package/types/Capital/FinancingOffers.d.ts +0 -188
  215. package/types/Capital/FinancingOffersResource.d.ts +0 -97
  216. package/types/Capital/FinancingSummary.d.ts +0 -106
  217. package/types/Capital/FinancingSummaryResource.d.ts +0 -27
  218. package/types/Capital/FinancingTransactions.d.ts +0 -135
  219. package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
  220. package/types/ExternalAccountsResource.d.ts +0 -304
  221. package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
  222. package/types/FinancialConnections/Institutions.d.ts +0 -98
  223. package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
  224. package/types/FxQuotes.d.ts +0 -153
  225. package/types/FxQuotesResource.d.ts +0 -130
  226. package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
  227. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
  228. package/types/Issuing/DisputeSettlementDetails.d.ts +0 -85
  229. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
  230. package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
  231. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
  232. package/types/Issuing/Settlements.d.ts +0 -113
  233. package/types/Margins.d.ts +0 -56
  234. package/types/MarginsResource.d.ts +0 -114
  235. package/types/Orders.d.ts +0 -1159
  236. package/types/OrdersResource.d.ts +0 -2967
  237. package/types/PaymentAttemptRecords.d.ts +0 -2132
  238. package/types/PaymentAttemptRecordsResource.d.ts +0 -47
  239. package/types/PaymentIntentAmountDetailsLineItems.d.ts +0 -116
  240. package/types/PaymentRecords.d.ts +0 -2125
  241. package/types/PaymentRecordsResource.d.ts +0 -455
  242. package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -60
  243. package/types/Privacy/RedactionJobs.d.ts +0 -111
  244. package/types/Privacy/RedactionJobsResource.d.ts +0 -230
  245. package/types/QuoteLines.d.ts +0 -634
  246. package/types/QuotePreviewInvoices.d.ts +0 -1695
  247. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -831
  248. package/types/Tax/Associations.d.ts +0 -82
  249. package/types/Tax/AssociationsResource.d.ts +0 -29
  250. package/types/Tax/Forms.d.ts +0 -220
  251. package/types/Tax/FormsResource.d.ts +0 -107
  252. package/types/Terminal/ReaderCollectedData.d.ts +0 -51
  253. package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
  254. package/types/V2/Core/AccountLinks.d.ts +0 -106
  255. package/types/V2/Core/AccountLinksResource.d.ts +0 -90
  256. package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -3770
  257. package/types/V2/Core/Accounts.d.ts +0 -8169
  258. package/types/V2/Core/AccountsResource.d.ts +0 -10203
  259. package/types/V2/Core/Persons.d.ts +0 -1867
  260. package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -160
  261. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -172
  262. package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -70
  263. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -123
  264. package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -27
  265. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -32
  266. package/types/V2/MoneyManagement/Adjustments.d.ts +0 -110
  267. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
  268. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -546
  269. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -52
  270. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -314
  271. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -288
  272. package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -206
  273. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
  274. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -168
  275. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -115
  276. package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -278
  277. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
  278. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -97
  279. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
  280. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -251
  281. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -207
  282. package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -151
  283. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +0 -41
  284. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +0 -87
  285. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +0 -113
  286. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +0 -243
  287. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
  288. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -176
  289. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
  290. package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -155
  291. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
  292. package/types/V2/MoneyManagement/Transactions.d.ts +0 -170
  293. package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
  294. package/types/V2/Payments/OffSessionPayments.d.ts +0 -162
  295. package/types/V2/Payments/OffSessionPaymentsResource.d.ts +0 -159
  296. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -66
@@ -3,11 +3,6 @@
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
6
  /**
12
7
  * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
13
8
  */
@@ -18,11 +13,6 @@ declare module 'stripe' {
18
13
  */
19
14
  customer?: string;
20
15
 
21
- /**
22
- * The identifier of the account to create the subscription schedule for.
23
- */
24
- customer_account?: string;
25
-
26
16
  /**
27
17
  * Object representing the subscription schedule's default settings.
28
18
  */
@@ -53,11 +43,6 @@ declare module 'stripe' {
53
43
  */
54
44
  phases?: Array<SubscriptionScheduleCreateParams.Phase>;
55
45
 
56
- /**
57
- * If specified, the invoicing for the given billing cycle iterations will be processed now.
58
- */
59
- prebilling?: SubscriptionScheduleCreateParams.Prebilling;
60
-
61
46
  /**
62
47
  * 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.
63
48
  */
@@ -65,9 +50,13 @@ declare module 'stripe' {
65
50
  }
66
51
 
67
52
  namespace SubscriptionScheduleCreateParams {
68
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
53
+ interface BillingMode {
54
+ type: BillingMode.Type;
55
+ }
69
56
 
70
- type BillingMode = 'classic' | 'flexible';
57
+ namespace BillingMode {
58
+ type Type = 'classic' | 'flexible';
59
+ }
71
60
 
72
61
  interface DefaultSettings {
73
62
  /**
@@ -306,11 +295,6 @@ declare module 'stripe' {
306
295
  */
307
296
  on_behalf_of?: string;
308
297
 
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
-
314
298
  /**
315
299
  * 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.
316
300
  */
@@ -326,20 +310,10 @@ declare module 'stripe' {
326
310
  */
327
311
  trial?: boolean;
328
312
 
329
- /**
330
- * Specify trial behavior when crossing phase boundaries
331
- */
332
- trial_continuation?: Phase.TrialContinuation;
333
-
334
313
  /**
335
314
  * 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`
336
315
  */
337
316
  trial_end?: number;
338
-
339
- /**
340
- * Settings related to subscription trials.
341
- */
342
- trial_settings?: Phase.TrialSettings;
343
317
  }
344
318
 
345
319
  namespace Phase {
@@ -382,56 +356,12 @@ declare module 'stripe' {
382
356
  */
383
357
  discount?: string;
384
358
 
385
- /**
386
- * Details to determine how long the discount should be applied for.
387
- */
388
- discount_end?: Discount.DiscountEnd;
389
-
390
359
  /**
391
360
  * ID of the promotion code to create a new discount for.
392
361
  */
393
362
  promotion_code?: string;
394
363
  }
395
364
 
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
-
435
365
  interface PriceData {
436
366
  /**
437
367
  * 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).
@@ -521,56 +451,12 @@ declare module 'stripe' {
521
451
  */
522
452
  discount?: string;
523
453
 
524
- /**
525
- * Details to determine how long the discount should be applied for.
526
- */
527
- discount_end?: Discount.DiscountEnd;
528
-
529
454
  /**
530
455
  * ID of the promotion code to create a new discount for.
531
456
  */
532
457
  promotion_code?: string;
533
458
  }
534
459
 
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
-
574
460
  interface InvoiceSettings {
575
461
  /**
576
462
  * 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.
@@ -646,11 +532,6 @@ declare module 'stripe' {
646
532
  * 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.
647
533
  */
648
534
  tax_rates?: Stripe.Emptyable<Array<string>>;
649
-
650
- /**
651
- * Options that configure the trial on the subscription item.
652
- */
653
- trial?: Item.Trial;
654
535
  }
655
536
 
656
537
  namespace Item {
@@ -672,56 +553,12 @@ declare module 'stripe' {
672
553
  */
673
554
  discount?: string;
674
555
 
675
- /**
676
- * Details to determine how long the discount should be applied for.
677
- */
678
- discount_end?: Discount.DiscountEnd;
679
-
680
556
  /**
681
557
  * ID of the promotion code to create a new discount for.
682
558
  */
683
559
  promotion_code?: string;
684
560
  }
685
561
 
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
-
725
562
  interface PriceData {
726
563
  /**
727
564
  * 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).
@@ -773,33 +610,6 @@ declare module 'stripe' {
773
610
 
774
611
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
775
612
  }
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';
803
613
  }
804
614
 
805
615
  type ProrationBehavior =
@@ -818,44 +628,6 @@ declare module 'stripe' {
818
628
  */
819
629
  destination: string;
820
630
  }
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';
859
631
  }
860
632
  }
861
633
 
@@ -867,11 +639,6 @@ declare module 'stripe' {
867
639
  }
868
640
 
869
641
  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
-
875
642
  /**
876
643
  * Object representing the subscription schedule's default settings.
877
644
  */
@@ -897,11 +664,6 @@ declare module 'stripe' {
897
664
  */
898
665
  phases?: Array<SubscriptionScheduleUpdateParams.Phase>;
899
666
 
900
- /**
901
- * If specified, the invoicing for the given billing cycle iterations will be processed now.
902
- */
903
- prebilling?: SubscriptionScheduleUpdateParams.Prebilling;
904
-
905
667
  /**
906
668
  * 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`.
907
669
  */
@@ -909,8 +671,6 @@ declare module 'stripe' {
909
671
  }
910
672
 
911
673
  namespace SubscriptionScheduleUpdateParams {
912
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
913
-
914
674
  interface DefaultSettings {
915
675
  /**
916
676
  * 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).
@@ -1148,11 +908,6 @@ declare module 'stripe' {
1148
908
  */
1149
909
  on_behalf_of?: string;
1150
910
 
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
-
1156
911
  /**
1157
912
  * 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.
1158
913
  */
@@ -1173,20 +928,10 @@ declare module 'stripe' {
1173
928
  */
1174
929
  trial?: boolean;
1175
930
 
1176
- /**
1177
- * Specify trial behavior when crossing phase boundaries
1178
- */
1179
- trial_continuation?: Phase.TrialContinuation;
1180
-
1181
931
  /**
1182
932
  * 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`
1183
933
  */
1184
934
  trial_end?: number | 'now';
1185
-
1186
- /**
1187
- * Settings related to subscription trials.
1188
- */
1189
- trial_settings?: Phase.TrialSettings;
1190
935
  }
1191
936
 
1192
937
  namespace Phase {
@@ -1229,56 +974,12 @@ declare module 'stripe' {
1229
974
  */
1230
975
  discount?: string;
1231
976
 
1232
- /**
1233
- * Details to determine how long the discount should be applied for.
1234
- */
1235
- discount_end?: Discount.DiscountEnd;
1236
-
1237
977
  /**
1238
978
  * ID of the promotion code to create a new discount for.
1239
979
  */
1240
980
  promotion_code?: string;
1241
981
  }
1242
982
 
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
-
1282
983
  interface PriceData {
1283
984
  /**
1284
985
  * 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).
@@ -1368,56 +1069,12 @@ declare module 'stripe' {
1368
1069
  */
1369
1070
  discount?: string;
1370
1071
 
1371
- /**
1372
- * Details to determine how long the discount should be applied for.
1373
- */
1374
- discount_end?: Discount.DiscountEnd;
1375
-
1376
1072
  /**
1377
1073
  * ID of the promotion code to create a new discount for.
1378
1074
  */
1379
1075
  promotion_code?: string;
1380
1076
  }
1381
1077
 
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
-
1421
1078
  interface InvoiceSettings {
1422
1079
  /**
1423
1080
  * 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.
@@ -1493,11 +1150,6 @@ declare module 'stripe' {
1493
1150
  * 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.
1494
1151
  */
1495
1152
  tax_rates?: Stripe.Emptyable<Array<string>>;
1496
-
1497
- /**
1498
- * Options that configure the trial on the subscription item.
1499
- */
1500
- trial?: Item.Trial;
1501
1153
  }
1502
1154
 
1503
1155
  namespace Item {
@@ -1519,56 +1171,12 @@ declare module 'stripe' {
1519
1171
  */
1520
1172
  discount?: string;
1521
1173
 
1522
- /**
1523
- * Details to determine how long the discount should be applied for.
1524
- */
1525
- discount_end?: Discount.DiscountEnd;
1526
-
1527
1174
  /**
1528
1175
  * ID of the promotion code to create a new discount for.
1529
1176
  */
1530
1177
  promotion_code?: string;
1531
1178
  }
1532
1179
 
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
-
1572
1180
  interface PriceData {
1573
1181
  /**
1574
1182
  * 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).
@@ -1620,33 +1228,6 @@ declare module 'stripe' {
1620
1228
 
1621
1229
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
1622
1230
  }
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';
1650
1231
  }
1651
1232
 
1652
1233
  type ProrationBehavior =
@@ -1665,44 +1246,6 @@ declare module 'stripe' {
1665
1246
  */
1666
1247
  destination: string;
1667
1248
  }
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';
1706
1249
  }
1707
1250
 
1708
1251
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
@@ -1729,11 +1272,6 @@ declare module 'stripe' {
1729
1272
  */
1730
1273
  customer?: string;
1731
1274
 
1732
- /**
1733
- * Only return subscription schedules for the given account.
1734
- */
1735
- customer_account?: string;
1736
-
1737
1275
  /**
1738
1276
  * Specifies which fields in the response should be expanded.
1739
1277
  */
@@ -1750,773 +1288,26 @@ declare module 'stripe' {
1750
1288
  scheduled?: boolean;
1751
1289
  }
1752
1290
 
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
-
1291
+ interface SubscriptionScheduleCancelParams {
1759
1292
  /**
1760
1293
  * Specifies which fields in the response should be expanded.
1761
1294
  */
1762
1295
  expand?: Array<string>;
1763
1296
 
1764
1297
  /**
1765
- * Provide any time periods to bill in advance.
1298
+ * 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`.
1766
1299
  */
1767
- prebilling?: Stripe.Emptyable<
1768
- Array<SubscriptionScheduleAmendParams.Prebilling>
1769
- >;
1300
+ invoice_now?: boolean;
1770
1301
 
1771
1302
  /**
1772
- * In cases where the amendment changes the currently active phase,
1773
- * specifies if and how to prorate at the time of the request.
1303
+ * If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
1774
1304
  */
1775
- proration_behavior?: SubscriptionScheduleAmendParams.ProrationBehavior;
1305
+ prorate?: boolean;
1306
+ }
1776
1307
 
1308
+ interface SubscriptionScheduleReleaseParams {
1777
1309
  /**
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;
2515
- }
2516
-
2517
- interface SubscriptionScheduleReleaseParams {
2518
- /**
2519
- * Specifies which fields in the response should be expanded.
1310
+ * Specifies which fields in the response should be expanded.
2520
1311
  */
2521
1312
  expand?: Array<string>;
2522
1313
 
@@ -2571,19 +1362,6 @@ declare module 'stripe' {
2571
1362
  options?: RequestOptions
2572
1363
  ): ApiListPromise<Stripe.SubscriptionSchedule>;
2573
1364
 
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
-
2587
1365
  /**
2588
1366
  * 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.
2589
1367
  */