## Confirm the Checkout Session `confirm(options?: object)` Use this method to confirm the Checkout Session. You must either read [total.total.amount](https://docs.stripe.com/js/custom_checkout/session_object.md#custom_checkout_session_object-total-total-amount) or each of [total.total.minorUnitsAmount](https://docs.stripe.com/js/custom_checkout/session_object.md#custom_checkout_session_object-total-total-minorUnitsAmount) and [currency](https://docs.stripe.com/js/custom_checkout/session_object.md#custom_checkout_session_object-currency) and [minorUnitsAmountDivisor](https://docs.stripe.com/js/custom_checkout/session_object.md#custom_checkout_session_object-minorUnitsAmountDivisor) from the checkout object and display in your UI, otherwise an error will be thrown. This helps keep your checkout page in sync as the Checkout Session updates, including adding future Stripe features, with minimal UI code changes. - `options` Options for `confirm`. - `returnUrl` The URL to redirect your customer to after they authenticate or cancel their payment on the payment method’s app or site. This parameter is only required if you didn't specify the `return_url` when creating the Checkout Session. - `paymentMethod` The ID of a previously collected [PaymentMethod](https://docs.stripe.com/api/payment_methods/object.md) to use for confirmation. When this option is provided, Custom Checkout will ignore the payment method collected by the PaymentElement and attempt confirmation using the provided PaymentMethod. - `savePaymentMethod` Whether your Customer has provided consent to save the payment method for future purchases. Learn how to [save payment methods](https://docs.stripe.com/checkout/custom-checkout/save-payment-methods-checkout.md). - `redirect` By default, `confirm` will always redirect to your `returnUrl` after a successful confirmation. If you set `redirect: "if_required"`, then `confirm` will only redirect if your user chooses a redirect-based payment method. - `email` The Customer's email address. If provided, this value overrides any values previously set using [updateEmail](https://docs.stripe.com/js/custom_checkout/update_email.md). - `phoneNumber` The Customer's phone number. If provided, this value overrides any values previously set using [updatePhoneNumber](https://docs.stripe.com/js/custom_checkout/update_phone_number.md). - `billingAddress` The Customer's billing address. If provided, this value overrides any values previously set using [updateBillingAddress](https://docs.stripe.com/js/custom_checkout/update_billing_address.md). - `name` Full name. - `address` Address. - `country` Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - `line1` Address line 1 (e.g., street, PO Box, or company name). - `line2` Address line 2 (e.g., apartment, suite, unit, or building). - `city` City, district, suburb, town, or village. - `postal_code` ZIP or postal code. - `state` State, county, province, or region. - `shippingAddress` The Customer's shipping address. If provided, this value overrides any values previously set using [updateShippingAddress](https://docs.stripe.com/js/custom_checkout/update_shipping_address.md). - `name` Full name. - `address` Address. - `country` Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - `line1` Address line 1 (e.g., street, PO Box, or company name). - `line2` Address line 2 (e.g., apartment, suite, unit, or building). - `city` City, district, suburb, town, or village. - `postal_code` ZIP or postal code. - `state` State, county, province, or region. - `expressCheckoutConfirmEvent` The [event object](https://docs.stripe.com/js/elements_object/express_checkout_element_confirm_event.md#express_checkout_element_on_confirm-handler) passed to your Express Checkout Element `confirm` handler. ### Example ```title Confirm the Checkout Session ```