stripe 17.6.0 → 17.7.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 (179) hide show
  1. package/CHANGELOG.md +1068 -109
  2. package/OPENAPI_VERSION +1 -0
  3. package/README.md +1 -0
  4. package/VERSION +1 -1
  5. package/cjs/resources/AccountNotices.js +21 -0
  6. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  7. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  8. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  9. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  10. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  11. package/cjs/resources/GiftCards/Cards.js +23 -0
  12. package/cjs/resources/GiftCards/Transactions.js +33 -0
  13. package/cjs/resources/Invoices.js +17 -0
  14. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  15. package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
  16. package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
  17. package/cjs/resources/Margins.js +22 -0
  18. package/cjs/resources/Orders.js +24 -0
  19. package/cjs/resources/PaymentAttemptRecords.js +17 -0
  20. package/cjs/resources/PaymentIntents.js +8 -0
  21. package/cjs/resources/PaymentRecords.js +29 -0
  22. package/cjs/resources/Quotes.js +32 -0
  23. package/cjs/resources/SubscriptionSchedules.js +4 -0
  24. package/cjs/resources/Tax/Associations.js +9 -0
  25. package/cjs/resources/Tax/Forms.js +20 -0
  26. package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
  27. package/cjs/resources/Terminal/Readers.js +12 -0
  28. package/cjs/resources.js +48 -10
  29. package/cjs/stripe.core.js +1 -1
  30. package/esm/resources/AccountNotices.js +18 -0
  31. package/esm/resources/Capital/FinancingOffers.js +18 -0
  32. package/esm/resources/Capital/FinancingSummary.js +9 -0
  33. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  34. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  35. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  36. package/esm/resources/GiftCards/Cards.js +20 -0
  37. package/esm/resources/GiftCards/Transactions.js +30 -0
  38. package/esm/resources/Invoices.js +17 -0
  39. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  40. package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
  41. package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
  42. package/esm/resources/Margins.js +19 -0
  43. package/esm/resources/Orders.js +21 -0
  44. package/esm/resources/PaymentAttemptRecords.js +14 -0
  45. package/esm/resources/PaymentIntents.js +8 -0
  46. package/esm/resources/PaymentRecords.js +26 -0
  47. package/esm/resources/Quotes.js +32 -0
  48. package/esm/resources/SubscriptionSchedules.js +4 -0
  49. package/esm/resources/Tax/Associations.js +6 -0
  50. package/esm/resources/Tax/Forms.js +17 -0
  51. package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
  52. package/esm/resources/Terminal/Readers.js +12 -0
  53. package/esm/resources.js +33 -0
  54. package/esm/stripe.core.js +1 -1
  55. package/package.json +1 -1
  56. package/types/AccountLinksResource.d.ts +5 -1
  57. package/types/AccountNotices.d.ts +113 -0
  58. package/types/AccountNoticesResource.d.ts +98 -0
  59. package/types/AccountSessions.d.ts +45 -0
  60. package/types/AccountSessionsResource.d.ts +243 -0
  61. package/types/Accounts.d.ts +205 -1
  62. package/types/AccountsResource.d.ts +526 -2
  63. package/types/Balance.d.ts +18 -18
  64. package/types/Billing/CreditBalanceSummaryResource.d.ts +14 -0
  65. package/types/Billing/CreditGrants.d.ts +15 -1
  66. package/types/Billing/CreditGrantsResource.d.ts +14 -0
  67. package/types/Billing/MeterErrorReports.d.ts +106 -0
  68. package/types/Billing/MeterEventSummaries.d.ts +2 -0
  69. package/types/Capital/FinancingOffers.d.ts +188 -0
  70. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  71. package/types/Capital/FinancingSummary.d.ts +106 -0
  72. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  73. package/types/Capital/FinancingTransactions.d.ts +135 -0
  74. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  75. package/types/Cards.d.ts +5 -0
  76. package/types/Charges.d.ts +151 -3
  77. package/types/ChargesResource.d.ts +1294 -0
  78. package/types/Checkout/Sessions.d.ts +362 -9
  79. package/types/Checkout/SessionsResource.d.ts +465 -5
  80. package/types/ConfirmationTokens.d.ts +103 -4
  81. package/types/Coupons.d.ts +1 -1
  82. package/types/CouponsResource.d.ts +1 -1
  83. package/types/CreditNotes.d.ts +23 -2
  84. package/types/CreditNotesResource.d.ts +51 -0
  85. package/types/CustomersResource.d.ts +7 -0
  86. package/types/EventTypes.d.ts +596 -0
  87. package/types/Events.d.ts +93 -0
  88. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  89. package/types/FinancialConnections/Accounts.d.ts +29 -1
  90. package/types/FinancialConnections/AccountsResource.d.ts +35 -3
  91. package/types/FinancialConnections/Institutions.d.ts +93 -0
  92. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  93. package/types/FinancialConnections/Sessions.d.ts +49 -1
  94. package/types/FinancialConnections/SessionsResource.d.ts +38 -1
  95. package/types/GiftCards/Cards.d.ts +118 -0
  96. package/types/GiftCards/CardsResource.d.ts +159 -0
  97. package/types/GiftCards/Transactions.d.ts +129 -0
  98. package/types/GiftCards/TransactionsResource.d.ts +201 -0
  99. package/types/InvoiceItems.d.ts +5 -0
  100. package/types/InvoiceItemsResource.d.ts +98 -0
  101. package/types/InvoiceLineItems.d.ts +28 -1
  102. package/types/InvoicePayments.d.ts +113 -0
  103. package/types/Invoices.d.ts +139 -4
  104. package/types/InvoicesResource.d.ts +4618 -933
  105. package/types/Issuing/Authorizations.d.ts +1 -0
  106. package/types/Issuing/CardholdersResource.d.ts +2 -1
  107. package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
  108. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
  109. package/types/Issuing/DisputeSettlementDetails.d.ts +73 -0
  110. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
  111. package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
  112. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
  113. package/types/Issuing/Settlements.d.ts +103 -0
  114. package/types/Issuing/Transactions.d.ts +2 -0
  115. package/types/Issuing/TransactionsResource.d.ts +5 -0
  116. package/types/LineItems.d.ts +34 -2
  117. package/types/Mandates.d.ts +77 -0
  118. package/types/Margins.d.ts +56 -0
  119. package/types/MarginsResource.d.ts +114 -0
  120. package/types/Orders.d.ts +1179 -0
  121. package/types/OrdersResource.d.ts +2961 -0
  122. package/types/PaymentAttemptRecords.d.ts +242 -0
  123. package/types/PaymentAttemptRecordsResource.d.ts +47 -0
  124. package/types/PaymentIntents.d.ts +644 -1
  125. package/types/PaymentIntentsResource.d.ts +8027 -3740
  126. package/types/PaymentLinks.d.ts +6 -0
  127. package/types/PaymentLinksResource.d.ts +12 -0
  128. package/types/PaymentMethodConfigurations.d.ts +180 -0
  129. package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
  130. package/types/PaymentMethods.d.ts +103 -4
  131. package/types/PaymentMethodsResource.d.ts +133 -0
  132. package/types/PaymentRecords.d.ts +242 -0
  133. package/types/PaymentRecordsResource.d.ts +455 -0
  134. package/types/Prices.d.ts +22 -0
  135. package/types/PricesResource.d.ts +22 -0
  136. package/types/Products.d.ts +39 -0
  137. package/types/ProductsResource.d.ts +36 -0
  138. package/types/QuoteLines.d.ts +634 -0
  139. package/types/QuotePreviewInvoices.d.ts +1658 -0
  140. package/types/QuotePreviewSubscriptionSchedules.d.ts +824 -0
  141. package/types/Quotes.d.ts +597 -7
  142. package/types/QuotesResource.d.ts +2526 -194
  143. package/types/Refunds.d.ts +16 -2
  144. package/types/SetupAttempts.d.ts +38 -0
  145. package/types/SetupIntents.d.ts +111 -1
  146. package/types/SetupIntentsResource.d.ts +648 -6
  147. package/types/Sources.d.ts +29 -0
  148. package/types/SubscriptionItems.d.ts +21 -0
  149. package/types/SubscriptionItemsResource.d.ts +109 -0
  150. package/types/SubscriptionSchedules.d.ts +200 -0
  151. package/types/SubscriptionSchedulesResource.d.ts +1234 -16
  152. package/types/Subscriptions.d.ts +91 -1
  153. package/types/SubscriptionsResource.d.ts +369 -2
  154. package/types/Tax/Associations.d.ts +126 -0
  155. package/types/Tax/AssociationsResource.d.ts +29 -0
  156. package/types/Tax/CalculationLineItems.d.ts +1 -1
  157. package/types/Tax/Calculations.d.ts +1 -1
  158. package/types/Tax/Forms.d.ts +220 -0
  159. package/types/Tax/FormsResource.d.ts +107 -0
  160. package/types/Tax/Transactions.d.ts +1 -1
  161. package/types/TaxRates.d.ts +3 -3
  162. package/types/TaxRatesResource.d.ts +2 -2
  163. package/types/Terminal/ReaderCollectedData.d.ts +51 -0
  164. package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
  165. package/types/Terminal/Readers.d.ts +290 -0
  166. package/types/Terminal/ReadersResource.d.ts +215 -0
  167. package/types/TestHelpers/ConfirmationTokensResource.d.ts +104 -0
  168. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  169. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  170. package/types/TokensResource.d.ts +3 -1
  171. package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
  172. package/types/Treasury/FinancialAccounts.d.ts +5 -0
  173. package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
  174. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  175. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  176. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  177. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  178. package/types/WebhookEndpointsResource.d.ts +70 -0
  179. package/types/index.d.ts +62 -0
