## Payment Intents

Accept global payments online with the [Payment Intents APIs](https://docs.stripe.com/payments/payment-intents.md). For step-by-step instructions on using the Payment Intents APIs, see the [accept a payment guide](https://docs.stripe.com/payments/accept-a-payment.md).

The following Stripe.js methods are available to use as part of your integration.

## Confirm a payment

`stripe.confirmPayment(options: object)`

Use `stripe.confirmPayment` to confirm a [PaymentIntent](https://docs.stripe.com/api/payment_intents.md) using data collected by the [Payment Element](https://docs.stripe.com/js/element/payment_element.md), or with manually provided data via `confirmParams`.

When called, `stripe.confirmPayment` will attempt to complete any [required actions](https://docs.stripe.org/payments/intents.md), such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page. Your user will be redirected to the `return_url` you pass once the confirmation is complete.

> The `stripe.confirmPayment` might take several seconds to complete.
> During that time, disable your form from being resubmitted and show a waiting indicator, such as a spinner. If you receive an error result, show this error to the user, re-enable the form, and hide the waiting indicator.

- `options`
  - `elements` The [Elements](#payment_element_create) instance used to create the Payment Element. Required if you [collect payment details before creating an Intent](https://docs.stripe.com/payments/accept-a-payment-deferred.md?platform=web&type=payment). It's always required if you don't provide a `clientSecret`.
  - `clientSecret` The PaymentIntent's client secret. Required if you [collect payment details before creating an Intent](https://docs.stripe.com/payments/accept-a-payment-deferred.md?platform=web&type=payment). It's always required if you don't provide an `elements` instance containing a [client secret](https://docs.stripe.com/api/payment_intents/object.md#payment_intent_object-client_secret).
  - `confirmParams` Parameters that will be passed on to the Stripe API. You can also use the parameters from the [Payment Intents API](https://docs.stripe.com/api/payment_intents/confirm.md), except for `setup_future_usage`.
  - `return_url` The URL that Stripe redirects your customer to after they complete the payment. You can use the following query parameters, `payment_intent` (the PaymentIntent's ID) or `payment_intent_client_secret` (the PaymentIntent's client secret), to retrieve the PaymentIntent's [status](https://docs.stripe.com/api/payment_intents/object.md#payment_intent_object-status). When Stripe redirects your customer, the resulting URL has these query parameters appended. You can also append your own query parameters to the `return_url`, which persist through the redirect process. If you don't want to redirect for card payments after payment completion, set [redirect](https://docs.stripe.com/js/payment_intents/confirm_payment.md#confirm_payment_intent-options-redirect) to `if_required`.
  - `shipping` The [shipping details](https://docs.stripe.com/api/payment_intents/confirm.md#confirm_payment_intent-shipping) for the payment, if collected. **Note**: When