Start with Checkout Sessions unless you need to own the payment state machine. Use a Payment Intent when your application needs to collect payment details in a separate step, confirm a payment explicitly, or reuse the same intent while the customer completes additional action.

Create a payment intent

Create it on your server after resolving the cart and customer. The API key never crosses this boundary.
Return only the intent ID and the short-lived client token required by the browser. Use the SDK or the intent confirmation endpoint to complete customer action.

Confirm and handle action

An intent can require a payment method, customer action, processing time, or no further action. Render the appropriate state, then retrieve the intent or wait for the verified event. Never treat a redirect return as confirmation.
Use Fulfill orders safely for the confirmed-event boundary. Cancel an intent only when the order is genuinely abandoned or expired. The verified payment.confirmed webhook remains the fulfillment authority when the browser flow ends before the server receives confirmation.