This release changes the pinned API version to 2025-09-30.clover
and contains breaking changes (prefixed with ⚠️ below)
-
#2036 ⚠️ 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 v2Event
. For example, there's now aV1BillingMeterErrorReportTriggeredEventNotification
to match the existingV1BillingMeterErrorReportTriggeredEvent
. Each notification class defines afetchEvent()
method to retrieve its corresponding event. For events with related objects, there's afetchRelatedObject()
method that performs the API call and casts the response to the correct type. - ⚠️ Rename function
StripeClient.parseThinEvent
toStripeClient.parseEventNotification
and remove theStripe.ThinEvent
class.- This function now returns a
Stripe.V2.Core.EventNotification
(which is the shared base class that all of the more specificStripe.Events.*EventNotification
classes share) instead ofStripe.ThinEvent
. When applicable, these event notifications will have therelatedObject
property and afetchRelatedObject()
function. They also have afetchEvent()
method to retrieve their correspondingStripe.Event.*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 therelatedObject
property and thefetchRelatedObject()
function (but they may be/returnnull
)
- This function now returns a
- Added matching
-
#2069 Move
V2.Event
API resources toV2.Core.Events
- ⚠️ Move the below event related classes from
com.stripe.model.v2
tocom.stripe.model.v2.core
. This enables us to correctly match the API path to the namespacecom.stripe.model.v2.Event
->com.stripe.model.v2.core.Event
com.stripe.model.v2.EventDestination
->com.stripe.model.v2.core.EventDestination
- ⚠️ Move the below event related classes from
-
#2057 Add
StripeContext
object- Add the
StripeContext
class. Previously, you could set the stripe context only as a string viaStripeClientBuilder .setStripeContext()
. The same method can now take an instance of theStripeContext
class as well - ⚠️ Change
EventNotification
(formerly known asThinEvent
)'scontext
property fromstring
toStripeContext
- Add the
-
#2041 Throw
ApiKeyMissingException
instead ofIllegalArgumentException
for unset API keys- ⚠️ throw
ApiKeyMissingException
instead ofIllegalArgumentException
when making a request before setting an API key initializing a client without an API key. Tweak the wording of that message to better indicate how to fix.
- ⚠️ throw
-
#2039 ⚠️ Build SDK w/ V2 OpenAPI spec
- ⚠️ The delete methods for v2 APIs (the ones in the
StripeClient.v2
namespace) now return aV2DeletedObject
which has the id of the object that has been deleted and a string representing the type of the object that has been deleted. - ⚠️ Query params on v2 APIs (like
limit
) are nowLong
instead ofInteger
(to match v1 APIs) - ⚠️ Deeply nested param hashes with no properties no longer have classes generated for them. Instead, they're typed as
Map<String, Object>
. Because there were no params, it's unlikely you were using these classes.
- ⚠️ The delete methods for v2 APIs (the ones in the
-
⚠️ Deprecated the V1 service accessors living directly under StripeClient(e.g. customers, products) as they were copied under the new V1 service in our last release. Service accessors living directly under StripeClient(e.g. customers, products) will be removed from StripeClient in a future release. E.g.
StripeClient client = new StripeClient("sk_test...") # Accessing V1 Stripe services on a StripeClient should be through the V1 namespace - client.customers().list() + client.v1().customers().list()
Refer to the migration guide for help upgrading.
-
#2046 Adds v2 support to RateLimitException
- ⚠️ The base class of
RateLimitException
has been changed fromInvalidRequestException
toApiException
. There is no change to the public interface for theRateLimitException
class.
- ⚠️ The base class of
-
#2037 Fix type bounds on request
- ⚠️ Changes the signature of
LiveResponseGetter#request
,ApiService#request
, andStripeResponseGetter#request
to return<T extends StripeObject>
instead of<T extends StripeObjectInterface>
. This only affects advanced use cases where users are extendingStripeObjectInterface
with their own objects to deserialize Stripe responses. Those objects will now need to extendStripeObject
.
- ⚠️ Changes the signature of
-
#2040, #2058, #2059, #2073 Update generated code based on incoming API changes in the
2025-09-30.clover
API version.- ⚠️ Remove support for
balanceReport
andpayoutReconciliationReport
onAccountSession.components
andAccountSessionCreateParams.components
- ⚠️ Change type of
InvoiceCreatePreviewParams.subscription_details.cancelAt
,SubscriptionCreateParams.cancelAt
andSubscriptionUpdateParams.cancelAt
fromDateTime
toDateTime | enum('max_period_end'|'min_period_end')
- ⚠️ Remove support for values
saturday
andsunday
from enumsAccountCreateParams.settings.payouts.schedule.weeklyPayoutDays
andAccountUpdateParams.settings.payouts.schedule.weeklyPayoutDays
- ⚠️ Remove support for
iterations
onInvoiceCreatePreviewParams.schedule_details.phases[]
,SubscriptionScheduleCreateParams.phases[]
, andSubscriptionScheduleUpdateParams.phases[]
- ⚠️ Remove support for
link
andpayByBank
onPaymentMethodUpdateParams
- ⚠️ Remove support for
coupon
onDiscount
,PromotionCodeCreateParams
, andPromotionCode
. UseDiscount.source.coupon
,PromotionCodeCreateParams.promotion.coupon
, andPromotionCode.promotion.coupon
instead - Add support for new resource
BalanceSettings
- Add support for
retrieve
andupdate
methods on resourceBalanceSettings
- Add support for
source
onDiscount
- Add support for
mbWayPayments
onAccount.capabilities
,AccountCreateParams.capabilities
, andAccountUpdateParams.capabilities
- Add support for
trialUpdateBehavior
onbillingportal.Configuration.features.subscription_update
,billingportal.ConfigurationCreateParams.features.subscription_update
, andbillingportal.ConfigurationUpdateParams.features.subscription_update
- Add support for
mbWay
onCharge.payment_method_details
,ConfirmationToken.payment_method_preview
,ConfirmationTokenCreateParams.payment_method_data
,PaymentIntent.payment_method_options
,PaymentIntentConfirmParams.payment_method_data
,PaymentIntentConfirmParams.payment_method_options
,PaymentIntentCreateParams.payment_method_data
,PaymentIntentCreateParams.payment_method_options
,PaymentIntentUpdateParams.payment_method_data
,PaymentIntentUpdateParams.payment_method_options
,PaymentMethodCreateParams
,PaymentMethod
,SetupIntentConfirmParams.payment_method_data
,SetupIntentCreateParams.payment_method_data
, andSetupIntentUpdateParams.payment_method_data
- Add support for
brandingSettings
andnameCollection
oncheckout.SessionCreateParams
andcheckout.Session
- Add support for
excludedPaymentMethodTypes
onPaymentIntentConfirmParams
,PaymentIntentUpdateParams
,checkout.SessionCreateParams
, andcheckout.Session
- Add support for
unitLabel
onInvoiceAddLinesParams.lines[].price_data.product_data
,InvoiceLineItemUpdateParams.price_data.product_data
,InvoiceUpdateLinesParams.lines[].price_data.product_data
,PaymentLinkCreateParams.line_items[].price_data.product_data
, andcheckout.SessionCreateParams.line_items[].price_data.product_data
- Add support for
alma
,billie
, andsatispay
oncheckout.Session.payment_method_options
andcheckout.SessionCreateParams.payment_method_options
- Add support for
demoPay
oncheckout.SessionCreateParams.payment_method_options
- Add support for
captureMethod
oncheckout.Session.payment_method_options.affirm
,checkout.Session.payment_method_options.afterpay_clearpay
,checkout.Session.payment_method_options.amazon_pay
,checkout.Session.payment_method_options.card
,checkout.Session.payment_method_options.cashapp
,checkout.Session.payment_method_options.klarna
,checkout.Session.payment_method_options.link
,checkout.Session.payment_method_options.mobilepay
,checkout.Session.payment_method_options.revolut_pay
,checkout.SessionCreateParams.payment_method_options.affirm
,checkout.SessionCreateParams.payment_method_options.afterpay_clearpay
,checkout.SessionCreateParams.payment_method_options.amazon_pay
,checkout.SessionCreateParams.payment_method_options.card
,checkout.SessionCreateParams.payment_method_options.cashapp
,checkout.SessionCreateParams.payment_method_options.klarna
,checkout.SessionCreateParams.payment_method_options.link
,checkout.SessionCreateParams.payment_method_options.mobilepay
, andcheckout.SessionCreateParams.payment_method_options.revolut_pay
- Add support for
flexible
onInvoiceCreatePreviewParams.schedule_details.billing_mode
,InvoiceCreatePreviewParams.subscription_details.billing_mode
,Quote.subscription_data.billing_mode
,QuoteCreateParams.subscription_data.billing_mode
,Subscription.billing_mode
,SubscriptionCreateParams.billing_mode
,SubscriptionMigrateParams.billing_mode
,SubscriptionSchedule.billing_mode
,SubscriptionScheduleCreateParams.billing_mode
, andcheckout.SessionCreateParams.subscription_data.billing_mode
- Add support for
businessName
andindividualName
onCustomerCreateParams
,CustomerUpdateParams
,Customer
,checkout.Session.collected_information
, andcheckout.Session.customer_details
- Add support for new values
mb_way
on enumsConfirmationTokenCreateParams.payment_method_data.type
,PaymentIntentConfirmParams.payment_method_data.type
,PaymentIntentCreateParams.payment_method_data.type
,PaymentIntentUpdateParams.payment_method_data.type
,SetupIntentConfirmParams.payment_method_data.type
,SetupIntentCreateParams.payment_method_data.type
, andSetupIntentUpdateParams.payment_method_data.type
- Add support for new values
mb_way
on enumsCustomerListPaymentMethodsParams.type
,PaymentMethodCreateParams.type
, andPaymentMethodListParams.type
- Add support for
chargebackLossReasonCode
onDispute.payment_method_details.klarna
- Add support for
netAmount
andprorationDetails
onInvoiceItem
- Add support for
fraudDisputabilityLikelihood
andriskAssessment
onissuing.AuthorizationCreateParams
- Add support for
secondLine
onissuing.Card
- Add support for new values
mb_way
on enumPaymentIntentCreateParams.excludedPaymentMethodTypes
- Add support for
frMealVoucherConecs
onPaymentMethodConfigurationCreateParams
andPaymentMethodConfigurationUpdateParams
- Add support for
promotion
onPromotionCodeCreateParams
andPromotionCode
- Add support for
provider
ontax.Settings.defaults
- Add support for
bbposWisepad3
onterminal.ConfigurationCreateParams
,terminal.ConfigurationUpdateParams
, andterminal.Configuration
- Add support for
addressKana
,addressKanji
,displayNameKana
,displayNameKanji
, andphone
onterminal.LocationCreateParams
,terminal.LocationUpdateParams
, andterminal.Location
- Change
terminal.LocationCreateParams.address
to be optional - Change
terminal.LocationCreateParams.displayName
to be optional - Add support for new value
2025-09-30.clover
on enumWebhookEndpointCreateParams.apiVersion
- ⚠️ Remove support for