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
Entwicklerressourcen
ÜbersichtAlle Produkte anzeigen
Beginnen Sie mit der Entwicklung
Entwicklung starten
Informationen zu APIs
    API-Tour
    Payment Intents API
    Setup Intents API
    So funktionieren PaymentIntents und SetupIntents
    Payment Methods API
    Produkte und Preise
    Veröffentlichungsphase
Entwicklung per LLM
Stripe verwenden, ohne Code zu erstellen
Stripe einrichten
Konto erstellen
Stripe Dashboard
Auf Stripe umsteigen
StartseiteJetzt startenAbout the APIs

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.

How PaymentIntents and SetupIntents work

Learn how PaymentIntents and SetupIntents work within the payment flow.

The main difference between the Payment Intents API and Setup Intents API is their purpose:

  • Payment Intents API: Used to collect payment and charge a customer immediately. It creates a charge and processes a transaction to collect funds.
  • Setup Intents API: Used to collect and save payment method details for future use without creating a charge. Sets up payment credentials without processing any payment.
Payment Intent APISetup Intents API
Creates an immediate chargeCreates no charge
Tracks a payment’s lifecycleTracks the progress of setting up a payment method
Uses 3D secure to authenticate the customer for the applicable transactionUses 3D secure to authenticate a payment method without charging it, and creates a mandate or agreement for future charges

Asynchronous payments can be challenging to manage because they can depend on customer actions that happen outside of your application. For example, a user might need to confirm a payment using 3D Secure.

To simplify payment management, Stripe uses a state machine that allows you to track the state of a payment flow. To learn the states for each API, select the applicable tab below:

requires_payment_method

When the PaymentIntent is created, it has a status of requires_payment_method1 until a payment method is attached.

We recommend creating the PaymentIntent as soon as you know how much you want to charge, so that Stripe can record all the attempted payments.

requires_confirmation
Optional

After the customer provides their payment information, the PaymentIntent is ready to be confirmed.

In most integrations, this state is skipped because payment method information is submitted at the same time that the payment is confirmed.

requires_action

If the payment requires additional actions, such as authenticating with 3D Secure, the PaymentIntent has a status of requires_action1.

processing

After required actions are handled, the PaymentIntent moves to processing for asynchronous payment methods, such as bank debits. These types of payment methods can take up to a few days to process. Other payment methods, such as cards, are processed more quickly and don’t go into the processing status.

If you’re separately authorizing and capturing funds, your PaymentIntent can instead move to requires_capture. In that case, attempting to capture the funds moves it to processing.

succeeded

A PaymentIntent with a status of succeeded means that the payment flow it is driving is complete.

The funds are now in your account and you can confidently fulfill the order. If you need to refund the customer, you can use the Refunds API.

requires_payment_method

If the payment attempt fails (for example due to a decline), the PaymentIntent’s status returns to requires_payment_method so that the payment can be retried.

canceled

You can cancel a PaymentIntent at any point before it’s in a processing2 or succeeded state. Canceling it invalidates the PaymentIntent for future payment attempts, and can’t be undone. If any funds have been held, cancellation releases them.

PaymentIntents might also be automatically transitioned to the canceled state after they have been confirmed too many times.

1 Versions of the API before 2019-02-11 show requires_source instead of requires_payment_method and requires_source_action instead of requires_action.

2 You can cancel a PaymentIntent in the processing state when the associated Payment Method is US Bank Account. However, it might fail due to a limited and varying cancellation time window.

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