Handle Card Payment
Handle card payment
Last verified 2026-09-24
Is this helpful?
stripe.handleCardPayment(clientSecret: string, data?: object) handleCardPayment has been renamed to confirmCardPayment. 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 handleCardPayment, we think the new name and arguments are easier to understand and better convey what the method is doing. Use stripe.handleCardPayment(clientSecret, data?) to advance the PaymentIntent 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 PaymentIntent or if you want to attach an existing card to it. > Note that stripe.handleCardPayment 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.handleCardPayment may trigger a 3D Secure 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 of the PaymentIntent. - data Data to be sent with the request. - payment_method Use payment_method to specify an existing PaymentMethod 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 associated with the card. - card[token] Converts the provided token into a PaymentMethod to use for the payment. - shipping The shipping details for the payment, if collected. - receipt_email Email address that the receipt for the resulting payment will be sent to. - setup_future_usage Indicates that you intend to make future payments with this PaymentIntent's payment method. If present, the PaymentMethod used with this PaymentIntent can be attached to a Customer, even after the transaction completes. Use on_session if you intend to only reuse the PaymentMethod when your customer is present in your checkout flow. Use off_session if your customer may or may not be in your checkout flow. See saving card details after a payment to learn more. Stripe uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by SCA, using off_session will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect off-session payments for this customer. ### Example title Handle a card payment Is this helpful?