Weiter zum Inhalt
Konto erstellen
oder
anmelden
Das Logo der Stripe-Dokumentation
/
KI fragen
Konto erstellen
Anmelden
Jetzt starten
Zahlungen
Umsatz
Plattformen und Marktplätze
Geldmanagement
Entwickler-Tools
Übersicht
Versionierung
Änderungsprotokoll
    Übersicht
    Basilikum
    Acacia
    Vorherige Versionen
Aktualisieren Sie Ihre API-Version
Ihre SDK-Version aktualisieren
Entwickler-Tools
SDKs
API
Tests
Workbench
Ereignisziele
Arbeitsabläufe
Stripe-CLI
Stripe Shell
Entwickler-Dashboard
Agent-Toolkit
Mit LLMs entwickelnStripe für Visual Studio CodeStripe-StatuswarnungenHochgeladene Dateien
Sicherheit und Datenschutz
Sicherheit
Datenschutz
Extend Stripe
Stripe-Apps
Stripe Connectors
Partner
Partner-Ecosystem
Partner-Zertifizierung
StartseiteEntwickler-ToolsChangelogBasil2025-03-31.basil

Notiz

Bis jetzt ist diese Seite noch nicht in dieser Sprache verfügbar. Wir arbeiten aber verstärkt daran, unsere Dokumentation in weiteren Sprachen bereitzustellen, und werden die Übersetzung sofort anzeigen, sobald diese verfügbar ist.

Checkout Sessions have lower latency and new update semanticsBreaking changes

What’s new

This version offers improved latency on all Checkout Session APIs for subscription-mode Sessions, including when your customer confirms the Session.

It also fixes a bug with earlier versions that prevents your customers from updating a Session after the first payment attempt, such as not being able to update a billing address. They can now unblock themselves instead of refreshing.

Why is this a breaking change?

Because this change creates the subscription after the user has completed the payment, payment_intent doesn’t reference an invoice until the Checkout Session fully completes. This means the checkout_session.status property must be complete before the invoice is created.

If your integration currently relies on an invoice during the payment intent webhooks, we recommend that you update your integration to use the checkout_session.completed webhook instead, which ensures an invoice is present.

Impact

  • Subscriptions are now created after the user completes payment.
  • Failed payment attempts no longer result in an incomplete subscription with a finalized invoice.
  • An invoice isn’t present until the Checkout Session is in the complete state.
Ruby
require 'json' # Using Sinatra post '/webhook' do payload = request.body.read event = nil begin event = Stripe::Event.construct_from( JSON.parse(payload, symbolize_names: true) ) rescue JSON::ParserError => e # Invalid payload status 400 return end # Handle the event case event.type when 'payment_intent.succeeded' payment_intent = event.data.object # contains a Stripe::PaymentIntent # The subscription and invoice might not have been created at this stage. # Then define and call a method to handle the successful payment intent. # handle_payment_intent_succeeded(payment_intent) when 'checkout_session.completed' checkout_session = event.data.object # contains a Stripe::CheckoutSession # checkout_session.payment_intent is a string here, # but you can use this payment_intent token to fetch the associated invoice payment # through the /v1/invoice_payments API method and its guaranteed associated invoice # and invoice payment are non-null at this stage. # Then define and call a method to handle the successful completion of a Checkout Session # handle_checkout_session_completed(checkout_session) # ... handle other event types else puts "Unhandled event type: #{event.type}" end status 200 end

Upgrade

  1. View your current API version in Workbench.
  2. If you use an SDK, upgrade to the corresponding SDK version for this API version.
    • If you don’t use an SDK, update your API requests to include Stripe-Version: 2025-03-31.basil
  3. Upgrade the API version used for webhook endpoints.
  4. Test your integration against the new version.
  5. If you use Connect, test your Connect integration.
  6. In Workbench, perform the upgrade. You can roll back the version for 72 hours.

Learn more about Stripe API upgrades.

Related changes

  • Checkout Session removes shipping details
  • Checkout Session allows shipping option updates
  • Adds permissions parameter to Checkout Sessions
  • Adds optional items to Checkout Sessions and Payment Links
War diese Seite hilfreich?
JaNein
Benötigen Sie Hilfe? Kontaktieren Sie den Kundensupport.
Nehmen Sie an unserem Programm für frühzeitigen Zugriff teil.
Schauen Sie sich unser Änderungsprotokoll an.
Fragen? Sales-Team kontaktieren.
LLM? Lesen Sie llms.txt.
Unterstützt von Markdoc