-
Notifications
You must be signed in to change notification settings - Fork 386
Migration guide for v22
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-11-15.
"
⚠️ Inline several "shared" classes for consistency (#1455)⚠️ RemovedLineItem.Productproperty that was released by mistake. (#1456)⚠️ RemovedChargesproperty onPaymentIntentand replace it withLatestCharge(#1473)⚠️ Removed deprecatedAmount,Currency,Description,Images,Nameproperties fromSessionCreateParams.LineItem(#1473⚠️ Remove support fortos_shown_and_acceptedonCheckoutSessionCreateParams.payment_method_options.paynow(#1473⚠️ Removed deprecatedSkuresource (#1459)⚠️ Removed deprecatedEphemeralKey.associatedObjectsfield. (#1470)⚠️ RemovedRequestOptions.getStripeVersionOverride,RequestOptions.setStripeVersionOverride, andRequestOptions.clearStripeVersionOverride(#1464)
Use of setStripeVersionOverride is discouraged and can lead to unexpected errors during service calls because Java SDK class shapes are not guaranteed to match API responses on arbitrary versions.
If you were using these methods in conjunction with EphemeralKey resource prefer the EphemeralKeyCreateParamsBuilder.setStripeVersion.
EphemeralKeyCreateParams params = EphemeralKeyCreateParams.builder()
.setStripeVersion("XXXX-YY-ZZ")
.build();If you have a use case that requires per-request version overrides, please file an issue on stripe-java repository to ensure we are aware and can add first-class support for it. In the meantime you can use unsafeSetStripeVersionOverride method as a workaround.
RequestOptions.RequestOptionsBuilder builder = RequestOptions.builder();
builder.setApiKey(...)
.setClientId(...);
RequestOptionsBuilder.unsafeSetStripeVersionOverride(builder, "2022-11-15");⚠️ Remove support fortos_shown_and_acceptedonCheckoutSessionCreateParams.payment_method_options.paynow. The property was mistakenly released and never worked. (#1474)
- Inlined
AutomaticPaymentMethodsPaymentIntentclass toPaymentIntent.AutomaticPaymentMethodsinner class - Inlined
CreditedItemsclass toInvoiceLineItem.CreditedItemsinner class - Inlined
EventDataclass toEvent.Datainner class - Inlined
EventRequestclass toEvent.Requestinner class - Inlined
InvoiceLineItemPeriodclass toInvoiceItem.Periodinner class - Inlined
PackageDimensionsclass toSku.PackageDimensionsandProduct.PackageDimensionsinner classeses.` - Inlined
ProrationDetailsclass toInvoiceLineItem.ProrationDetailsinner class - Inlined
radar.Ruleclass toCharge.Ruleinner class - Inlined
treasury.FlowDetailsclass toTransactionEntry.FlowDetailsinner class - Deleted
StripeErrorResponseclass that was unused. - Moved
Account.DeclineChargeOntoAccount.SettingsCardPayments.DeclineChargeOn - Moved
Account.PayoutScheduletoAccount.SettingsPayouts.PayoutSchedule - Moved
Account.SettingsBrandingtoAccount.Settings.Branding - Moved
Account.SettingsCardPaymentstoAccount.Settings.CardPayments - Moved
Account.SettingsDashboardtoAccount.Settings.Dashboard - Moved
Account.SettingsPaymentstoAccount.Settings.Payments - Moved
Account.SettingsPayoutstoAccount.Settings.Payouts - Moved
Charge.PaymentMethodDetails.StoretoCharge.PaymentMethodDetails.Konbini.Store - Moved
Invoice.PaymentMethodOptionstoInvoice.PaymentSettings.PaymentMethodOptions - Moved
Invoice.ThresholdItemReasontoInvoice.ThresholdReason.ItemReason - Moved
Mandate.AuBecsDebittoMandate.PaymentMethodDetails.AuBecsDebit - Moved
Mandate.BacsDebittoMandate.PaymentMethodDetails.BacsDebit - Moved
PaymentIntent.PaymentMethodOptions.BlikMandateOptionsOffSessionDetailstoMandate.PaymentMethodDetails.Blik.OffSession - Moved
PaymentIntent.PaymentMethodOptions.BankTransfertoPaymentIntent.PaymentMethodOptions.CustomerBalance.BankTransfer - Moved
PaymentIntent.NextActionAlipayHandleRedirecttoPaymentIntent.NextAction.AlipayHandleRedirect - Moved
PaymentIntent.NextActionCardAwaitNotificationtoPaymentIntent.NextAction.CardAwaitNotification - Moved
PaymentIntent.NextActionDisplayBankTransferInstructionstoPaymentIntent.NextAction.DisplayBankTransferInstructions - Moved
PaymentIntent.NextActionDisplayBoletoDetailstoPaymentIntent.NextAction.BoletoDisplayDetails - Moved
PaymentIntent.NextActionKonbiniDisplayDetailstoPaymentIntent.NextAction.KonbiniDisplayDetails - Moved
PaymentIntent.NextActionOxxoDisplayDetailstoPaymentIntent.NextAction.OxxoDisplayDetails - Moved
PaymentIntent.NextActionRedirectToUrltoPaymentIntent.NextAction.RedirectToUrl - Moved
PaymentIntent.PaymentMethodOptions.SepaDebitMandateOptionstoPaymentIntent.PaymentMethodOptions.SepaDebit.MandateOptions - Moved
Person.VerificationDocumenttoPerson.Verification.Document - Moved
Person.VerificationDocumenttoPerson.Verification.AdditionalDocument - Moved
PromotionCode.CurrencyOptiontoPromotionCode.Restrictions.CurrencyOption - Moved
Quote.RecurringtoQuote.Computed.Recurring - Moved
Quote.UpfronttoQuote.Computed.Upfront - Moved
Refund.NextActionDisplayDetailstoRefund.NextAction.DisplayDetails - Moved
SetupIntent.PaymentMethodOptions.BlikMandateOptionstoSetupIntent.PaymentMethodOptions.Blik.MandateOptions - Moved
SetupIntent.NextActionRedirectToUrltoSetupIntent.NextAction.RedirectToUrl - Moved
SetupIntent.PaymentMethodOptions.SepaDebitMandateOptionstoSetupIntent.PaymentMethodOptions.SepaDebit.MandateOptions - Moved
ShippingRate.CurrencyOptiontoShippingRate.FixedAmount.CurrencyOption - Moved
Source.OrderItemtoSource.Order.OrderItem - Moved
Subscription.PaymentMethodOptionstoSubscription.PaymentSettings.PaymentMethodOptions - Renamed
Person.JapanAddresstoPerson.AddressKanji - Renamed
Account.Company.Verification.VerificationDocumenttoAccount.Company.Verification.Document - Moved
SubscriptionSchedule.AddInvoiceItemtoSubscriptionSchedule.Phase.AddInvoiceItem - Renamed
Person.JapanAddresstoPerson.AddressKana - Moved
SubscriptionSchedule.InvoiceSettingstoSubscriptionSchedule.DefaultSettings.InvoiceSettings - Moved
SubscriptionSchedule.PhaseItemtoSubscriptionSchedule.Phase.Item - Renamed
Account.FutureRequirements.ErrorstoAccount.FutureRequirements.Error - Renamed
Account.Requirements.ErrorstoAccount.Requirements.Error - Renamed
Account.Settings.SettingsCardIssuingtoAccount.Settings.CardIssuing - Renamed
Account.Settings.SettingsTreasurytoAccount.Settings.Treasury - Renamed
Balance.MoneytoBalance.Available - Renamed
Balance.MoneytoBalance.ConnectReserved - Renamed
Balance.MoneytoBalance.InstantAvailable - Renamed
Balance.DetailstoBalance.Issuing - Renamed
Balance.MoneytoBalance.Pending - Renamed
BalanceTransaction.FeetoBalanceTransaction.FeeDetail - Renamed
Capability.FutureRequirements.ErrorstoCapability.FutureRequirements.Error - Renamed
CashBalance.BalanceSettingstoCashBalance.Settings - Renamed
Session.CustomerDetails.TaxIDtoSession.CustomerDetails.TaxId - Renamed
Session.PaymentMethodOptions.GrabPaytoSession.PaymentMethodOptions.Grabpay - Renamed
Session.TaxIDCollectiontoSession.TaxIdCollection - Renamed
CountrySpec.VerificationFields.DetailstoCountrySpec.VerificationFields.Company - Renamed
CountrySpec.VerificationFields.DetailstoCountrySpec.VerificationFields.Individual - Renamed
Account.Balance.CashBalancetoAccount.Balance.Cash - Renamed
Account.Balance.CreditBalancetoAccount.Balance.Credit - Renamed
VerificationReport.Document.DateOfBirthtoVerificationReport.Document.Dob - Renamed
VerificationReport.Document.DocumentCheckErrortoVerificationReport.Document.Error - Renamed
VerificationReport.IdNumber.DateOfBirthtoVerificationReport.IdNumber.Dob - Renamed
VerificationReport.IdNumber.IdNumberCheckErrortoVerificationReport.IdNumber.Error - Renamed
VerificationReport.Selfie.SelfieCheckErrortoVerificationReport.Selfie.Error - Renamed
VerificationSession.VerifiedOutputs.DateOfBirthtoVerificationSession.VerifiedOutputs.Dob - Renamed
Invoice.DiscountAmounttoInvoice.TotalDiscountAmount - Renamed
Invoice.TaxAmounttoInvoice.TotalTaxAmount - Renamed
Cardholder.Individual.DateOfBirthtoCardholder.Individual.Dob - Renamed
Transaction.PurchaseDetails.Flight.SegmentstoTransaction.PurchaseDetails.Flight.Segment - Renamed
PaymentIntent.PaymentMethodOptions.Card.Installments.PlantoPaymentIntent.PaymentMethodOptions.Card.Installments.AvailablePlan - Renamed
PaymentMethod.Klarna.DateOfBirthtoPaymentMethod.Klarna.Dob - Renamed
PaymentMethod.USBankAccounttoPaymentMethod.UsBankAccount - Renamed
Person.DateOfBirthtoPerson.Dob - Renamed
Person.FutureRequirements.ErrorstoPerson.FutureRequirements.Error - Renamed
Review.LocationtoReview.IpAddressLocation - Renamed
ScheduledQueryRun.RunErrortoScheduledQueryRun.Error - Renamed
Source.CodeVerificationFlowtoSource.CodeVerification - Renamed
Source.ReceiverFlowtoSource.Receiver - Renamed
Source.RedirectFlowtoSource.Redirect - Renamed
Source.OrdertoSource.SourceOrder - Renamed
SourceMandateNotification.AcssDebitDatatoSourceMandateNotification.AcssDebit - Renamed
SourceMandateNotification.BacsDebitDatatoSourceMandateNotification.BacsDebit - Renamed
SourceMandateNotification.SepaDebitDatatoSourceMandateNotification.SepaDebit - Renamed
SourceTransaction.AchCreditTransferDatatoSourceTransaction.AchCreditTransfer - Renamed
SourceTransaction.ChfCreditTransferDatatoSourceTransaction.ChfCreditTransfer - Renamed
SourceTransaction.GbpCreditTransferDatatoSourceTransaction.GbpCreditTransfer - Renamed
SourceTransaction.PaperCheckDatatoSourceTransaction.PaperCheck - Renamed
SourceTransaction.SepaCreditTransferDatatoSourceTransaction.SepaCreditTransfer - Renamed
Reader.ReaderActiontoReader.Action - Renamed
FinancialAccountFeatures.FinancialAddresses.Aba.StatusDetailstoFinancialAccountFeatures.FinancialAddresses.Aba.StatusDetail - Renamed
FinancialAccountFeatures.CardIssuing.StatusDetailstoFinancialAccountFeatures.CardIssuing.StatusDetail - Renamed
FinancialAccountFeatures.DepositInsurance.StatusDetailstoFinancialAccountFeatures.DepositInsurance.StatusDetail - Renamed
FinancialAccountFeatures.InboundTransfers.Ach.StatusDetailstoFinancialAccountFeatures.InboundTransfers.Ach.StatusDetail - Renamed
FinancialAccountFeatures.IntraStripeFlows.StatusDetailstoFinancialAccountFeatures.IntraStripeFlows.StatusDetail - Renamed
FinancialAccountFeatures.OutboundPayments.Ach.StatusDetailstoFinancialAccountFeatures.OutboundPayments.Ach.StatusDetail - Renamed
FinancialAccountFeatures.OutboundPayments.UsDomesticWire.StatusDetailstoFinancialAccountFeatures.OutboundPayments.UsDomesticWire.StatusDetail - Renamed
FinancialAccountFeatures.OutboundTransfers.Ach.StatusDetailstoFinancialAccountFeatures.OutboundTransfers.Ach.StatusDetail - Renamed
FinancialAccountFeatures.OutboundTransfers.UsDomesticWire.StatusDetailstoFinancialAccountFeatures.OutboundTransfers.UsDomesticWire.StatusDetail