github stripe/stripe-ruby v16.0.0

latest release: v16.1.0-beta.1
9 hours ago

This release changes the pinned API version to 2025-09-30.clover and contains breaking changes (prefixed with ⚠️ below)

  • #1652 ⚠️ Deserialize inner types in resources for more detailed types

    • ⚠️ Deserialize inner classes, so inner class types will now reflect generated inner classes
      • For example, Stripe::Customer.address is deserialized to specific a Stripe::Customer::Address class instead of the generic Stripe::StripeObject, as is suggested by the static type annotations
      • This should not affect any normal use cases of the SDK, as inner types remain children of Stripe::StripeObject
  • #1649 Explicitly define methods for RBIs and ship combined RBI for Tapioca

    • Improvements for Tapioca
      • Explicitly define methods for attributes in RBIs to allow Tapioca to reflect them
      • Ship combined RBI for shorter Tapioca time
  • #1677 Move V2.Event API resources to V2.Core.Events

    • ⚠️ Move Stripe::V2::Event and Stripe::V2::EventDestination to Stripe::V2::Core::Event and Stripe::V2::Core::EventDestination respectively. They now correctly match their API path
  • #1664 Add StripeContext object

    • Add the StripeContext class. Previously you could set the stripe_context to only a string value. Now you can use the new class as well
    • ⚠️ Change EventNotification (formerly known as ThinEvent)'s context property from string to StripeContext
  • #1684 ⚠️ Drop support for Ruby < 2.6 & clarify version policy

    • Read our new language version support policy
      • ⚠️ In this release, we drop support for Ruby 2.3, 2.4, and 2.5
      • Ruby 2.6 support is deprecated and will be removed in the next scheduled major release (March 2026)
  • #1651 ⚠️ Build SDK w/ V2 OpenAPI spec

    • ⚠️ The delete methods for v2 APIs (the ones in the StripeClient.v2 namespace) now return a V2DeletedObject which has the id of the object that has been deleted and a string representing the type of the object that has been deleted.
    • ⚠️ Deeply nested param hashes with no properties no longer have classes generated for them. Instead, they're typed as T::Hash[String, T.untyped]. Because there were no params, it's unlikely you were using these classes.
  • #1650 ⚠️ Add strongly typed EventNotifications
    We've overhauled how V2 Events are handled in the SDK! This approach should provide a lot more information at authoring and compile time, leading to more robust integrations. As part of this process, there are a number of changes to be aware of.

    • Added matching EventNotification classes to every v2 Event
      • For example, there's now a V1BillingMeterErrorReportTriggeredEventNotification to match the existing V1BillingMeterErrorReportTriggeredEvent
      • Each notification class defines a fetch_event() method to retrieve its corresponding event
      • For events with related objects, there's a fetch_related_object() method that performs the API call and casts the response to the correct type on both the EventNotification and Event.
    • ⚠️ Rename function StripeClient.parse_thin_event to StripeClient.parse_event_notification and remove the Stripe::ThinEvent class.
      • This function now returns a Stripe::V2::Core::EventNotification (which is the shared base class that all of the more specific Stripe::Event::*EventNotification classes share) instead of Stripe::ThinEvent. When applicable, these event notifications will have the relatedObject property and a fetch_related_object() function. They also have a fetch_event() method to retrieve their corresponding Stripe::Events::*Event instance.
      • If you parse an event the SDK doesn't have types for (e.g. it's newer than the SDK you're using), you'll get an instance of Stripe::Events::UnknownEventNotification instead of a more specific type. It has both the related_object property and the fetch_related_object() function (but they may be/return nil)
    • ⚠️ Move all Event Classes into the Events module
      • For example, Stripe::V1BillingMeterErrorReportTriggeredEvent is now Stripe::Events::V1BillingMeterErrorReportTriggeredEvent
  • #1670 ⚠️ Unify resource and service method parameters into one class

    • ⚠️ Resource and service request parameter types have been moved to the top-level and are shared.
      • For example, Stripe::Account::CreateParams and Stripe::AccountService::CreateParams have moved to Stripe::AccountCreateParams
      • This change only affects users who use Sorbet types for parameters
  • #1643, #1667, #1680, #1678 Update generated code based on incoming API changes in the 2025-09-30.clover API version.

    • ⚠️ Remove support for balance_report and payout_reconciliation_report on AccountSession::Component and AccountSession::CreateParams::Component
    • Change Invoice.id to be required (i.e. not nilable).
    • Add support for new resource BalanceSettings
    • Add support for retrieve and update methods on resource BalanceSettings
    • Add support for source on Discount
    • Remove support for coupon on Discount, PromotionCode::CreateParams, and PromotionCode
    • Add support for mb_way_paymentson Account::Capability, Account::CreateParams::Capability, and Account::UpdateParams::Capability
    • Add support for trial_update_behavior on BillingPortal::Configuration::CreateParams::Feature::SubscriptionUpdate, BillingPortal::Configuration::Feature::SubscriptionUpdate, and BillingPortal::Configuration::UpdateParams::Feature::SubscriptionUpdate
    • Add support for mb_way on Charge::PaymentMethodDetail, ConfirmationToken::CreateParams::PaymentMethodDatum, ConfirmationToken::PaymentMethodPreview, PaymentIntent::ConfirmParams::PaymentMethodDatum, PaymentIntent::ConfirmParams::PaymentMethodOption, PaymentIntent::CreateParams::PaymentMethodDatum, PaymentIntent::CreateParams::PaymentMethodOption, PaymentIntent::PaymentMethodOption, PaymentIntent::UpdateParams::PaymentMethodDatum, PaymentIntent::UpdateParams::PaymentMethodOption, PaymentMethod::CreateParams, PaymentMethod, SetupIntent::ConfirmParams::PaymentMethodDatum, SetupIntent::CreateParams::PaymentMethodDatum, and SetupIntent::UpdateParams::PaymentMethodDatum
    • Add support for branding_settings and name_collection on Checkout::Session::CreateParams and Checkout::Session
    • Add support for excluded_payment_method_types on Checkout::Session::CreateParams, Checkout::Session, PaymentIntent::ConfirmParams, and PaymentIntent::UpdateParams
    • Add support for unit_label on Checkout::Session::CreateParams::LineItem::PriceDatum::ProductDatum, Invoice::AddLinesParams::Line::PriceDatum::ProductDatum, Invoice::UpdateLinesParams::Line::PriceDatum::ProductDatum, InvoiceLineItem::UpdateParams::PriceDatum::ProductDatum, and PaymentLink::CreateParams::LineItem::PriceDatum::ProductDatum
    • Add support for alma, billie, and satispay on Checkout::Session::CreateParams::PaymentMethodOption and Checkout::Session::PaymentMethodOption
    • Add support for demo_pay on Checkout::Session::CreateParams::PaymentMethodOption
    • Add support for capture_method on Checkout::Session::CreateParams::PaymentMethodOption::Affirm, Checkout::Session::CreateParams::PaymentMethodOption::AfterpayClearpay, Checkout::Session::CreateParams::PaymentMethodOption::AmazonPay, Checkout::Session::CreateParams::PaymentMethodOption::Card, Checkout::Session::CreateParams::PaymentMethodOption::Cashapp, Checkout::Session::CreateParams::PaymentMethodOption::Klarna, Checkout::Session::CreateParams::PaymentMethodOption::Link, Checkout::Session::CreateParams::PaymentMethodOption::Mobilepay, Checkout::Session::CreateParams::PaymentMethodOption::RevolutPay, Checkout::Session::PaymentMethodOption::Affirm, Checkout::Session::PaymentMethodOption::AfterpayClearpay, Checkout::Session::PaymentMethodOption::AmazonPay, Checkout::Session::PaymentMethodOption::Card, Checkout::Session::PaymentMethodOption::Cashapp, Checkout::Session::PaymentMethodOption::Klarna, Checkout::Session::PaymentMethodOption::Link, Checkout::Session::PaymentMethodOption::Mobilepay, and Checkout::Session::PaymentMethodOption::RevolutPay
    • Add support for flexible on Checkout::Session::CreateParams::SubscriptionDatum::BillingMode, Invoice::CreatePreviewParams::ScheduleDetail::BillingMode, Invoice::CreatePreviewParams::SubscriptionDetail::BillingMode, Quote::CreateParams::SubscriptionDatum::BillingMode, Quote::SubscriptionDatum::BillingMode, Subscription::BillingMode, Subscription::CreateParams::BillingMode, Subscription::MigrateParams::BillingMode, SubscriptionSchedule::BillingMode, and SubscriptionSchedule::CreateParams::BillingMode
    • Add support for business_name and individual_name on Checkout::Session::CollectedInformation, Checkout::Session::CustomerDetail, Customer::CreateParams, Customer::UpdateParams, and Customer
    • Add support for chargeback_loss_reason_code on Dispute::PaymentMethodDetail::Klarna
    • Add support for net_amount and proration_details on InvoiceItem
    • Remove support for iterations on Invoice::CreatePreviewParams::ScheduleDetail::Phase, SubscriptionSchedule::CreateParams::Phase, and SubscriptionSchedule::UpdateParams::Phase
    • Add support for fraud_disputability_likelihood and risk_assessment on Issuing::Authorization::CreateParams
    • Add support for second_line on Issuing::Card
    • Add support for fr_meal_voucher_conecs on PaymentMethodConfiguration::CreateParams and PaymentMethodConfiguration::UpdateParams
    • Remove support for link and pay_by_bank on PaymentMethod::UpdateParams
    • Add support for promotion on PromotionCode::CreateParams and PromotionCode
    • Add support for provider on Tax::Settings::Default
    • Add support for bbpos_wisepad3 on Terminal::Configuration::CreateParams, Terminal::Configuration::UpdateParams, and Terminal::Configuration
    • Add support for address_kana, address_kanji, display_name_kana, display_name_kanji, and phone on Terminal::Location::CreateParams, Terminal::Location::UpdateParams, and Terminal::Location
    • Change Terminal::Location::CreateParams.address to be optional
    • Change Terminal::Location::CreateParams.display_name to be optional

See the changelog for more details.

Don't miss a new stripe-ruby release

NewReleases is sending notifications on new releases.