Skip to content

Migration guide for v42

Richard Marmorstein edited this page Aug 17, 2023 · 8 revisions

Changes in 42.0.0 - 2023-08-16

New API Version

In v41.0.0, stripe-dotnet is now pinned to Stripe API version 2023-08-16. When upgrading, please read the API upgrade guide and review each item to determine if changes are necessary for your integration to become compatible with 2023-08-16.

Of particular note: Stripe has changed the defaults that apply when you use a PaymentIntent or SetupIntent without specifying the payment_method_types parameter. Read more about this change here, and carefully review any of your code that calls PaymentIntent or SetupIntent APIs to see if you are affected.

"⚠️" symbol highlights breaking changes.

Removals

  • ⚠️Remove deprecated constants from Event.
  • ⚠️Remove support for AvailableOn on BalanceTransactionListOptions
    • Use of this parameter is discouraged. You may use .AddExtraParam if sending the parameter is still required.
  • ⚠️Remove support for Destination on Charge
    • Please use TransferData or OnBehalfOf instead.
  • ⚠️Remove support for ShippingRates on Checkout.SessionCreateOptions
    • Please use ShippingOptions instead.
  • ⚠️Remove support for Coupon and TrialFromPlan on CheckoutSessionSubscriptionDataOptions
  • ⚠️Remove support for Blik on MandatePaymentMethodDetails, PaymentMethodUpdateOptions, SetupAttemptPaymentMethodDetails, SetupIntentPaymentMethodOptionsOptions, and SetupIntentPaymentMethodOptions
    • These fields were mistakenly released.
  • ⚠️Remove support for AcssDebit, Affirm, AuBecsDebit, BacsDebit, Cashapp, SepaDebit, and Zip on PaymentMethodUpdateOptions
    • These fields were empty hashes.
  • ⚠️Remove support for Country on PaymentMethodLink
    • This field was not fully operational.
  • ⚠️Remove support for Recurring on PriceUpdateOptions
    • This property should be set on create only.
  • ⚠️Remove support for Attributes, Caption, and DeactivateOn on ProductCreateOptions, ProductUpdateOptions, and Product
    • These fields are not fully operational.
  • ⚠️Remove support for AlternateStatementDescriptors and Dispute on Charge
    • Use of these parameters is discouraged.

Changes

  • ⚠️ More accurate types for AccountSettingsPayoutsScheduleOptions.DelayDays, SubscriptionSchedulePhaseOptions.EndDate, SubscriptionSchedulePhaseOptions.StartDate, and SubscriptionSchedulePhaseOptions.TrialEnd. These fields are dates or numbers that also support special signifier strings like "now". They have been changed to use AnyOf<...>. (#2744)
  • ⚠️ Change type of AccountSettingsPayoutsScheduleOptions.MonthlyAnchor from string to long. (#2746)
  • ⚠️ Make Discount.Start non-nullable (#2751)
  • ⚠️ Reflect that Discount.Subscription is not expandable (#2751)
  • ⚠️ Reflect that several fields on InvoiceLineItem are expandable. (#2751)