stripe 16.0.0 → 16.2.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 (154) hide show
  1. package/CHANGELOG.md +761 -109
  2. package/README.md +33 -0
  3. package/VERSION +1 -1
  4. package/cjs/RequestSender.js +66 -5
  5. package/cjs/StripeResource.js +1 -1
  6. package/cjs/apiVersion.js +2 -1
  7. package/cjs/multipart.js +1 -1
  8. package/cjs/resources/AccountNotices.js +21 -0
  9. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  10. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  11. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  12. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  13. package/cjs/resources/GiftCards/Cards.js +23 -0
  14. package/cjs/resources/GiftCards/Transactions.js +33 -0
  15. package/cjs/resources/Invoices.js +25 -0
  16. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  17. package/cjs/resources/Margins.js +22 -0
  18. package/cjs/resources/OAuth.js +1 -1
  19. package/cjs/resources/Orders.js +24 -0
  20. package/cjs/resources/PaymentIntents.js +4 -0
  21. package/cjs/resources/QuotePhases.js +22 -0
  22. package/cjs/resources/Quotes.js +32 -0
  23. package/cjs/resources/SubscriptionSchedules.js +4 -0
  24. package/cjs/resources/Tax/Forms.js +20 -0
  25. package/cjs/resources/Terminal/Readers.js +12 -0
  26. package/cjs/resources.js +36 -10
  27. package/cjs/stripe.core.js +6 -3
  28. package/cjs/utils.js +30 -3
  29. package/esm/RequestSender.js +67 -6
  30. package/esm/StripeResource.js +2 -2
  31. package/esm/apiVersion.js +1 -0
  32. package/esm/multipart.js +2 -2
  33. package/esm/resources/AccountNotices.js +18 -0
  34. package/esm/resources/Capital/FinancingOffers.js +18 -0
  35. package/esm/resources/Capital/FinancingSummary.js +9 -0
  36. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  37. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  38. package/esm/resources/GiftCards/Cards.js +20 -0
  39. package/esm/resources/GiftCards/Transactions.js +30 -0
  40. package/esm/resources/Invoices.js +25 -0
  41. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  42. package/esm/resources/Margins.js +19 -0
  43. package/esm/resources/OAuth.js +2 -2
  44. package/esm/resources/Orders.js +21 -0
  45. package/esm/resources/PaymentIntents.js +4 -0
  46. package/esm/resources/QuotePhases.js +19 -0
  47. package/esm/resources/Quotes.js +32 -0
  48. package/esm/resources/SubscriptionSchedules.js +4 -0
  49. package/esm/resources/Tax/Forms.js +17 -0
  50. package/esm/resources/Terminal/Readers.js +12 -0
  51. package/esm/resources.js +22 -0
  52. package/esm/stripe.core.js +6 -3
  53. package/esm/utils.js +27 -1
  54. package/package.json +1 -1
  55. package/types/AccountLinksResource.d.ts +5 -1
  56. package/types/AccountNotices.d.ts +110 -0
  57. package/types/AccountNoticesResource.d.ts +98 -0
  58. package/types/AccountSessions.d.ts +15 -0
  59. package/types/AccountSessionsResource.d.ts +205 -0
  60. package/types/Accounts.d.ts +88 -1
  61. package/types/AccountsResource.d.ts +204 -0
  62. package/types/Billing/MetersResource.d.ts +6 -2
  63. package/types/Capabilities.d.ts +1 -1
  64. package/types/Capital/FinancingOffers.d.ts +188 -0
  65. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  66. package/types/Capital/FinancingSummary.d.ts +106 -0
  67. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  68. package/types/Capital/FinancingTransactions.d.ts +135 -0
  69. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  70. package/types/Charges.d.ts +67 -0
  71. package/types/ChargesResource.d.ts +1294 -0
  72. package/types/Checkout/Sessions.d.ts +36 -1
  73. package/types/Checkout/SessionsResource.d.ts +15 -1
  74. package/types/ConfirmationTokens.d.ts +83 -0
  75. package/types/Coupons.d.ts +1 -1
  76. package/types/CouponsResource.d.ts +1 -1
  77. package/types/CreditNotes.d.ts +21 -0
  78. package/types/CreditNotesResource.d.ts +72 -0
  79. package/types/CustomerSessions.d.ts +48 -0
  80. package/types/CustomerSessionsResource.d.ts +48 -0
  81. package/types/CustomersResource.d.ts +2 -0
  82. package/types/Disputes.d.ts +167 -0
  83. package/types/DisputesResource.d.ts +120 -0
  84. package/types/EventTypes.d.ts +426 -0
  85. package/types/Events.d.ts +83 -0
  86. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  87. package/types/FinancialConnections/Accounts.d.ts +29 -1
  88. package/types/FinancialConnections/AccountsResource.d.ts +35 -3
  89. package/types/FinancialConnections/Sessions.d.ts +58 -1
  90. package/types/FinancialConnections/SessionsResource.d.ts +47 -1
  91. package/types/GiftCards/Cards.d.ts +118 -0
  92. package/types/GiftCards/CardsResource.d.ts +159 -0
  93. package/types/GiftCards/Transactions.d.ts +129 -0
  94. package/types/GiftCards/TransactionsResource.d.ts +201 -0
  95. package/types/InvoiceItems.d.ts +5 -0
  96. package/types/InvoiceItemsResource.d.ts +98 -0
  97. package/types/InvoiceLineItems.d.ts +22 -0
  98. package/types/InvoicePayments.d.ts +91 -0
  99. package/types/Invoices.d.ts +123 -1
  100. package/types/InvoicesResource.d.ts +6477 -2302
  101. package/types/Issuing/CardholdersResource.d.ts +2 -1
  102. package/types/Issuing/Cards.d.ts +34 -0
  103. package/types/Issuing/CardsResource.d.ts +125 -0
  104. package/types/Issuing/CreditUnderwritingRecords.d.ts +446 -0
  105. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1017 -0
  106. package/types/LineItems.d.ts +7 -0
  107. package/types/Mandates.d.ts +77 -0
  108. package/types/Margins.d.ts +56 -0
  109. package/types/MarginsResource.d.ts +114 -0
  110. package/types/Orders.d.ts +1057 -0
  111. package/types/OrdersResource.d.ts +2711 -0
  112. package/types/PaymentIntents.d.ts +476 -1
  113. package/types/PaymentIntentsResource.d.ts +6735 -3354
  114. package/types/PaymentLinks.d.ts +4 -1
  115. package/types/PaymentLinksResource.d.ts +8 -2
  116. package/types/PaymentMethods.d.ts +62 -0
  117. package/types/PaymentMethodsResource.d.ts +110 -0
  118. package/types/Prices.d.ts +22 -0
  119. package/types/PricesResource.d.ts +22 -0
  120. package/types/Products.d.ts +39 -0
  121. package/types/ProductsResource.d.ts +36 -0
  122. package/types/QuoteLines.d.ts +634 -0
  123. package/types/QuotePhases.d.ts +198 -0
  124. package/types/QuotePhasesResource.d.ts +67 -0
  125. package/types/QuotePreviewInvoices.d.ts +1528 -0
  126. package/types/QuotePreviewSubscriptionSchedules.d.ts +778 -0
  127. package/types/Quotes.d.ts +578 -1
  128. package/types/QuotesResource.d.ts +3174 -265
  129. package/types/SetupAttempts.d.ts +8 -0
  130. package/types/SetupIntents.d.ts +117 -1
  131. package/types/SetupIntentsResource.d.ts +531 -3
  132. package/types/Sources.d.ts +23 -0
  133. package/types/SubscriptionItems.d.ts +21 -0
  134. package/types/SubscriptionItemsResource.d.ts +109 -0
  135. package/types/SubscriptionSchedules.d.ts +164 -0
  136. package/types/SubscriptionSchedulesResource.d.ts +1234 -16
  137. package/types/Subscriptions.d.ts +54 -1
  138. package/types/SubscriptionsResource.d.ts +369 -2
  139. package/types/Tax/Forms.d.ts +133 -0
  140. package/types/Tax/FormsResource.d.ts +90 -0
  141. package/types/Terminal/Configurations.d.ts +14 -0
  142. package/types/Terminal/ConfigurationsResource.d.ts +36 -0
  143. package/types/Terminal/Readers.d.ts +278 -0
  144. package/types/Terminal/ReadersResource.d.ts +208 -0
  145. package/types/TestHelpers/ConfirmationTokensResource.d.ts +55 -0
  146. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  147. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  148. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  149. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  150. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  151. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  152. package/types/WebhookEndpointsResource.d.ts +50 -0
  153. package/types/index.d.ts +61 -0
  154. package/types/lib.d.ts +12 -0
