stripe 18.3.0-beta.2 → 18.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/CHANGELOG.md +48 -7
  2. package/OPENAPI_VERSION +1 -1
  3. package/VERSION +1 -1
  4. package/cjs/Error.js +9 -9
  5. package/cjs/RequestSender.js +1 -1
  6. package/cjs/apiVersion.js +1 -1
  7. package/cjs/stripe.core.js +1 -1
  8. package/esm/Error.js +7 -7
  9. package/esm/RequestSender.js +1 -1
  10. package/esm/apiVersion.js +1 -1
  11. package/esm/stripe.core.js +1 -1
  12. package/package.json +1 -1
  13. package/types/AccountSessions.d.ts +31 -31
  14. package/types/AccountSessionsResource.d.ts +62 -62
  15. package/types/Accounts.d.ts +29 -1
  16. package/types/AccountsResource.d.ts +89 -0
  17. package/types/BillingPortal/Sessions.d.ts +1 -1
  18. package/types/BillingPortal/SessionsResource.d.ts +1 -1
  19. package/types/Charges.d.ts +52 -16
  20. package/types/Checkout/SessionsResource.d.ts +61 -7
  21. package/types/ConfirmationTokens.d.ts +22 -11
  22. package/types/CreditNotesResource.d.ts +9 -9
  23. package/types/CustomerSessions.d.ts +1 -1
  24. package/types/CustomerSessionsResource.d.ts +1 -1
  25. package/types/CustomersResource.d.ts +1 -0
  26. package/types/Disputes.d.ts +13 -2
  27. package/types/Errors.d.ts +6 -6
  28. package/types/Events.d.ts +1 -1
  29. package/types/Identity/VerificationSessions.d.ts +34 -0
  30. package/types/Identity/VerificationSessionsResource.d.ts +17 -0
  31. package/types/InvoiceItems.d.ts +1 -4
  32. package/types/Invoices.d.ts +1 -0
  33. package/types/InvoicesResource.d.ts +29 -7
  34. package/types/Mandates.d.ts +4 -0
  35. package/types/Orders.d.ts +5 -1
  36. package/types/OrdersResource.d.ts +174 -2
  37. package/types/PaymentAttemptRecords.d.ts +48 -19
  38. package/types/PaymentIntents.d.ts +38 -7
  39. package/types/PaymentIntentsResource.d.ts +384 -15
  40. package/types/PaymentMethods.d.ts +16 -9
  41. package/types/PaymentMethodsResource.d.ts +10 -0
  42. package/types/PaymentRecords.d.ts +48 -19
  43. package/types/QuotePreviewInvoices.d.ts +1 -0
  44. package/types/QuotePreviewSubscriptionSchedules.d.ts +17 -3
  45. package/types/Quotes.d.ts +12 -3
  46. package/types/QuotesResource.d.ts +7 -1
  47. package/types/SetupAttempts.d.ts +3 -1
  48. package/types/SetupIntents.d.ts +15 -1
  49. package/types/SetupIntentsResource.d.ts +482 -2
  50. package/types/SubscriptionItems.d.ts +0 -9
  51. package/types/SubscriptionSchedules.d.ts +17 -3
  52. package/types/SubscriptionSchedulesResource.d.ts +7 -1
  53. package/types/Subscriptions.d.ts +14 -11
  54. package/types/SubscriptionsResource.d.ts +20 -6
  55. package/types/Tax/Registrations.d.ts +9 -0
  56. package/types/Tax/RegistrationsResource.d.ts +12 -0
  57. package/types/Terminal/Configurations.d.ts +1 -0
  58. package/types/Terminal/LocationsResource.d.ts +1 -1
  59. package/types/Terminal/Readers.d.ts +6 -6
  60. package/types/Terminal/ReadersResource.d.ts +4 -4
  61. package/types/TestHelpers/ConfirmationTokensResource.d.ts +15 -2
  62. package/types/TokensResource.d.ts +3 -0
  63. package/types/Treasury/FinancialAccountsResource.d.ts +9 -0
  64. package/types/V2/Core/Accounts/PersonsResource.d.ts +10 -0
  65. package/types/V2/Core/Accounts.d.ts +130 -51
  66. package/types/V2/Core/AccountsResource.d.ts +54 -0
  67. package/types/V2/Core/Persons.d.ts +5 -0
  68. package/types/V2/EventTypes.d.ts +1 -1
  69. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +8 -4
  70. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +1 -0
  71. package/types/V2/MoneyManagement/OutboundPayments.d.ts +1 -1
  72. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +1 -1
  73. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +1 -0
  74. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +22 -3
  75. package/types/WebhookEndpointsResource.d.ts +2 -1
  76. package/types/index.d.ts +12 -12
  77. package/types/lib.d.ts +11 -1
  78. package/types/test/typescriptTest.ts +3 -3
