Skip to content

Upgrading stripe 7 to 8

Breaking7.14.1 → 8.11.1Breaking37New122Changed4Fixed6Other14

Fetching 25 releases from GitHub…24 / 25
BreakingUpgrade verdict

29 breaking changes.

  • Code that passes subscription-related options when previewing an invoice will no longer work.
  • A feature for handling entitlement events is no longer available in this beta.
  • The separate async HTTP client class and its global setting are gone. You now configure one HTTP client that can handle both sync and async calls.
  • Three methods that never worked are removed, so any code calling them will fail.
Top 3 of 29 that need code or config changes

stripe publishes an official migration guide for version 8. It covers more than the release notes do.

V8 migration guide ↗
Breaking29
Removes support for subscription_* parameters on Invoice.CreatePreviewParams and InvoiceService.CreatePreviewParams.
Invoice.CreatePreviewParamsInvoiceService.CreatePreviewParamssubscription_billing_cycle_anchorsubscription_cancel_at_period_endsubscription_cancel_atsubscription_cancel_nowsubscription_default_tax_ratessubscription_items
Removes support for the Entitlements.Event resource in the generated beta code.
Entitlements.Event
Collapses HTTPClientAsync into HTTPClient, removing the stripe.default_http_client_async global and the stripe.HTTPClientAsync class.
stripe.default_http_client_asyncstripe.HTTPClientAsyncstripe.default_http_clientstripe.HTTPClientstripe.HTTPXClientstripe.RequestsClient.request_async.sleep_async
Removes broken CreditNoteLineItem.list, CustomerCashBalanceTransaction.list, and CustomerCashBalanceTransaction.retrieve methods.
CreditNoteLineItem.listCustomerCashBalanceTransaction.listCustomerCashBalanceTransaction.retrieve
Request options like api_key, stripe_account, stripe_version and idempotency_key can no longer be passed positionally on resource methods.
api_keystripe_accountstripe_versionidempotency_key
Removes public access to APIRequestor, which is now private.
APIRequestor
Removes api_version from File.create parameters; use stripe_version instead.
File.createapi_versionstripe_version
Removes the util.read_special_variable() utility method.
util.read_special_variable()
Removes the defunct StripeObject.api_base property that returned None.
StripeObject.api_base
Changes type of stripe.checkout.Session.CreateParamsPaymentMethodOptionsSwish from Literal['']|str to str.
stripe.checkout.Session.CreateParamsPaymentMethodOptionsSwishreference
Changes discounts type on Invoice, InvoiceLineItem, QuotePreviewInvoice, Subscription, and SubscriptionItem from Optional list to list.
stripe.Invoicestripe.InvoiceLineItemstripe.QuotePreviewInvoicestripe.Subscriptionstripe.SubscriptionItemdiscounts
Changes image_url_png type on stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode.QrCode from Optional[str] to str.
stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode.QrCodeimage_url_pngimage_url_svgdata
Changes hosted_instructions_url type on stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode from Optional[str] to str.
stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCodehosted_instructions_url
Changes mobile_auth_url type on stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode from Optional[str] to str.
stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCodemobile_auth_url
Changes qr_code type on stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode from Optional[QrCode] to QrCode.
stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCodeqr_code
Changes the type of the discounts field on several Quote and SubscriptionSchedule classes from Optional[List[Discount]] to List[Discount].
stripe.QuoteLine.Action.AddItemstripe.QuoteLine.Action.SetItemstripe.QuotePreviewSubscriptionSchedule.Phase.AddInvoiceItemstripe.QuotePreviewSubscriptionSchedule.Phase.Itemstripe.QuotePreviewSubscriptionSchedule.Phasestripe.SubscriptionSchedule.Phase.AddInvoiceItemstripe.SubscriptionSchedule.Phase.Itemstripe.SubscriptionSchedule.Phase
Changes type of reference on checkout Session.CreateParamsPaymentMethodOptionsSwish from Literal['']|str to str.
stripe.checkout.Session.CreateParamsPaymentMethodOptionsSwishreference
Changes type of type on identity VerificationSession.CreateParams from Literal['document', 'id_number'] to NotRequired[Literal['document', 'id_number']].
stripe.identity.VerificationSession.CreateParamstype
Changes type of discounts on Invoice and InvoiceLineItem from Optional[List[ExpandableField[Discount]]] to List[ExpandableField[Discount]].
stripe.Invoicestripe.InvoiceLineItemdiscounts
Changes type of image_url_png on PaymentIntent SwishHandleRedirectOrDisplayQrCode QrCode from Optional[str] to str.
stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode.QrCodeimage_url_pngimage_url_svgdata
Changes type of mobile_auth_url on PaymentIntent SwishHandleRedirectOrDisplayQrCode from Optional[str] to str.
stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCodemobile_auth_urlhosted_instructions_url
Changes type of qr_code on PaymentIntent SwishHandleRedirectOrDisplayQrCode from Optional[QrCode] to QrCode.
stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCodeqr_code
Makes identity.VerificationReport.type required and identity.VerificationSession.type a non-optional Literal.
identity.VerificationReport.typeidentity.VerificationSession.type
Changes type of identity.VerificationSession.type from Optional[Literal["document", "id_number"]] to Literal["document", "id_number"].
identity.VerificationSession.type
Changes TaxId.instance_url to return the top-level /v1/tax_ids/{id} path instead of the customer-scoped path.
TaxId.instance_url
Changes the type of status on terminal.Reader from str to Literal["offline", "online"].
statusterminal.Reader
Introduces StripeClient and a service-based call pattern with no global config and no static methods.
StripeClient
Methods that return a response stream such as Quote.pdf now return a single StripeResponseStream instead of a tuple.
Quote.pdfStripeResponseStream
Removes StripeError.construct_error_object(), which was intended for internal use only.
StripeError.construct_error_object()SearchResultObject.empty_search_result()StripeObject.ReprJSONEncoderListObject.empty_list()

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • removed: export APIRequestor
  • removed: export api_requestor
  • added: export AIOHTTPClient
  • added: export AccountCapabilityService
  • added: export AccountExternalAccountService
  • added: export AccountLinkService
  • added: export AccountLoginLinkService
  • added: export AccountPersonService
  • added: export AccountService
  • added: export AccountSessionService
  • added: export ApiMode
  • added: export ApplePayDomainService
  • added: export ApplicationFeeRefundService
  • added: export ApplicationFeeService
  • added: export AppsService
  • added: export BalanceService
  • added: export BalanceTransactionService
  • added: export BaseAddress
  • added: export BillingPortalService
  • added: export BillingService
  • added: export ChargeService
  • added: export CheckoutService
  • added: export ClimateService
  • added: export ConfirmationToken
  • added: export ConfirmationTokenService
  • added: export CountrySpecService
  • added: export CouponService
  • added: export CreditNoteLineItemService
  • added: export CreditNotePreviewLinesService
  • added: export CreditNoteService
  • added: export CustomerBalanceTransactionService
  • added: export CustomerCashBalanceService
  • added: export CustomerCashBalanceTransactionService
  • added: export CustomerFundingInstructionsService
  • added: export CustomerPaymentMethodService
  • added: export CustomerPaymentSourceService
  • added: export CustomerService
  • added: export CustomerSessionService
  • added: export CustomerTaxIdService
  • added: export DisputeService
  • added: export EntitlementsService
  • added: export EphemeralKeyService
  • added: export EventService
  • added: export ExchangeRateService
  • added: export FileLinkService
  • added: export FileService
  • added: export FinancialConnectionsService
  • added: export ForwardingService
  • added: export HTTPXClient
  • added: export IdentityService
  • added: export InvoiceItemService
  • added: export InvoiceLineItemService
  • added: export InvoiceService
  • added: export InvoiceUpcomingLinesService
  • added: export IssuingService
  • added: export MandateService
  • added: export PaymentIntentService
  • added: export PaymentLinkLineItemService
  • added: export PaymentLinkService
  • added: export PaymentMethodConfigurationService
  • added: export PaymentMethodDomainService
  • added: export PaymentMethodService
  • added: export PayoutService
  • added: export PlanService
  • added: export PriceService
  • added: export ProductFeature
  • added: export ProductFeatureService
  • added: export ProductService
  • added: export PromotionCodeService
  • added: export QuoteComputedUpfrontLineItemsService
  • added: export QuoteLineItemService
  • added: export QuoteService
  • added: export RadarService
  • added: export RefundService
  • added: export ReportingService
  • added: export RequestorOptions
  • added: export ReviewService
  • added: export SetupAttemptService
  • added: export SetupIntentService
  • added: export ShippingRateService
  • added: export SigmaService
  • added: export SourceService
  • added: export SourceTransactionService
  • added: export StripeClient
  • added: export StripeStreamResponseAsync
  • added: export SubscriptionItemService
  • added: export SubscriptionItemUsageRecordService
  • added: export SubscriptionItemUsageRecordSummaryService
  • added: export SubscriptionScheduleService
  • added: export SubscriptionService
  • added: export TaxCodeService
  • added: export TaxIdService
  • added: export TaxRateService
  • added: export TaxService
  • added: export TerminalService
  • added: export TestHelpersService
  • added: export TokenService
  • added: export TopupService
  • added: export TransferReversalService
  • added: export TransferService
  • added: export TreasuryService
  • added: export WebhookEndpointService
  • added: export billing
  • added: export entitlements
  • added: export forwarding
  • added: variable DEFAULT_API_BASE: str
  • added: variable DEFAULT_CONNECT_API_BASE: str
  • added: variable DEFAULT_UPLOAD_API_BASE: str
  • added: export ConfirmationToken
  • added: export ProductFeature
  • added: export billing
  • added: export entitlements
  • added: export forwarding
  • added: export Meter
  • added: export MeterEvent
  • added: export MeterEventAdjustment
  • added: export MeterEventSummary
  • added: export ActiveEntitlement
  • added: export Feature
  • added: export Request
  • added: export PersonalizationDesign
  • added: export PhysicalBundle
  • added: export SecretService
  • added: export Meter
  • added: export MeterEvent
  • added: export MeterEventAdjustment
  • added: export MeterEventAdjustmentService
  • added: export MeterEventService
  • added: export MeterEventSummary
  • added: export MeterEventSummaryService
  • added: export MeterService
  • added: export ConfigurationService
  • added: export SessionService
  • added: export SessionLineItemService
  • added: export SessionService
  • added: export OrderService
  • added: export ProductService
  • added: export SupplierService
  • added: export ActiveEntitlement
  • added: export ActiveEntitlementService
  • added: export Feature
  • added: export FeatureService
  • added: export AccountOwnerService
  • added: export AccountService
  • added: export SessionService
  • added: export TransactionService
  • added: export Request
  • added: export RequestService
  • added: export VerificationReportService
  • added: export VerificationSessionService
  • added: export AuthorizationService
  • added: export CardService
  • added: export CardholderService
  • added: export DisputeService
  • added: export PersonalizationDesign
  • added: export PersonalizationDesignService
  • added: export PhysicalBundle
  • added: export PhysicalBundleService
  • added: export TokenService
  • added: export TransactionService
  • removed: method OAuthError.construct_error_object()
  • added: export EarlyFraudWarningService
  • added: export ValueListItemService
  • added: export ValueListService
  • added: export ReportRunService
  • added: export ReportTypeService
  • added: export ScheduledQueryRunService
  • added: export CalculationLineItemService
  • added: export CalculationService
  • added: export RegistrationService
  • added: export SettingsService
  • added: export TransactionLineItemService
  • added: export TransactionService
  • added: export ConfigurationService
  • added: export ConnectionTokenService
  • added: export LocationService
  • added: export ReaderService
  • added: export ConfirmationTokenService
  • added: export CustomerService
  • added: export IssuingService
  • added: export RefundService
  • added: export TerminalService
  • added: export TestClockService
  • added: export TreasuryService
  • added: export issuing
  • added: export terminal
  • added: export treasury
  • added: export AuthorizationService
  • added: export CardService
  • added: export PersonalizationDesignService
  • added: export TransactionService
  • added: export ReaderService
  • added: export InboundTransferService
  • added: export OutboundPaymentService
  • added: export OutboundTransferService
  • added: export ReceivedCreditService
  • added: export ReceivedDebitService
  • added: export CreditReversalService
  • added: export DebitReversalService
  • added: export FinancialAccountFeaturesService
  • added: export FinancialAccountService
  • added: export InboundTransferService
  • added: export OutboundPaymentService
  • added: export OutboundTransferService
  • added: export ReceivedCreditService
  • added: export ReceivedDebitService
  • added: export TransactionEntryService
  • added: export TransactionService