stripe 18.5.0-beta.2 → 18.6.0-alpha.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 (200) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +5 -3
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +63 -55
  6. package/cjs/RequestSender.js +7 -4
  7. package/cjs/apiVersion.js +1 -1
  8. package/cjs/resources/Mandates.js +5 -0
  9. package/cjs/resources/Subscriptions.js +4 -0
  10. package/cjs/resources/V2/Billing/BillSettings/Versions.js +17 -0
  11. package/cjs/resources/V2/Billing/BillSettings.js +27 -0
  12. package/cjs/resources/V2/Billing/Cadences.js +23 -0
  13. package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +17 -0
  14. package/cjs/resources/V2/Billing/CollectionSettings.js +30 -0
  15. package/cjs/resources/V2/Billing/CustomPricingUnits.js +25 -0
  16. package/cjs/resources/V2/Billing/Intents/Actions.js +17 -0
  17. package/cjs/resources/V2/Billing/Intents.js +36 -0
  18. package/cjs/resources/V2/Billing/LicenseFeeSubscriptions.js +12 -0
  19. package/cjs/resources/V2/Billing/LicenseFees/Versions.js +17 -0
  20. package/cjs/resources/V2/Billing/LicenseFees.js +27 -0
  21. package/cjs/resources/V2/Billing/LicensedItems.js +25 -0
  22. package/cjs/resources/V2/Billing/MeteredItems.js +22 -0
  23. package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +17 -0
  24. package/cjs/resources/V2/Billing/PricingPlans/Components.js +29 -0
  25. package/cjs/resources/V2/Billing/PricingPlans/Versions.js +17 -0
  26. package/cjs/resources/V2/Billing/PricingPlans.js +29 -0
  27. package/cjs/resources/V2/Billing/Profiles.js +19 -0
  28. package/cjs/resources/V2/Billing/RateCardSubscriptions.js +29 -0
  29. package/cjs/resources/V2/Billing/RateCards/Rates.js +25 -0
  30. package/cjs/resources/V2/Billing/RateCards/Versions.js +17 -0
  31. package/cjs/resources/V2/Billing/RateCards.js +29 -0
  32. package/cjs/resources/V2/Billing/ServiceActions.js +16 -0
  33. package/cjs/resources/V2/Core/ClaimableSandboxes.js +12 -0
  34. package/cjs/resources/V2/Reporting/ReportRuns.js +13 -0
  35. package/cjs/resources/V2/Reporting/Reports.js +12 -0
  36. package/cjs/resources/V2/Tax/AutomaticRules.js +22 -0
  37. package/cjs/resources.js +64 -24
  38. package/cjs/stripe.core.js +27 -1
  39. package/esm/Error.js +50 -43
  40. package/esm/RequestSender.js +7 -4
  41. package/esm/apiVersion.js +1 -1
  42. package/esm/resources/Mandates.js +5 -0
  43. package/esm/resources/Subscriptions.js +4 -0
  44. package/esm/resources/V2/Billing/BillSettings/Versions.js +14 -0
  45. package/esm/resources/V2/Billing/BillSettings.js +24 -0
  46. package/esm/resources/V2/Billing/Cadences.js +20 -0
  47. package/esm/resources/V2/Billing/CollectionSettings/Versions.js +14 -0
  48. package/esm/resources/V2/Billing/CollectionSettings.js +27 -0
  49. package/esm/resources/V2/Billing/CustomPricingUnits.js +22 -0
  50. package/esm/resources/V2/Billing/Intents/Actions.js +14 -0
  51. package/esm/resources/V2/Billing/Intents.js +33 -0
  52. package/esm/resources/V2/Billing/LicenseFeeSubscriptions.js +9 -0
  53. package/esm/resources/V2/Billing/LicenseFees/Versions.js +14 -0
  54. package/esm/resources/V2/Billing/LicenseFees.js +24 -0
  55. package/esm/resources/V2/Billing/LicensedItems.js +22 -0
  56. package/esm/resources/V2/Billing/MeteredItems.js +19 -0
  57. package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +14 -0
  58. package/esm/resources/V2/Billing/PricingPlans/Components.js +26 -0
  59. package/esm/resources/V2/Billing/PricingPlans/Versions.js +14 -0
  60. package/esm/resources/V2/Billing/PricingPlans.js +26 -0
  61. package/esm/resources/V2/Billing/Profiles.js +16 -0
  62. package/esm/resources/V2/Billing/RateCardSubscriptions.js +26 -0
  63. package/esm/resources/V2/Billing/RateCards/Rates.js +22 -0
  64. package/esm/resources/V2/Billing/RateCards/Versions.js +14 -0
  65. package/esm/resources/V2/Billing/RateCards.js +26 -0
  66. package/esm/resources/V2/Billing/ServiceActions.js +13 -0
  67. package/esm/resources/V2/Core/ClaimableSandboxes.js +9 -0
  68. package/esm/resources/V2/Reporting/ReportRuns.js +10 -0
  69. package/esm/resources/V2/Reporting/Reports.js +9 -0
  70. package/esm/resources/V2/Tax/AutomaticRules.js +19 -0
  71. package/esm/resources.js +45 -5
  72. package/esm/stripe.core.js +27 -1
  73. package/package.json +1 -1
  74. package/types/AccountSessions.d.ts +45 -0
  75. package/types/AccountSessionsResource.d.ts +76 -13
  76. package/types/Accounts.d.ts +2 -2
  77. package/types/Balance.d.ts +2 -7
  78. package/types/BalanceSettings.d.ts +52 -46
  79. package/types/BalanceSettingsResource.d.ts +55 -46
  80. package/types/Billing/AlertTriggereds.d.ts +16 -1
  81. package/types/Billing/Alerts.d.ts +116 -1
  82. package/types/Billing/AlertsResource.d.ts +93 -2
  83. package/types/Billing/CreditBalanceSummary.d.ts +118 -2
  84. package/types/Billing/CreditBalanceSummaryResource.d.ts +12 -0
  85. package/types/Billing/CreditBalanceTransactions.d.ts +118 -2
  86. package/types/Billing/CreditGrants.d.ts +71 -1
  87. package/types/Billing/CreditGrantsResource.d.ts +32 -1
  88. package/types/Billing/MeterUsageRows.d.ts +1 -1
  89. package/types/Billing/Meters.d.ts +1 -1
  90. package/types/Billing/MetersResource.d.ts +1 -1
  91. package/types/BillingPortal/Configurations.d.ts +5 -0
  92. package/types/BillingPortal/ConfigurationsResource.d.ts +10 -0
  93. package/types/Charges.d.ts +71 -5
  94. package/types/Checkout/Sessions.d.ts +128 -2
  95. package/types/Checkout/SessionsResource.d.ts +167 -3
  96. package/types/CreditNotesResource.d.ts +3 -3
  97. package/types/Disputes.d.ts +7 -2
  98. package/types/Errors.d.ts +51 -45
  99. package/types/FileLinksResource.d.ts +1 -1
  100. package/types/Files.d.ts +1 -0
  101. package/types/FilesResource.d.ts +3 -1
  102. package/types/InvoiceItems.d.ts +104 -2
  103. package/types/InvoiceLineItems.d.ts +113 -2
  104. package/types/InvoicePaymentsResource.d.ts +3 -0
  105. package/types/Invoices.d.ts +19 -2
  106. package/types/InvoicesResource.d.ts +64 -0
  107. package/types/Mandates.d.ts +58 -1
  108. package/types/MandatesResource.d.ts +31 -0
  109. package/types/PaymentAttemptRecords.d.ts +154 -9
  110. package/types/PaymentAttemptRecordsResource.d.ts +5 -0
  111. package/types/PaymentIntents.d.ts +136 -2
  112. package/types/PaymentIntentsResource.d.ts +280 -3
  113. package/types/PaymentLinksResource.d.ts +1 -1
  114. package/types/PaymentMethods.d.ts +5 -0
  115. package/types/PaymentRecords.d.ts +154 -9
  116. package/types/PaymentRecordsResource.d.ts +24 -3
  117. package/types/Payouts.d.ts +1 -1
  118. package/types/PromotionCodes.d.ts +5 -2
  119. package/types/QuotePreviewInvoices.d.ts +19 -2
  120. package/types/QuotePreviewSubscriptionSchedules.d.ts +47 -0
  121. package/types/SetupAttempts.d.ts +7 -1
  122. package/types/SetupIntents.d.ts +95 -1
  123. package/types/SetupIntentsResource.d.ts +207 -0
  124. package/types/SubscriptionSchedules.d.ts +47 -0
  125. package/types/SubscriptionSchedulesResource.d.ts +112 -0
  126. package/types/Subscriptions.d.ts +5 -0
  127. package/types/SubscriptionsResource.d.ts +145 -7
  128. package/types/Terminal/Configurations.d.ts +28 -0
  129. package/types/Terminal/ConfigurationsResource.d.ts +72 -0
  130. package/types/TestHelpers/Terminal/ReadersResource.d.ts +28 -1
  131. package/types/V2/Billing/BillSettingVersions.d.ts +97 -0
  132. package/types/V2/Billing/BillSettings/VersionsResource.d.ts +58 -0
  133. package/types/V2/Billing/BillSettings.d.ts +120 -0
  134. package/types/V2/Billing/BillSettingsResource.d.ts +241 -0
  135. package/types/V2/Billing/Cadences.d.ts +354 -0
  136. package/types/V2/Billing/CadencesResource.d.ts +489 -0
  137. package/types/V2/Billing/CollectionSettingVersions.d.ts +314 -0
  138. package/types/V2/Billing/CollectionSettings/VersionsResource.d.ts +62 -0
  139. package/types/V2/Billing/CollectionSettings.d.ts +337 -0
  140. package/types/V2/Billing/CollectionSettingsResource.d.ts +675 -0
  141. package/types/V2/Billing/CustomPricingUnits.d.ts +56 -0
  142. package/types/V2/Billing/CustomPricingUnitsResource.d.ts +122 -0
  143. package/types/V2/Billing/IntentActions.d.ts +458 -0
  144. package/types/V2/Billing/Intents/ActionsResource.d.ts +58 -0
  145. package/types/V2/Billing/Intents.d.ts +117 -0
  146. package/types/V2/Billing/IntentsResource.d.ts +574 -0
  147. package/types/V2/Billing/LicenseFeeSubscriptions.d.ts +64 -0
  148. package/types/V2/Billing/LicenseFeeSubscriptionsResource.d.ts +28 -0
  149. package/types/V2/Billing/LicenseFeeVersions.d.ts +106 -0
  150. package/types/V2/Billing/LicenseFees/VersionsResource.d.ts +58 -0
  151. package/types/V2/Billing/LicenseFees.d.ts +163 -0
  152. package/types/V2/Billing/LicenseFeesResource.d.ts +290 -0
  153. package/types/V2/Billing/LicensedItems.d.ts +73 -0
  154. package/types/V2/Billing/LicensedItemsResource.d.ts +157 -0
  155. package/types/V2/Billing/MeteredItems.d.ts +101 -0
  156. package/types/V2/Billing/MeteredItemsResource.d.ts +189 -0
  157. package/types/V2/Billing/PricingPlanComponents.d.ts +109 -0
  158. package/types/V2/Billing/PricingPlanSubscriptions.d.ts +134 -0
  159. package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +93 -0
  160. package/types/V2/Billing/PricingPlanVersions.d.ts +49 -0
  161. package/types/V2/Billing/PricingPlans/ComponentsResource.d.ts +197 -0
  162. package/types/V2/Billing/PricingPlans/VersionsResource.d.ts +58 -0
  163. package/types/V2/Billing/PricingPlans.d.ts +84 -0
  164. package/types/V2/Billing/PricingPlansResource.d.ts +151 -0
  165. package/types/V2/Billing/Profiles.d.ts +70 -0
  166. package/types/V2/Billing/ProfilesResource.d.ts +150 -0
  167. package/types/V2/Billing/RateCardRates.d.ts +138 -0
  168. package/types/V2/Billing/RateCardSubscriptions.d.ts +134 -0
  169. package/types/V2/Billing/RateCardSubscriptionsResource.d.ts +157 -0
  170. package/types/V2/Billing/RateCardVersions.d.ts +39 -0
  171. package/types/V2/Billing/RateCards/RatesResource.d.ts +209 -0
  172. package/types/V2/Billing/RateCards/VersionsResource.d.ts +58 -0
  173. package/types/V2/Billing/RateCards.d.ts +98 -0
  174. package/types/V2/Billing/RateCardsResource.d.ts +162 -0
  175. package/types/V2/Billing/ServiceActions.d.ts +240 -0
  176. package/types/V2/Billing/ServiceActionsResource.d.ts +302 -0
  177. package/types/V2/Core/Accounts/PersonsResource.d.ts +32 -0
  178. package/types/V2/Core/Accounts.d.ts +49 -0
  179. package/types/V2/Core/AccountsResource.d.ts +78 -0
  180. package/types/V2/Core/ClaimableSandboxes.d.ts +349 -0
  181. package/types/V2/Core/ClaimableSandboxesResource.d.ts +310 -0
  182. package/types/V2/Core/Persons.d.ts +16 -0
  183. package/types/V2/EventTypes.d.ts +3682 -632
  184. package/types/V2/Events.d.ts +7 -0
  185. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +7 -2
  186. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +5 -0
  187. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +1 -1
  188. package/types/V2/MoneyManagement/TransactionEntries.d.ts +7 -0
  189. package/types/V2/MoneyManagement/Transactions.d.ts +7 -0
  190. package/types/V2/Reporting/ReportRuns.d.ts +178 -0
  191. package/types/V2/Reporting/ReportRunsResource.d.ts +99 -0
  192. package/types/V2/Reporting/Reports.d.ts +120 -0
  193. package/types/V2/Reporting/ReportsResource.d.ts +30 -0
  194. package/types/V2/Tax/AutomaticRules.d.ts +53 -0
  195. package/types/V2/Tax/AutomaticRulesResource.d.ts +102 -0
  196. package/types/WebhookEndpointsResource.d.ts +2 -1
  197. package/types/Webhooks.d.ts +2 -0
  198. package/types/index.d.ts +125 -5
  199. package/types/lib.d.ts +1 -1
  200. package/types/test/typescriptTest.ts +3 -3
