## Handle a card action Use `stripe.handleCardAction` in the Payment Intents API [manual confirmation](/payments/payment-intents/web-manual.md) flow to handle a [PaymentIntent](/api/payment_intents.md) with the `requires_action` status. It will throw an error if the `PaymentIntent` has a different status. > Note that `stripe.handleCardAction` may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. > > Additionally, `stripe.handleCardAction` may trigger a [3D Secure](/payments/3d-secure.md) authentication challenge. > The authentication challenge requires a context switch that can be hard to follow on a screen-reader. > Ensure that your form is accessible by ensuring that success or error messages are clearly read out. This method returns a `Promise` which resolves with a `result` object. This object has either: * `result.paymentIntent`: a [PaymentIntent](/api/payment_intents) with the `requires_confirmation` status to confirm server-side. * `result.error`: an error. Refer to the [API reference](/api/errors) for all possible errors. **Syntax:** `stripe.handleCardAction(...)` - `clientSecret` (string) **required** The [client secret](/api/payment_intents/object.md#payment_intent_object-client_secret) of the `PaymentIntent` to handle. ### Handle a card action ```js stripe .handleCardAction('{PAYMENT_INTENT_CLIENT_SECRET}') .then(function(result) { // Handle result.error or result.paymentIntent }); ``` ```es_next const {paymentIntent, error} = await stripe.handleCardAction( '{{PAYMENT_INTENT_CLIENT_SECRET}}', ); // Handle the paymentIntent or error ```