# Confirm a PaymentIntent

Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment. If the selected payment method requires additional authentication steps, the PaymentIntent will transition to the `requires_action` status and suggest additional actions via `next_action`. If payment fails, the PaymentIntent transitions to the `requires_payment_method` status or the `canceled` status if the confirmation limit is reached.  If payment succeeds, the PaymentIntent will transition to the `succeeded` status (or `requires_capture`, if `capture_method` is set to `manual`). If the `confirmation_method` is `automatic`, payment may be attempted using our [client SDKs](https://docs.stripe.com/docs/stripe-js/reference.md?api-version=2025-04-30.preview#stripe-handle-card-payment) and the PaymentIntent’s [client_secret](https://docs.stripe.com/api/payment_intents/confirm.md?api-version=2025-04-30.preview#payment_intent_object-client_secret). After `next_action`s are handled by the client, no additional confirmation is required to complete the payment. If the `confirmation_method` is `manual`, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to the `requires_confirmation` state after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be confirmed. After this limit is reached, any further calls to this endpoint will transition the PaymentIntent to the `canceled` state.

## Prerequisites

Before you can run the following code snippet, you need to call these APIs with the provided parameters to set up the prerequisite API object(s).

1. createPaymentIntent
POST /v1/payment_intents {"amount":2000,"currency":"usd","automatic_payment_methods":{"enabled":true}}

## Request

```curl
curl https://api.stripe.com/v1/payment_intents/{{PAYMENT_INTENT_ID}}/confirm \
  -u "<<YOUR_SECRET_KEY>>" \
  -H "Stripe-Version: 2025-04-30.preview" \
  -d payment_method=pm_card_visa \
  --data-urlencode return_url="https://www.example.com"
```

### Response

```json
{
  "id": "pi_3MtweELkdIwHu7ix0Dt0gF2H",
  "object": "payment_intent",
  "amount": 2000,
  "amount_capturable": 0,
  "amount_details": {
    "tip": {}
  },
  "amount_received": 2000,
  "application": null,
  "application_fee_amount": null,
  "automatic_payment_methods": {
    "enabled": true
  },
  "canceled_at": null,
  "cancellation_reason": null,
  "capture_method": "automatic",
  "client_secret": "pi_3MtweELkdIwHu7ix0Dt0gF2H_secret_ALlpPMIZse0ac8YzPxkMkFgGC",
  "confirmation_method": "automatic",
  "created": 1680802258,
  "currency": "usd",
  "customer": null,
  "description": null,
  "last_payment_error": null,
  "latest_charge": "ch_3MtweELkdIwHu7ix05lnLAFd",
  "livemode": false,
  "metadata": {},
  "next_action": null,
  "on_behalf_of": null,
  "payment_method": "pm_1MtweELkdIwHu7ixxrsejPtG",
  "payment_method_options": {
    "card": {
      "installments": null,
      "mandate_options": null,
      "network": null,
      "request_three_d_secure": "automatic"
    },
    "link": {
      "persistent_token": null
    }
  },
  "payment_method_types": [
    "card",
    "link"
  ],
  "processing": null,
  "receipt_email": null,
  "review": null,
  "setup_future_usage": null,
  "shipping": null,
  "source": null,
  "statement_descriptor": null,
  "statement_descriptor_suffix": null,
  "status": "succeeded",
  "transfer_data": null,
  "transfer_group": null
}
```

## Returns

Returns the resulting PaymentIntent after all possible transitions are applied.

## Parameters

- [`amount_details`](https://docs.stripe.com/api/payment_intents/confirm.md?query=amount_details&api-version=2025-04-30.preview) (object, optional)
  Provides industry-specific information about the amount.

- `capture_method` (enum, optional)
  Controls when the funds will be captured from the customer’s account.
Possible enum values:
  - `automatic`
    Stripe automatically captures funds when the customer authorizes the payment.

  - `automatic_async`
    (Default) Stripe asynchronously captures funds when the customer authorizes the payment. Recommended over `capture_method=automatic` due to improved latency. Read the [integration guide](https://docs.stripe.com/docs/payments/payment-intents/asynchronous-capture.md?api-version=2025-04-30.preview) for more information.

  - `manual`
    Place a hold on the funds when the customer authorizes the payment, but [don’t capture the funds until later](https://docs.stripe.com/docs/payments/capture-later.md?api-version=2025-04-30.preview). (Not all payment methods support this.)

- `confirmation_token` (string, optional)
  ID of the ConfirmationToken used to confirm this PaymentIntent.

  If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.

- `error_on_requires_action` (boolean, optional)
  Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://docs.stripe.com/docs/payments/save-card-without-authentication.md?api-version=2025-04-30.preview).

- `mandate` (string, optional)
  ID of the mandate that’s used for this payment.

- [`mandate_data`](https://docs.stripe.com/api/payment_intents/confirm.md?query=mandate_data&api-version=2025-04-30.preview) (object, optional)
  This hash contains details about the mandate to create.

- `off_session` (boolean | string, optional)
  Set to `true` to indicate that the customer isn’t in your checkout flow during this payment attempt and can’t authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://docs.stripe.com/docs/payments/cards/charging-saved-cards.md?api-version=2025-04-30.preview).

- [`payment_details`](https://docs.stripe.com/api/payment_intents/confirm.md?query=payment_details&api-version=2025-04-30.preview) (object, optional)
  Provides industry-specific information about the charge.

- `payment_method` (string, optional)
  ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://docs.stripe.com/docs/payments/payment-methods/transitioning.md?api-version=2025-04-30.preview#compatibility) object) to attach to this PaymentIntent.

- [`payment_method_data`](https://docs.stripe.com/api/payment_intents/confirm.md?query=payment_method_data&api-version=2025-04-30.preview) (object, optional)
  If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear in the [payment_method](https://docs.stripe.com/docs/api/payment_intents/object.md?api-version=2025-04-30.preview#payment_intent_object-payment_method) property on the PaymentIntent.

- [`payment_method_options`](https://docs.stripe.com/api/payment_intents/confirm.md?query=payment_method_options&api-version=2025-04-30.preview) (object, optional)
  Payment method-specific configuration for this PaymentIntent.

- `payment_method_types` (array of strings, optional)
  The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).

- [`radar_options`](https://docs.stripe.com/api/payment_intents/confirm.md?query=radar_options&api-version=2025-04-30.preview) (object, optional)
  Options to configure Radar. Learn more about [Radar Sessions](https://docs.stripe.com/docs/radar/radar-session.md?api-version=2025-04-30.preview).

- `receipt_email` (string, optional)
  Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).

- `return_url` (string, optional)
  The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method’s app or site. If you’d prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter is only used for cards and other redirect-based payment methods.

- `setup_future_usage` (enum, optional)
  Indicates that you intend to make future payments with this PaymentIntent’s payment method.

  If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment.md?api-version=2025-04-30.preview) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don’t provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach.md?api-version=2025-04-30.preview) the payment method to a Customer after the transaction completes.

  If the payment method is `card_present` and isn’t a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object.md?api-version=2025-04-30.preview#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

  When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication.md?api-version=2025-04-30.preview).

  If you’ve already set `setup_future_usage` and you’re performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
Possible enum values:
  - `off_session`
    Use `off_session` if your customer may or may not be present in your checkout flow.

  - `on_session`
    Use `on_session` if you intend to only reuse the payment method when your customer is present in your checkout flow.

- [`shipping`](https://docs.stripe.com/api/payment_intents/confirm.md?query=shipping&api-version=2025-04-30.preview) (object, optional)
  Shipping information for this PaymentIntent.

- `use_stripe_sdk` (boolean, optional)
  Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