@@ -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 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 =
@@ -558,6 +716,13 @@ declare module 'stripe' {
558
716
  PaymentMethodOptions.CustomerBalance
559
717
  >;
560
718
 
719
+ /**
720
+ * This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
721
+ */
722
+ id_bank_transfer?: Stripe.Emptyable<
723
+ PaymentMethodOptions.IdBankTransfer
724
+ >;
725
+
561
726
  /**
562
727
  * This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
563
728
  */
@@ -707,6 +872,8 @@ declare module 'stripe' {
707
872
  }
708
873
  }
709
874
 
875
+ interface IdBankTransfer {}
876
+
710
877
  interface Konbini {}
711
878
 
712
879
  interface SepaDebit {}
@@ -747,6 +914,11 @@ declare module 'stripe' {
747
914
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
748
915
  */
749
916
  account_subcategories?: Array<Filters.AccountSubcategory>;
917
+
918
+ /**
919
+ * ID of the institution to use to filter for selectable accounts.
920
+ */
921
+ institution?: string;
750
922
  }
751
923
 
752
924
  namespace Filters {
@@ -759,7 +931,11 @@ declare module 'stripe' {
759
931
  | 'payment_method'
760
932
  | 'transactions';
761
933
 
762
- type Prefetch = 'balances' | 'ownership' | 'transactions';
934
+ type Prefetch =
935
+ | 'balances'
936
+ | 'inferred_balances'
937
+ | 'ownership'
938
+ | 'transactions';
763
939
  }
764
940
 
765
941
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -777,11 +953,13 @@ declare module 'stripe' {
777
953
  | 'boleto'
778
954
  | 'card'
779
955
  | 'cashapp'
956
+ | 'custom'
780
957
  | 'customer_balance'
781
958
  | 'eps'
782
959
  | 'fpx'
783
960
  | 'giropay'
784
961
  | 'grabpay'
962
+ | 'id_bank_transfer'
785
963
  | 'ideal'
786
964
  | 'jp_credit_transfer'
787
965
  | 'kakao_pay'
@@ -822,6 +1000,22 @@ declare module 'stripe' {
822
1000
  type Interval = 'day' | 'month' | 'week' | 'year';
823
1001
  }
824
1002
 
1003
+ interface Prebilling {
1004
+ /**
1005
+ * This is used to determine the number of billing cycles to prebill.
1006
+ */
1007
+ iterations: number;
1008
+
1009
+ /**
1010
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1011
+ */
1012
+ update_behavior?: Prebilling.UpdateBehavior;
1013
+ }
1014
+
1015
+ namespace Prebilling {
1016
+ type UpdateBehavior = 'prebill' | 'reset';
1017
+ }
1018
+
825
1019
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
826
1020
 
827
1021
  interface TransferData {
@@ -1007,6 +1201,11 @@ declare module 'stripe' {
1007
1201
  SubscriptionUpdateParams.PendingInvoiceItemInterval
1008
1202
  >;
1009
1203
 
1204
+ /**
1205
+ * If specified, the invoicing for the given billing cycle iterations will be processed now.
1206
+ */
1207
+ prebilling?: SubscriptionUpdateParams.Prebilling;
1208
+
1010
1209
  /**
1011
1210
  * The 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.
1012
1211
  */
@@ -1083,12 +1282,56 @@ declare module 'stripe' {
1083
1282
  */
1084
1283
  discount?: string;
1085
1284
 
1285
+ /**
1286
+ * Details to determine how long the discount should be applied for.
1287
+ */
1288
+ discount_end?: Discount.DiscountEnd;
1289
+
1086
1290
  /**
1087
1291
  * ID of the promotion code to create a new discount for.
1088
1292
  */
1089
1293
  promotion_code?: string;
1090
1294
  }
1091
1295
 
1296
+ namespace Discount {
1297
+ interface DiscountEnd {
1298
+ /**
1299
+ * Time span for the redeemed discount.
1300
+ */
1301
+ duration?: DiscountEnd.Duration;
1302
+
1303
+ /**
1304
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1305
+ */
1306
+ timestamp?: number;
1307
+
1308
+ /**
1309
+ * The type of calculation made to determine when the discount ends.
1310
+ */
1311
+ type: DiscountEnd.Type;
1312
+ }
1313
+
1314
+ namespace DiscountEnd {
1315
+ interface Duration {
1316
+ /**
1317
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1318
+ */
1319
+ interval: Duration.Interval;
1320
+
1321
+ /**
1322
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1323
+ */
1324
+ interval_count: number;
1325
+ }
1326
+
1327
+ namespace Duration {
1328
+ type Interval = 'day' | 'month' | 'week' | 'year';
1329
+ }
1330
+
1331
+ type Type = 'duration' | 'timestamp';
1332
+ }
1333
+ }
1334
+
1092
1335
  interface PriceData {
1093
1336
  /**
1094
1337
  * 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).
@@ -1202,12 +1445,56 @@ declare module 'stripe' {
1202
1445
  */
1203
1446
  discount?: string;
1204
1447
 
1448
+ /**
1449
+ * Details to determine how long the discount should be applied for.
1450
+ */
1451
+ discount_end?: Discount.DiscountEnd;
1452
+
1205
1453
  /**
1206
1454
  * ID of the promotion code to create a new discount for.
1207
1455
  */
1208
1456
  promotion_code?: string;
1209
1457
  }
1210
1458
 
1459
+ namespace Discount {
1460
+ interface DiscountEnd {
1461
+ /**
1462
+ * Time span for the redeemed discount.
1463
+ */
1464
+ duration?: DiscountEnd.Duration;
1465
+
1466
+ /**
1467
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1468
+ */
1469
+ timestamp?: number;
1470
+
1471
+ /**
1472
+ * The type of calculation made to determine when the discount ends.
1473
+ */
1474
+ type: DiscountEnd.Type;
1475
+ }
1476
+
1477
+ namespace DiscountEnd {
1478
+ interface Duration {
1479
+ /**
1480
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1481
+ */
1482
+ interval: Duration.Interval;
1483
+
1484
+ /**
1485
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1486
+ */
1487
+ interval_count: number;
1488
+ }
1489
+
1490
+ namespace Duration {
1491
+ type Interval = 'day' | 'month' | 'week' | 'year';
1492
+ }
1493
+
1494
+ type Type = 'duration' | 'timestamp';
1495
+ }
1496
+ }
1497
+
1211
1498
  interface InvoiceSettings {
1212
1499
  /**
1213
1500
  * The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
@@ -1314,12 +1601,56 @@ declare module 'stripe' {
1314
1601
  */
1315
1602
  discount?: string;
1316
1603
 
1604
+ /**
1605
+ * Details to determine how long the discount should be applied for.
1606
+ */
1607
+ discount_end?: Discount.DiscountEnd;
1608
+
1317
1609
  /**
1318
1610
  * ID of the promotion code to create a new discount for.
1319
1611
  */
1320
1612
  promotion_code?: string;
1321
1613
  }
1322
1614
 
1615
+ namespace Discount {
1616
+ interface DiscountEnd {
1617
+ /**
1618
+ * Time span for the redeemed discount.
1619
+ */
1620
+ duration?: DiscountEnd.Duration;
1621
+
1622
+ /**
1623
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1624
+ */
1625
+ timestamp?: number;
1626
+
1627
+ /**
1628
+ * The type of calculation made to determine when the discount ends.
1629
+ */
1630
+ type: DiscountEnd.Type;
1631
+ }
1632
+
1633
+ namespace DiscountEnd {
1634
+ interface Duration {
1635
+ /**
1636
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1637
+ */
1638
+ interval: Duration.Interval;
1639
+
1640
+ /**
1641
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1642
+ */
1643
+ interval_count: number;
1644
+ }
1645
+
1646
+ namespace Duration {
1647
+ type Interval = 'day' | 'month' | 'week' | 'year';
1648
+ }
1649
+
1650
+ type Type = 'duration' | 'timestamp';
1651
+ }
1652
+ }
1653
+
1323
1654
  interface PriceData {
1324
1655
  /**
1325
1656
  * 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).
@@ -1438,6 +1769,13 @@ declare module 'stripe' {
1438
1769
  PaymentMethodOptions.CustomerBalance
1439
1770
  >;
1440
1771
 
1772
+ /**
1773
+ * This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
1774
+ */
1775
+ id_bank_transfer?: Stripe.Emptyable<
1776
+ PaymentMethodOptions.IdBankTransfer
1777
+ >;
1778
+
1441
1779
  /**
1442
1780
  * This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
1443
1781
  */
@@ -1587,6 +1925,8 @@ declare module 'stripe' {
1587
1925
  }
1588
1926
  }
1589
1927
 
1928
+ interface IdBankTransfer {}
1929
+
1590
1930
  interface Konbini {}
1591
1931
 
1592
1932
  interface SepaDebit {}
@@ -1627,6 +1967,11 @@ declare module 'stripe' {
1627
1967
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1628
1968
  */
1629
1969
  account_subcategories?: Array<Filters.AccountSubcategory>;
1970
+
1971
+ /**
1972
+ * ID of the institution to use to filter for selectable accounts.
1973
+ */
1974
+ institution?: string;
1630
1975
  }
1631
1976
 
1632
1977
  namespace Filters {
@@ -1639,7 +1984,11 @@ declare module 'stripe' {
1639
1984
  | 'payment_method'
1640
1985
  | 'transactions';
1641
1986
 
1642
- type Prefetch = 'balances' | 'ownership' | 'transactions';
1987
+ type Prefetch =
1988
+ | 'balances'
1989
+ | 'inferred_balances'
1990
+ | 'ownership'
1991
+ | 'transactions';
1643
1992
  }
1644
1993
 
1645
1994
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -1657,11 +2006,13 @@ declare module 'stripe' {
1657
2006
  | 'boleto'
1658
2007
  | 'card'
1659
2008
  | 'cashapp'
2009
+ | 'custom'
1660
2010
  | 'customer_balance'
1661
2011
  | 'eps'
1662
2012
  | 'fpx'
1663
2013
  | 'giropay'
1664
2014
  | 'grabpay'
2015
+ | 'id_bank_transfer'
1665
2016
  | 'ideal'
1666
2017
  | 'jp_credit_transfer'
1667
2018
  | 'kakao_pay'
@@ -1702,6 +2053,22 @@ declare module 'stripe' {
1702
2053
  type Interval = 'day' | 'month' | 'week' | 'year';
1703
2054
  }
1704
2055
 
2056
+ interface Prebilling {
2057
+ /**
2058
+ * This is used to determine the number of billing cycles to prebill.
2059
+ */
2060
+ iterations: number;
2061
+
2062
+ /**
2063
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2064
+ */
2065
+ update_behavior?: Prebilling.UpdateBehavior;
2066
+ }
2067
+
2068
+ namespace Prebilling {
2069
+ type UpdateBehavior = 'prebill' | 'reset';
2070
+ }
2071
+
1705
2072
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
1706
2073
 
1707
2074
  interface TransferData {
@@ -0,0 +1,126 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace Tax {
6
+ /**
7
+ * A Tax Association exposes the Tax Transactions that Stripe attempted to create on your behalf based on the PaymentIntent input
8
+ */
9
+ interface Association {
10
+ /**
11
+ * Unique identifier for the object.
12
+ */
13
+ id: string;
14
+
15
+ /**
16
+ * String representing the object's type. Objects of the same type share the same value.
17
+ */
18
+ object: 'tax.association';
19
+
20
+ /**
21
+ * The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent.
22
+ */
23
+ calculation: string;
24
+
25
+ /**
26
+ * The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking.
27
+ */
28
+ payment_intent: string;
29
+
30
+ /**
31
+ * Status of the Tax Association.
32
+ */
33
+ status: Association.Status;
34
+
35
+ status_details: Association.StatusDetails;
36
+ }
37
+
38
+ namespace Association {
39
+ type Status = 'committed' | 'errored';
40
+
41
+ interface StatusDetails {
42
+ committed?: StatusDetails.Committed;
43
+
44
+ errored?: StatusDetails.Errored;
45
+ }
46
+
47
+ namespace StatusDetails {
48
+ interface Committed {
49
+ /**
50
+ * Attempts to create Tax Transaction reversals
51
+ */
52
+ reversals: Array<Committed.Reversal>;
53
+
54
+ /**
55
+ * The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object)
56
+ */
57
+ transaction: string;
58
+ }
59
+
60
+ namespace Committed {
61
+ interface Reversal {
62
+ /**
63
+ * Status of the attempted Tax Transaction reversal.
64
+ */
65
+ status: Reversal.Status;
66
+
67
+ status_details: Reversal.StatusDetails;
68
+ }
69
+
70
+ namespace Reversal {
71
+ type Status = 'committed' | 'errored';
72
+
73
+ interface StatusDetails {
74
+ committed?: StatusDetails.Committed;
75
+
76
+ errored?: StatusDetails.Errored;
77
+ }
78
+
79
+ namespace StatusDetails {
80
+ interface Committed {
81
+ /**
82
+ * The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object)
83
+ */
84
+ transaction: string;
85
+ }
86
+
87
+ interface Errored {
88
+ /**
89
+ * Details on why we could not commit the reversal Tax Transaction
90
+ */
91
+ reason: Errored.Reason;
92
+
93
+ /**
94
+ * The [Refund](https://stripe.com/docs/api/refunds/object) ID that should have created a tax reversal.
95
+ */
96
+ refund_id: string;
97
+ }
98
+
99
+ namespace Errored {
100
+ type Reason =
101
+ | 'original_transaction_voided'
102
+ | 'unique_reference_violation';
103
+ }
104
+ }
105
+ }
106
+ }
107
+
108
+ interface Errored {
109
+ /**
110
+ * Details on why we could not commit the Tax Transaction
111
+ */
112
+ reason: Errored.Reason;
113
+ }
114
+
115
+ namespace Errored {
116
+ type Reason =
117
+ | 'another_payment_associated_with_calculation'
118
+ | 'calculation_expired'
119
+ | 'currency_mismatch'
120
+ | 'unique_reference_violation';
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }