## Handle card setup `stripe.handleCardSetup(clientSecret: string, data?: object)` *`handleCardSetup` has been renamed to [confirmCardSetup](#stripe_confirm_card_setup). In addition to the rename, we have slightly modified the arguments. These changes do not affect the behavior of the method. While we have no plans to ever remove support for `handleCardSetup`, we think the new name and arguments are easier to understand and better convey what the method is doing.* Use `stripe.handleCardSetup(clientSecret, data)` to advance the `SetupIntent` towards completion when you are not gathering payment method information from an `Element`. Call this variation when you have already attached a card to this `SetupIntent` or if you want to attach an existing card to it. > Note that `stripe.handleCardSetup` 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.handleCardSetup` may trigger a [3D Secure](https://docs.stripe.com/payments/3d-secure.md) authentication challenge. > This will be shown in a modal dialog and may be confusing for customers using assistive technologies like screen readers. > You should make your form accessible by ensuring that success or error messages are clearly read out after this method completes. - `clientSecret` The [client secret](https://docs.stripe.com/api/setup_intents/object.md#setup_intent_object-client_secret) of the `SetupIntent`. - `data` Data to be sent with the request. - `payment_method` Use `payment_method` to specify an existing [PaymentMethod](https://docs.stripe.com/api/payment_methods.md) to use for this payment. Only one of `payment_method_data` and `payment_method` is required. - `payment_method_data` Use this parameter to supply additional data relevant to the payment method, such as billing details. - `billing_details` The [billing details](https://docs.stripe.com/api/payment_methods/create.md#create_payment_method-billing_details) associated with the card. - `card[token]` Converts the provided token into a `PaymentMethod` to use for the payment. ### Example ```title Handle card setup ```