@@ -45,14 +45,9 @@ declare module 'stripe' {
45
45
  billing_cycle_anchor_config: Subscription.BillingCycleAnchorConfig | null;
46
46
 
47
47
  /**
48
- * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
48
+ * The billing mode of the subscription.
49
49
  */
50
- billing_mode?: Subscription.BillingMode;
51
-
52
- /**
53
- * Details about when the current billing_mode was updated.
54
- */
55
- billing_mode_details?: Subscription.BillingModeDetails | null;
50
+ billing_mode: Subscription.BillingMode;
56
51
 
57
52
  /**
58
53
  * Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
@@ -65,7 +60,7 @@ declare module 'stripe' {
65
60
  cancel_at: number | null;
66
61
 
67
62
  /**
68
- * Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. This field will be removed in a future API version. Please use `cancel_at` instead.
63
+ * Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.
69
64
  */
70
65
  cancel_at_period_end: boolean;
71
66
 
@@ -252,7 +247,7 @@ declare module 'stripe' {
252
247
  trial_settings: Subscription.TrialSettings | null;
253
248
 
254
249
  /**
255
- * If the subscription has a trial, the beginning of that trial. For subsequent trials, this date remains as the start of the first ever trial on the subscription.
250
+ * If the subscription has a trial, the beginning of that trial.
256
251
  */
257
252
  trial_start: number | null;
258
253
  }
@@ -320,15 +315,22 @@ declare module 'stripe' {
320
315
  second: number | null;
321
316
  }
322
317
 
323
- type BillingMode = 'classic' | 'flexible';
318
+ interface BillingMode {
319
+ /**
320
+ * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
321
+ */
322
+ type: BillingMode.Type;
324
323
 
325
- interface BillingModeDetails {
326
324
  /**
327
325
  * Details on when the current billing_mode was adopted.
328
326
  */
329
327
  updated_at?: number;
330
328
  }
331
329
 
330
+ namespace BillingMode {
331
+ type Type = 'classic' | 'flexible';
332
+ }
333
+
332
334
  interface BillingThresholds {
333
335
  /**
334
336
  * Monetary threshold that triggers the subscription to create an invoice
@@ -712,6 +714,7 @@ declare module 'stripe' {
712
714
  | 'boleto'
713
715
  | 'card'
714
716
  | 'cashapp'
717
+ | 'crypto'
715
718
  | 'custom'
716
719
  | 'customer_balance'
717
720
  | 'eps'
@@ -14,12 +14,12 @@ declare module 'stripe' {
14
14
  application_fee_percent?: Stripe.Emptyable<number>;
15
15
 
16
16
  /**
17
- * Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
17
+ * Automatic tax settings for this subscription.
18
18
  */
19
19
  automatic_tax?: SubscriptionCreateParams.AutomaticTax;
20
20
 
21
21
  /**
22
- * For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
22
+ * A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
23
23
  */
24
24
  backdate_start_date?: number;
25
25
 
@@ -51,7 +51,7 @@ declare module 'stripe' {
51
51
  cancel_at?: number | SubscriptionCreateParams.CancelAt;
52
52
 
53
53
  /**
54
- * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
54
+ * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
55
55
  */
56
56
  cancel_at_period_end?: boolean;
57
57
 
@@ -377,7 +377,13 @@ declare module 'stripe' {
377
377
  second?: number;
378
378
  }
379
379
 
380
- type BillingMode = 'classic' | 'flexible';
380
+ interface BillingMode {
381
+ type: BillingMode.Type;
382
+ }
383
+
384
+ namespace BillingMode {
385
+ type Type = 'classic' | 'flexible';
386
+ }
381
387
 
382
388
  interface BillingThresholds {
383
389
  /**
@@ -958,6 +964,7 @@ declare module 'stripe' {
958
964
  | 'boleto'
959
965
  | 'card'
960
966
  | 'cashapp'
967
+ | 'crypto'
961
968
  | 'custom'
962
969
  | 'customer_balance'
963
970
  | 'eps'
@@ -1100,7 +1107,7 @@ declare module 'stripe' {
1100
1107
  cancel_at?: Stripe.Emptyable<number | SubscriptionUpdateParams.CancelAt>;
1101
1108
 
1102
1109
  /**
1103
- * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
1110
+ * Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1104
1111
  */
1105
1112
  cancel_at_period_end?: boolean;
1106
1113
 
@@ -2007,6 +2014,7 @@ declare module 'stripe' {
2007
2014
  | 'boleto'
2008
2015
  | 'card'
2009
2016
  | 'cashapp'
2017
+ | 'crypto'
2010
2018
  | 'custom'
2011
2019
  | 'customer_balance'
2012
2020
  | 'eps'
@@ -2247,7 +2255,7 @@ declare module 'stripe' {
2247
2255
  /**
2248
2256
  * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2249
2257
  */
2250
- billing_mode: 'flexible';
2258
+ billing_mode: SubscriptionMigrateParams.BillingMode;
2251
2259
 
2252
2260
  /**
2253
2261
  * Specifies which fields in the response should be expanded.
@@ -2255,6 +2263,12 @@ declare module 'stripe' {
2255
2263
  expand?: Array<string>;
2256
2264
  }
2257
2265
 
2266
+ namespace SubscriptionMigrateParams {
2267
+ interface BillingMode {
2268
+ type: 'flexible';
2269
+ }
2270
+ }
2271
+
2258
2272
  interface SubscriptionResumeParams {
2259
2273
  /**
2260
2274
  * The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
@@ -236,6 +236,8 @@ declare module 'stripe' {
236
236
 
237
237
  tz?: CountryOptions.Tz;
238
238
 
239
+ ua?: CountryOptions.Ua;
240
+
239
241
  ug?: CountryOptions.Ug;
240
242
 
241
243
  us?: CountryOptions.Us;
@@ -1356,6 +1358,13 @@ declare module 'stripe' {
1356
1358
  type: 'simplified';
1357
1359
  }
1358
1360
 
1361
+ interface Ua {
1362
+ /**
1363
+ * Type of registration in `country`.
1364
+ */
1365
+ type: 'simplified';
1366
+ }
1367
+
1359
1368
  interface Ug {
1360
1369
  /**
1361
1370
  * Type of registration in `country`.
@@ -482,6 +482,11 @@ declare module 'stripe' {
482
482
  */
483
483
  tz?: CountryOptions.Tz;
484
484
 
485
+ /**
486
+ * Options for the registration in UA.
487
+ */
488
+ ua?: CountryOptions.Ua;
489
+
485
490
  /**
486
491
  * Options for the registration in UG.
487
492
  */
@@ -1710,6 +1715,13 @@ declare module 'stripe' {
1710
1715
  type: 'simplified';
1711
1716
  }
1712
1717
 
1718
+ interface Ua {
1719
+ /**
1720
+ * Type of registration to be created in `country`.
1721
+ */
1722
+ type: 'simplified';
1723
+ }
1724
+
1713
1725
  interface Ug {
1714
1726
  /**
1715
1727
  * Type of registration to be created in `country`.
@@ -5,6 +5,7 @@ declare module 'stripe' {
5
5
  namespace Terminal {
6
6
  /**
7
7
  * A Configurations object represents how features should be configured for terminal readers.
8
+ * For information about how to use it, see the [Terminal configurations documentation](https://docs.stripe.com/terminal/fleet/configurations-overview).
8
9
  */
9
10
  interface Configuration {
10
11
  /**
@@ -85,7 +85,7 @@ declare module 'stripe' {
85
85
  /**
86
86
  * A name for the location.
87
87
  */
88
- display_name?: string;
88
+ display_name?: Stripe.Emptyable<string>;
89
89
 
90
90
  /**
91
91
  * Specifies which fields in the response should be expanded.
@@ -389,7 +389,7 @@ declare module 'stripe' {
389
389
  namespace CollectPaymentMethod {
390
390
  interface CollectConfig {
391
391
  /**
392
- * Enable customer initiated cancellation when processing this payment.
392
+ * Enable customer-initiated cancellation when processing this payment.
393
393
  */
394
394
  enable_customer_cancellation?: boolean;
395
395
 
@@ -434,7 +434,7 @@ declare module 'stripe' {
434
434
  namespace ConfirmPaymentIntent {
435
435
  interface ConfirmConfig {
436
436
  /**
437
- * If the customer does not abandon authenticating the payment, they will be redirected to this specified URL after completion.
437
+ * If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion.
438
438
  */
439
439
  return_url?: string;
440
440
  }
@@ -460,12 +460,12 @@ declare module 'stripe' {
460
460
  namespace ProcessPaymentIntent {
461
461
  interface ProcessConfig {
462
462
  /**
463
- * Enable customer initiated cancellation when processing this payment.
463
+ * Enable customer-initiated cancellation when processing this payment.
464
464
  */
465
465
  enable_customer_cancellation?: boolean;
466
466
 
467
467
  /**
468
- * If the customer does not abandon authenticating the payment, they will be redirected to this specified URL after completion.
468
+ * If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion.
469
469
  */
470
470
  return_url?: string;
471
471
 
@@ -510,7 +510,7 @@ declare module 'stripe' {
510
510
  namespace ProcessSetupIntent {
511
511
  interface ProcessConfig {
512
512
  /**
513
- * Enable customer initiated cancellation when processing this SetupIntent.
513
+ * Enable customer-initiated cancellation when processing this SetupIntent.
514
514
  */
515
515
  enable_customer_cancellation?: boolean;
516
516
  }
@@ -573,7 +573,7 @@ declare module 'stripe' {
573
573
 
574
574
  interface RefundPaymentConfig {
575
575
  /**
576
- * Enable customer initiated cancellation when refunding this payment.
576
+ * Enable customer-initiated cancellation when refunding this payment.
577
577
  */
578
578
  enable_customer_cancellation?: boolean;
579
579
  }
@@ -236,12 +236,12 @@ declare module 'stripe' {
236
236
 
237
237
  interface ReaderCollectPaymentMethodParams {
238
238
  /**
239
- * PaymentIntent ID
239
+ * PaymentIntent ID.
240
240
  */
241
241
  payment_intent: string;
242
242
 
243
243
  /**
244
- * Configuration overrides
244
+ * Configuration overrides.
245
245
  */
246
246
  collect_config?: ReaderCollectPaymentMethodParams.CollectConfig;
247
247
 
@@ -288,12 +288,12 @@ declare module 'stripe' {
288
288
 
289
289
  interface ReaderConfirmPaymentIntentParams {
290
290
  /**
291
- * PaymentIntent ID
291
+ * PaymentIntent ID.
292
292
  */
293
293
  payment_intent: string;
294
294
 
295
295
  /**
296
- * Configuration overrides
296
+ * Configuration overrides.
297
297
  */
298
298
  confirm_config?: ReaderConfirmPaymentIntentParams.ConfirmConfig;
299
299
 
@@ -119,6 +119,11 @@ declare module 'stripe' {
119
119
  */
120
120
  cashapp?: PaymentMethodData.Cashapp;
121
121
 
122
+ /**
123
+ * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
124
+ */
125
+ crypto?: PaymentMethodData.Crypto;
126
+
122
127
  /**
123
128
  * If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
124
129
  */
@@ -441,6 +446,8 @@ declare module 'stripe' {
441
446
 
442
447
  interface Cashapp {}
443
448
 
449
+ interface Crypto {}
450
+
444
451
  interface CustomerBalance {}
445
452
 
446
453
  interface Eps {
@@ -551,6 +558,7 @@ declare module 'stripe' {
551
558
  | 'abn_amro'
552
559
  | 'asn_bank'
553
560
  | 'bunq'
561
+ | 'buut'
554
562
  | 'handelsbanken'
555
563
  | 'ing'
556
564
  | 'knab'
@@ -811,6 +819,7 @@ declare module 'stripe' {
811
819
  | 'blik'
812
820
  | 'boleto'
813
821
  | 'cashapp'
822
+ | 'crypto'
814
823
  | 'customer_balance'
815
824
  | 'eps'
816
825
  | 'fpx'
@@ -929,9 +938,13 @@ declare module 'stripe' {
929
938
  interval?: 'month';
930
939
 
931
940
  /**
932
- * Type of installment plan, one of `fixed_count`.
941
+ * Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
933
942
  */
934
- type: 'fixed_count';
943
+ type: Plan.Type;
944
+ }
945
+
946
+ namespace Plan {
947
+ type Type = 'bonus' | 'fixed_count' | 'revolving';
935
948
  }
936
949
  }
937
950
  }
@@ -157,6 +157,9 @@ declare module 'stripe' {
157
157
  */
158
158
  phone?: string;
159
159
 
160
+ /**
161
+ * When the business was incorporated or registered.
162
+ */
160
163
  registration_date?: Stripe.Emptyable<Company.RegistrationDate>;
161
164
 
162
165
  /**
@@ -469,6 +469,15 @@ declare module 'stripe' {
469
469
  * Specifies which fields in the response should be expanded.
470
470
  */
471
471
  expand?: Array<string>;
472
+
473
+ /**
474
+ * Only return FinancialAccounts that have the given status: `open` or `closed`
475
+ */
476
+ status?: FinancialAccountListParams.Status;
477
+ }
478
+
479
+ namespace FinancialAccountListParams {
480
+ type Status = 'closed' | 'open';
472
481
  }
473
482
 
474
483
  interface FinancialAccountCloseParams {
@@ -387,6 +387,7 @@ declare module 'stripe' {
387
387
  | 'vu'
388
388
  | 'wf'
389
389
  | 'ws'
390
+ | 'xx'
390
391
  | 'ye'
391
392
  | 'yt'
392
393
  | 'za'
@@ -730,6 +731,7 @@ declare module 'stripe' {
730
731
  | 'vu'
731
732
  | 'wf'
732
733
  | 'ws'
734
+ | 'xx'
733
735
  | 'ye'
734
736
  | 'yt'
735
737
  | 'za'
@@ -1150,6 +1152,7 @@ declare module 'stripe' {
1150
1152
  | 'vu'
1151
1153
  | 'wf'
1152
1154
  | 'ws'
1155
+ | 'xx'
1153
1156
  | 'ye'
1154
1157
  | 'yt'
1155
1158
  | 'za'
@@ -1497,6 +1500,7 @@ declare module 'stripe' {
1497
1500
  | 'vu'
1498
1501
  | 'wf'
1499
1502
  | 'ws'
1503
+ | 'xx'
1500
1504
  | 'ye'
1501
1505
  | 'yt'
1502
1506
  | 'za'
@@ -1788,6 +1792,7 @@ declare module 'stripe' {
1788
1792
  | 'vu'
1789
1793
  | 'wf'
1790
1794
  | 'ws'
1795
+ | 'xx'
1791
1796
  | 'ye'
1792
1797
  | 'yt'
1793
1798
  | 'za'
@@ -2227,6 +2232,7 @@ declare module 'stripe' {
2227
2232
  | 'vu'
2228
2233
  | 'wf'
2229
2234
  | 'ws'
2235
+ | 'xx'
2230
2236
  | 'ye'
2231
2237
  | 'yt'
2232
2238
  | 'za'
@@ -2570,6 +2576,7 @@ declare module 'stripe' {
2570
2576
  | 'vu'
2571
2577
  | 'wf'
2572
2578
  | 'ws'
2579
+ | 'xx'
2573
2580
  | 'ye'
2574
2581
  | 'yt'
2575
2582
  | 'za'
@@ -2990,6 +2997,7 @@ declare module 'stripe' {
2990
2997
  | 'vu'
2991
2998
  | 'wf'
2992
2999
  | 'ws'
3000
+ | 'xx'
2993
3001
  | 'ye'
2994
3002
  | 'yt'
2995
3003
  | 'za'
@@ -3337,6 +3345,7 @@ declare module 'stripe' {
3337
3345
  | 'vu'
3338
3346
  | 'wf'
3339
3347
  | 'ws'
3348
+ | 'xx'
3340
3349
  | 'ye'
3341
3350
  | 'yt'
3342
3351
  | 'za'
@@ -3628,6 +3637,7 @@ declare module 'stripe' {
3628
3637
  | 'vu'
3629
3638
  | 'wf'
3630
3639
  | 'ws'
3640
+ | 'xx'
3631
3641
  | 'ye'
3632
3642
  | 'yt'
3633
3643
  | 'za'