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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,113 @@
1
1
  # Changelog
2
2
 
3
+ ## 18.6.0-alpha.1 - 2025-08-27
4
+ * [#2393](https://github.com/stripe/stripe-node/pull/2393) Use the right API version 2025-08-27.preview
5
+ * [#2390](https://github.com/stripe/stripe-node/pull/2390) Update generated code for private-preview
6
+ * Add support for `attach_cadence` method on resource `Subscription`
7
+ * Add support for `currency` and `external_customer_id` on `Billing.AlertTriggered`
8
+ * Add support for `custom_pricing_unit` on `Billing.AlertTriggered`, `Billing.CreditBalanceSummary.balances[].available_balance`, `Billing.CreditBalanceSummary.balances[].ledger_balance`, `Billing.CreditBalanceTransaction.credit.amount`, `Billing.CreditBalanceTransaction.debit.amount`, `Billing.CreditGrant.amount`, and `Billing.CreditGrantCreateParams.amount`
9
+ * Add support for `customer` on `Billing.AlertListParams`
10
+ * Change type of `Billing.Alert.alert_type`, `Billing.AlertCreateParams.alert_type`, and `Billing.AlertListParams.alert_type` from `literal('usage_threshold')` to `enum('credit_balance_threshold'|'usage_threshold')`
11
+ * Add support for `credit_balance_threshold` on `Billing.AlertCreateParams` and `Billing.Alert`
12
+ * Add support for `billable_items` on `Billing.CreditBalanceSummaryRetrieveParams.filter.applicability_scope`, `Billing.CreditGrant.applicability_config.scope`, and `Billing.CreditGrantCreateParams.applicability_config.scope`
13
+ * Change type of `Billing.CreditBalanceSummary.balances[].available_balance.type`, `Billing.CreditBalanceSummary.balances[].ledger_balance.type`, `Billing.CreditBalanceTransaction.credit.amount.type`, `Billing.CreditBalanceTransaction.debit.amount.type`, `Billing.CreditGrant.amount.type`, and `Billing.CreditGrantCreateParams.amount.type` from `literal('monetary')` to `enum('custom_pricing_unit'|'monetary')`
14
+ * Add support for `license_fee_subscription_details` and `rate_card_subscription_details` on `InvoiceItem.parent` and `InvoiceLineItem.parent`
15
+ * Change type of `InvoiceItem.parent.type` from `literal('subscription_details')` to `enum('license_fee_subscription_details'|'rate_card_subscription_details'|'subscription_details')`
16
+ * Add support for `license_fee_details` and `rate_card_rate_details` on `InvoiceItem.pricing` and `InvoiceLineItem.pricing`
17
+ * Change type of `InvoiceItem.pricing.type` and `InvoiceLineItem.pricing.type` from `literal('price_details')` to `enum('license_fee_details'|'price_details'|'rate_card_rate_details')`
18
+ * Add support for `billing_cadence` on `InvoiceCreatePreviewParams`, `SubscriptionCreateParams`, and `Subscription`
19
+ * Add support for `billing_cadence_details` on `Invoice.parent` and `QuotePreviewInvoice.parent`
20
+ * Add support for new value `billing_cadence_details` on enums `Invoice.parent.type` and `QuotePreviewInvoice.parent.type`
21
+ * Add support for new values `license_fee_subscription_details` and `rate_card_subscription_details` on enum `InvoiceLineItem.parent.type`
22
+ * Add support for new resources `V2.Billing.BillSettingVersion`, `V2.Billing.BillSetting`, `V2.Billing.Cadence`, `V2.Billing.CollectionSettingVersion`, `V2.Billing.CollectionSetting`, `V2.Billing.CustomPricingUnit`, `V2.Billing.IntentAction`, `V2.Billing.Intent`, `V2.Billing.LicenseFeeSubscription`, `V2.Billing.LicenseFeeVersion`, `V2.Billing.LicenseFee`, `V2.Billing.LicensedItem`, `V2.Billing.MeteredItem`, `V2.Billing.PricingPlanComponent`, `V2.Billing.PricingPlanSubscription`, `V2.Billing.PricingPlanVersion`, `V2.Billing.PricingPlan`, `V2.Billing.Profile`, `V2.Billing.RateCardRate`, `V2.Billing.RateCardSubscription`, `V2.Billing.RateCardVersion`, `V2.Billing.RateCard`, `V2.Billing.ServiceAction`, `V2.Core.ClaimableSandbox`, `V2.Reporting.ReportRun`, `V2.Reporting.Report`, and `V2.Tax.AutomaticRule`
23
+ * Add support for `create`, `deactivate`, `find`, `retrieve`, and `update` methods on resource `V2.Tax.AutomaticRule`
24
+ * Add support for `create` and `retrieve` methods on resources `V2.Billing.ServiceAction` and `V2.Reporting.ReportRun`
25
+ * Add support for `retrieve` method on resources `V2.Billing.LicenseFeeSubscription` and `V2.Reporting.Report`
26
+ * Add support for `create` method on resources `V2.Core.ClaimableSandbox`
27
+ * Add support for `cancel`, `create`, `list`, `retrieve`, and `update` methods on resources `V2.Billing.Cadence` and `V2.Billing.RateCardSubscription`
28
+ * Add support for `create`, `list`, `retrieve`, and `update` methods on resources `V2.Billing.BillSetting`, `V2.Billing.CollectionSetting`, `V2.Billing.CustomPricingUnit`, `V2.Billing.LicenseFee`, `V2.Billing.LicensedItem`, `V2.Billing.MeteredItem`, `V2.Billing.PricingPlan`, `V2.Billing.Profile`, and `V2.Billing.RateCard`
29
+ * Add support for `list` and `retrieve` methods on resources `V2.Billing.BillSettingVersion`, `V2.Billing.CollectionSettingVersion`, `V2.Billing.IntentAction`, `V2.Billing.LicenseFeeVersion`, `V2.Billing.PricingPlanSubscription`, `V2.Billing.PricingPlanVersion`, and `V2.Billing.RateCardVersion`
30
+ * Add support for `create`, `del`, `list`, and `retrieve` methods on resource `V2.Billing.RateCardRate`
31
+ * Add support for `create`, `del`, `list`, `retrieve`, and `update` methods on resource `V2.Billing.PricingPlanComponent`
32
+ * Add support for `cancel`, `commit`, `create`, `list`, `release_reservation`, `reserve`, and `retrieve` methods on resource `V2.Billing.Intent`
33
+ * Add support for `changes` on `V2.Event`
34
+ * Add support for thin events `V2BillingCadenceBilledEvent`, `V2BillingCadenceCanceledEvent`, `V2BillingCadenceCreatedEvent`, and `V2BillingCadenceErroredEvent` with related object `V2.Billing.Cadence`
35
+ * Add support for thin events `V2BillingLicenseFeeCreatedEvent` and `V2BillingLicenseFeeUpdatedEvent` with related object `V2.Billing.LicenseFee`
36
+ * Add support for thin event `V2BillingLicenseFeeVersionCreatedEvent` with related object `V2.Billing.LicenseFeeVersion`
37
+ * Add support for thin events `V2BillingLicensedItemCreatedEvent` and `V2BillingLicensedItemUpdatedEvent` with related object `V2.Billing.LicensedItem`
38
+ * Add support for thin events `V2BillingMeteredItemCreatedEvent` and `V2BillingMeteredItemUpdatedEvent` with related object `V2.Billing.MeteredItem`
39
+ * Add support for thin events `V2BillingPricingPlanCreatedEvent` and `V2BillingPricingPlanUpdatedEvent` with related object `V2.Billing.PricingPlan`
40
+ * Add support for thin events `V2BillingPricingPlanComponentCreatedEvent` and `V2BillingPricingPlanComponentUpdatedEvent` with related object `V2.Billing.PricingPlanComponent`
41
+ * Add support for thin events `V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEvent`, `V2BillingPricingPlanSubscriptionCollectionCurrentEvent`, `V2BillingPricingPlanSubscriptionCollectionPastDueEvent`, `V2BillingPricingPlanSubscriptionCollectionPausedEvent`, `V2BillingPricingPlanSubscriptionCollectionUnpaidEvent`, `V2BillingPricingPlanSubscriptionServicingActivatedEvent`, `V2BillingPricingPlanSubscriptionServicingCanceledEvent`, and `V2BillingPricingPlanSubscriptionServicingPausedEvent` with related object `V2.Billing.PricingPlanSubscription`
42
+ * Add support for thin event `V2BillingPricingPlanVersionCreatedEvent` with related object `V2.Billing.PricingPlanVersion`
43
+ * Add support for thin events `V2BillingRateCardCreatedEvent` and `V2BillingRateCardUpdatedEvent` with related object `V2.Billing.RateCard`
44
+ * Add support for thin event `V2BillingRateCardRateCreatedEvent` with related object `V2.Billing.RateCardRate`
45
+ * Add support for thin events `V2BillingRateCardSubscriptionActivatedEvent`, `V2BillingRateCardSubscriptionCanceledEvent`, `V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEvent`, `V2BillingRateCardSubscriptionCollectionCurrentEvent`, `V2BillingRateCardSubscriptionCollectionPastDueEvent`, `V2BillingRateCardSubscriptionCollectionPausedEvent`, `V2BillingRateCardSubscriptionCollectionUnpaidEvent`, `V2BillingRateCardSubscriptionServicingActivatedEvent`, `V2BillingRateCardSubscriptionServicingCanceledEvent`, and `V2BillingRateCardSubscriptionServicingPausedEvent` with related object `V2.Billing.RateCardSubscription`
46
+ * Add support for thin event `V2BillingRateCardVersionCreatedEvent` with related object `V2.Billing.RateCardVersion`
47
+ * Add support for thin events `V2CoreHealthApiErrorFiringEvent`, `V2CoreHealthApiErrorResolvedEvent`, `V2CoreHealthApiLatencyFiringEvent`, `V2CoreHealthApiLatencyResolvedEvent`, `V2CoreHealthAuthorizationRateDropFiringEvent`, `V2CoreHealthAuthorizationRateDropResolvedEvent`, `V2CoreHealthEventGenerationFailureResolvedEvent`, `V2CoreHealthFraudRateIncreasedEvent`, `V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent`, `V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent`, `V2CoreHealthPaymentMethodErrorFiringEvent`, `V2CoreHealthPaymentMethodErrorResolvedEvent`, `V2CoreHealthTrafficVolumeDropFiringEvent`, `V2CoreHealthTrafficVolumeDropResolvedEvent`, `V2CoreHealthWebhookLatencyFiringEvent`, and `V2CoreHealthWebhookLatencyResolvedEvent`
48
+ * Add support for thin events `V2ReportingReportRunCreatedEvent`, `V2ReportingReportRunFailedEvent`, `V2ReportingReportRunSucceededEvent`, and `V2ReportingReportRunUpdatedEvent` with related object `V2.Reporting.ReportRun`
49
+ * Add support for error type `RateLimitError`
50
+
51
+ ## 18.6.0-beta.1 - 2025-08-27
52
+ This release changes the pinned API version to `2025-08-27.preview`.
53
+
54
+ * [#2381](https://github.com/stripe/stripe-node/pull/2381) Update generated code for beta
55
+ * Add support for `list` and `retrieve` methods on resource `InvoicePayment`
56
+ * Add support for `list` method on resource `Mandate`
57
+ * Add support for `applied` on `V2.Core.Account.configuration.customer`, `V2.Core.Account.configuration.merchant`, `V2.Core.Account.configuration.recipient`, `V2.Core.Account.configuration.storer`, `V2.Core.AccountUpdateParams.configuration.customer`, `V2.Core.AccountUpdateParams.configuration.merchant`, `V2.Core.AccountUpdateParams.configuration.recipient`, and `V2.Core.AccountUpdateParams.configuration.storer`
58
+ * Add support for new values `ao_nif`, `az_tin`, `bd_etin`, `cr_cpj`, `cr_nite`, `do_rcn`, `gt_nit`, `kz_bin`, `mz_nuit`, `pe_ruc`, `pk_ntn`, `sa_crn`, and `sa_tin` on enums `V2.Core.Account.identity.business_details.id_numbers[].type`, `V2.Core.AccountCreateParams.identity.business_details.id_numbers[].type`, and `V2.Core.AccountUpdateParams.identity.business_details.id_numbers[].type`
59
+ * Add support for new values `ao_nif`, `az_tin`, `bd_brc`, `bd_etin`, `bd_nid`, `cr_cpf`, `cr_dimex`, `cr_nite`, `do_rcn`, `gt_nit`, `kz_iin`, `mz_nuit`, `pe_dni`, `pk_cnic`, `pk_snic`, and `sa_tin` on enums `V2.Core.Account.identity.individual.id_numbers[].type`, `V2.Core.AccountCreateParams.identity.individual.id_numbers[].type`, `V2.Core.AccountUpdateParams.identity.individual.id_numbers[].type`, `V2.Core.Person.id_numbers[].type`, `V2.Core.PersonCreateParams.id_numbers[].type`, and `V2.Core.PersonUpdateParams.id_numbers[].type`
60
+ * Change type of `Billing.AlertTriggered.value` from `longInteger` to `decimal_string`
61
+ * Add support for `display_name` on `V2.MoneyManagement.FinancialAccountCreateParams` and `V2.MoneyManagement.FinancialAccount`
62
+ * Add support for new value `currency_conversion` on enums `V2.MoneyManagement.Transaction.category` and `V2.MoneyManagement.TransactionEntry.transaction_details.category`
63
+ * Add support for `currency_conversion` on `V2.MoneyManagement.Transaction.flow` and `V2.MoneyManagement.TransactionEntry.transaction_details.flow`
64
+ * Add support for new value `currency_conversion` on enums `V2.MoneyManagement.Transaction.flow.type` and `V2.MoneyManagement.TransactionEntry.transaction_details.flow.type`
65
+ * Add support for `payments` on `BalanceSettingUpdateParams` and `BalanceSettings`
66
+ * Remove support for `debit_negative_balances`, `payouts`, and `settlement_timing` on `BalanceSettingUpdateParams` and `BalanceSettings`
67
+ * Add support for `mandate` on `Charge.payment_method_details.pix`, `PaymentAttemptRecord.payment_method_details.pix`, and `PaymentRecord.payment_method_details.pix`
68
+ * Add support for `coupon_data` on `Checkout.SessionCreateParams.discounts[]`
69
+ * Add support for `mandate_options` on `Checkout.Session.payment_method_options.pix`, `Checkout.SessionCreateParams.payment_method_options.pix`, `PaymentIntent.payment_method_options.pix`, `PaymentIntentConfirmParams.payment_method_options.pix`, `PaymentIntentCreateParams.payment_method_options.pix`, and `PaymentIntentUpdateParams.payment_method_options.pix`
70
+ * Change type of `Checkout.Session.payment_method_options.pix.setup_future_usage`, `Checkout.SessionCreateParams.payment_method_options.pix.setup_future_usage`, `PaymentIntent.payment_method_options.pix.setup_future_usage`, `PaymentIntentConfirmParams.payment_method_options.pix.setup_future_usage`, `PaymentIntentCreateParams.payment_method_options.pix.setup_future_usage`, and `PaymentIntentUpdateParams.payment_method_options.pix.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`
71
+ * Add support for `amount` on `Mandate.multi_use`, `PaymentAttemptRecord`, and `PaymentRecord`
72
+ * Add support for `currency` on `Mandate.multi_use`
73
+ * Add support for `pix` on `Mandate.payment_method_details`, `SetupAttempt.payment_method_details`, `SetupIntent.payment_method_options`, `SetupIntentConfirmParams.payment_method_options`, `SetupIntentCreateParams.payment_method_options`, and `SetupIntentUpdateParams.payment_method_options`
74
+ * Add support for `limit` on `PaymentAttemptRecordListParams`
75
+ * Add support for `amount_authorized`, `amount_refunded`, and `application` on `PaymentAttemptRecord` and `PaymentRecord`
76
+ * Add support for `processor_details` on `PaymentAttemptRecord`, `PaymentRecordReportPaymentParams`, and `PaymentRecord`
77
+ * Remove support for `payment_reference` on `PaymentAttemptRecord`, `PaymentRecordReportPaymentParams`, and `PaymentRecord`
78
+ * Add support for `installments` on `PaymentAttemptRecord.payment_method_details.alma` and `PaymentRecord.payment_method_details.alma`
79
+ * Add support for `transaction_id` on `PaymentAttemptRecord.payment_method_details.alma`, `PaymentAttemptRecord.payment_method_details.amazon_pay`, `PaymentAttemptRecord.payment_method_details.billie`, `PaymentAttemptRecord.payment_method_details.kakao_pay`, `PaymentAttemptRecord.payment_method_details.kr_card`, `PaymentAttemptRecord.payment_method_details.naver_pay`, `PaymentAttemptRecord.payment_method_details.payco`, `PaymentAttemptRecord.payment_method_details.revolut_pay`, `PaymentAttemptRecord.payment_method_details.samsung_pay`, `PaymentAttemptRecord.payment_method_details.satispay`, `PaymentRecord.payment_method_details.alma`, `PaymentRecord.payment_method_details.amazon_pay`, `PaymentRecord.payment_method_details.billie`, `PaymentRecord.payment_method_details.kakao_pay`, `PaymentRecord.payment_method_details.kr_card`, `PaymentRecord.payment_method_details.naver_pay`, `PaymentRecord.payment_method_details.payco`, `PaymentRecord.payment_method_details.revolut_pay`, `PaymentRecord.payment_method_details.samsung_pay`, and `PaymentRecord.payment_method_details.satispay`
80
+ * Add support for `location` and `reader` on `PaymentAttemptRecord.payment_method_details.paynow` and `PaymentRecord.payment_method_details.paynow`
81
+ * Add support for `latest_active_mandate` on `PaymentMethod`
82
+ * Change `Payout.payout_method` to be required
83
+ * Add support for `metadata` and `period` on `QuotePreviewSubscriptionSchedule.phases[].add_invoice_items[]`
84
+ * Add support for `pix_display_qr_code` on `SetupIntent.next_action`
85
+ * Add support for `reader_security` on `Terminal.ConfigurationCreateParams`, `Terminal.ConfigurationUpdateParams`, and `Terminal.Configuration`
86
+ * Add support for error codes `customer_session_expired` and `india_recurring_payment_mandate_canceled` on `QuotePreviewInvoice.last_finalization_error`
87
+
88
+ ## 18.5.0 - 2025-08-27
89
+ * [#2392](https://github.com/stripe/stripe-node/pull/2392) Add section on private preview SDKs in readme
90
+ * [#2384](https://github.com/stripe/stripe-node/pull/2384) Update generated code. This release changes the pinned API version to `2025-08-27.basil`.
91
+ * Add support for `balance_report`, `payout_details`, and `payout_reconciliation_report` on `AccountSession.components` and `AccountSessionCreateParams.components`
92
+ * Add support for `name` on `BillingPortal.ConfigurationCreateParams`, `BillingPortal.ConfigurationUpdateParams`, and `BillingPortal.Configuration`
93
+ * Add support for `installments` on `Charge.payment_method_details.alma`
94
+ * Add support for `transaction_id` on `Charge.payment_method_details.alma`, `Charge.payment_method_details.amazon_pay`, `Charge.payment_method_details.billie`, `Charge.payment_method_details.kakao_pay`, `Charge.payment_method_details.kr_card`, `Charge.payment_method_details.naver_pay`, `Charge.payment_method_details.payco`, `Charge.payment_method_details.revolut_pay`, `Charge.payment_method_details.samsung_pay`, and `Charge.payment_method_details.satispay`
95
+ * Add support for `location` and `reader` on `Charge.payment_method_details.paynow`
96
+ * Add support for `amount_includes_iof` on `Checkout.Session.payment_method_options.pix`, `Checkout.SessionCreateParams.payment_method_options.pix`, `PaymentIntent.payment_method_options.pix`, `PaymentIntentConfirmParams.payment_method_options.pix`, `PaymentIntentCreateParams.payment_method_options.pix`, and `PaymentIntentUpdateParams.payment_method_options.pix`
97
+ * Add support for new values `block` and `resolution` on enum `Dispute.payment_method_details.card.case_type`
98
+ * Add support for new value `terminal_android_apk` on enums `File.purpose` and `FileListParams.purpose`
99
+ * Add support for new value `terminal_android_apk` on enum `FileCreateParams.purpose`
100
+ * Add support for `metadata` and `period` on `InvoiceCreatePreviewParams.schedule_details.phases[].add_invoice_items[]`, `SubscriptionCreateParams.add_invoice_items[]`, `SubscriptionSchedule.phases[].add_invoice_items[]`, `SubscriptionScheduleCreateParams.phases[].add_invoice_items[]`, `SubscriptionScheduleUpdateParams.phases[].add_invoice_items[]`, and `SubscriptionUpdateParams.add_invoice_items[]`
101
+ * Add support for `exp_month` and `exp_year` on `Issuing.CardCreateParams`
102
+ * Add support for `excluded_payment_method_types` on `PaymentIntentCreateParams` and `PaymentIntent`
103
+ * Add support for `payout_method` on `PayoutCreateParams` and `Payout`
104
+ * Add support for `mxn` on `Terminal.Configuration.tipping`, `Terminal.ConfigurationCreateParams.tipping`, and `Terminal.ConfigurationUpdateParams.tipping`
105
+ * Add support for `card` on `Terminal.ReaderPresentPaymentMethodParams.testHelpers`
106
+ * Add support for new value `card` on enum `Terminal.ReaderPresentPaymentMethodParams.testHelpers.type`
107
+ * Add support for new value `2025-08-27.basil` on enum `WebhookEndpointCreateParams.api_version`
108
+ * Add support for error codes `customer_session_expired` and `india_recurring_payment_mandate_canceled` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
109
+ * [#2389](https://github.com/stripe/stripe-node/pull/2389) fix(example): expires_at is in milliseconds
110
+
3
111
  ## 18.5.0-beta.2 - 2025-08-06
4
112
  * [#2383](https://github.com/stripe/stripe-node/pull/2383) Bring back GA invoice payments APIs that were missing in the public preview SDKs
5
113
  * Add support for new resource `InvoicePayment`
package/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v1868
1
+ f4b80890ea17e89a543a77a389f29ca9be6fe615
package/README.md CHANGED
@@ -528,7 +528,7 @@ const stripe = new Stripe('sk_test_...', {
528
528
  Stripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-beta.X` suffix like `15.2.0-beta.2`.
529
529
  We would love for you to try these as we incrementally release new features and improve them based on your feedback.
530
530
 
531
- To install, choose the version that includes support for the preview feature you are interested in by reviewing the [releases page](https://github.com/stripe/stripe-node/releases/) and use it in the below command
531
+ To install, pick the latest version with the `beta` suffix by reviewing the [releases page](https://github.com/stripe/stripe-node/releases/) and use it in the below command
532
532
 
533
533
  ```
534
534
  npm install stripe@<replace-with-the-version-of-your-choice> --save
@@ -537,8 +537,6 @@ npm install stripe@<replace-with-the-version-of-your-choice> --save
537
537
  > **Note**
538
538
  > There can be breaking changes between two versions of the public preview SDKs without a bump in the major version. Therefore we recommend pinning the package version to a specific version in your package.json file. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest public preview SDK.
539
539
 
540
- The versions tab on the [stripe page on npm](https://www.npmjs.com/package/stripe) lists the current tags in use. The `beta` tag here corresponds to the the latest public preview SDK.
541
-
542
540
  Some preview features require a name and version to be set in the `Stripe-Version` header like `feature_beta=v3`. If your preview feature has this requirement, use the `apiVersion` property of `config` object to set it:
543
541
 
544
542
  ```js
@@ -547,6 +545,10 @@ const stripe = new Stripe('sk_test_...', {
547
545
  });
548
546
  ```
549
547
 
548
+ ### Private Preview SDKs
549
+
550
+ Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `15.2.0-alpha.2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-node?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`.
551
+
550
552
  ### Custom requests
551
553
 
552
554
  If you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `rawRequest` method on the StripeClient object.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 18.5.0-beta.2
1
+ 18.6.0-alpha.1
package/cjs/Error.js CHANGED
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable camelcase */
3
3
  /* eslint-disable no-warning-comments */
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.InvalidPaymentMethodError = exports.ControlledByDashboardError = exports.InvalidPayoutMethodError = exports.RecipientNotNotifiableError = exports.QuotaExceededError = exports.InsufficientFundsError = exports.NotCancelableError = exports.AlreadyCanceledError = exports.BlockedByStripeError = exports.FinancialAccountNotOpenError = exports.FeatureNotEnabledError = exports.AlreadyExistsError = exports.NonZeroBalanceError = exports.TemporarySessionExpiredError = exports.StripeUnknownError = exports.StripeInvalidGrantError = exports.StripeIdempotencyError = exports.StripeSignatureVerificationError = exports.StripeConnectionError = exports.StripeRateLimitError = exports.StripePermissionError = exports.StripeAuthenticationError = exports.StripeAPIError = exports.StripeInvalidRequestError = exports.StripeCardError = exports.StripeError = exports.generateV2Error = exports.generateV1Error = void 0;
5
+ exports.TemporarySessionExpiredError = exports.RecipientNotNotifiableError = exports.RateLimitError = exports.QuotaExceededError = exports.NotCancelableError = exports.NonZeroBalanceError = exports.InvalidPayoutMethodError = exports.InvalidPaymentMethodError = exports.InsufficientFundsError = exports.FinancialAccountNotOpenError = exports.FeatureNotEnabledError = exports.ControlledByDashboardError = exports.BlockedByStripeError = exports.AlreadyExistsError = exports.AlreadyCanceledError = exports.StripeUnknownError = exports.StripeInvalidGrantError = exports.StripeIdempotencyError = exports.StripeSignatureVerificationError = exports.StripeConnectionError = exports.StripeRateLimitError = exports.StripePermissionError = exports.StripeAuthenticationError = exports.StripeAPIError = exports.StripeInvalidRequestError = exports.StripeCardError = exports.StripeError = exports.generateV2Error = exports.generateV1Error = void 0;
6
6
  const generateV1Error = (rawStripeError) => {
7
7
  switch (rawStripeError.type) {
8
8
  case 'card_error':
@@ -28,34 +28,36 @@ exports.generateV1Error = generateV1Error;
28
28
  const generateV2Error = (rawStripeError) => {
29
29
  switch (rawStripeError.type) {
30
30
  // switchCases: The beginning of the section generated from our OpenAPI spec
31
- case 'temporary_session_expired':
32
- return new TemporarySessionExpiredError(rawStripeError);
33
- case 'non_zero_balance':
34
- return new NonZeroBalanceError(rawStripeError);
31
+ case 'already_canceled':
32
+ return new AlreadyCanceledError(rawStripeError);
35
33
  case 'already_exists':
36
34
  return new AlreadyExistsError(rawStripeError);
35
+ case 'blocked_by_stripe':
36
+ return new BlockedByStripeError(rawStripeError);
37
+ case 'controlled_by_dashboard':
38
+ return new ControlledByDashboardError(rawStripeError);
37
39
  case 'feature_not_enabled':
38
40
  return new FeatureNotEnabledError(rawStripeError);
39
41
  case 'financial_account_not_open':
40
42
  return new FinancialAccountNotOpenError(rawStripeError);
41
- case 'blocked_by_stripe':
42
- return new BlockedByStripeError(rawStripeError);
43
- case 'already_canceled':
44
- return new AlreadyCanceledError(rawStripeError);
45
- case 'not_cancelable':
46
- return new NotCancelableError(rawStripeError);
47
43
  case 'insufficient_funds':
48
44
  return new InsufficientFundsError(rawStripeError);
45
+ case 'invalid_payment_method':
46
+ return new InvalidPaymentMethodError(rawStripeError);
47
+ case 'invalid_payout_method':
48
+ return new InvalidPayoutMethodError(rawStripeError);
49
+ case 'non_zero_balance':
50
+ return new NonZeroBalanceError(rawStripeError);
51
+ case 'not_cancelable':
52
+ return new NotCancelableError(rawStripeError);
49
53
  case 'quota_exceeded':
50
54
  return new QuotaExceededError(rawStripeError);
55
+ case 'rate_limit':
56
+ return new RateLimitError(rawStripeError);
51
57
  case 'recipient_not_notifiable':
52
58
  return new RecipientNotNotifiableError(rawStripeError);
53
- case 'invalid_payout_method':
54
- return new InvalidPayoutMethodError(rawStripeError);
55
- case 'controlled_by_dashboard':
56
- return new ControlledByDashboardError(rawStripeError);
57
- case 'invalid_payment_method':
58
- return new InvalidPaymentMethodError(rawStripeError);
59
+ case 'temporary_session_expired':
60
+ return new TemporarySessionExpiredError(rawStripeError);
59
61
  // switchCases: The end of the section generated from our OpenAPI spec
60
62
  }
61
63
  // Special handling for requests with missing required fields in V2 APIs.
@@ -220,24 +222,30 @@ class StripeUnknownError extends StripeError {
220
222
  }
221
223
  exports.StripeUnknownError = StripeUnknownError;
222
224
  // classDefinitions: The beginning of the section generated from our OpenAPI spec
223
- class TemporarySessionExpiredError extends StripeError {
224
- constructor(rawStripeError = {}) {
225
- super(rawStripeError, 'TemporarySessionExpiredError');
226
- }
227
- }
228
- exports.TemporarySessionExpiredError = TemporarySessionExpiredError;
229
- class NonZeroBalanceError extends StripeError {
225
+ class AlreadyCanceledError extends StripeError {
230
226
  constructor(rawStripeError = {}) {
231
- super(rawStripeError, 'NonZeroBalanceError');
227
+ super(rawStripeError, 'AlreadyCanceledError');
232
228
  }
233
229
  }
234
- exports.NonZeroBalanceError = NonZeroBalanceError;
230
+ exports.AlreadyCanceledError = AlreadyCanceledError;
235
231
  class AlreadyExistsError extends StripeError {
236
232
  constructor(rawStripeError = {}) {
237
233
  super(rawStripeError, 'AlreadyExistsError');
238
234
  }
239
235
  }
240
236
  exports.AlreadyExistsError = AlreadyExistsError;
237
+ class BlockedByStripeError extends StripeError {
238
+ constructor(rawStripeError = {}) {
239
+ super(rawStripeError, 'BlockedByStripeError');
240
+ }
241
+ }
242
+ exports.BlockedByStripeError = BlockedByStripeError;
243
+ class ControlledByDashboardError extends StripeError {
244
+ constructor(rawStripeError = {}) {
245
+ super(rawStripeError, 'ControlledByDashboardError');
246
+ }
247
+ }
248
+ exports.ControlledByDashboardError = ControlledByDashboardError;
241
249
  class FeatureNotEnabledError extends StripeError {
242
250
  constructor(rawStripeError = {}) {
243
251
  super(rawStripeError, 'FeatureNotEnabledError');
@@ -250,60 +258,60 @@ class FinancialAccountNotOpenError extends StripeError {
250
258
  }
251
259
  }
252
260
  exports.FinancialAccountNotOpenError = FinancialAccountNotOpenError;
253
- class BlockedByStripeError extends StripeError {
261
+ class InsufficientFundsError extends StripeError {
254
262
  constructor(rawStripeError = {}) {
255
- super(rawStripeError, 'BlockedByStripeError');
263
+ super(rawStripeError, 'InsufficientFundsError');
256
264
  }
257
265
  }
258
- exports.BlockedByStripeError = BlockedByStripeError;
259
- class AlreadyCanceledError extends StripeError {
266
+ exports.InsufficientFundsError = InsufficientFundsError;
267
+ class InvalidPaymentMethodError extends StripeError {
268
+ constructor(rawStripeError) {
269
+ super(rawStripeError, 'InvalidPaymentMethodError');
270
+ // @ts-ignore
271
+ this.invalid_param = this.raw.invalid_param;
272
+ }
273
+ }
274
+ exports.InvalidPaymentMethodError = InvalidPaymentMethodError;
275
+ class InvalidPayoutMethodError extends StripeError {
260
276
  constructor(rawStripeError = {}) {
261
- super(rawStripeError, 'AlreadyCanceledError');
277
+ super(rawStripeError, 'InvalidPayoutMethodError');
262
278
  }
263
279
  }
264
- exports.AlreadyCanceledError = AlreadyCanceledError;
265
- class NotCancelableError extends StripeError {
280
+ exports.InvalidPayoutMethodError = InvalidPayoutMethodError;
281
+ class NonZeroBalanceError extends StripeError {
266
282
  constructor(rawStripeError = {}) {
267
- super(rawStripeError, 'NotCancelableError');
283
+ super(rawStripeError, 'NonZeroBalanceError');
268
284
  }
269
285
  }
270
- exports.NotCancelableError = NotCancelableError;
271
- class InsufficientFundsError extends StripeError {
286
+ exports.NonZeroBalanceError = NonZeroBalanceError;
287
+ class NotCancelableError extends StripeError {
272
288
  constructor(rawStripeError = {}) {
273
- super(rawStripeError, 'InsufficientFundsError');
289
+ super(rawStripeError, 'NotCancelableError');
274
290
  }
275
291
  }
276
- exports.InsufficientFundsError = InsufficientFundsError;
292
+ exports.NotCancelableError = NotCancelableError;
277
293
  class QuotaExceededError extends StripeError {
278
294
  constructor(rawStripeError = {}) {
279
295
  super(rawStripeError, 'QuotaExceededError');
280
296
  }
281
297
  }
282
298
  exports.QuotaExceededError = QuotaExceededError;
283
- class RecipientNotNotifiableError extends StripeError {
299
+ class RateLimitError extends StripeError {
284
300
  constructor(rawStripeError = {}) {
285
- super(rawStripeError, 'RecipientNotNotifiableError');
301
+ super(rawStripeError, 'RateLimitError');
286
302
  }
287
303
  }
288
- exports.RecipientNotNotifiableError = RecipientNotNotifiableError;
289
- class InvalidPayoutMethodError extends StripeError {
304
+ exports.RateLimitError = RateLimitError;
305
+ class RecipientNotNotifiableError extends StripeError {
290
306
  constructor(rawStripeError = {}) {
291
- super(rawStripeError, 'InvalidPayoutMethodError');
307
+ super(rawStripeError, 'RecipientNotNotifiableError');
292
308
  }
293
309
  }
294
- exports.InvalidPayoutMethodError = InvalidPayoutMethodError;
295
- class ControlledByDashboardError extends StripeError {
310
+ exports.RecipientNotNotifiableError = RecipientNotNotifiableError;
311
+ class TemporarySessionExpiredError extends StripeError {
296
312
  constructor(rawStripeError = {}) {
297
- super(rawStripeError, 'ControlledByDashboardError');
298
- }
299
- }
300
- exports.ControlledByDashboardError = ControlledByDashboardError;
301
- class InvalidPaymentMethodError extends StripeError {
302
- constructor(rawStripeError) {
303
- super(rawStripeError, 'InvalidPaymentMethodError');
304
- // @ts-ignore
305
- this.invalid_param = this.raw.invalid_param;
313
+ super(rawStripeError, 'TemporarySessionExpiredError');
306
314
  }
307
315
  }
308
- exports.InvalidPaymentMethodError = InvalidPaymentMethodError;
316
+ exports.TemporarySessionExpiredError = TemporarySessionExpiredError;
309
317
  // classDefinitions: The end of the section generated from our OpenAPI spec
@@ -285,7 +285,7 @@ class RequestSender {
285
285
  }
286
286
  }
287
287
  }
288
- _rawRequest(method, path, params, options) {
288
+ _rawRequest(method, path, params, options, usage) {
289
289
  const requestPromise = new Promise((resolve, reject) => {
290
290
  let opts;
291
291
  try {
@@ -313,7 +313,8 @@ class RequestSender {
313
313
  host: calculatedOptions.host,
314
314
  streaming: !!calculatedOptions.streaming,
315
315
  settings: {},
316
- usage: ['raw_request'],
316
+ // If used internally for a non raw_request, overwrite the usage
317
+ usage: usage || ['raw_request'],
317
318
  };
318
319
  }
319
320
  catch (err) {
@@ -417,6 +418,7 @@ class RequestSender {
417
418
  }
418
419
  requestData = data;
419
420
  this._stripe.getClientUserAgent((clientUserAgent) => {
421
+ var _a, _b;
420
422
  const apiVersion = this._stripe.getApiField('version');
421
423
  const headers = this._makeHeaders({
422
424
  contentType: apiMode == 'v2'
@@ -426,8 +428,9 @@ class RequestSender {
426
428
  apiVersion: apiVersion,
427
429
  clientUserAgent,
428
430
  method,
429
- userSuppliedHeaders: options.headers,
430
- userSuppliedSettings: options.settings,
431
+ // other callers expect null, but .headers being optional means it's undefined if not supplied. So we normalize to null.
432
+ userSuppliedHeaders: (_a = options.headers) !== null && _a !== void 0 ? _a : null,
433
+ userSuppliedSettings: (_b = options.settings) !== null && _b !== void 0 ? _b : {},
431
434
  stripeAccount: apiMode == 'v2' ? null : this._stripe.getApiField('stripeAccount'),
432
435
  stripeContext: apiMode == 'v2' ? this._stripe.getApiField('stripeContext') : null,
433
436
  apiMode: apiMode,
package/cjs/apiVersion.js CHANGED
@@ -2,4 +2,4 @@
2
2
  // File generated from our OpenAPI spec
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.ApiVersion = void 0;
5
- exports.ApiVersion = '2025-07-30.preview';
5
+ exports.ApiVersion = '2025-08-27.preview';
@@ -6,4 +6,9 @@ const StripeResource_js_1 = require("../StripeResource.js");
6
6
  const stripeMethod = StripeResource_js_1.StripeResource.method;
7
7
  exports.Mandates = StripeResource_js_1.StripeResource.extend({
8
8
  retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/mandates/{mandate}' }),
9
+ list: stripeMethod({
10
+ method: 'GET',
11
+ fullPath: '/v1/mandates',
12
+ methodType: 'list',
13
+ }),
9
14
  });
@@ -19,6 +19,10 @@ exports.Subscriptions = StripeResource_js_1.StripeResource.extend({
19
19
  fullPath: '/v1/subscriptions',
20
20
  methodType: 'list',
21
21
  }),
22
+ attachCadence: stripeMethod({
23
+ method: 'POST',
24
+ fullPath: '/v1/subscriptions/{subscription}/attach_cadence',
25
+ }),
22
26
  cancel: stripeMethod({
23
27
  method: 'DELETE',
24
28
  fullPath: '/v1/subscriptions/{subscription_exposed_id}',
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Versions = void 0;
5
+ const StripeResource_js_1 = require("../../../../StripeResource.js");
6
+ const stripeMethod = StripeResource_js_1.StripeResource.method;
7
+ exports.Versions = StripeResource_js_1.StripeResource.extend({
8
+ retrieve: stripeMethod({
9
+ method: 'GET',
10
+ fullPath: '/v2/billing/bill_settings/{bill_setting_id}/versions/{id}',
11
+ }),
12
+ list: stripeMethod({
13
+ method: 'GET',
14
+ fullPath: '/v2/billing/bill_settings/{bill_setting_id}/versions',
15
+ methodType: 'list',
16
+ }),
17
+ });
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.BillSettings = void 0;
5
+ const StripeResource_js_1 = require("../../../StripeResource.js");
6
+ const Versions_js_1 = require("./BillSettings/Versions.js");
7
+ const stripeMethod = StripeResource_js_1.StripeResource.method;
8
+ exports.BillSettings = StripeResource_js_1.StripeResource.extend({
9
+ constructor: function (...args) {
10
+ StripeResource_js_1.StripeResource.apply(this, args);
11
+ this.versions = new Versions_js_1.Versions(...args);
12
+ },
13
+ create: stripeMethod({ method: 'POST', fullPath: '/v2/billing/bill_settings' }),
14
+ retrieve: stripeMethod({
15
+ method: 'GET',
16
+ fullPath: '/v2/billing/bill_settings/{id}',
17
+ }),
18
+ update: stripeMethod({
19
+ method: 'POST',
20
+ fullPath: '/v2/billing/bill_settings/{id}',
21
+ }),
22
+ list: stripeMethod({
23
+ method: 'GET',
24
+ fullPath: '/v2/billing/bill_settings',
25
+ methodType: 'list',
26
+ }),
27
+ });
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Cadences = void 0;
5
+ const StripeResource_js_1 = require("../../../StripeResource.js");
6
+ const stripeMethod = StripeResource_js_1.StripeResource.method;
7
+ exports.Cadences = StripeResource_js_1.StripeResource.extend({
8
+ create: stripeMethod({ method: 'POST', fullPath: '/v2/billing/cadences' }),
9
+ retrieve: stripeMethod({
10
+ method: 'GET',
11
+ fullPath: '/v2/billing/cadences/{id}',
12
+ }),
13
+ update: stripeMethod({ method: 'POST', fullPath: '/v2/billing/cadences/{id}' }),
14
+ list: stripeMethod({
15
+ method: 'GET',
16
+ fullPath: '/v2/billing/cadences',
17
+ methodType: 'list',
18
+ }),
19
+ cancel: stripeMethod({
20
+ method: 'POST',
21
+ fullPath: '/v2/billing/cadences/{id}/cancel',
22
+ }),
23
+ });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Versions = void 0;
5
+ const StripeResource_js_1 = require("../../../../StripeResource.js");
6
+ const stripeMethod = StripeResource_js_1.StripeResource.method;
7
+ exports.Versions = StripeResource_js_1.StripeResource.extend({
8
+ retrieve: stripeMethod({
9
+ method: 'GET',
10
+ fullPath: '/v2/billing/collection_settings/{collection_setting_id}/versions/{id}',
11
+ }),
12
+ list: stripeMethod({
13
+ method: 'GET',
14
+ fullPath: '/v2/billing/collection_settings/{collection_setting_id}/versions',
15
+ methodType: 'list',
16
+ }),
17
+ });
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CollectionSettings = void 0;
5
+ const StripeResource_js_1 = require("../../../StripeResource.js");
6
+ const Versions_js_1 = require("./CollectionSettings/Versions.js");
7
+ const stripeMethod = StripeResource_js_1.StripeResource.method;
8
+ exports.CollectionSettings = StripeResource_js_1.StripeResource.extend({
9
+ constructor: function (...args) {
10
+ StripeResource_js_1.StripeResource.apply(this, args);
11
+ this.versions = new Versions_js_1.Versions(...args);
12
+ },
13
+ create: stripeMethod({
14
+ method: 'POST',
15
+ fullPath: '/v2/billing/collection_settings',
16
+ }),
17
+ retrieve: stripeMethod({
18
+ method: 'GET',
19
+ fullPath: '/v2/billing/collection_settings/{id}',
20
+ }),
21
+ update: stripeMethod({
22
+ method: 'POST',
23
+ fullPath: '/v2/billing/collection_settings/{id}',
24
+ }),
25
+ list: stripeMethod({
26
+ method: 'GET',
27
+ fullPath: '/v2/billing/collection_settings',
28
+ methodType: 'list',
29
+ }),
30
+ });
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CustomPricingUnits = void 0;
5
+ const StripeResource_js_1 = require("../../../StripeResource.js");
6
+ const stripeMethod = StripeResource_js_1.StripeResource.method;
7
+ exports.CustomPricingUnits = StripeResource_js_1.StripeResource.extend({
8
+ create: stripeMethod({
9
+ method: 'POST',
10
+ fullPath: '/v2/billing/custom_pricing_units',
11
+ }),
12
+ retrieve: stripeMethod({
13
+ method: 'GET',
14
+ fullPath: '/v2/billing/custom_pricing_units/{id}',
15
+ }),
16
+ update: stripeMethod({
17
+ method: 'POST',
18
+ fullPath: '/v2/billing/custom_pricing_units/{id}',
19
+ }),
20
+ list: stripeMethod({
21
+ method: 'GET',
22
+ fullPath: '/v2/billing/custom_pricing_units',
23
+ methodType: 'list',
24
+ }),
25
+ });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Actions = void 0;
5
+ const StripeResource_js_1 = require("../../../../StripeResource.js");
6
+ const stripeMethod = StripeResource_js_1.StripeResource.method;
7
+ exports.Actions = StripeResource_js_1.StripeResource.extend({
8
+ retrieve: stripeMethod({
9
+ method: 'GET',
10
+ fullPath: '/v2/billing/intents/{intent_id}/actions/{id}',
11
+ }),
12
+ list: stripeMethod({
13
+ method: 'GET',
14
+ fullPath: '/v2/billing/intents/{intent_id}/actions',
15
+ methodType: 'list',
16
+ }),
17
+ });
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Intents = void 0;
5
+ const StripeResource_js_1 = require("../../../StripeResource.js");
6
+ const Actions_js_1 = require("./Intents/Actions.js");
7
+ const stripeMethod = StripeResource_js_1.StripeResource.method;
8
+ exports.Intents = StripeResource_js_1.StripeResource.extend({
9
+ constructor: function (...args) {
10
+ StripeResource_js_1.StripeResource.apply(this, args);
11
+ this.actions = new Actions_js_1.Actions(...args);
12
+ },
13
+ create: stripeMethod({ method: 'POST', fullPath: '/v2/billing/intents' }),
14
+ retrieve: stripeMethod({ method: 'GET', fullPath: '/v2/billing/intents/{id}' }),
15
+ list: stripeMethod({
16
+ method: 'GET',
17
+ fullPath: '/v2/billing/intents',
18
+ methodType: 'list',
19
+ }),
20
+ cancel: stripeMethod({
21
+ method: 'POST',
22
+ fullPath: '/v2/billing/intents/{id}/cancel',
23
+ }),
24
+ commit: stripeMethod({
25
+ method: 'POST',
26
+ fullPath: '/v2/billing/intents/{id}/commit',
27
+ }),
28
+ releaseReservation: stripeMethod({
29
+ method: 'POST',
30
+ fullPath: '/v2/billing/intents/{id}/release_reservation',
31
+ }),
32
+ reserve: stripeMethod({
33
+ method: 'POST',
34
+ fullPath: '/v2/billing/intents/{id}/reserve',
35
+ }),
36
+ });