@@ -196,6 +196,11 @@ declare module 'stripe' {
196
196
  */
197
197
  pending_update: Subscription.PendingUpdate | null;
198
198
 
199
+ /**
200
+ * Time period and invoice for a Subscription billed in advance.
201
+ */
202
+ prebilling?: Subscription.Prebilling | null;
203
+
199
204
  /**
200
205
  * The schedule attached to the subscription
201
206
  */
@@ -589,6 +594,8 @@ declare module 'stripe' {
589
594
 
590
595
  namespace UsBankAccount {
591
596
  interface FinancialConnections {
597
+ filters?: FinancialConnections.Filters;
598
+
592
599
  /**
593
600
  * The list of permissions to request. The `payment_method` permission must be included.
594
601
  */
@@ -601,13 +608,28 @@ declare module 'stripe' {
601
608
  }
602
609
 
603
610
  namespace FinancialConnections {
611
+ interface Filters {
612
+ /**
613
+ * The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
614
+ */
615
+ account_subcategories?: Array<Filters.AccountSubcategory>;
616
+ }
617
+
618
+ namespace Filters {
619
+ type AccountSubcategory = 'checking' | 'savings';
620
+ }
621
+
604
622
  type Permission =
605
623
  | 'balances'
606
624
  | 'ownership'
607
625
  | 'payment_method'
608
626
  | 'transactions';
609
627
 
610
- type Prefetch = 'balances' | 'ownership' | 'transactions';
628
+ type Prefetch =
629
+ | 'balances'
630
+ | 'inferred_balances'
631
+ | 'ownership'
632
+ | 'transactions';
611
633
  }
612
634
 
613
635
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -675,6 +697,11 @@ declare module 'stripe' {
675
697
  */
676
698
  expires_at: number;
677
699
 
700
+ /**
701
+ * The number of iterations of prebilling to apply.
702
+ */
703
+ prebilling_iterations?: number | null;
704
+
678
705
  /**
679
706
  * List of subscription items, each with an attached plan, that will be set if the update is applied.
680
707
  */
@@ -691,6 +718,32 @@ declare module 'stripe' {
691
718
  trial_from_plan: boolean | null;
692
719
  }
693
720
 
721
+ interface Prebilling {
722
+ /**
723
+ * ID of the prebilling invoice.
724
+ */
725
+ invoice: string | Stripe.Invoice;
726
+
727
+ /**
728
+ * The end of the last period for which the invoice pre-bills.
729
+ */
730
+ period_end: number;
731
+
732
+ /**
733
+ * The start of the first period for which the invoice pre-bills.
734
+ */
735
+ period_start: number;
736
+
737
+ /**
738
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
739
+ */
740
+ update_behavior?: Prebilling.UpdateBehavior;
741
+ }
742
+
743
+ namespace Prebilling {
744
+ type UpdateBehavior = 'prebill' | 'reset';
745
+ }
746
+
694
747
  type Status =
695
748
  | 'active'
696
749
  | 'canceled'
@@ -157,6 +157,11 @@ declare module 'stripe' {
157
157
  SubscriptionCreateParams.PendingInvoiceItemInterval
158
158
  >;
159
159
 
160
+ /**
161
+ * If specified, the invoicing for the given billing cycle iterations will be processed now.
162
+ */
163
+ prebilling?: SubscriptionCreateParams.Prebilling;
164
+
160
165
  /**
161
166
  * The ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
162
167
  */
@@ -233,12 +238,56 @@ declare module 'stripe' {
233
238
  */
234
239
  discount?: string;
235
240
 
241
+ /**
242
+ * Details to determine how long the discount should be applied for.
243
+ */
244
+ discount_end?: Discount.DiscountEnd;
245
+
236
246
  /**
237
247
  * ID of the promotion code to create a new discount for.
238
248
  */
239
249
  promotion_code?: string;
240
250
  }
241
251
 
252
+ namespace Discount {
253
+ interface DiscountEnd {
254
+ /**
255
+ * Time span for the redeemed discount.
256
+ */
257
+ duration?: DiscountEnd.Duration;
258
+
259
+ /**
260
+ * A precise Unix timestamp for the discount to end. Must be in the future.
261
+ */
262
+ timestamp?: number;
263
+
264
+ /**
265
+ * The type of calculation made to determine when the discount ends.
266
+ */
267
+ type: DiscountEnd.Type;
268
+ }
269
+
270
+ namespace DiscountEnd {
271
+ interface Duration {
272
+ /**
273
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
274
+ */
275
+ interval: Duration.Interval;
276
+
277
+ /**
278
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
279
+ */
280
+ interval_count: number;
281
+ }
282
+
283
+ namespace Duration {
284
+ type Interval = 'day' | 'month' | 'week' | 'year';
285
+ }
286
+
287
+ type Type = 'duration' | 'timestamp';
288
+ }
289
+ }
290
+
242
291
  interface PriceData {
243
292
  /**
244
293
  * 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).
@@ -353,12 +402,56 @@ declare module 'stripe' {
353
402
  */
354
403
  discount?: string;
355
404
 
405
+ /**
406
+ * Details to determine how long the discount should be applied for.
407
+ */
408
+ discount_end?: Discount.DiscountEnd;
409
+
356
410
  /**
357
411
  * ID of the promotion code to create a new discount for.
358
412
  */
359
413
  promotion_code?: string;
360
414
  }
361
415
 
416
+ namespace Discount {
417
+ interface DiscountEnd {
418
+ /**
419
+ * Time span for the redeemed discount.
420
+ */
421
+ duration?: DiscountEnd.Duration;
422
+
423
+ /**
424
+ * A precise Unix timestamp for the discount to end. Must be in the future.
425
+ */
426
+ timestamp?: number;
427
+
428
+ /**
429
+ * The type of calculation made to determine when the discount ends.
430
+ */
431
+ type: DiscountEnd.Type;
432
+ }
433
+
434
+ namespace DiscountEnd {
435
+ interface Duration {
436
+ /**
437
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
438
+ */
439
+ interval: Duration.Interval;
440
+
441
+ /**
442
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
443
+ */
444
+ interval_count: number;
445
+ }
446
+
447
+ namespace Duration {
448
+ type Interval = 'day' | 'month' | 'week' | 'year';
449
+ }
450
+
451
+ type Type = 'duration' | 'timestamp';
452
+ }
453
+ }
454
+
362
455
  interface InvoiceSettings {
363
456
  /**
364
457
  * The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
@@ -429,6 +522,11 @@ declare module 'stripe' {
429
522
  * 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.
430
523
  */
431
524
  tax_rates?: Stripe.Emptyable<Array<string>>;
525
+
526
+ /**
527
+ * Define options to configure the trial on the subscription item.
528
+ */
529
+ trial?: Item.Trial;
432
530
  }
433
531
 
434
532
  namespace Item {
@@ -450,12 +548,56 @@ declare module 'stripe' {
450
548
  */
451
549
  discount?: string;
452
550
 
551
+ /**
552
+ * Details to determine how long the discount should be applied for.
553
+ */
554
+ discount_end?: Discount.DiscountEnd;
555
+
453
556
  /**
454
557
  * ID of the promotion code to create a new discount for.
455
558
  */
456
559
  promotion_code?: string;
457
560
  }
458
561
 
562
+ namespace Discount {
563
+ interface DiscountEnd {
564
+ /**
565
+ * Time span for the redeemed discount.
566
+ */
567
+ duration?: DiscountEnd.Duration;
568
+
569
+ /**
570
+ * A precise Unix timestamp for the discount to end. Must be in the future.
571
+ */
572
+ timestamp?: number;
573
+
574
+ /**
575
+ * The type of calculation made to determine when the discount ends.
576
+ */
577
+ type: DiscountEnd.Type;
578
+ }
579
+
580
+ namespace DiscountEnd {
581
+ interface Duration {
582
+ /**
583
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
584
+ */
585
+ interval: Duration.Interval;
586
+
587
+ /**
588
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
589
+ */
590
+ interval_count: number;
591
+ }
592
+
593
+ namespace Duration {
594
+ type Interval = 'day' | 'month' | 'week' | 'year';
595
+ }
596
+
597
+ type Type = 'duration' | 'timestamp';
598
+ }
599
+ }
600
+
459
601
  interface PriceData {
460
602
  /**
461
603
  * 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).
@@ -507,6 +649,22 @@ declare module 'stripe' {
507
649
 
508
650
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
509
651
  }
652
+
653
+ interface Trial {
654
+ /**
655
+ * 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.
656
+ */
657
+ converts_to?: Array<string>;
658
+
659
+ /**
660
+ * Determines the type of trial for this item.
661
+ */
662
+ type: Trial.Type;
663
+ }
664
+
665
+ namespace Trial {
666
+ type Type = 'free' | 'paid';
667
+ }
510
668
  }
511
669
 
512
670
  type PaymentBehavior =
@@ -723,6 +881,11 @@ declare module 'stripe' {
723
881
 
724
882
  namespace UsBankAccount {
725
883
  interface FinancialConnections {
884
+ /**
885
+ * Provide filters for the linked accounts that the customer can select for the payment method.
886
+ */
887
+ filters?: FinancialConnections.Filters;
888
+
726
889
  /**
727
890
  * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
728
891
  */
@@ -735,13 +898,28 @@ declare module 'stripe' {
735
898
  }
736
899
 
737
900
  namespace FinancialConnections {
901
+ interface Filters {
902
+ /**
903
+ * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
904
+ */
905
+ account_subcategories?: Array<Filters.AccountSubcategory>;
906
+ }
907
+
908
+ namespace Filters {
909
+ type AccountSubcategory = 'checking' | 'savings';
910
+ }
911
+
738
912
  type Permission =
739
913
  | 'balances'
740
914
  | 'ownership'
741
915
  | 'payment_method'
742
916
  | 'transactions';
743
917
 
744
- type Prefetch = 'balances' | 'ownership' | 'transactions';
918
+ type Prefetch =
919
+ | 'balances'
920
+ | 'inferred_balances'
921
+ | 'ownership'
922
+ | 'transactions';
745
923
  }
746
924
 
747
925
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -798,6 +976,22 @@ declare module 'stripe' {
798
976
  type Interval = 'day' | 'month' | 'week' | 'year';
799
977
  }
800
978
 
979
+ interface Prebilling {
980
+ /**
981
+ * This is used to determine the number of billing cycles to prebill.
982
+ */
983
+ iterations: number;
984
+
985
+ /**
986
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
987
+ */
988
+ update_behavior?: Prebilling.UpdateBehavior;
989
+ }
990
+
991
+ namespace Prebilling {
992
+ type UpdateBehavior = 'prebill' | 'reset';
993
+ }
994
+
801
995
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
802
996
 
803
997
  interface TransferData {
@@ -983,6 +1177,11 @@ declare module 'stripe' {
983
1177
  SubscriptionUpdateParams.PendingInvoiceItemInterval
984
1178
  >;
985
1179
 
1180
+ /**
1181
+ * If specified, the invoicing for the given billing cycle iterations will be processed now.
1182
+ */
1183
+ prebilling?: SubscriptionUpdateParams.Prebilling;
1184
+
986
1185
  /**
987
1186
  * The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.
988
1187
  */
@@ -1059,12 +1258,56 @@ declare module 'stripe' {
1059
1258
  */
1060
1259
  discount?: string;
1061
1260
 
1261
+ /**
1262
+ * Details to determine how long the discount should be applied for.
1263
+ */
1264
+ discount_end?: Discount.DiscountEnd;
1265
+
1062
1266
  /**
1063
1267
  * ID of the promotion code to create a new discount for.
1064
1268
  */
1065
1269
  promotion_code?: string;
1066
1270
  }
1067
1271
 
1272
+ namespace Discount {
1273
+ interface DiscountEnd {
1274
+ /**
1275
+ * Time span for the redeemed discount.
1276
+ */
1277
+ duration?: DiscountEnd.Duration;
1278
+
1279
+ /**
1280
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1281
+ */
1282
+ timestamp?: number;
1283
+
1284
+ /**
1285
+ * The type of calculation made to determine when the discount ends.
1286
+ */
1287
+ type: DiscountEnd.Type;
1288
+ }
1289
+
1290
+ namespace DiscountEnd {
1291
+ interface Duration {
1292
+ /**
1293
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1294
+ */
1295
+ interval: Duration.Interval;
1296
+
1297
+ /**
1298
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1299
+ */
1300
+ interval_count: number;
1301
+ }
1302
+
1303
+ namespace Duration {
1304
+ type Interval = 'day' | 'month' | 'week' | 'year';
1305
+ }
1306
+
1307
+ type Type = 'duration' | 'timestamp';
1308
+ }
1309
+ }
1310
+
1068
1311
  interface PriceData {
1069
1312
  /**
1070
1313
  * 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).
@@ -1178,12 +1421,56 @@ declare module 'stripe' {
1178
1421
  */
1179
1422
  discount?: string;
1180
1423
 
1424
+ /**
1425
+ * Details to determine how long the discount should be applied for.
1426
+ */
1427
+ discount_end?: Discount.DiscountEnd;
1428
+
1181
1429
  /**
1182
1430
  * ID of the promotion code to create a new discount for.
1183
1431
  */
1184
1432
  promotion_code?: string;
1185
1433
  }
1186
1434
 
1435
+ namespace Discount {
1436
+ interface DiscountEnd {
1437
+ /**
1438
+ * Time span for the redeemed discount.
1439
+ */
1440
+ duration?: DiscountEnd.Duration;
1441
+
1442
+ /**
1443
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1444
+ */
1445
+ timestamp?: number;
1446
+
1447
+ /**
1448
+ * The type of calculation made to determine when the discount ends.
1449
+ */
1450
+ type: DiscountEnd.Type;
1451
+ }
1452
+
1453
+ namespace DiscountEnd {
1454
+ interface Duration {
1455
+ /**
1456
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1457
+ */
1458
+ interval: Duration.Interval;
1459
+
1460
+ /**
1461
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1462
+ */
1463
+ interval_count: number;
1464
+ }
1465
+
1466
+ namespace Duration {
1467
+ type Interval = 'day' | 'month' | 'week' | 'year';
1468
+ }
1469
+
1470
+ type Type = 'duration' | 'timestamp';
1471
+ }
1472
+ }
1473
+
1187
1474
  interface InvoiceSettings {
1188
1475
  /**
1189
1476
  * The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
@@ -1290,12 +1577,56 @@ declare module 'stripe' {
1290
1577
  */
1291
1578
  discount?: string;
1292
1579
 
1580
+ /**
1581
+ * Details to determine how long the discount should be applied for.
1582
+ */
1583
+ discount_end?: Discount.DiscountEnd;
1584
+
1293
1585
  /**
1294
1586
  * ID of the promotion code to create a new discount for.
1295
1587
  */
1296
1588
  promotion_code?: string;
1297
1589
  }
1298
1590
 
1591
+ namespace Discount {
1592
+ interface DiscountEnd {
1593
+ /**
1594
+ * Time span for the redeemed discount.
1595
+ */
1596
+ duration?: DiscountEnd.Duration;
1597
+
1598
+ /**
1599
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1600
+ */
1601
+ timestamp?: number;
1602
+
1603
+ /**
1604
+ * The type of calculation made to determine when the discount ends.
1605
+ */
1606
+ type: DiscountEnd.Type;
1607
+ }
1608
+
1609
+ namespace DiscountEnd {
1610
+ interface Duration {
1611
+ /**
1612
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1613
+ */
1614
+ interval: Duration.Interval;
1615
+
1616
+ /**
1617
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1618
+ */
1619
+ interval_count: number;
1620
+ }
1621
+
1622
+ namespace Duration {
1623
+ type Interval = 'day' | 'month' | 'week' | 'year';
1624
+ }
1625
+
1626
+ type Type = 'duration' | 'timestamp';
1627
+ }
1628
+ }
1629
+
1299
1630
  interface PriceData {
1300
1631
  /**
1301
1632
  * 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).
@@ -1579,6 +1910,11 @@ declare module 'stripe' {
1579
1910
 
1580
1911
  namespace UsBankAccount {
1581
1912
  interface FinancialConnections {
1913
+ /**
1914
+ * Provide filters for the linked accounts that the customer can select for the payment method.
1915
+ */
1916
+ filters?: FinancialConnections.Filters;
1917
+
1582
1918
  /**
1583
1919
  * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
1584
1920
  */
@@ -1591,13 +1927,28 @@ declare module 'stripe' {
1591
1927
  }
1592
1928
 
1593
1929
  namespace FinancialConnections {
1930
+ interface Filters {
1931
+ /**
1932
+ * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1933
+ */
1934
+ account_subcategories?: Array<Filters.AccountSubcategory>;
1935
+ }
1936
+
1937
+ namespace Filters {
1938
+ type AccountSubcategory = 'checking' | 'savings';
1939
+ }
1940
+
1594
1941
  type Permission =
1595
1942
  | 'balances'
1596
1943
  | 'ownership'
1597
1944
  | 'payment_method'
1598
1945
  | 'transactions';
1599
1946
 
1600
- type Prefetch = 'balances' | 'ownership' | 'transactions';
1947
+ type Prefetch =
1948
+ | 'balances'
1949
+ | 'inferred_balances'
1950
+ | 'ownership'
1951
+ | 'transactions';
1601
1952
  }
1602
1953
 
1603
1954
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -1654,6 +2005,22 @@ declare module 'stripe' {
1654
2005
  type Interval = 'day' | 'month' | 'week' | 'year';
1655
2006
  }
1656
2007
 
2008
+ interface Prebilling {
2009
+ /**
2010
+ * This is used to determine the number of billing cycles to prebill.
2011
+ */
2012
+ iterations: number;
2013
+
2014
+ /**
2015
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2016
+ */
2017
+ update_behavior?: Prebilling.UpdateBehavior;
2018
+ }
2019
+
2020
+ namespace Prebilling {
2021
+ type UpdateBehavior = 'prebill' | 'reset';
2022
+ }
2023
+
1657
2024
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
1658
2025
 
1659
2026
  interface TransferData {