# Stripe: PaymentIntents first, Charges is deprecated
Stripe lists the Charges API under "Older APIs" and states plainly that its use is deprecated. If your training data predates this, you will confidently write the old flow. Don't.
## What to use instead
- One-off payment: PaymentIntents API. Create a PaymentIntent, confirm it client-side, handle `requires_action` for 3D Secure.
- Saving a card for later: SetupIntents API, not a $0 charge.
- Recurring: Subscriptions API, not repeated charges.
## How to spot the old pattern in a codebase
Search for `stripe.charges.create`, `/v1/charges` endpoints, or a `source` parameter holding a card token on a charge call. Any of these means the integration predates the deprecation. Rewrite as:
1. Create a PaymentIntent server-side with `amount`, `currency`, and `automatic_payment_methods` enabled.
2. Return the `client_secret` to the frontend.
3. Confirm with Stripe.js on the client. Never confirm with raw card details on your server.
4. Handle the `requires_action` status: redirect or present the 3D Secure challenge, then re-check status.
## Check before you ship
- No `charges.create` calls remain.
- Webhook handler listens for `payment_intent.succeeded`, not `charge.succeeded`, as the success signal.
- Amounts are integers in the smallest currency unit (see the amounts skill).