stripe 10.2.0 → 10.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.
package/CHANGELOG.md CHANGED
@@ -1,63 +1,39 @@
1
1
  # Changelog
2
2
 
3
+ ## 10.3.0-beta.1 - 2022-08-11
4
+ * [#1511](https://github.com/stripe/stripe-node/pull/1511) API Updates for beta branch
5
+ - Updated stable APIs to the latest version
6
+ - Add refund_payment method to Terminal resource
7
+
3
8
  ## 10.2.0 - 2022-08-11
4
9
  * [#1510](https://github.com/stripe/stripe-node/pull/1510) API Updates
5
- * Add support for `payment_method_collection` on `Checkout.Session`, `CheckoutSessionCreateParams`, `PaymentLinkCreateParams`, `PaymentLinkUpdateParams`, and `PaymentLink`
6
-
10
+ * Add support for `payment_method_collection` on `Checkout.Session`, `CheckoutSessionCreateParams`, `PaymentLinkCreateParams`, `PaymentLinkUpdateParams`, and `PaymentLink`
7
11
 
8
12
  ## 10.1.0 - 2022-08-09
9
13
  * [#1506](https://github.com/stripe/stripe-node/pull/1506) API Updates
10
14
  * Add support for `process_config` on `Terminal.Reader.action.process_payment_intent`
11
15
  * [#1505](https://github.com/stripe/stripe-node/pull/1505) Simplify AddressParam definitions
12
- - Rename `AddressParam` to `ShippingAddressParam`, and change type of `Source.source_order.shipping.address`, `SourceUpdateParams.SourceOrder.Shipping.address`, and `SessionCreateParams.PaymentIntentData.Shipping.address` to `ShippingAddressParam`
16
+ - Rename `AddressParam` to `ShippingAddressParam`, and change type of `Source.source_order.shipping.address`, `SourceUpdateParams.SourceOrder.Shipping.address`, and `SessionCreateParams.PaymentIntentData.Shipping.address` to `ShippingAddressParam`
13
17
  - Rename `AccountAddressParam` go `AddressParam`, and change type of `AccountCreateParams.BusinessProfile.support_address`, `AccountCreateParams.Company.address`, `AccountCreateParams.Individual.address `, `AccountCreateParams.Individual.registered_address`, `AccountUpdateParams.BusinessProfile.support_address`, `AccountUpdateParams.Company.address`, `AccountUpdateParams.Individual.address`, `AccountUpdateParams.Individual.registered_address`, `ChargeCreateParams.Shipping.address`, `ChargeUpdateParams.Shipping.address`, `CustomerCreateParams.Shipping.address`, `CustomerUpdateParams.Shipping.address`, `CustomerSourceUpdateParams.Owner.address`, `InvoiceListUpcomingLinesParams.CustomerDetails.Shipping.address`, `InvoiceRetrieveUpcomingParams.CustomerDetails.Shipping.address`, `OrderCreateParams.BillingDetails.address`, `OrderCreateParams.ShippingDetails.address`, `OrderUpdateParams.BillingDetails.address`, `OrderUpdateParams.ShippingDetails.address`, `PaymentIntentCreateParams.Shipping.address`, `PaymentIntentUpdateParams.Shipping.address`, `PaymentIntentConfirmParams.Shipping.address`, `PersonCreateParams.address`, `PersonCreateParams.registered_address`, `PersonUpdateParams.address`, `PersonUpdateParams.registered_address`, `SourceCreateParams.Owner.address`, `SourceUpdateParams.Owner.address`, `TokenCreateParams.Account.Company.address`, `TokenCreateParams.Account.Individual.address`, `TokenCreateParams.Account.Individual.registered_address`, `TokenCreateParams.Person.address`, `TokenCreateParams.Person.registered_address`, and `Terminal.LocationUpdateParams.address` to `AddressParam`
14
18
  * [#1503](https://github.com/stripe/stripe-node/pull/1503) API Updates
15
19
  * Add support for `expires_at` on `Apps.Secret` and `AppsSecretCreateParams`
16
20
 
21
+ ## 10.1.0-beta.1 - 2022-08-03
22
+ * [#1498](https://github.com/stripe/stripe-node/pull/1498) API Updates for beta branch
23
+ - Updated stable APIs to the latest version
24
+ - Added the `Order` resource support
25
+
17
26
  ## 10.0.0 - 2022-08-02
18
27
 
19
- This release includes breaking changes resulting from:
28
+ Major version release for API version 2022-08-01. Default API version changed to "2022-08-01".
20
29
 
21
- * Moving to use the new API version "2022-08-01". To learn more about these changes to Stripe products, see https://stripe.com/docs/upgrades#2022-08-01
22
- * Cleaning up the SDK to remove deprecated/unused APIs and rename classes/methods/properties to sync with product APIs. Read more detailed description at https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v10.
30
+ Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v10. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.
23
31
 
24
32
  "⚠️" symbol highlights breaking changes.
25
33
 
26
34
  * [#1497](https://github.com/stripe/stripe-node/pull/1497) API Updates
27
35
  * [#1493](https://github.com/stripe/stripe-node/pull/1493) Next major release changes
28
36
 
29
- ### Added
30
- * Add support for new value `invalid_tos_acceptance` on enums `Account.future_requirements.errors[].code`, `Account.requirements.errors[].code`, `Capability.future_requirements.errors[].code`, `Capability.requirements.errors[].code`, `Person.future_requirements.errors[].code`, and `Person.requirements.errors[].code`
31
- * Add support for `shipping_cost` and `shipping_details` on `Checkout.Session`
32
-
33
- ### ⚠️ Changed
34
- * Change type of `business_profile`, `business_type`, `country`, `default_currency`, and `settings` properties on `Account` resource to be nullable.
35
- * Change type of `currency` property on `Checkout.Session` resource from `string` to `'cad' | 'usd'`.
36
- * Change location of TypeScript definitions for `CreditNoteLineItemListPreviewParams`, `CreditNoteLineItemListPreviewParams.Line`, `CreditNoteLineItemListPreviewParams.Line.Type`, and `CreditNoteLineItemListPreviewParams.Line.Reason` interfaces from `CreditNoteLineItems.d.ts` to `CreditNotes.d.ts`.
37
- * Change type of `address`, `currency`, `delinquent`, `discount`, `invoice_prefix`, `name`, `phone`, and `preferred_locales` properties on `Customer` resource to be nullable.
38
- * Rename `InvoiceRetrieveUpcomingParams` to `InvoiceListUpcomingLinesParams`.
39
-
40
- ### ⚠️ Removed
41
- * Remove for `AlipayAccount`, `DeletedAlipayAccount`, `BitcoinReceiver`, `DeletedBitcoinReceiver`, `BitcoinTransaction`, and `BitcoinTransactionListParams` definitions.
42
- * Remove `AlipayAccount` and `BitcoinReceiver` from `CustomerSource`.
43
- * Remove `Stripe.DeletedAlipayAccount` and `Stripe.DeletedBitcoinReceiver` from possible values of `source` property in `PaymentIntent`.
44
- * Remove `IssuerFraudRecord`, `IssuerFraudRecordRetrieveParams`, `IssuerFraudRecordListParams`, and `IssuerFraudRecordsResource`, definitions.
45
- * Remove `treasury.received_credit.reversed` webhook event constant. Please use `treasury.received_credit.returned` instead.
46
- * Remove `order.payment_failed`, `transfer.failed`, and `transfer.paid`. The events were deprecated.
47
- * Remove `retrieveDetails` method from `Issuing.Card` resource. The method was unsupported. Read more at https://stripe.com/docs/issuing/cards/virtual.
48
- * Remove `Issuing.CardDetails` and `CardRetrieveDetailsParams` definition.
49
- * Remove `IssuerFraudRecords` resource.
50
- * Remove `Recipient` resource and`recipient` property from `Card` resource.
51
- * Remove `InvoiceMarkUncollectibleParams` definition.
52
- * Remove deprecated `Stripe.Errors` and `StripeError` (and derived `StripeCardError`, `StripeInvalidRequestError`, `StripeAPIError`, `StripeAuthenticationError`, `StripePermissionError`, `StripeRateLimitError`, `StripeConnectionError`, `StripeSignatureVerificationError`, `StripeIdempotencyError`, and `StripeInvalidGrantError`) definitions.
53
- * Remove `redirect_url` from `LoginLinks` definition. The property is no longer supported.
54
- * Remove `LineItemListParams` definition. The interface was no longer in use.
55
-
56
- ### ⚠️ Renamed
57
- * Rename `listUpcomingLineItems` method on `Invoice` resource to `listUpcomingLines`.
58
- * Rename `InvoiceLineItemListUpcomingParams` to `InvoiceListUpcomingLinesParams`.
59
- * Rename `InvoiceRetrieveUpcomingParams` to `InvoiceListUpcomingLinesParams`.
60
-
61
37
  ## 9.16.0 - 2022-07-26
62
38
  * [#1492](https://github.com/stripe/stripe-node/pull/1492) API Updates
63
39
  * Add support for new value `exempted` on enums `Charge.payment_method_details.card.three_d_secure.result` and `SetupAttempt.payment_method_details.card.three_d_secure.result`
@@ -74,6 +50,20 @@ This release includes breaking changes resulting from:
74
50
  * Add support for `mandate` on `InvoicePayParams`
75
51
  * Add support for `product_data` on `OrderCreateParams.line_items[]` and `OrderUpdateParams.line_items[]`
76
52
 
53
+ ## 9.15.0-beta.1 - 2022-07-22
54
+ * [#1485](https://github.com/stripe/stripe-node/pull/1485) API Updates for beta branch
55
+ - Updated stable APIs to the latest version
56
+ * [#1483](https://github.com/stripe/stripe-node/pull/1483) API Updates for beta branch
57
+ - Updated stable APIs to the latest version
58
+ - Add `QuotePhase` resource
59
+ * [#1479](https://github.com/stripe/stripe-node/pull/1479) API Updates for beta branch
60
+ - Updated stable APIs to the latest version
61
+ - Add `Price.migrate_to` property
62
+ - Add `SubscriptionSchedule.amend` method.
63
+ - Add `Discount.subscription_item` property.
64
+ - Add `Quote.subscription_data.billing_behavior`, `billing_cycle_anchor`, `end_behavior`, `from_schedule`, `from_subscription`, `prebilling`, `proration_behavior` properties.
65
+ - Add `phases` parameter to `Quote.create`
66
+ - Add `Subscription.discounts`, `prebilling` properties.
77
67
 
78
68
  ## 9.14.0 - 2022-07-18
79
69
  * [#1477](https://github.com/stripe/stripe-node/pull/1477) API Updates
@@ -96,6 +86,18 @@ This release includes breaking changes resulting from:
96
86
  * Change `Transfer.source_type` to be optional and not nullable
97
87
  * [#1471](https://github.com/stripe/stripe-node/pull/1471) Update readme to include a note on beta packages
98
88
 
89
+ ## 9.13.0-beta.1 - 2022-07-07
90
+ * [#1469](https://github.com/stripe/stripe-node/pull/1469) API Updates for beta branch
91
+ - Include `server_side_confirmation_beta=v1` beta
92
+ - Add `secretKeyConfirmation` to `PaymentIntent`
93
+ * [#1451](https://github.com/stripe/stripe-node/pull/1451) API Updates
94
+ - Updated stable APIs to the latest version
95
+ * [#1457](https://github.com/stripe/stripe-node/pull/1457) Use the generated API version
96
+ * [#1445](https://github.com/stripe/stripe-node/pull/1445) Support updating pre-release versions
97
+ * [#1442](https://github.com/stripe/stripe-node/pull/1442) API Updates
98
+ * Add support for `network_details` method on resource `ReceivedCredits`/`ReceivedDebits`
99
+ * [#1444](https://github.com/stripe/stripe-node/pull/1444) Merge master branch into beta branch
100
+
99
101
  ## 9.12.0 - 2022-07-07
100
102
  * [#1468](https://github.com/stripe/stripe-node/pull/1468) API Updates
101
103
  * Add support for `currency` on `CheckoutSessionCreateParams`, `InvoiceUpcomingLinesParams`, `InvoiceUpcomingParams`, `PaymentLinkCreateParams`, `SubscriptionCreateParams`, `SubscriptionSchedule.phases[]`, `SubscriptionScheduleCreateParams.phases[]`, `SubscriptionScheduleUpdateParams.phases[]`, and `Subscription`
@@ -158,6 +160,10 @@ This release includes breaking changes resulting from:
158
160
  * Change type of `Order.payment.settings.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `OrderCreateParams.payment.settings.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `OrderUpdateParams.payment.settings.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `PaymentIntent.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `PaymentIntentConfirmParams.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `PaymentIntentCreateParams.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, and `PaymentIntentUpdateParams.payment_method_options.customer_balance.bank_transfer.requested_address_types[]` from `literal('zengin')` to `enum`
159
161
  * Add support for `custom_unit_amount` on `PriceCreateParams` and `Price`
160
162
 
163
+ ## 9.8.0-beta.1 - 2022-06-08
164
+ * [#1442](https://github.com/stripe/stripe-node/pull/1442) API Updates
165
+ * Add support for `network_details` method on resource `ReceivedCredits`/`ReceivedDebits`
166
+
161
167
  ## 9.7.0 - 2022-06-08
162
168
  * [#1441](https://github.com/stripe/stripe-node/pull/1441) API Updates
163
169
  * Add support for `affirm`, `bancontact`, `card`, `ideal`, `p24`, and `sofort` on `Checkout.Session.payment_method_options` and `CheckoutSessionCreateParams.payment_method_options`
@@ -178,7 +184,6 @@ This release includes breaking changes resulting from:
178
184
  * Add support for `network` on `SetupIntent.payment_method_options.card`
179
185
  * Add support for new value `simulated_wisepos_e` on enums `Terminal.Reader.device_type` and `TerminalReaderListParams.device_type`
180
186
 
181
-
182
187
  ## 9.5.0 - 2022-05-26
183
188
  * [#1434](https://github.com/stripe/stripe-node/pull/1434) API Updates
184
189
  * Add support for `affirm_payments` and `link_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
@@ -249,7 +254,6 @@ Major version release - The [migration guide](https://github.com/stripe/stripe-n
249
254
  * Add support for `default_price` on `ProductUpdateParams` and `Product`
250
255
  * Add support for `instructions_email` on `RefundCreateParams` and `Refund`
251
256
 
252
-
253
257
  ## 8.221.0 - 2022-05-05
254
258
  * [#1413](https://github.com/stripe/stripe-node/pull/1413) API Updates
255
259
  * Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
@@ -526,7 +530,6 @@ Major version release - The [migration guide](https://github.com/stripe/stripe-n
526
530
  * [#1297](https://github.com/stripe/stripe-node/pull/1297) API Updates
527
531
  * Add support for `automatic_payment_methods` on `PaymentIntentCreateParams` and `PaymentIntent`
528
532
 
529
-
530
533
  ## 8.189.0 - 2021-11-16
531
534
  * [#1295](https://github.com/stripe/stripe-node/pull/1295) API Updates
532
535
  * Add support for new resource `ShippingRate`
@@ -549,7 +552,6 @@ Major version release - The [migration guide](https://github.com/stripe/stripe-n
549
552
  * Remove support for `ownership_declaration_shown_and_signed` on `TokenCreateParams.account`. This API was unused.
550
553
  * Add support for `ownership_declaration_shown_and_signed` on `TokenCreateParams.account.company`
551
554
 
552
-
553
555
  ## 8.186.0 - 2021-11-01
554
556
  * [#1283](https://github.com/stripe/stripe-node/pull/1283) API Updates
555
557
  * Add support for `ownership_declaration` on `AccountUpdateParams.company`, `AccountCreateParams.company`, `Account.company`, and `TokenCreateParams.account.company`
@@ -693,7 +695,6 @@ Major version release - The [migration guide](https://github.com/stripe/stripe-n
693
695
  * Add support for `wallet` on `Issuing.Transaction`
694
696
  * Add support for `ideal` on `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentIntentConfirmParams.payment_method_options`, and `PaymentIntent.payment_method_options`
695
697
 
696
-
697
698
  ## 8.163.0 - 2021-07-15
698
699
  * [#1102](https://github.com/stripe/stripe-node/pull/1102), [#1191](https://github.com/stripe/stripe-node/pull/1191) Add support for `stripeAccount` when initializing the client
699
700
 
@@ -2226,7 +2227,7 @@ Pull requests included in this release (cf. [#606](https://github.com/stripe/str
2226
2227
 
2227
2228
  - [BUGFIX] Fix incorrect deleteDiscount method & related spec(s)
2228
2229
 
2229
- ### 2.2.1 - 2013-12-01
2230
+ ## 2.2.1 - 2013-12-01
2230
2231
 
2231
2232
  - [BUGFIX] Fix user-agent header issue (see issue #75)
2232
2233
 
@@ -2289,3 +2290,4 @@ Pull requests included in this release (cf. [#606](https://github.com/stripe/str
2289
2290
  ## 0.0.2 - 2011-09-28
2290
2291
 
2291
2292
  - Initial release with customers and tokens APIs
2293
+
package/VERSION CHANGED
@@ -1 +1 @@
1
- 10.2.0
1
+ 10.3.0-beta.1
package/lib/apiVersion.js CHANGED
@@ -1,3 +1,6 @@
1
1
  // File generated from our OpenAPI spec
2
2
 
3
- module.exports = {ApiVersion: '2022-08-01'};
3
+ module.exports = {
4
+ ApiVersion:
5
+ '2022-08-01; server_side_confirmation_beta=v1; orders_beta=v4; terminal_interac_refunds_beta=v1',
6
+ };
@@ -0,0 +1,27 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ 'use strict';
4
+
5
+ const StripeResource = require('../StripeResource');
6
+ const stripeMethod = StripeResource.method;
7
+
8
+ module.exports = StripeResource.extend({
9
+ path: 'quote_phases',
10
+
11
+ retrieve: stripeMethod({
12
+ method: 'GET',
13
+ path: '/{quotePhase}',
14
+ }),
15
+
16
+ list: stripeMethod({
17
+ method: 'GET',
18
+ path: '',
19
+ methodType: 'list',
20
+ }),
21
+
22
+ listLineItems: stripeMethod({
23
+ method: 'GET',
24
+ path: '/{quotePhase}/line_items',
25
+ methodType: 'list',
26
+ }),
27
+ });
@@ -29,6 +29,11 @@ module.exports = StripeResource.extend({
29
29
  methodType: 'list',
30
30
  }),
31
31
 
32
+ amend: stripeMethod({
33
+ method: 'POST',
34
+ path: '/{schedule}/amend',
35
+ }),
36
+
32
37
  cancel: stripeMethod({
33
38
  method: 'POST',
34
39
  path: '/{schedule}/cancel',
@@ -49,6 +49,11 @@ module.exports = StripeResource.extend({
49
49
  path: '/{reader}/process_setup_intent',
50
50
  }),
51
51
 
52
+ refundPayment: stripeMethod({
53
+ method: 'POST',
54
+ path: '/{reader}/refund_payment',
55
+ }),
56
+
52
57
  setReaderDisplay: stripeMethod({
53
58
  method: 'POST',
54
59
  path: '/{reader}/set_reader_display',
package/lib/resources.js CHANGED
@@ -38,6 +38,7 @@ module.exports = {
38
38
  Products: require('./resources/Products'),
39
39
  PromotionCodes: require('./resources/PromotionCodes'),
40
40
  Quotes: require('./resources/Quotes'),
41
+ QuotePhases: require('./resources/QuotePhases'),
41
42
  Refunds: require('./resources/Refunds'),
42
43
  Reviews: require('./resources/Reviews'),
43
44
  SetupAttempts: require('./resources/SetupAttempts'),
package/lib/stripe.js CHANGED
@@ -1,11 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  const resources = require('./resources');
4
+ const apiVersion = require('./apiVersion');
4
5
 
5
6
  const DEFAULT_HOST = 'api.stripe.com';
6
7
  const DEFAULT_PORT = '443';
7
8
  const DEFAULT_BASE_PATH = '/v1/';
8
- const DEFAULT_API_VERSION = null;
9
+ const DEFAULT_API_VERSION = apiVersion.ApiVersion;
9
10
 
10
11
  const DEFAULT_TIMEOUT = 80000;
11
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe",
3
- "version": "10.2.0",
3
+ "version": "10.3.0-beta.1",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -64,6 +64,11 @@ declare module 'stripe' {
64
64
  * The subscription that this coupon is applied to, if it is applied to a particular subscription.
65
65
  */
66
66
  subscription: string | null;
67
+
68
+ /**
69
+ * The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
70
+ */
71
+ subscription_item?: string | null;
67
72
  }
68
73
 
69
74
  /**
@@ -126,6 +131,11 @@ declare module 'stripe' {
126
131
  * The subscription that this coupon is applied to, if it is applied to a particular subscription.
127
132
  */
128
133
  subscription: string | null;
134
+
135
+ /**
136
+ * The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
137
+ */
138
+ subscription_item?: string | null;
129
139
  }
130
140
  }
131
141
  }
@@ -1912,6 +1912,11 @@ declare module 'stripe' {
1912
1912
  InvoiceListUpcomingLinesParams.SubscriptionItem
1913
1913
  >;
1914
1914
 
1915
+ /**
1916
+ * The pre-billing to apply to the subscription as a preview.
1917
+ */
1918
+ subscription_prebilling?: InvoiceListUpcomingLinesParams.SubscriptionPrebilling;
1919
+
1915
1920
  /**
1916
1921
  * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes.
1917
1922
  */
@@ -2224,6 +2229,11 @@ declare module 'stripe' {
2224
2229
  */
2225
2230
  deleted?: boolean;
2226
2231
 
2232
+ /**
2233
+ * The coupons to redeem into discounts for the subscription item.
2234
+ */
2235
+ discounts?: Stripe.Emptyable<Array<SubscriptionItem.Discount>>;
2236
+
2227
2237
  /**
2228
2238
  * Subscription item to update.
2229
2239
  */
@@ -2268,6 +2278,18 @@ declare module 'stripe' {
2268
2278
  usage_gte: number;
2269
2279
  }
2270
2280
 
2281
+ interface Discount {
2282
+ /**
2283
+ * ID of the coupon to create a new discount for.
2284
+ */
2285
+ coupon?: string;
2286
+
2287
+ /**
2288
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
2289
+ */
2290
+ discount?: string;
2291
+ }
2292
+
2271
2293
  interface PriceData {
2272
2294
  /**
2273
2295
  * 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).
@@ -2321,6 +2343,13 @@ declare module 'stripe' {
2321
2343
  }
2322
2344
  }
2323
2345
 
2346
+ interface SubscriptionPrebilling {
2347
+ /**
2348
+ * This is used to determine the number of billing cycles to prebill.
2349
+ */
2350
+ iterations: number;
2351
+ }
2352
+
2324
2353
  type SubscriptionProrationBehavior =
2325
2354
  | 'always_invoice'
2326
2355
  | 'create_prorations'
@@ -2460,6 +2489,11 @@ declare module 'stripe' {
2460
2489
  InvoiceRetrieveUpcomingParams.SubscriptionItem
2461
2490
  >;
2462
2491
 
2492
+ /**
2493
+ * The pre-billing to apply to the subscription as a preview.
2494
+ */
2495
+ subscription_prebilling?: InvoiceRetrieveUpcomingParams.SubscriptionPrebilling;
2496
+
2463
2497
  /**
2464
2498
  * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes.
2465
2499
  */
@@ -2772,6 +2806,11 @@ declare module 'stripe' {
2772
2806
  */
2773
2807
  deleted?: boolean;
2774
2808
 
2809
+ /**
2810
+ * The coupons to redeem into discounts for the subscription item.
2811
+ */
2812
+ discounts?: Stripe.Emptyable<Array<SubscriptionItem.Discount>>;
2813
+
2775
2814
  /**
2776
2815
  * Subscription item to update.
2777
2816
  */
@@ -2816,6 +2855,18 @@ declare module 'stripe' {
2816
2855
  usage_gte: number;
2817
2856
  }
2818
2857
 
2858
+ interface Discount {
2859
+ /**
2860
+ * ID of the coupon to create a new discount for.
2861
+ */
2862
+ coupon?: string;
2863
+
2864
+ /**
2865
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
2866
+ */
2867
+ discount?: string;
2868
+ }
2869
+
2819
2870
  interface PriceData {
2820
2871
  /**
2821
2872
  * 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).
@@ -2869,6 +2920,13 @@ declare module 'stripe' {
2869
2920
  }
2870
2921
  }
2871
2922
 
2923
+ interface SubscriptionPrebilling {
2924
+ /**
2925
+ * This is used to determine the number of billing cycles to prebill.
2926
+ */
2927
+ iterations: number;
2928
+ }
2929
+
2872
2930
  type SubscriptionProrationBehavior =
2873
2931
  | 'always_invoice'
2874
2932
  | 'create_prorations'
@@ -163,6 +163,11 @@ declare module 'stripe' {
163
163
  */
164
164
  review: string | Stripe.Review | null;
165
165
 
166
+ /**
167
+ * Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`.
168
+ */
169
+ secret_key_confirmation?: PaymentIntent.SecretKeyConfirmation;
170
+
166
171
  /**
167
172
  * Indicates that you intend to make future payments with this PaymentIntent's payment method.
168
173
  *
@@ -1685,6 +1690,8 @@ declare module 'stripe' {
1685
1690
  }
1686
1691
  }
1687
1692
 
1693
+ type SecretKeyConfirmation = 'optional' | 'required';
1694
+
1688
1695
  type SetupFutureUsage = 'off_session' | 'on_session';
1689
1696
 
1690
1697
  interface Shipping {
@@ -1856,6 +1863,11 @@ declare module 'stripe' {
1856
1863
  */
1857
1864
  return_url?: string;
1858
1865
 
1866
+ /**
1867
+ * Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`.
1868
+ */
1869
+ secret_key_confirmation?: PaymentIntentCreateParams.SecretKeyConfirmation;
1870
+
1859
1871
  /**
1860
1872
  * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1861
1873
  *
@@ -3495,6 +3507,8 @@ declare module 'stripe' {
3495
3507
  session?: string;
3496
3508
  }
3497
3509
 
3510
+ type SecretKeyConfirmation = 'optional' | 'required';
3511
+
3498
3512
  type SetupFutureUsage = 'off_session' | 'on_session';
3499
3513
 
3500
3514
  interface Shipping {
@@ -3598,6 +3612,11 @@ declare module 'stripe' {
3598
3612
  */
3599
3613
  expand?: Array<string>;
3600
3614
 
3615
+ /**
3616
+ * This hash contains details about the Mandate to create.
3617
+ */
3618
+ mandate_data?: PaymentIntentUpdateParams.MandateData;
3619
+
3601
3620
  /**
3602
3621
  * 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`.
3603
3622
  */
@@ -3672,6 +3691,41 @@ declare module 'stripe' {
3672
3691
  namespace PaymentIntentUpdateParams {
3673
3692
  type CaptureMethod = 'automatic' | 'manual';
3674
3693
 
3694
+ interface MandateData {
3695
+ /**
3696
+ * This hash contains details about the customer acceptance of the Mandate.
3697
+ */
3698
+ customer_acceptance: MandateData.CustomerAcceptance;
3699
+ }
3700
+
3701
+ namespace MandateData {
3702
+ interface CustomerAcceptance {
3703
+ /**
3704
+ * If this is a Mandate accepted online, this hash contains details about the online acceptance.
3705
+ */
3706
+ online: CustomerAcceptance.Online;
3707
+
3708
+ /**
3709
+ * The type of customer acceptance information included with the Mandate.
3710
+ */
3711
+ type: 'online';
3712
+ }
3713
+
3714
+ namespace CustomerAcceptance {
3715
+ interface Online {
3716
+ /**
3717
+ * The IP address from which the Mandate was accepted by the customer.
3718
+ */
3719
+ ip_address?: string;
3720
+
3721
+ /**
3722
+ * The user agent of the browser from which the Mandate was accepted by the customer.
3723
+ */
3724
+ user_agent?: string;
3725
+ }
3726
+ }
3727
+ }
3728
+
3675
3729
  interface PaymentMethodData {
3676
3730
  /**
3677
3731
  * If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
@@ -5340,6 +5394,11 @@ declare module 'stripe' {
5340
5394
  }
5341
5395
 
5342
5396
  interface PaymentIntentConfirmParams {
5397
+ /**
5398
+ * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
5399
+ */
5400
+ application_fee_amount?: Stripe.Emptyable<number>;
5401
+
5343
5402
  /**
5344
5403
  * Controls when the funds will be captured from the customer's account.
5345
5404
  */
@@ -65,6 +65,11 @@ declare module 'stripe' {
65
65
  */
66
66
  metadata: Stripe.Metadata;
67
67
 
68
+ /**
69
+ * Subscriptions using this price will be migrated to use the new referenced price.
70
+ */
71
+ migrate_to?: Price.MigrateTo | null;
72
+
68
73
  /**
69
74
  * A brief description of the price, hidden from customers.
70
75
  */
@@ -211,6 +216,23 @@ declare module 'stripe' {
211
216
  preset: number | null;
212
217
  }
213
218
 
219
+ interface MigrateTo {
220
+ /**
221
+ * The behavior controlling at what point in the subscription lifecycle to migrate the price
222
+ */
223
+ behavior: 'at_cycle_end';
224
+
225
+ /**
226
+ * The unix timestamp after at which subscriptions will start to migrate to the new price.
227
+ */
228
+ effective_after: number;
229
+
230
+ /**
231
+ * The id of the price being migrated to
232
+ */
233
+ price: string;
234
+ }
235
+
214
236
  interface Recurring {
215
237
  /**
216
238
  * Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.
@@ -685,6 +707,11 @@ declare module 'stripe' {
685
707
  */
686
708
  metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
687
709
 
710
+ /**
711
+ * If specified, subscriptions using this price will be updated to use the new referenced price.
712
+ */
713
+ migrate_to?: Stripe.Emptyable<PriceUpdateParams.MigrateTo>;
714
+
688
715
  /**
689
716
  * A brief description of the price, hidden from customers.
690
717
  */
@@ -787,6 +814,23 @@ declare module 'stripe' {
787
814
  }
788
815
  }
789
816
 
817
+ interface MigrateTo {
818
+ /**
819
+ * The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`.
820
+ */
821
+ behavior: 'at_cycle_end';
822
+
823
+ /**
824
+ * The time after which subscriptions should start using the new price.
825
+ */
826
+ effective_after?: number;
827
+
828
+ /**
829
+ * The ID of the price object.
830
+ */
831
+ price: string;
832
+ }
833
+
790
834
  interface Recurring {
791
835
  /**
792
836
  * Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).