stripe 15.7.0 → 15.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 15.8.0 - 2024-05-23
4
+ * [#2092](https://github.com/stripe/stripe-node/pull/2092) Update generated code
5
+ * Add support for `external_account_collection` on `AccountSession.components.balances.features`, `AccountSession.components.payouts.features`, `AccountSessionCreateParams.components.balances.features`, and `AccountSessionCreateParams.components.payouts.features`
6
+ * Add support for new value `terminal_reader_invalid_location_for_payment` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code`
7
+ * Add support for `payment_method_remove` on `Checkout.Session.saved_payment_method_options`
8
+
3
9
  ## 15.7.0 - 2024-05-16
4
10
  * [#2088](https://github.com/stripe/stripe-node/pull/2088) Update generated code
5
11
  * Add support for `fee_source` on `ApplicationFee`
package/VERSION CHANGED
@@ -1 +1 @@
1
- 15.7.0
1
+ 15.8.0
@@ -34,7 +34,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
34
34
  ];
35
35
  const defaultRequestSenderFactory = (stripe) => new RequestSender_js_1.RequestSender(stripe, StripeResource_js_1.StripeResource.MAX_BUFFERED_REQUEST_METRICS);
36
36
  function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
37
- Stripe.PACKAGE_VERSION = '15.7.0';
37
+ Stripe.PACKAGE_VERSION = '15.8.0';
38
38
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, (0, utils_js_1.determineProcessUserAgentProperties)());
39
39
  Stripe.StripeResource = StripeResource_js_1.StripeResource;
40
40
  Stripe.resources = resources;
@@ -31,7 +31,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
31
31
  ];
32
32
  const defaultRequestSenderFactory = (stripe) => new RequestSender(stripe, StripeResource.MAX_BUFFERED_REQUEST_METRICS);
33
33
  export function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
34
- Stripe.PACKAGE_VERSION = '15.7.0';
34
+ Stripe.PACKAGE_VERSION = '15.8.0';
35
35
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, determineProcessUserAgentProperties());
36
36
  Stripe.StripeResource = StripeResource;
37
37
  Stripe.resources = resources;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe",
3
- "version": "15.7.0",
3
+ "version": "15.8.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -118,6 +118,11 @@ declare module 'stripe' {
118
118
  */
119
119
  edit_payout_schedule: boolean;
120
120
 
121
+ /**
122
+ * Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
123
+ */
124
+ external_account_collection: boolean;
125
+
121
126
  /**
122
127
  * Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
123
128
  */
@@ -243,6 +248,11 @@ declare module 'stripe' {
243
248
  */
244
249
  edit_payout_schedule: boolean;
245
250
 
251
+ /**
252
+ * Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
253
+ */
254
+ external_account_collection: boolean;
255
+
246
256
  /**
247
257
  * Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
248
258
  */
@@ -129,6 +129,11 @@ declare module 'stripe' {
129
129
  */
130
130
  edit_payout_schedule?: boolean;
131
131
 
132
+ /**
133
+ * Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
134
+ */
135
+ external_account_collection?: boolean;
136
+
132
137
  /**
133
138
  * Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
134
139
  */
@@ -269,6 +274,11 @@ declare module 'stripe' {
269
274
  */
270
275
  edit_payout_schedule?: boolean;
271
276
 
277
+ /**
278
+ * Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements.
279
+ */
280
+ external_account_collection?: boolean;
281
+
272
282
  /**
273
283
  * Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
274
284
  */
@@ -338,7 +338,7 @@ declare module 'stripe' {
338
338
  link_payments?: Capabilities.LinkPayments;
339
339
 
340
340
  /**
341
- * The status of the MobilepPay capability of the account, or whether the account can directly process MobilePay charges.
341
+ * The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges.
342
342
  */
343
343
  mobilepay_payments?: Capabilities.MobilepayPayments;
344
344
 
@@ -1537,6 +1537,11 @@ declare module 'stripe' {
1537
1537
  SavedPaymentMethodOptions.AllowRedisplayFilter
1538
1538
  > | null;
1539
1539
 
1540
+ /**
1541
+ * Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.
1542
+ */
1543
+ payment_method_remove: SavedPaymentMethodOptions.PaymentMethodRemove | null;
1544
+
1540
1545
  /**
1541
1546
  * Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
1542
1547
  */
@@ -1546,6 +1551,8 @@ declare module 'stripe' {
1546
1551
  namespace SavedPaymentMethodOptions {
1547
1552
  type AllowRedisplayFilter = 'always' | 'limited' | 'unspecified';
1548
1553
 
1554
+ type PaymentMethodRemove = 'disabled' | 'enabled';
1555
+
1549
1556
  type PaymentMethodSave = 'disabled' | 'enabled';
1550
1557
  }
1551
1558
 
@@ -54,12 +54,12 @@ declare module 'stripe' {
54
54
  period?: InvoiceItemCreateParams.Period;
55
55
 
56
56
  /**
57
- * The ID of the price object.
57
+ * The ID of the price object. One of `price` or `price_data` is required.
58
58
  */
59
59
  price?: string;
60
60
 
61
61
  /**
62
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
62
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
63
63
  */
64
64
  price_data?: InvoiceItemCreateParams.PriceData;
65
65
 
@@ -207,12 +207,12 @@ declare module 'stripe' {
207
207
  period?: InvoiceItemUpdateParams.Period;
208
208
 
209
209
  /**
210
- * The ID of the price object.
210
+ * The ID of the price object. One of `price` or `price_data` is required.
211
211
  */
212
212
  price?: string;
213
213
 
214
214
  /**
215
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
215
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
216
216
  */
217
217
  price_data?: InvoiceItemUpdateParams.PriceData;
218
218
 
@@ -939,6 +939,7 @@ declare module 'stripe' {
939
939
  | 'terminal_location_country_unsupported'
940
940
  | 'terminal_reader_busy'
941
941
  | 'terminal_reader_hardware_fault'
942
+ | 'terminal_reader_invalid_location_for_payment'
942
943
  | 'terminal_reader_offline'
943
944
  | 'terminal_reader_timeout'
944
945
  | 'testmode_charges_only'
@@ -1733,12 +1733,12 @@ declare module 'stripe' {
1733
1733
  period?: InvoiceItem.Period;
1734
1734
 
1735
1735
  /**
1736
- * The ID of the price object.
1736
+ * The ID of the price object. One of `price` or `price_data` is required.
1737
1737
  */
1738
1738
  price?: string;
1739
1739
 
1740
1740
  /**
1741
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1741
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1742
1742
  */
1743
1743
  price_data?: InvoiceItem.PriceData;
1744
1744
 
@@ -2000,12 +2000,12 @@ declare module 'stripe' {
2000
2000
  discounts?: Array<AddInvoiceItem.Discount>;
2001
2001
 
2002
2002
  /**
2003
- * The ID of the price object.
2003
+ * The ID of the price object. One of `price` or `price_data` is required.
2004
2004
  */
2005
2005
  price?: string;
2006
2006
 
2007
2007
  /**
2008
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
2008
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
2009
2009
  */
2010
2010
  price_data?: AddInvoiceItem.PriceData;
2011
2011
 
@@ -2409,12 +2409,12 @@ declare module 'stripe' {
2409
2409
  plan?: string;
2410
2410
 
2411
2411
  /**
2412
- * The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
2412
+ * The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
2413
2413
  */
2414
2414
  price?: string;
2415
2415
 
2416
2416
  /**
2417
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
2417
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
2418
2418
  */
2419
2419
  price_data?: Item.PriceData;
2420
2420
 
@@ -2908,12 +2908,12 @@ declare module 'stripe' {
2908
2908
  period?: InvoiceItem.Period;
2909
2909
 
2910
2910
  /**
2911
- * The ID of the price object.
2911
+ * The ID of the price object. One of `price` or `price_data` is required.
2912
2912
  */
2913
2913
  price?: string;
2914
2914
 
2915
2915
  /**
2916
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
2916
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
2917
2917
  */
2918
2918
  price_data?: InvoiceItem.PriceData;
2919
2919
 
@@ -3175,12 +3175,12 @@ declare module 'stripe' {
3175
3175
  discounts?: Array<AddInvoiceItem.Discount>;
3176
3176
 
3177
3177
  /**
3178
- * The ID of the price object.
3178
+ * The ID of the price object. One of `price` or `price_data` is required.
3179
3179
  */
3180
3180
  price?: string;
3181
3181
 
3182
3182
  /**
3183
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
3183
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
3184
3184
  */
3185
3185
  price_data?: AddInvoiceItem.PriceData;
3186
3186
 
@@ -3586,12 +3586,12 @@ declare module 'stripe' {
3586
3586
  plan?: string;
3587
3587
 
3588
3588
  /**
3589
- * The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
3589
+ * The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
3590
3590
  */
3591
3591
  price?: string;
3592
3592
 
3593
3593
  /**
3594
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
3594
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
3595
3595
  */
3596
3596
  price_data?: Item.PriceData;
3597
3597
 
@@ -3729,12 +3729,12 @@ declare module 'stripe' {
3729
3729
  plan?: string;
3730
3730
 
3731
3731
  /**
3732
- * The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
3732
+ * The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
3733
3733
  */
3734
3734
  price?: string;
3735
3735
 
3736
3736
  /**
3737
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
3737
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
3738
3738
  */
3739
3739
  price_data?: SubscriptionItem.PriceData;
3740
3740
 
@@ -4254,12 +4254,12 @@ declare module 'stripe' {
4254
4254
  period?: InvoiceItem.Period;
4255
4255
 
4256
4256
  /**
4257
- * The ID of the price object.
4257
+ * The ID of the price object. One of `price` or `price_data` is required.
4258
4258
  */
4259
4259
  price?: string;
4260
4260
 
4261
4261
  /**
4262
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
4262
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
4263
4263
  */
4264
4264
  price_data?: InvoiceItem.PriceData;
4265
4265
 
@@ -4521,12 +4521,12 @@ declare module 'stripe' {
4521
4521
  discounts?: Array<AddInvoiceItem.Discount>;
4522
4522
 
4523
4523
  /**
4524
- * The ID of the price object.
4524
+ * The ID of the price object. One of `price` or `price_data` is required.
4525
4525
  */
4526
4526
  price?: string;
4527
4527
 
4528
4528
  /**
4529
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
4529
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
4530
4530
  */
4531
4531
  price_data?: AddInvoiceItem.PriceData;
4532
4532
 
@@ -4932,12 +4932,12 @@ declare module 'stripe' {
4932
4932
  plan?: string;
4933
4933
 
4934
4934
  /**
4935
- * The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
4935
+ * The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
4936
4936
  */
4937
4937
  price?: string;
4938
4938
 
4939
4939
  /**
4940
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
4940
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
4941
4941
  */
4942
4942
  price_data?: Item.PriceData;
4943
4943
 
@@ -5075,12 +5075,12 @@ declare module 'stripe' {
5075
5075
  plan?: string;
5076
5076
 
5077
5077
  /**
5078
- * The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
5078
+ * The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
5079
5079
  */
5080
5080
  price?: string;
5081
5081
 
5082
5082
  /**
5083
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
5083
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
5084
5084
  */
5085
5085
  price_data?: SubscriptionItem.PriceData;
5086
5086
 
@@ -5245,12 +5245,12 @@ declare module 'stripe' {
5245
5245
  period?: InvoiceUpdateLineItemParams.Period;
5246
5246
 
5247
5247
  /**
5248
- * The ID of the price object.
5248
+ * The ID of the price object. One of `price` or `price_data` is required.
5249
5249
  */
5250
5250
  price?: string;
5251
5251
 
5252
5252
  /**
5253
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
5253
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
5254
5254
  */
5255
5255
  price_data?: InvoiceUpdateLineItemParams.PriceData;
5256
5256
 
@@ -537,6 +537,7 @@ declare module 'stripe' {
537
537
  | 'terminal_location_country_unsupported'
538
538
  | 'terminal_reader_busy'
539
539
  | 'terminal_reader_hardware_fault'
540
+ | 'terminal_reader_invalid_location_for_payment'
540
541
  | 'terminal_reader_offline'
541
542
  | 'terminal_reader_timeout'
542
543
  | 'testmode_charges_only'
@@ -780,6 +780,7 @@ declare module 'stripe' {
780
780
  | 'terminal_location_country_unsupported'
781
781
  | 'terminal_reader_busy'
782
782
  | 'terminal_reader_hardware_fault'
783
+ | 'terminal_reader_invalid_location_for_payment'
783
784
  | 'terminal_reader_offline'
784
785
  | 'terminal_reader_timeout'
785
786
  | 'testmode_charges_only'
@@ -450,6 +450,7 @@ declare module 'stripe' {
450
450
  | 'terminal_location_country_unsupported'
451
451
  | 'terminal_reader_busy'
452
452
  | 'terminal_reader_hardware_fault'
453
+ | 'terminal_reader_invalid_location_for_payment'
453
454
  | 'terminal_reader_offline'
454
455
  | 'terminal_reader_timeout'
455
456
  | 'testmode_charges_only'
@@ -219,12 +219,12 @@ declare module 'stripe' {
219
219
  plan?: string;
220
220
 
221
221
  /**
222
- * The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
222
+ * The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
223
223
  */
224
224
  price?: string;
225
225
 
226
226
  /**
227
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
227
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
228
228
  */
229
229
  price_data?: SubscriptionItemUpdateParams.PriceData;
230
230
 
@@ -316,12 +316,12 @@ declare module 'stripe' {
316
316
  discounts?: Array<AddInvoiceItem.Discount>;
317
317
 
318
318
  /**
319
- * The ID of the price object.
319
+ * The ID of the price object. One of `price` or `price_data` is required.
320
320
  */
321
321
  price?: string;
322
322
 
323
323
  /**
324
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
324
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
325
325
  */
326
326
  price_data?: AddInvoiceItem.PriceData;
327
327
 
@@ -939,12 +939,12 @@ declare module 'stripe' {
939
939
  discounts?: Array<AddInvoiceItem.Discount>;
940
940
 
941
941
  /**
942
- * The ID of the price object.
942
+ * The ID of the price object. One of `price` or `price_data` is required.
943
943
  */
944
944
  price?: string;
945
945
 
946
946
  /**
947
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
947
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
948
948
  */
949
949
  price_data?: AddInvoiceItem.PriceData;
950
950
 
@@ -201,12 +201,12 @@ declare module 'stripe' {
201
201
  discounts?: Array<AddInvoiceItem.Discount>;
202
202
 
203
203
  /**
204
- * The ID of the price object.
204
+ * The ID of the price object. One of `price` or `price_data` is required.
205
205
  */
206
206
  price?: string;
207
207
 
208
208
  /**
209
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
209
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
210
210
  */
211
211
  price_data?: AddInvoiceItem.PriceData;
212
212
 
@@ -1026,12 +1026,12 @@ declare module 'stripe' {
1026
1026
  discounts?: Array<AddInvoiceItem.Discount>;
1027
1027
 
1028
1028
  /**
1029
- * The ID of the price object.
1029
+ * The ID of the price object. One of `price` or `price_data` is required.
1030
1030
  */
1031
1031
  price?: string;
1032
1032
 
1033
1033
  /**
1034
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1034
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1035
1035
  */
1036
1036
  price_data?: AddInvoiceItem.PriceData;
1037
1037
 
@@ -1250,12 +1250,12 @@ declare module 'stripe' {
1250
1250
  plan?: string;
1251
1251
 
1252
1252
  /**
1253
- * The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
1253
+ * The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
1254
1254
  */
1255
1255
  price?: string;
1256
1256
 
1257
1257
  /**
1258
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1258
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1259
1259
  */
1260
1260
  price_data?: Item.PriceData;
1261
1261