@@ -325,7 +325,7 @@ declare module 'stripe' {
325
325
  network_advice_code: string | null;
326
326
 
327
327
  /**
328
- * For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
328
+ * For charges declined by the network, an alphanumeric code which indicates the reason the charge failed.
329
329
  */
330
330
  network_decline_code: string | null;
331
331
 
@@ -335,7 +335,7 @@ declare module 'stripe' {
335
335
  network_status: string | null;
336
336
 
337
337
  /**
338
- * An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.
338
+ * An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges blocked because the payment is unlikely to be authorized have the value `low_probability_of_authorization`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.
339
339
  */
340
340
  reason: string | null;
341
341
 
@@ -661,10 +661,31 @@ declare module 'stripe' {
661
661
  transaction_id: string | null;
662
662
  }
663
663
 
664
- interface Alma {}
664
+ interface Alma {
665
+ installments?: Alma.Installments;
666
+
667
+ /**
668
+ * The Alma transaction ID associated with this payment.
669
+ */
670
+ transaction_id: string | null;
671
+ }
672
+
673
+ namespace Alma {
674
+ interface Installments {
675
+ /**
676
+ * The number of installments.
677
+ */
678
+ count: number;
679
+ }
680
+ }
665
681
 
666
682
  interface AmazonPay {
667
683
  funding?: AmazonPay.Funding;
684
+
685
+ /**
686
+ * The Amazon Pay transaction ID associated with this payment.
687
+ */
688
+ transaction_id: string | null;
668
689
  }
669
690
 
670
691
  namespace AmazonPay {
@@ -809,7 +830,12 @@ declare module 'stripe' {
809
830
  type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl';
810
831
  }
811
832
 
812
- interface Billie {}
833
+ interface Billie {
834
+ /**
835
+ * The Billie transaction ID associated with this payment.
836
+ */
837
+ transaction_id: string | null;
838
+ }
813
839
 
814
840
  interface Blik {
815
841
  /**
@@ -1906,6 +1932,11 @@ declare module 'stripe' {
1906
1932
  * A unique identifier for the buyer as determined by the local payment processor.
1907
1933
  */
1908
1934
  buyer_id: string | null;
1935
+
1936
+ /**
1937
+ * The Kakao Pay transaction ID associated with this payment.
1938
+ */
1939
+ transaction_id: string | null;
1909
1940
  }
1910
1941
 
1911
1942
  interface Klarna {
@@ -1980,6 +2011,11 @@ declare module 'stripe' {
1980
2011
  * The last four digits of the card. This may not be present for American Express cards.
1981
2012
  */
1982
2013
  last4: string | null;
2014
+
2015
+ /**
2016
+ * The Korean Card transaction ID associated with this payment.
2017
+ */
2018
+ transaction_id: string | null;
1983
2019
  }
1984
2020
 
1985
2021
  namespace KrCard {
@@ -2071,6 +2107,11 @@ declare module 'stripe' {
2071
2107
  * A unique identifier for the buyer as determined by the local payment processor.
2072
2108
  */
2073
2109
  buyer_id: string | null;
2110
+
2111
+ /**
2112
+ * The Naver Pay transaction ID associated with this payment.
2113
+ */
2114
+ transaction_id: string | null;
2074
2115
  }
2075
2116
 
2076
2117
  interface NzBankAccount {
@@ -2168,6 +2209,11 @@ declare module 'stripe' {
2168
2209
  * A unique identifier for the buyer as determined by the local payment processor.
2169
2210
  */
2170
2211
  buyer_id: string | null;
2212
+
2213
+ /**
2214
+ * The Payco transaction ID associated with this payment.
2215
+ */
2216
+ transaction_id: string | null;
2171
2217
  }
2172
2218
 
2173
2219
  interface Paynow {
@@ -2284,6 +2330,11 @@ declare module 'stripe' {
2284
2330
  * Unique transaction id generated by BCB
2285
2331
  */
2286
2332
  bank_transaction_id?: string | null;
2333
+
2334
+ /**
2335
+ * ID of the multi use Mandate generated by the PaymentIntent
2336
+ */
2337
+ mandate?: string;
2287
2338
  }
2288
2339
 
2289
2340
  interface Promptpay {
@@ -2299,6 +2350,11 @@ declare module 'stripe' {
2299
2350
 
2300
2351
  interface RevolutPay {
2301
2352
  funding?: RevolutPay.Funding;
2353
+
2354
+ /**
2355
+ * The Revolut Pay transaction ID associated with this payment.
2356
+ */
2357
+ transaction_id: string | null;
2302
2358
  }
2303
2359
 
2304
2360
  namespace RevolutPay {
@@ -2356,9 +2412,19 @@ declare module 'stripe' {
2356
2412
  * A unique identifier for the buyer as determined by the local payment processor.
2357
2413
  */
2358
2414
  buyer_id: string | null;
2415
+
2416
+ /**
2417
+ * The Samsung Pay transaction ID associated with this payment.
2418
+ */
2419
+ transaction_id: string | null;
2359
2420
  }
2360
2421
 
2361
- interface Satispay {}
2422
+ interface Satispay {
2423
+ /**
2424
+ * The Satispay transaction ID associated with this payment.
2425
+ */
2426
+ transaction_id: string | null;
2427
+ }
2362
2428
 
2363
2429
  interface SepaCreditTransfer {
2364
2430
  /**
@@ -67,6 +67,8 @@ declare module 'stripe' {
67
67
  */
68
68
  cancel_url: string | null;
69
69
 
70
+ checkout_items?: Array<Session.CheckoutItem>;
71
+
70
72
  /**
71
73
  * A unique string to reference the Checkout Session. This can be a
72
74
  * customer ID, a cart ID, or similar, and can be used to reconcile the
@@ -343,7 +345,7 @@ declare module 'stripe' {
343
345
  namespace Session {
344
346
  interface AdaptivePricing {
345
347
  /**
346
- * Whether Adaptive Pricing is enabled.
348
+ * If enabled, Adaptive Pricing is available on [eligible sessions](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing?payment-ui=stripe-hosted#restrictions).
347
349
  */
348
350
  enabled: boolean;
349
351
  }
@@ -425,6 +427,62 @@ declare module 'stripe' {
425
427
 
426
428
  type BillingAddressCollection = 'auto' | 'required';
427
429
 
430
+ interface CheckoutItem {
431
+ type: CheckoutItem.Type;
432
+
433
+ rate_card_subscription_item?: CheckoutItem.RateCardSubscriptionItem;
434
+
435
+ pricing_plan_subscription_item?: CheckoutItem.PricingPlanSubscriptionItem;
436
+ }
437
+
438
+ namespace CheckoutItem {
439
+ interface PricingPlanSubscriptionItem {
440
+ pricing_plan: string;
441
+
442
+ pricing_plan_version: string;
443
+
444
+ metadata: Stripe.Metadata;
445
+
446
+ component_configurations: {
447
+ [key: string]: PricingPlanSubscriptionItem.ComponentConfigurations;
448
+ };
449
+
450
+ pricing_plan_subscription?: string;
451
+
452
+ billing_cadence?: string;
453
+ }
454
+
455
+ namespace PricingPlanSubscriptionItem {
456
+ interface ComponentConfigurations {
457
+ type: 'license_fee_component';
458
+
459
+ license_fee_component?: ComponentConfigurations.LicenseFeeComponent;
460
+ }
461
+
462
+ namespace ComponentConfigurations {
463
+ interface LicenseFeeComponent {
464
+ quantity: number;
465
+ }
466
+ }
467
+ }
468
+
469
+ interface RateCardSubscriptionItem {
470
+ rate_card: string;
471
+
472
+ metadata: Stripe.Metadata;
473
+
474
+ rate_card_version: string;
475
+
476
+ billing_cadence?: string;
477
+
478
+ rate_card_subscription?: string;
479
+ }
480
+
481
+ type Type =
482
+ | 'rate_card_subscription_item'
483
+ | 'pricing_plan_subscription_item';
484
+ }
485
+
428
486
  interface CollectedInformation {
429
487
  /**
430
488
  * Customer's business name for this Checkout Session
@@ -2043,11 +2101,18 @@ declare module 'stripe' {
2043
2101
  }
2044
2102
 
2045
2103
  interface Pix {
2104
+ /**
2105
+ * Determines if the amount includes the IOF tax.
2106
+ */
2107
+ amount_includes_iof?: Pix.AmountIncludesIof;
2108
+
2046
2109
  /**
2047
2110
  * The number of seconds after which Pix payment will expire.
2048
2111
  */
2049
2112
  expires_after_seconds: number | null;
2050
2113
 
2114
+ mandate_options?: Pix.MandateOptions;
2115
+
2051
2116
  /**
2052
2117
  * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2053
2118
  *
@@ -2057,7 +2122,68 @@ declare module 'stripe' {
2057
2122
  *
2058
2123
  * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
2059
2124
  */
2060
- setup_future_usage?: 'none';
2125
+ setup_future_usage?: Pix.SetupFutureUsage;
2126
+ }
2127
+
2128
+ namespace Pix {
2129
+ type AmountIncludesIof = 'always' | 'never';
2130
+
2131
+ interface MandateOptions {
2132
+ /**
2133
+ * Amount to be charged for future payments.
2134
+ */
2135
+ amount?: number;
2136
+
2137
+ /**
2138
+ * Determines if the amount includes the IOF tax.
2139
+ */
2140
+ amount_includes_iof?: MandateOptions.AmountIncludesIof;
2141
+
2142
+ /**
2143
+ * Type of amount.
2144
+ */
2145
+ amount_type?: MandateOptions.AmountType;
2146
+
2147
+ /**
2148
+ * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
2149
+ */
2150
+ currency?: string;
2151
+
2152
+ /**
2153
+ * Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`.
2154
+ */
2155
+ end_date?: string;
2156
+
2157
+ /**
2158
+ * Schedule at which the future payments will be charged.
2159
+ */
2160
+ payment_schedule?: MandateOptions.PaymentSchedule;
2161
+
2162
+ /**
2163
+ * Subscription name displayed to buyers in their bank app.
2164
+ */
2165
+ reference?: string;
2166
+
2167
+ /**
2168
+ * Start date of the mandate, in `YYYY-MM-DD`.
2169
+ */
2170
+ start_date?: string;
2171
+ }
2172
+
2173
+ namespace MandateOptions {
2174
+ type AmountIncludesIof = 'always' | 'never';
2175
+
2176
+ type AmountType = 'fixed' | 'maximum';
2177
+
2178
+ type PaymentSchedule =
2179
+ | 'halfyearly'
2180
+ | 'monthly'
2181
+ | 'quarterly'
2182
+ | 'weekly'
2183
+ | 'yearly';
2184
+ }
2185
+
2186
+ type SetupFutureUsage = 'none' | 'off_session';
2061
2187
  }
2062
2188
 
2063
2189
  interface RevolutPay {
@@ -34,6 +34,8 @@ declare module 'stripe' {
34
34
  */
35
35
  cancel_url?: string;
36
36
 
37
+ checkout_items?: Array<SessionCreateParams.CheckoutItem>;
38
+
37
39
  /**
38
40
  * A unique string to reference the Checkout Session. This can be a
39
41
  * customer ID, a cart ID, or similar, and can be used to reconcile the
@@ -164,7 +166,7 @@ declare module 'stripe' {
164
166
  optional_items?: Array<SessionCreateParams.OptionalItem>;
165
167
 
166
168
  /**
167
- * Where the user is coming from. This informs the optimizations that are applied to the session. For example, a session originating from a mobile app may behave more like a native app, depending on the platform. This parameter is currently not allowed if `ui_mode` is `custom`.
169
+ * Where the user is coming from. This informs the optimizations that are applied to the session.
168
170
  */
169
171
  origin_context?: SessionCreateParams.OriginContext;
170
172
 
@@ -301,7 +303,7 @@ declare module 'stripe' {
301
303
  namespace SessionCreateParams {
302
304
  interface AdaptivePricing {
303
305
  /**
304
- * Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing).
306
+ * If set to `true`, Adaptive Pricing is available on [eligible sessions](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing?payment-ui=stripe-hosted#restrictions). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing).
305
307
  */
306
308
  enabled?: boolean;
307
309
  }
@@ -363,6 +365,54 @@ declare module 'stripe' {
363
365
 
364
366
  type BillingAddressCollection = 'auto' | 'required';
365
367
 
368
+ interface CheckoutItem {
369
+ type: CheckoutItem.Type;
370
+
371
+ rate_card_subscription_item?: CheckoutItem.RateCardSubscriptionItem;
372
+
373
+ pricing_plan_subscription_item?: CheckoutItem.PricingPlanSubscriptionItem;
374
+ }
375
+
376
+ namespace CheckoutItem {
377
+ interface PricingPlanSubscriptionItem {
378
+ pricing_plan: string;
379
+
380
+ pricing_plan_version?: string;
381
+
382
+ metadata?: Stripe.MetadataParam;
383
+
384
+ component_configurations?: {
385
+ [key: string]: PricingPlanSubscriptionItem.ComponentConfigurations;
386
+ };
387
+ }
388
+
389
+ namespace PricingPlanSubscriptionItem {
390
+ interface ComponentConfigurations {
391
+ type: 'license_fee_component';
392
+
393
+ license_fee_component?: ComponentConfigurations.LicenseFeeComponent;
394
+ }
395
+
396
+ namespace ComponentConfigurations {
397
+ interface LicenseFeeComponent {
398
+ quantity: number;
399
+ }
400
+ }
401
+ }
402
+
403
+ interface RateCardSubscriptionItem {
404
+ rate_card: string;
405
+
406
+ metadata?: Stripe.MetadataParam;
407
+
408
+ rate_card_version?: string;
409
+ }
410
+
411
+ type Type =
412
+ | 'rate_card_subscription_item'
413
+ | 'pricing_plan_subscription_item';
414
+ }
415
+
366
416
  interface ConsentCollection {
367
417
  /**
368
418
  * Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.
@@ -603,12 +653,55 @@ declare module 'stripe' {
603
653
  */
604
654
  coupon?: string;
605
655
 
656
+ /**
657
+ * Data used to generate a new [Coupon](https://stripe.com/docs/api/coupon) object inline. One of `coupon` or `coupon_data` is required when updating discounts.
658
+ */
659
+ coupon_data?: Discount.CouponData;
660
+
606
661
  /**
607
662
  * The ID of a promotion code to apply to this Session.
608
663
  */
609
664
  promotion_code?: string;
610
665
  }
611
666
 
667
+ namespace Discount {
668
+ interface CouponData {
669
+ /**
670
+ * A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
671
+ */
672
+ amount_off?: number;
673
+
674
+ /**
675
+ * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).
676
+ */
677
+ currency?: string;
678
+
679
+ /**
680
+ * Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
681
+ */
682
+ duration?: CouponData.Duration;
683
+
684
+ /**
685
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
686
+ */
687
+ metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
688
+
689
+ /**
690
+ * Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
691
+ */
692
+ name?: string;
693
+
694
+ /**
695
+ * A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).
696
+ */
697
+ percent_off?: number;
698
+ }
699
+
700
+ namespace CouponData {
701
+ type Duration = 'forever' | 'once' | 'repeating';
702
+ }
703
+ }
704
+
612
705
  interface InvoiceCreation {
613
706
  /**
614
707
  * Set to `true` to enable invoice creation.
@@ -2164,11 +2257,21 @@ declare module 'stripe' {
2164
2257
  }
2165
2258
 
2166
2259
  interface Pix {
2260
+ /**
2261
+ * Determines if the amount includes the IOF tax. Defaults to `never`.
2262
+ */
2263
+ amount_includes_iof?: Pix.AmountIncludesIof;
2264
+
2167
2265
  /**
2168
2266
  * The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
2169
2267
  */
2170
2268
  expires_after_seconds?: number;
2171
2269
 
2270
+ /**
2271
+ * Additional fields for mandate creation.
2272
+ */
2273
+ mandate_options?: Pix.MandateOptions;
2274
+
2172
2275
  /**
2173
2276
  * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2174
2277
  *
@@ -2178,7 +2281,68 @@ declare module 'stripe' {
2178
2281
  *
2179
2282
  * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
2180
2283
  */
2181
- setup_future_usage?: 'none';
2284
+ setup_future_usage?: Pix.SetupFutureUsage;
2285
+ }
2286
+
2287
+ namespace Pix {
2288
+ type AmountIncludesIof = 'always' | 'never';
2289
+
2290
+ interface MandateOptions {
2291
+ /**
2292
+ * Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
2293
+ */
2294
+ amount?: number;
2295
+
2296
+ /**
2297
+ * Determines if the amount includes the IOF tax. Defaults to `never`.
2298
+ */
2299
+ amount_includes_iof?: MandateOptions.AmountIncludesIof;
2300
+
2301
+ /**
2302
+ * Type of amount. Defaults to `maximum`.
2303
+ */
2304
+ amount_type?: MandateOptions.AmountType;
2305
+
2306
+ /**
2307
+ * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
2308
+ */
2309
+ currency?: string;
2310
+
2311
+ /**
2312
+ * Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
2313
+ */
2314
+ end_date?: string;
2315
+
2316
+ /**
2317
+ * Schedule at which the future payments will be charged. Defaults to `weekly`.
2318
+ */
2319
+ payment_schedule?: MandateOptions.PaymentSchedule;
2320
+
2321
+ /**
2322
+ * Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
2323
+ */
2324
+ reference?: string;
2325
+
2326
+ /**
2327
+ * Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
2328
+ */
2329
+ start_date?: string;
2330
+ }
2331
+
2332
+ namespace MandateOptions {
2333
+ type AmountIncludesIof = 'always' | 'never';
2334
+
2335
+ type AmountType = 'fixed' | 'maximum';
2336
+
2337
+ type PaymentSchedule =
2338
+ | 'halfyearly'
2339
+ | 'monthly'
2340
+ | 'quarterly'
2341
+ | 'weekly'
2342
+ | 'yearly';
2343
+ }
2344
+
2345
+ type SetupFutureUsage = 'none' | 'off_session';
2182
2346
  }
2183
2347
 
2184
2348
  interface RevolutPay {
@@ -158,7 +158,7 @@ declare module 'stripe' {
158
158
  amount_refunded?: number;
159
159
 
160
160
  /**
161
- * ID of an existing refund to link this credit note to.
161
+ * ID of an existing refund to link this credit note to. Required when `type` is `refund`.
162
162
  */
163
163
  refund?: string;
164
164
  }
@@ -385,7 +385,7 @@ declare module 'stripe' {
385
385
  amount_refunded?: number;
386
386
 
387
387
  /**
388
- * ID of an existing refund to link this credit note to.
388
+ * ID of an existing refund to link this credit note to. Required when `type` is `refund`.
389
389
  */
390
390
  refund?: string;
391
391
  }
@@ -554,7 +554,7 @@ declare module 'stripe' {
554
554
  amount_refunded?: number;
555
555
 
556
556
  /**
557
- * ID of an existing refund to link this credit note to.
557
+ * ID of an existing refund to link this credit note to. Required when `type` is `refund`.
558
558
  */
559
559
  refund?: string;
560
560
  }
@@ -89,7 +89,7 @@ declare module 'stripe' {
89
89
  smart_disputes?: Dispute.SmartDisputes;
90
90
 
91
91
  /**
92
- * Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`.
92
+ * The current status of a dispute. Possible values include:`warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, `lost`, or `prevented`.
93
93
  */
94
94
  status: Dispute.Status;
95
95
  }
@@ -479,7 +479,12 @@ declare module 'stripe' {
479
479
  }
480
480
 
481
481
  namespace Card {
482
- type CaseType = 'chargeback' | 'compliance' | 'inquiry';
482
+ type CaseType =
483
+ | 'block'
484
+ | 'chargeback'
485
+ | 'compliance'
486
+ | 'inquiry'
487
+ | 'resolution';
483
488
  }
484
489
 
485
490
  interface Klarna {