Skip to content

Instantly share code, notes, and snippets.

@daugaard47
Created May 15, 2023 19:11
Show Gist options
  • Save daugaard47/4c547bd29eaa534ef7426fd132caab05 to your computer and use it in GitHub Desktop.
Save daugaard47/4c547bd29eaa534ef7426fd132caab05 to your computer and use it in GitHub Desktop.
[{"intro":{"title":"Introduction","group_title":"Setting up","group_anchor":"setting_up","anchor":"intro","section_anchor":"intro","subsection_anchors":null,"path":"/","gate":false,"data":{"section_type":"generic","title":"Stripe.js reference","description":"This reference documents every object and method available in Stripe’s browser-side JavaScript library, Stripe.js.\nUse our [React Stripe.js reference](/docs/stripe-js/react) if you want to add Elements to your React based app.\n\nYou can use Stripe.js’ APIs to tokenize customer information,\ncollect sensitive payment details using customizable [Stripe Elements](/docs/payments/elements),\nand accept payments with [browser payment APIs](/docs/stripe-js/elements/payment-request-button)\nlike Apple Pay and the Payment Request API.\n","section_tag":"intro"},"display_on_load":true},"including_stripe_js":{"title":"Including Stripe.js","group_title":"Setting up","group_anchor":"setting_up","anchor":"including_stripe_js","section_anchor":"including_stripe_js","subsection_anchors":null,"path":"/including","gate":false,"data":{"section_type":"generic","title":"Including Stripe.js","description":"Include the Stripe.js script on each page of your site—it should always be loaded directly from `https://js.stripe.com`, rather than included in a bundle or hosted yourself.\n\nTo best leverage Stripe’s advanced fraud functionality, include this script on every page, not just the checkout page.\nThis [allows Stripe to detect suspicious behavior](/docs/disputes/prevention/advanced-fraud-detection) that may be indicative of fraud as customers browse your website.\n\n**Using Stripe.js as a module**\n\nWe also provide an npm package that makes it easier to load and use Stripe.js as a module.\nFor more information, check out the [project on GitHub](https://github.com/stripe/stripe-js).\n\n**Asynchronous and deferred loading of Stripe.js**\n\nAsynchronous loading of JavaScript is generally recommended, as it can improve the user experience of your site by not blocking DOM rendering during [script loading.](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/What_is_JavaScript#script_loading_strategies)\nThe easiest way to asynchronously load Stripe.js is to use the npm module as described above.\nIt does asynchronous loading by default.\n\nYou can also load Stripe.js using the `async` or `defer` attribute on the script tag.\nNote, however, that with asynchronous loading any API calls will have to be made only after the script execution has finished.\n\n","request":{"title":"Including Stripe.js","snippets":{"html":"\u003Cscript src=\"https://js.stripe.com/v3/\"\u003E\u003C/script\u003E\n"}},"section_tag":"including_stripe_js"},"display_on_load":true},"init_stripe_js":{"title":"Initializing Stripe.js","group_title":"Setting up","group_anchor":"setting_up","anchor":"init_stripe_js","section_anchor":"init_stripe_js","subsection_anchors":null,"path":"/initializing","gate":false,"data":{"section_type":"method","title":"Initializing Stripe.js","description":"Use `Stripe(publishableKey, options?)` to create an instance of the **Stripe object**. The Stripe object is your entrypoint to the rest of the Stripe.js SDK.\n\nYour Stripe publishable [API key](/docs/keys) is required when calling this function, as it identifies your website to Stripe.\n\nWe've prefilled the example with your [test API key](https://dashboard.stripe.com/account/apikeys), `pk_test_VD0jz708gfrfx9oMbWDopyaS`, which you can also find [here](https://dashboard.stripe.com/apikeys).\nOnly you can see this value.\n\n\nWhen you’re ready to accept live payments, replace the test key with your live key in production.\nLearn more about how API keys work in [test mode and live mode](/docs/dashboard#viewing-test-data).\n","signature":{"object_name":"Stripe","args":[{"name":"publishableKey","documentation":"Your publishable key.\n","validation":"string","required":true},{"name":"options","documentation":"Initialization options.\n","validation":"object","subspec":[{"name":"stripeAccount","documentation":"For usage with [Connect](/docs/connect) only.\nSpecifying a connected account ID (e.g., `acct_24BFMpJ1svR5A89k`) allows you to perform actions on behalf of that account.\n","validation":"string"},{"name":"apiVersion","documentation":"Override your account's [API version](/docs/api/versioning).\n","validation":"string"},{"name":"locale","documentation":"A [locale](#supported_locales) used to globally configure localization in Stripe.\nSetting the locale here will localize error strings for all Stripe.js methods.\nIt will also configure the locale for [Elements](#element_mount).\nDefault is `auto` (Stripe detects the locale of the browser).\n","validation":"string"}]}]},"table_content":{"items":[{"name":"publishableKey","documentation":"Your publishable key.\n","validation":"string","required":true},{"name":"options","documentation":"Initialization options.\n","validation":"object","subspec":[{"name":"stripeAccount","documentation":"For usage with [Connect](/docs/connect) only.\nSpecifying a connected account ID (e.g., `acct_24BFMpJ1svR5A89k`) allows you to perform actions on behalf of that account.\n","validation":"string"},{"name":"apiVersion","documentation":"Override your account's [API version](/docs/api/versioning).\n","validation":"string"},{"name":"locale","documentation":"A [locale](#supported_locales) used to globally configure localization in Stripe.\nSetting the locale here will localize error strings for all Stripe.js methods.\nIt will also configure the locale for [Elements](#element_mount).\nDefault is `auto` (Stripe detects the locale of the browser).\n","validation":"string"}]}]},"request":{"title":"Initializing Stripe.js","snippets":{"js":"var stripe = Stripe('pk_test_VD0jz708gfrfx9oMbWDopyaS');\n","es_next":"const stripe = Stripe('pk_test_VD0jz708gfrfx9oMbWDopyaS');\n"}},"section_tag":"init_stripe_js"},"display_on_load":true},"elements_intro":{"title":"Introduction","group_title":"The Elements object","group_anchor":"elements_object","anchor":"elements_intro","section_anchor":"elements_intro","subsection_anchors":null,"path":"/elements_object","gate":false,"data":{"section_type":"generic","title":"The Elements object","description":"[Stripe Elements](/docs/payments/elements) are customizable UI components used to collect sensitive information in your payment forms.\n\nUse an `Elements` instance to create and manage a group of individual [Element](/docs/js/element) instances.\n","section_tag":"elements_intro"},"display_on_load":true},"stripe_elements":{"title":"Create an Elements object","group_title":"The Elements object","group_anchor":"elements_object","anchor":"stripe_elements","section_anchor":"stripe_elements","subsection_anchors":null,"path":"/elements_object/create","gate":false,"data":{"section_type":"method","title":"Create an Elements instance","description":"This method creates an `Elements` instance, which manages a group of elements.\n","signature":{"object_name":"stripe","method_name":"elements","args":[{"name":"options","required":false,"expanded":true,"validation":"object","documentation":"A set of options to create this `Elements` instance with.\n","subspec":[{"name":"fonts","documentation":"An array of custom fonts, which elements created from the `Elements` object can use. Fonts can be specified as [CssFontSource](#css_font_source_object) or [CustomFontSource](#custom_font_source_object) objects.\n","validation":"array","required":false},{"name":"locale","documentation":"A [locale](#supported_locales) to display placeholders and error strings in.\nDefault is `auto` (Stripe detects the locale of the browser).\n\nSetting the locale does not affect the behavior of postal code validation—a valid postal code for the billing country of the card is still required.\n","validation":"string","required":false},{"name":"clientSecret","documentation":"Required to use with the [Payment Element](/docs/payments/payment-element) and the [Link Authentication Element](/docs/payments/link).\n\nThe [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) for a PaymentIntent or SetupIntent.\n","validation":"string","required":true,"requirement_text":"Conditionally required"},{"name":"appearance","documentation":"Supported for the [Payment Element](/docs/payments/payment-element), the [Link Authentication Element](/docs/payments/link), and the [Address Element](/docs/elements/address-element/).\n\nMatch the design of your site with the [appearance option](/docs/elements/appearance-api).\nThe layout of each Element stays consistent, but you can modify colors, fonts, borders, padding, and more.\n","validation":"object","required":false},{"name":"loader","documentation":"Supported for the [Payment Element](/docs/payments/payment-element), the [Link Authentication Element](/docs/payments/link), and the [Address Element](/docs/elements/address-element/).\n\nDisplay skeleton loader UI while waiting for Elements to be fully loaded, after they are mounted.\nDefault is `'auto'` (Stripe determines if a loader UI should be shown).\n","validation":"'auto' | 'always' | 'never'"}]}]},"table_content":{"items":[{"name":"options","required":false,"expanded":true,"validation":"object","documentation":"A set of options to create this `Elements` instance with.\n","subspec":[{"name":"fonts","documentation":"An array of custom fonts, which elements created from the `Elements` object can use. Fonts can be specified as [CssFontSource](#css_font_source_object) or [CustomFontSource](#custom_font_source_object) objects.\n","validation":"array","required":false},{"name":"locale","documentation":"A [locale](#supported_locales) to display placeholders and error strings in.\nDefault is `auto` (Stripe detects the locale of the browser).\n\nSetting the locale does not affect the behavior of postal code validation—a valid postal code for the billing country of the card is still required.\n","validation":"string","required":false},{"name":"clientSecret","documentation":"Required to use with the [Payment Element](/docs/payments/payment-element) and the [Link Authentication Element](/docs/payments/link).\n\nThe [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) for a PaymentIntent or SetupIntent.\n","validation":"string","required":true,"requirement_text":"Conditionally required"},{"name":"appearance","documentation":"Supported for the [Payment Element](/docs/payments/payment-element), the [Link Authentication Element](/docs/payments/link), and the [Address Element](/docs/elements/address-element/).\n\nMatch the design of your site with the [appearance option](/docs/elements/appearance-api).\nThe layout of each Element stays consistent, but you can modify colors, fonts, borders, padding, and more.\n","validation":"object","required":false},{"name":"loader","documentation":"Supported for the [Payment Element](/docs/payments/payment-element), the [Link Authentication Element](/docs/payments/link), and the [Address Element](/docs/elements/address-element/).\n\nDisplay skeleton loader UI while waiting for Elements to be fully loaded, after they are mounted.\nDefault is `'auto'` (Stripe determines if a loader UI should be shown).\n","validation":"'auto' | 'always' | 'never'"}]}]},"request":{"title":"Create an Elements instance","snippets":{"js":"var elements = stripe.elements({\n clientSecret: 'CLIENT_SECRET',\n});\n","es_next":"const elements = stripe.elements({\n clientSecret: 'CLIENT_SECRET',\n});\n"}},"section_tag":"stripe_elements"},"display_on_load":true},"stripe_elements_no_intent":{"title":"Create an Elements object without an Intent","group_title":"The Elements object","group_anchor":"elements_object","anchor":"stripe_elements_no_intent","section_anchor":"stripe_elements_no_intent","subsection_anchors":null,"path":"/elements_object/create_without_intent","gate":false,"data":{"section_type":"method","title":"Create an Elements instance without an intent","description":"This method creates an `Elements` instance, which manages a group of elements.\n\nUse `stripe.elements()` with `mode`, `currency`, and `amount` when initializing the Payment Element without an Intent. Refer to [Collect payment details before creating an Intent](/docs/payments/accept-a-payment-deferred) for further details.\n","signature":{"object_name":"stripe","method_name":"elements","args":[{"name":"options","required":false,"expanded":true,"validation":"object","documentation":"A set of options to create this `Elements` instance with.\n","subspec":[{"name":"fonts","documentation":"An array of custom fonts, which elements created from the `Elements` object can use. Fonts can be specified as [CssFontSource](#css_font_source_object) or [CustomFontSource](#custom_font_source_object) objects.\n","validation":"array","required":false},{"name":"locale","documentation":"A [locale](#supported_locales) to display placeholders and error strings in.\nDefault is `auto` (Stripe detects the locale of the browser).\n\nSetting the locale does not affect the behavior of postal code validation—a valid postal code for the billing country of the card is still required.\n","validation":"string","required":false},{"name":"mode","documentation":"Required to use with the [Payment Element](/docs/payments/payment-element).\n\nFilters out payment methods based on intended use.\n","validation":"'payment' | 'setup' | 'subscription'","required":true,"requirement_text":"Conditionally required"},{"name":"currency","documentation":"Required to use with the [Payment Element](/docs/payments/payment-element).\n\nThree-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](/docs/currencies).\n","validation":"string","required":true,"requirement_text":"Conditionally required"},{"name":"amount","documentation":"Used with the [Payment Element](/docs/payments/payment-element). Required when `mode` is `payment` or `subscription`.\n\nShown in Apple Pay, Google Pay, or Buy now pay later UIs. The amount intended to be collected from the customer right now.\nA positive integer representing how much to charge in the [smallest currency unit](/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100\nto charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](/docs/currencies#minimum-and-maximum-charge-amounts).\nThe amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).\n","validation":"number","required":true,"requirement_text":"Conditionally required"},{"name":"setupFutureUsage","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nIndicates that you intend to make future payments with the payment details collected by the Payment Element.\n\nThis should match the [setup_future_usage](/docs/api/payment_intents/create#create_payment_intent-setup_future_usage) provided on the Intent used when confirming payment.\n","validation":"'on_session' | 'off_session'"},{"name":"captureMethod","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nInfluences available payment methods. This should match the [capture_method](/docs/api/payment_intents/create#create_payment_intent-capture_method) provided on the Intent used when confirming payment.\n","validation":"'automatic' | 'automatic_async' | 'manual'"},{"name":"onBehalfOf","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nThe Stripe account ID which is the business of record. See [use cases](/docs/connect/charges) to determine if this option is relevant for your integration. This should match the [on_behalf_of](/docs/api/payment_intents/create#create_payment_intent-on_behalf_of) provided on the Intent used when confirming payment.\n","validation":"string","requirement_text":"Connect only"},{"name":"paymentMethodTypes","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nA list of payment method types to render. You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).\n","validation":"array"},{"name":"paymentMethodCreation","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nAllows PaymentMethods to be created from the Elements instance using [stripe.createPaymentMethod](/docs/js/payment_methods/create_payment_method_elements).\n","validation":"'manual'"},{"name":"appearance","documentation":"Supported for the [Payment Element](/docs/payments/payment-element), the [Link Authentication Element](/docs/payments/link), and the [Address Element](/docs/elements/address-element/).\n\nMatch the design of your site with the [appearance option](/docs/elements/appearance-api).\nThe layout of each Element stays consistent, but you can modify colors, fonts, borders, padding, and more.\n","validation":"object","required":false},{"name":"loader","documentation":"Supported for the [Payment Element](/docs/payments/payment-element), the [Link Authentication Element](/docs/payments/link), and the [Address Element](/docs/elements/address-element/).\n\nDisplay skeleton loader UI while waiting for Elements to be fully loaded, after they are mounted.\nDefault is `'auto'` (Stripe determines if a loader UI should be shown).\n","validation":"'auto' | 'always' | 'never'"}]}]},"table_content":{"items":[{"name":"options","required":false,"expanded":true,"validation":"object","documentation":"A set of options to create this `Elements` instance with.\n","subspec":[{"name":"fonts","documentation":"An array of custom fonts, which elements created from the `Elements` object can use. Fonts can be specified as [CssFontSource](#css_font_source_object) or [CustomFontSource](#custom_font_source_object) objects.\n","validation":"array","required":false},{"name":"locale","documentation":"A [locale](#supported_locales) to display placeholders and error strings in.\nDefault is `auto` (Stripe detects the locale of the browser).\n\nSetting the locale does not affect the behavior of postal code validation—a valid postal code for the billing country of the card is still required.\n","validation":"string","required":false},{"name":"mode","documentation":"Required to use with the [Payment Element](/docs/payments/payment-element).\n\nFilters out payment methods based on intended use.\n","validation":"'payment' | 'setup' | 'subscription'","required":true,"requirement_text":"Conditionally required"},{"name":"currency","documentation":"Required to use with the [Payment Element](/docs/payments/payment-element).\n\nThree-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](/docs/currencies).\n","validation":"string","required":true,"requirement_text":"Conditionally required"},{"name":"amount","documentation":"Used with the [Payment Element](/docs/payments/payment-element). Required when `mode` is `payment` or `subscription`.\n\nShown in Apple Pay, Google Pay, or Buy now pay later UIs. The amount intended to be collected from the customer right now.\nA positive integer representing how much to charge in the [smallest currency unit](/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100\nto charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](/docs/currencies#minimum-and-maximum-charge-amounts).\nThe amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).\n","validation":"number","required":true,"requirement_text":"Conditionally required"},{"name":"setupFutureUsage","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nIndicates that you intend to make future payments with the payment details collected by the Payment Element.\n\nThis should match the [setup_future_usage](/docs/api/payment_intents/create#create_payment_intent-setup_future_usage) provided on the Intent used when confirming payment.\n","validation":"'on_session' | 'off_session'"},{"name":"captureMethod","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nInfluences available payment methods. This should match the [capture_method](/docs/api/payment_intents/create#create_payment_intent-capture_method) provided on the Intent used when confirming payment.\n","validation":"'automatic' | 'automatic_async' | 'manual'"},{"name":"onBehalfOf","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nThe Stripe account ID which is the business of record. See [use cases](/docs/connect/charges) to determine if this option is relevant for your integration. This should match the [on_behalf_of](/docs/api/payment_intents/create#create_payment_intent-on_behalf_of) provided on the Intent used when confirming payment.\n","validation":"string","requirement_text":"Connect only"},{"name":"paymentMethodTypes","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nA list of payment method types to render. You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).\n","validation":"array"},{"name":"paymentMethodCreation","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nAllows PaymentMethods to be created from the Elements instance using [stripe.createPaymentMethod](/docs/js/payment_methods/create_payment_method_elements).\n","validation":"'manual'"},{"name":"appearance","documentation":"Supported for the [Payment Element](/docs/payments/payment-element), the [Link Authentication Element](/docs/payments/link), and the [Address Element](/docs/elements/address-element/).\n\nMatch the design of your site with the [appearance option](/docs/elements/appearance-api).\nThe layout of each Element stays consistent, but you can modify colors, fonts, borders, padding, and more.\n","validation":"object","required":false},{"name":"loader","documentation":"Supported for the [Payment Element](/docs/payments/payment-element), the [Link Authentication Element](/docs/payments/link), and the [Address Element](/docs/elements/address-element/).\n\nDisplay skeleton loader UI while waiting for Elements to be fully loaded, after they are mounted.\nDefault is `'auto'` (Stripe determines if a loader UI should be shown).\n","validation":"'auto' | 'always' | 'never'"}]}]},"request":{"title":"Create an Elements instance without an intent","snippets":{"js":"var elements = stripe.elements({\n mode: 'payment',\n currency: 'usd',\n amount: 1099,\n});\n","es_next":"const elements = stripe.elements({\n mode: 'payment',\n currency: 'usd',\n amount: 1099,\n});\n"}},"section_tag":"stripe_elements_no_intent"},"display_on_load":true},"elements_update":{"title":"Update an Elements object","group_title":"The Elements object","group_anchor":"elements_object","anchor":"elements_update","section_anchor":"elements_update","subsection_anchors":null,"path":"/elements_object/update","gate":false,"data":{"section_type":"method","title":"Update Elements Options","description":"This method updates options on an existing instance of `Elements`. Note that not all options (e.g. `fonts`) are updatable.\n","signature":{"object_name":"elements","method_name":"update","args":[{"name":"options","required":true,"expanded":true,"validation":"object","documentation":"A set of options to update this `Elements` instance with.\n","subspec":[{"name":"locale","documentation":"A [locale](#supported_locales) to display placeholders and error strings in.\nDefault is `auto` (Stripe detects the locale of the browser).\n\nSetting the locale does not affect the behavior of postal code validation—a valid postal code for the billing country of the card is still required.\n","validation":"string","required":false},{"name":"mode","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nFilters out payment methods based on intended use.\n","validation":"'payment' | 'setup' | 'subscription'"},{"name":"currency","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nThree-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](/docs/currencies).\n","validation":"string"},{"name":"amount","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nShown in Apple Pay, Google Pay, or Buy now pay later UIs. The amount intended to be collected from the customer right now.\nA positive integer representing how much to charge in the [smallest currency unit](/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100\nto charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](/docs/currencies#minimum-and-maximum-charge-amounts).\nThe amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).\n","validation":"number"},{"name":"setupFutureUsage","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nInfluences available payment methods and the [terms](/docs/js/elements_object/create_payment_element#payment_element_create-options-terms) shown by the Payment Element.\n\nThis should match the [setup_future_usage](/docs/api/payment_intents/create#create_payment_intent-setup_future_usage) provided on the Intent used when confirming payment.\n","validation":"'on_session' | 'off_session'"},{"name":"captureMethod","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nInfluences available payment methods. This should match the [capture method](/docs/api/payment_intents/create#create_payment_intent-capture_method) provided on the PaymentIntent or SetupIntent used when confirming payment.\n","validation":"'automatic' | 'automatic_async' | 'manual'"},{"name":"onBehalfOf","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nThe Stripe account ID which is the business of record. See [use cases](/docs/connect/charges) to determine if this option is relevant for your integration. This should match the [on_behalf_of](/docs/api/payment_intents/create#create_payment_intent-on_behalf_of) provided on the Intent used when confirming payment.\n","validation":"string","requirement_text":"Connect only"},{"name":"paymentMethodTypes","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nInstead of using automatic payment methods, declare specific [payment methods](/docs/payments/payment-methods/overview) to enable.\n","validation":"array"},{"name":"appearance","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nMatch the design of your site with the [appearance option](/docs/elements/appearance-api).\nThe layout of each Element stays consistent, but you can modify colors, fonts, borders, padding, and more.\n","validation":"object"}]}]},"table_content":{"items":[{"name":"options","required":true,"expanded":true,"validation":"object","documentation":"A set of options to update this `Elements` instance with.\n","subspec":[{"name":"locale","documentation":"A [locale](#supported_locales) to display placeholders and error strings in.\nDefault is `auto` (Stripe detects the locale of the browser).\n\nSetting the locale does not affect the behavior of postal code validation—a valid postal code for the billing country of the card is still required.\n","validation":"string","required":false},{"name":"mode","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nFilters out payment methods based on intended use.\n","validation":"'payment' | 'setup' | 'subscription'"},{"name":"currency","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nThree-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](/docs/currencies).\n","validation":"string"},{"name":"amount","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nShown in Apple Pay, Google Pay, or Buy now pay later UIs. The amount intended to be collected from the customer right now.\nA positive integer representing how much to charge in the [smallest currency unit](/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100\nto charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](/docs/currencies#minimum-and-maximum-charge-amounts).\nThe amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).\n","validation":"number"},{"name":"setupFutureUsage","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nInfluences available payment methods and the [terms](/docs/js/elements_object/create_payment_element#payment_element_create-options-terms) shown by the Payment Element.\n\nThis should match the [setup_future_usage](/docs/api/payment_intents/create#create_payment_intent-setup_future_usage) provided on the Intent used when confirming payment.\n","validation":"'on_session' | 'off_session'"},{"name":"captureMethod","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nInfluences available payment methods. This should match the [capture method](/docs/api/payment_intents/create#create_payment_intent-capture_method) provided on the PaymentIntent or SetupIntent used when confirming payment.\n","validation":"'automatic' | 'automatic_async' | 'manual'"},{"name":"onBehalfOf","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nThe Stripe account ID which is the business of record. See [use cases](/docs/connect/charges) to determine if this option is relevant for your integration. This should match the [on_behalf_of](/docs/api/payment_intents/create#create_payment_intent-on_behalf_of) provided on the Intent used when confirming payment.\n","validation":"string","requirement_text":"Connect only"},{"name":"paymentMethodTypes","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nInstead of using automatic payment methods, declare specific [payment methods](/docs/payments/payment-methods/overview) to enable.\n","validation":"array"},{"name":"appearance","documentation":"Used with the [Payment Element](/docs/payments/payment-element).\n\nMatch the design of your site with the [appearance option](/docs/elements/appearance-api).\nThe layout of each Element stays consistent, but you can modify colors, fonts, borders, padding, and more.\n","validation":"object"}]}]},"request":{"title":"Update Elements","snippets":{"js":"elements.update({locale: 'fr'});\n","es_next":"elements.update({locale: 'fr'});\n"}},"section_tag":"elements_update"},"display_on_load":true},"elements_fetch_updates":{"title":"Fetch Elements Updates","group_title":"The Element","group_anchor":"element","anchor":"elements_fetch_updates","section_anchor":"payment_element","subsection_anchors":null,"path":"/elements_object/fetch_updates","gate":false,"data":{"section_type":"method","title":"Fetch Server Updates","description":"Used with the [Payment Element](/docs/payments/payment-element).\n\nThis method fetches updates from the associated [PaymentIntent](/docs/api/payment_intents) or [SetupIntent](/docs/api/setup_intents) on an existing instance of `Elements`, and reflects these updates in the Payment Element.\n","signature":{"object_name":"elements","method_name":"fetchUpdates"},"request":{"title":"Fetch Server Updates","snippets":{"js":"elements.fetchUpdates()\n .then(function(result) {\n // Handle result.error\n });\n","es_next":"const {error} = await elements.fetchUpdates();\n"}},"returns":"This method returns a `Promise` which resolves with a result object.\nIf this method succeeds, the result object will be empty.\nIf this method fails, the result object will contain a localized error message in the `error.message` field. If the associated [PaymentIntent](/docs/api/payment_intents) or [SetupIntent](/docs/api/setup_intents) is in an unexpected status, the result object will also contain the intent's status in the `error.status` field.\n","section_tag":"elements_fetch_updates"},"display_on_load":true},"elements_submit":{"title":"Submit an Elements object","group_title":"The Elements object","group_anchor":"elements_object","anchor":"elements_submit","section_anchor":"elements_submit","subsection_anchors":null,"path":"/elements/submit","gate":false,"data":{"section_type":"method","title":"Submit ","description":"Use `elements.submit()` when creating the [Elements object without an Intent](#stripe_elements_no_intent).\n\nBefore confirming a payment, call `elements.submit()` to validate the form fields and collect any data required for [wallets](#payment_element_create-options-wallets).\n","signature":{"object_name":"element","method_name":"submit"},"request":{"title":"Submit Elements","snippets":{"js":"elements.submit()\n .then(function(result) {\n // Handle result.error\n });\n","es_next":"const {error} = await elements.submit();\n"}},"section_tag":"elements_submit"},"display_on_load":true},"element_intro":{"title":"Introduction","group_title":"The Element","group_anchor":"element","anchor":"element_intro","section_anchor":"element_intro","subsection_anchors":null,"path":"/element","gate":false,"data":{"section_type":"generic","title":"The Element","description":"Use `Element` instances to collect sensitive information in your checkout flow.\n","section_tag":"element_intro"},"display_on_load":true},"payment_element":{"title":"Payment Element","group_title":"The Element","group_anchor":"element","anchor":"payment_element","section_anchor":"payment_element","subsection_anchors":["payment_element_create","payment_element_get","payment_element_update","elements_fetch_updates","payment_element_collapse"],"path":"/element/payment_element","gate":false,"data":{"section_type":"generic","title":"The Payment Element","description":"The [Payment Element](/docs/payments/payment-element) is\nan embeddable component for securely collecting payment details.\nThe Payment Element supports dozens of payment methods with a single integration.\n","section_tag":"payment_element"},"display_on_load":true},"payment_element_create":{"title":"Create a Payment Element","group_title":"The Element","group_anchor":"element","anchor":"payment_element_create","section_anchor":"payment_element","subsection_anchors":null,"path":"/elements_object/create_payment_element","gate":false,"data":{"section_type":"method","title":"Create the Payment Element","description":"This method creates an instance of the Payment Element.\n","signature":{"object_name":"elements","method_name":"create","args":[{"name":"type","documentation":"The type of Element being created, which is `payment` in this case.\n","validation":"'payment'","render_as_value":"'payment'","required":true},{"name":"options","documentation":"Options for creating the Payment Element.\n","validation":"object","expanded":true,"subspec":[{"name":"layout","validation":"'accordion' | 'tabs' | object","documentation":"Specify the layout for the Payment Element. If you only pass a layout type (`'accordion'` or `‘tabs’`) without any additional parameters, the Payment Element renders using that layout and the default values associated with it.\n\nAn object can also be passed to specify the layout with additional configuration.\n","expanded":false,"subspec":[{"name":"type","validation":"'accordion' | 'tabs'","required":true,"documentation":"Defines the layout to render the Payment Element.\n"},{"name":"defaultCollapsed","validation":"boolean","documentation":"Controls if the Payment Element renders in a collapsed state (where no payment method is selected by default). When you leave this `undefined`, Stripe renders the experience that it determines will have the best conversion.\n"},{"name":"radios","validation":"boolean","documentation":"Renders each Payment Method with a radio input next to its logo. The radios visually indicate the current selection of the Payment Element.\n\n_This property is only applicable to the `accordion` layout._\n"},{"name":"spacedAccordionItems","validation":"boolean","documentation":"When `true`, the Payment Methods render as standalone buttons with space in between them.\n\n_This property is only applicable to the `accordion` layout._\n"}]},{"name":"defaultValues","validation":"object","documentation":"Provide initial customer information that will be displayed in the Payment Element.\nThe form will render with empty fields if not provided.\n","expanded":false,"subspec":[{"name":"billingDetails","validation":"object","documentation":"Specify customer's billing details, which lets you pre-fill a customer’s name, email,\nphone number and address if required by payment method. Pre-filling as much information\nas possible streamlines the checkout process.\n","expanded":true,"subspec":[{"name":"name","validation":"string"},{"name":"email","validation":"string"},{"name":"phone","validation":"string"},{"name":"address","validation":"object","subspec":[{"name":"line1","validation":"string"},{"name":"line2","validation":"string"},{"name":"city","validation":"string"},{"name":"state","validation":"string"},{"name":"country","validation":"string"},{"name":"postal_code","validation":"string"}]}]}]},{"name":"business","documentation":"Provide information about your business that will be displayed in the Payment Element.\nThis information will be retrieved from your Stripe account if not provided.\n","validation":"object","subspec":[{"name":"name","validation":"string","documentation":"The name of your business. Your business name will be used to render mandate text for some payment methods.\n"}],"expanded":true},{"name":"paymentMethodOrder","documentation":"By default, the Payment Element will use a dynamic ordering that optimizes payment method display for each user.\n\nYou can override the default order in which payment methods are displayed in the Payment Element with a list of payment method types.\n\nIf the associated PaymentIntent has payment method types not specified in `paymentMethodOrder`, they will be displayed\nafter the payment methods you specify. If you specify payment method types not on the associated PaymentIntent, they will be ignored.\n","validation":"array"},{"name":"fields","documentation":"By default, the Payment Element will collect all necessary details to complete a payment.\n\nFor some payment methods, this means that the Payment Element will collect details like name or email\nthat you may have already collected from the user. If this is the case, you can prevent the Payment Element\nfrom collecting these data by using the `fields` option.\n\nIf you disable the collection of a certain field\nwith the `fields` option, you must pass that same data to [stripe.confirmPayment](/docs/js/payment_intents/confirm_payment)\nor the payment will be rejected.\n\nSee [below](/docs/js/elements_object/create_payment_element#payment_element_create-customized_fields) for details.\n","validation":"object","subspec":[{"name":"billingDetails","validation":"'never' | 'auto' | object","documentation":"Specify `never` to avoid collecting all [billing details](/docs/api/payment_methods/object#payment_method_object-billing_details)\nin the Payment Element. If you would like to disable only certain billing details,\npass an object specifying which fields you would like to disable collection for.\nThe default setting for each field or object is `auto`.\n","expanded":true,"subspec":[{"name":"name","validation":"'never' | 'auto'"},{"name":"email","validation":"'never' | 'auto'"},{"name":"phone","validation":"'never' | 'auto'"},{"name":"address","validation":"'never' | 'auto' | object","subspec":[{"name":"line1","validation":"'never' | 'auto'"},{"name":"line2","validation":"'never' | 'auto'"},{"name":"city","validation":"'never' | 'auto'"},{"name":"state","validation":"'never' | 'auto'"},{"name":"country","validation":"'never' | 'auto'"},{"name":"postalCode","validation":"'never' | 'auto'"}]}]}]},{"name":"readOnly","documentation":"Applies a read-only state to the Payment Element so that payment details can’t be changed. Default is false.\n\nEnabling the `readOnly` option doesn't change the Payment Element's visual appearance. If you want to adjust the way the Payment Element looks, use the [Appearance API](/docs/elements/appearance-api).\n","validation":"boolean"},{"name":"terms","documentation":"Control how mandates or other legal agreements are displayed in the Payment Element.\nUse `never` to never display legal agreements. The default setting is `auto`, which causes\nlegal agreements to only be shown when necessary.\n","validation":"object","subspec":[{"name":"auBecsDebit","validation":"'auto' | 'always' | 'never'"},{"name":"bancontact","validation":"'auto' | 'always' | 'never'"},{"name":"card","validation":"'auto' | 'always' | 'never'"},{"name":"ideal","validation":"'auto' | 'always' | 'never'"},{"name":"sepaDebit","validation":"'auto' | 'always' | 'never'"},{"name":"sofort","validation":"'auto' | 'always' | 'never'"},{"name":"usBankAccount","validation":"'auto' | 'always' | 'never'"}]},{"name":"wallets","documentation":"By default, the Payment Element will display all the payment\nmethods that the underlying Payment Intent was created with.\n\nHowever, wallets like Apple Pay and Google Pay are not payment\nmethods per the Payment Intent API. They will show when the\nPayment Intent has the `card` payment method and the customer is\nusing a supported platform and have an active card in their\naccount. This is the `auto` behavior, and it is the default for\nchoice for all wallets.\n\nIf you do not want to show a given wallet as a payment option, you\ncan set its property in `wallets` to `never`.\n","validation":"object","subspec":[{"name":"applePay","validation":"'auto' | 'never'"},{"name":"googlePay","validation":"'auto' | 'never'"}]}],"required":false}]},"table_content":{"items":[{"name":"type","documentation":"The type of Element being created, which is `payment` in this case.\n","validation":"'payment'","render_as_value":"'payment'","required":true},{"name":"options","documentation":"Options for creating the Payment Element.\n","validation":"object","expanded":true,"subspec":[{"name":"layout","validation":"'accordion' | 'tabs' | object","documentation":"Specify the layout for the Payment Element. If you only pass a layout type (`'accordion'` or `‘tabs’`) without any additional parameters, the Payment Element renders using that layout and the default values associated with it.\n\nAn object can also be passed to specify the layout with additional configuration.\n","expanded":false,"subspec":[{"name":"type","validation":"'accordion' | 'tabs'","required":true,"documentation":"Defines the layout to render the Payment Element.\n"},{"name":"defaultCollapsed","validation":"boolean","documentation":"Controls if the Payment Element renders in a collapsed state (where no payment method is selected by default). When you leave this `undefined`, Stripe renders the experience that it determines will have the best conversion.\n"},{"name":"radios","validation":"boolean","documentation":"Renders each Payment Method with a radio input next to its logo. The radios visually indicate the current selection of the Payment Element.\n\n_This property is only applicable to the `accordion` layout._\n"},{"name":"spacedAccordionItems","validation":"boolean","documentation":"When `true`, the Payment Methods render as standalone buttons with space in between them.\n\n_This property is only applicable to the `accordion` layout._\n"}]},{"name":"defaultValues","validation":"object","documentation":"Provide initial customer information that will be displayed in the Payment Element.\nThe form will render with empty fields if not provided.\n","expanded":false,"subspec":[{"name":"billingDetails","validation":"object","documentation":"Specify customer's billing details, which lets you pre-fill a customer’s name, email,\nphone number and address if required by payment method. Pre-filling as much information\nas possible streamlines the checkout process.\n","expanded":true,"subspec":[{"name":"name","validation":"string"},{"name":"email","validation":"string"},{"name":"phone","validation":"string"},{"name":"address","validation":"object","subspec":[{"name":"line1","validation":"string"},{"name":"line2","validation":"string"},{"name":"city","validation":"string"},{"name":"state","validation":"string"},{"name":"country","validation":"string"},{"name":"postal_code","validation":"string"}]}]}]},{"name":"business","documentation":"Provide information about your business that will be displayed in the Payment Element.\nThis information will be retrieved from your Stripe account if not provided.\n","validation":"object","subspec":[{"name":"name","validation":"string","documentation":"The name of your business. Your business name will be used to render mandate text for some payment methods.\n"}],"expanded":true},{"name":"paymentMethodOrder","documentation":"By default, the Payment Element will use a dynamic ordering that optimizes payment method display for each user.\n\nYou can override the default order in which payment methods are displayed in the Payment Element with a list of payment method types.\n\nIf the associated PaymentIntent has payment method types not specified in `paymentMethodOrder`, they will be displayed\nafter the payment methods you specify. If you specify payment method types not on the associated PaymentIntent, they will be ignored.\n","validation":"array"},{"name":"fields","documentation":"By default, the Payment Element will collect all necessary details to complete a payment.\n\nFor some payment methods, this means that the Payment Element will collect details like name or email\nthat you may have already collected from the user. If this is the case, you can prevent the Payment Element\nfrom collecting these data by using the `fields` option.\n\nIf you disable the collection of a certain field\nwith the `fields` option, you must pass that same data to [stripe.confirmPayment](/docs/js/payment_intents/confirm_payment)\nor the payment will be rejected.\n\nSee [below](/docs/js/elements_object/create_payment_element#payment_element_create-customized_fields) for details.\n","validation":"object","subspec":[{"name":"billingDetails","validation":"'never' | 'auto' | object","documentation":"Specify `never` to avoid collecting all [billing details](/docs/api/payment_methods/object#payment_method_object-billing_details)\nin the Payment Element. If you would like to disable only certain billing details,\npass an object specifying which fields you would like to disable collection for.\nThe default setting for each field or object is `auto`.\n","expanded":true,"subspec":[{"name":"name","validation":"'never' | 'auto'"},{"name":"email","validation":"'never' | 'auto'"},{"name":"phone","validation":"'never' | 'auto'"},{"name":"address","validation":"'never' | 'auto' | object","subspec":[{"name":"line1","validation":"'never' | 'auto'"},{"name":"line2","validation":"'never' | 'auto'"},{"name":"city","validation":"'never' | 'auto'"},{"name":"state","validation":"'never' | 'auto'"},{"name":"country","validation":"'never' | 'auto'"},{"name":"postalCode","validation":"'never' | 'auto'"}]}]}]},{"name":"readOnly","documentation":"Applies a read-only state to the Payment Element so that payment details can’t be changed. Default is false.\n\nEnabling the `readOnly` option doesn't change the Payment Element's visual appearance. If you want to adjust the way the Payment Element looks, use the [Appearance API](/docs/elements/appearance-api).\n","validation":"boolean"},{"name":"terms","documentation":"Control how mandates or other legal agreements are displayed in the Payment Element.\nUse `never` to never display legal agreements. The default setting is `auto`, which causes\nlegal agreements to only be shown when necessary.\n","validation":"object","subspec":[{"name":"auBecsDebit","validation":"'auto' | 'always' | 'never'"},{"name":"bancontact","validation":"'auto' | 'always' | 'never'"},{"name":"card","validation":"'auto' | 'always' | 'never'"},{"name":"ideal","validation":"'auto' | 'always' | 'never'"},{"name":"sepaDebit","validation":"'auto' | 'always' | 'never'"},{"name":"sofort","validation":"'auto' | 'always' | 'never'"},{"name":"usBankAccount","validation":"'auto' | 'always' | 'never'"}]},{"name":"wallets","documentation":"By default, the Payment Element will display all the payment\nmethods that the underlying Payment Intent was created with.\n\nHowever, wallets like Apple Pay and Google Pay are not payment\nmethods per the Payment Intent API. They will show when the\nPayment Intent has the `card` payment method and the customer is\nusing a supported platform and have an active card in their\naccount. This is the `auto` behavior, and it is the default for\nchoice for all wallets.\n\nIf you do not want to show a given wallet as a payment option, you\ncan set its property in `wallets` to `never`.\n","validation":"object","subspec":[{"name":"applePay","validation":"'auto' | 'never'"},{"name":"googlePay","validation":"'auto' | 'never'"}]}],"required":false}]},"request":{"title":"Create a Payment Element","snippets":{"js":"var paymentElement = elements.create('payment');\n","es_next":"const paymentElement = elements.create('payment');\n"}},"use_cases":[{"name":"customized_fields","title":"with customized fields","description":"","table_content":{"title":"Option parameter","items":[{"name":"fields","documentation":"Pass an object to specify payment `fields` you don't want to collect with the Payment Element.\n","validation":"object","expanded":true,"subspec":[{"name":"billingDetails","validation":"'never' | 'auto' | object","documentation":"Specify `never` to avoid collecting all [billing details](/docs/api/payment_methods/object#payment_method_object-billing_details)\nin the Payment Element. If you would like to disable only certain billing details,\npass an object specifying which fields you would like to disable collection for.\nThe default setting for each field or object is `auto`.\n","expanded":true,"subspec":[{"name":"name","validation":"'never' | 'auto'"},{"name":"email","validation":"'never' | 'auto'"},{"name":"phone","validation":"'never' | 'auto'"},{"name":"address","validation":"'never' | 'auto' | object","subspec":[{"name":"line1","validation":"'never' | 'auto'"},{"name":"line2","validation":"'never' | 'auto'"},{"name":"city","validation":"'never' | 'auto'"},{"name":"state","validation":"'never' | 'auto'"},{"name":"country","validation":"'never' | 'auto'"},{"name":"postalCode","validation":"'never' | 'auto'"}]}]}]}]},"request":{"title":"Create a Payment Element with customized fields","snippets":{"js":"// Customize which fields are collected by the Payment Element\nvar paymentElement = elements.create('payment', {\n fields: {\n billingDetails: {\n name: 'never',\n email: 'never',\n }\n }\n});\n\n// If you disable collecting fields in the Payment Element, you\n// must pass equivalent data when calling `stripe.confirmPayment`.\nform.addEventListener('submit', async (event) =\u003E {\n stripe.confirmPayment({\n elements,\n confirmParams: {\n return_url: 'https://example.com',\n payment_method_data: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n }\n },\n },\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n});\n","es_next":"// Customize which fields are collected by the Payment Element\nconst paymentElement = elements.create('payment', {\n fields: {\n billingDetails: {\n name: 'never',\n email: 'never',\n }\n }\n});\n\n// If you disable collecting fields in the Payment Element, you\n// must pass equivalent data when calling `stripe.confirmPayment`.\nconst handleSubmit = async () =\u003E {\n const {error} = await stripe.confirmPayment({\n elements,\n confirmParams: {\n return_url: 'https://example.com/return',\n payment_method_data: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n }\n },\n },\n });\n // Other actions ...\n};\n"}}}],"section_tag":"payment_element_create"},"display_on_load":true},"payment_element_get":{"title":"Get a Payment Element","group_title":"The Element","group_anchor":"element","anchor":"payment_element_get","section_anchor":"payment_element","subsection_anchors":null,"path":"/elements_object/get_payment_element","gate":false,"data":{"section_type":"method","title":"Get a Payment Element","description":"This method retrieves a previously created Payment Element.\n","signature":{"object_name":"elements","method_name":"getElement","args":[{"name":"type","documentation":"The type of Element being retrieved, which is `payment` in this case.\n","validation":"'payment'","render_as_value":"'payment'","required":true}]},"table_content":{"items":[{"name":"type","documentation":"The type of Element being retrieved, which is `payment` in this case.\n","validation":"'payment'","render_as_value":"'payment'","required":true}]},"request":{"title":"Get a Payment Element","snippets":{"js":"var paymentElement = elements.getElement('payment');\n","es_next":"const paymentElement = elements.getElement('payment');\n"}},"returns":"`elements.getElement('payment')` returns one of the following:\n\n* An instance of a Payment Element.\n* `null`, when no Payment Element has been created.\n","section_tag":"payment_element_get"},"display_on_load":true},"payment_element_update":{"title":"Update a Payment Element","group_title":"The Element","group_anchor":"element","anchor":"payment_element_update","section_anchor":"payment_element","subsection_anchors":null,"path":"/elements_object/update_payment_element","gate":false,"data":{"section_type":"method","title":"Update a Payment Element","description":"Updates the options the [Payment Element](/docs/js/element/payment_element)\nwas initialized with. Updates are merged into the existing configuration.\n\n**NOTE**: Don't use `element.update()` to fetch updates from a [PaymentIntent](/docs/api/payment_intents) or [SetupIntent](/docs/api/setup_intents).\nUse [elements.fetchUpdates()](/docs/js/elements_object/fetch_updates) instead.\n","signature":{"object_name":"element","method_name":"update","args":[{"name":"options","documentation":"The [same options as `element.create`](/docs/js/elements_object/create_payment_element).\n","validation":"object","required":true}]},"table_content":{"items":[{"name":"options","documentation":"Options for updating the Payment Element.\n","validation":"object","expanded":true,"subspec":[{"name":"defaultValues","validation":"object","documentation":"Provide initial customer information that will be displayed in the Payment Element.\nThe form will render with empty fields if not provided.\n","expanded":false,"subspec":[{"name":"billingDetails","validation":"object","documentation":"Specify customer's billing details, which lets you pre-fill a customer’s name, email,\nphone number and address if required by payment method. Pre-filling as much information\nas possible streamlines the checkout process.\n","expanded":true,"subspec":[{"name":"name","validation":"string"},{"name":"email","validation":"string"},{"name":"phone","validation":"string"},{"name":"address","validation":"object","subspec":[{"name":"line1","validation":"string"},{"name":"line2","validation":"string"},{"name":"city","validation":"string"},{"name":"state","validation":"string"},{"name":"country","validation":"string"},{"name":"postal_code","validation":"string"}]}]}]},{"name":"business","documentation":"Provide information about your business that will be displayed in the Payment Element.\nThis information will be retrieved from your Stripe account if not provided.\n","validation":"object","subspec":[{"name":"name","validation":"string","documentation":"The name of your business. Your business name will be used to render mandate text for some payment methods.\n"}],"expanded":true},{"name":"paymentMethodOrder","documentation":"By default, the Payment Element will use a dynamic ordering that optimizes payment method display for each user.\n\nYou can override the default order in which payment methods are displayed in the Payment Element with a list of payment method types.\n\nIf the associated PaymentIntent has payment method types not specified in `paymentMethodOrder`, they will be displayed\nafter the payment methods you specify. If you specify payment method types not on the associated PaymentIntent, they will be ignored.\n","validation":"array"},{"name":"fields","documentation":"By default, the Payment Element will collect all necessary details to complete a payment.\n\nFor some payment methods, this means that the Payment Element will collect details like name or email\nthat you may have already collected from the user. If this is the case, you can prevent the Payment Element\nfrom collecting these data by using the `fields` option.\n\nIf you disable the collection of a certain field\nwith the `fields` option, you must pass that same data to [stripe.confirmPayment](/docs/js/payment_intents/confirm_payment)\nor the payment will be rejected.\n\nSee [below](/docs/js/elements_object/create_payment_element#payment_element_create-customized_fields) for details.\n","validation":"object","subspec":[{"name":"billingDetails","validation":"'never' | 'auto' | object","documentation":"Specify `never` to avoid collecting all [billing details](/docs/api/payment_methods/object#payment_method_object-billing_details)\nin the Payment Element. If you would like to disable only certain billing details,\npass an object specifying which fields you would like to disable collection for.\nThe default setting for each field or object is `auto`.\n","expanded":true,"subspec":[{"name":"name","validation":"'never' | 'auto'"},{"name":"email","validation":"'never' | 'auto'"},{"name":"phone","validation":"'never' | 'auto'"},{"name":"address","validation":"'never' | 'auto' | object","subspec":[{"name":"line1","validation":"'never' | 'auto'"},{"name":"line2","validation":"'never' | 'auto'"},{"name":"city","validation":"'never' | 'auto'"},{"name":"state","validation":"'never' | 'auto'"},{"name":"country","validation":"'never' | 'auto'"},{"name":"postalCode","validation":"'never' | 'auto'"}]}]}]},{"name":"readOnly","documentation":"Applies a read-only state to the Payment Element so that payment details can’t be changed. Default is false.\n\nEnabling the `readOnly` option doesn't change the Payment Element's visual appearance. If you want to adjust the way the Payment Element looks, use the [Appearance API](/docs/elements/appearance-api).\n","validation":"boolean"},{"name":"terms","documentation":"Control how mandates or other legal agreements are displayed in the Payment Element.\nUse `never` to never display legal agreements. The default setting is `auto`, which causes\nlegal agreements to only be shown when necessary.\n","validation":"object","subspec":[{"name":"auBecsDebit","validation":"'auto' | 'always' | 'never'"},{"name":"bancontact","validation":"'auto' | 'always' | 'never'"},{"name":"card","validation":"'auto' | 'always' | 'never'"},{"name":"ideal","validation":"'auto' | 'always' | 'never'"},{"name":"sepaDebit","validation":"'auto' | 'always' | 'never'"},{"name":"sofort","validation":"'auto' | 'always' | 'never'"},{"name":"usBankAccount","validation":"'auto' | 'always' | 'never'"}]}]}]},"request":{"title":"Update a Payment Element","snippets":{"js":"// Update a Payment Element after creation\nvar paymentElement = elements.getElement('payment');\npaymentElement.update({business: {name: 'Stripe Shop'}});\n","es_next":"// Update a Payment Element after creation\nconst paymentElement = elements.getElement('payment');\npaymentElement.update({business: {name: 'Stripe Shop'}});\n"}},"section_tag":"payment_element_update"},"display_on_load":true},"payment_element_collapse":{"title":"Collapse a Payment Element","group_title":"The Element","group_anchor":"element","anchor":"payment_element_collapse","section_anchor":"payment_element","subsection_anchors":null,"path":"/elements_object/collapse_payment_element","gate":false,"data":{"section_type":"method","title":"Collapse a Payment Element","description":"This method collapses the Payment Element into a row of payment method tabs.\n","signature":{"object_name":"element","method_name":"collapse"},"request":{"title":"Collapse a Payment Element","snippets":{"js":"// Collapse a Payment Element\nvar paymentElement = elements.getElement('payment');\npaymentElement.collapse();\n","es_next":"// Collapse a Payment Element\nconst paymentElement = elements.getElement('payment');\npaymentElement.collapse();\n"}},"section_tag":"payment_element_collapse"},"display_on_load":true},"link_authentication_element":{"title":"Link Authentication Element","group_title":"The Element","group_anchor":"element","anchor":"link_authentication_element","section_anchor":"link_authentication_element","subsection_anchors":["link_authentication_element_create","link_authentication_element_get"],"path":"/element/link_authentication_element","gate":false,"data":{"section_type":"generic","title":"The Link Authentication Element","description":"The [Link Authentication Element](/docs/payments/link/accept-a-payment) is\nan embeddable component for collecting email addresses and allow users to\nlog into Link on your checkout page.\n","section_tag":"link_authentication_element"},"display_on_load":true},"link_authentication_element_create":{"title":"Create a Link Authentication Element","group_title":"The Element","group_anchor":"element","anchor":"link_authentication_element_create","section_anchor":"link_authentication_element","subsection_anchors":null,"path":"/elements_object/create_link_authentication_element","gate":false,"data":{"section_type":"method","title":"Create the Link Authentication Element","description":"This method creates an instance of the Link Authentication Element.\n","signature":{"object_name":"elements","method_name":"create","args":[{"name":"type","documentation":"The type of Element being created, which is `linkAuthentication` in this case.\n","validation":"'linkAuthentication'","render_as_value":"'linkAuthentication'","required":true},{"name":"options","documentation":"Options for creating the Link Authentication Element.\n","validation":"object","expanded":true,"subspec":[{"name":"defaultValues","validation":"object","documentation":"Provide the initial contact information that will be displayed in the Link Authentication Element.\nThe form will render with empty fields if not provided.\n","expanded":false,"subspec":[{"name":"email","validation":"string"}]}],"required":false}]},"table_content":{"items":[{"name":"type","documentation":"The type of Element being created, which is `linkAuthentication` in this case.\n","validation":"'linkAuthentication'","render_as_value":"'linkAuthentication'","required":true},{"name":"options","documentation":"Options for creating the Link Authentication Element.\n","validation":"object","expanded":true,"subspec":[{"name":"defaultValues","validation":"object","documentation":"Provide the initial contact information that will be displayed in the Link Authentication Element.\nThe form will render with empty fields if not provided.\n","expanded":false,"subspec":[{"name":"email","validation":"string"}]}],"required":false}]},"request":{"title":"Create a Link Authentication Element","snippets":{"js":"var linkAuthenticationElement = elements.create('linkAuthentication');\n","es_next":"const linkAuthenticationElement = elements.create('linkAuthentication');\n"}},"section_tag":"link_authentication_element_create"},"display_on_load":true},"link_authentication_element_get":{"title":"Get a Link Authentication Element","group_title":"The Element","group_anchor":"element","anchor":"link_authentication_element_get","section_anchor":"link_authentication_element","subsection_anchors":null,"path":"/elements_object/get_link_authentication_element","gate":false,"data":{"section_type":"method","title":"Get a Link Authentication Element","description":"This method retrieves a previously created Link Authentication Element.\n","signature":{"object_name":"elements","method_name":"getElement","args":[{"name":"type","documentation":"The type of Element being retrieved, which is `linkAuthentication` in this case.\n","validation":"'linkAuthentication'","render_as_value":"'linkAuthentication'","required":true}]},"table_content":{"items":[{"name":"type","documentation":"The type of Element being retrieved, which is `linkAuthentication` in this case.\n","validation":"'linkAuthentication'","render_as_value":"'linkAuthentication'","required":true}]},"request":{"title":"Get a Link Authentication Element","snippets":{"js":"var linkAuthenticationElement = elements.getElement('linkAuthentication');\n","es_next":"const linkAuthenticationElement = elements.getElement('linkAuthentication');\n"}},"returns":"`elements.getElement('linkAuthentication')` returns one of the following:\n\n* An instance of a Link Authentication Element.\n* `null`, when no Link Authentication Element has been created.\n","section_tag":"link_authentication_element_get"},"display_on_load":true},"address_element":{"title":"Address Element","group_title":"The Element","group_anchor":"element","anchor":"address_element","section_anchor":"address_element","subsection_anchors":["address_element_create","address_element_get","address_element_update","address_element_get_value"],"path":"/element/address_element","gate":false,"data":{"section_type":"generic","title":"The Address Element","description":"The Address Element is\nan embeddable component for collecting local and international billing and shipping addresses.\n","section_tag":"address_element"},"display_on_load":true},"address_element_create":{"title":"Create an Address Element","group_title":"The Element","group_anchor":"element","anchor":"address_element_create","section_anchor":"address_element","subsection_anchors":null,"path":"/elements_object/create_address_element","gate":false,"data":{"section_type":"method","title":"Create the Address Element","description":"This method creates an instance of the Address Element.\n","signature":{"object_name":"elements","method_name":"create","args":[{"name":"type","documentation":"The type of Element being created, which is `address` in this case.\n","validation":"'address'","render_as_value":"'address'","required":true},{"name":"options","documentation":"Options for creating the Address Element.\n","validation":"object","expanded":true,"subspec":[{"name":"mode","documentation":"Specify which mode you would like to use Address Element for.\n\nWhen `shipping` mode is used with the Payment Element and Link Authentication Element, it will automatically pass shipping information when confirming Payment Intent or Setup Intent.\n\nWhen `billing` mode is used with the Payment Element, it will automatically pass the billing information when confirming Payment Intent or Setup Intent.\n","validation":"'shipping' | 'billing'","required":true},{"name":"autocomplete","validation":"object","documentation":"By default, the Address Element will have autocomplete enabled with Stripe provided Google Maps API key for certain countries if any of the following condition is met:\n* If Payment Element is mounted in the same elements group as Address Element in a single page application.\n* If the Address Element is used in an active Link session.\n\nYou can customize the autocomplete setting with this option.\n","expanded":true,"subspec":[{"name":"mode","validation":"‘automatic’ | ‘disabled’ | ‘google_maps_api’","required":true,"documentation":"Specify `disabled` to disable autocomplete in the Address Element.\n\nSpecify `google_maps_api` to enable [Google Maps API](https://developers.google.com/maps/documentation/javascript/places) with your own key. It will only be used when Stripe provided Google Maps API key is not available.\n\nThe default setting is `automatic`, where we’ll support autocomplete when possible.\n"},{"name":"apiKey","validation":"string","documentation":"Specify your own [Google Maps API key](https://developers.google.com/maps/documentation/javascript/places#add-places-api-to-the-api-keys-api-restrictions-list) with it.\n\n**Only needs to be passed in when `autocomplete.mode` is set to `google_maps_api`.**\n"}]},{"name":"allowedCountries","documentation":"By default, the Address Element will display all countries for selection.\n\nYou can specify which countries are displayed in the Address Element with a list of two-letter country codes.\nIf only one country is specified, the country field will not display.\n","validation":"array"},{"name":"blockPoBox","documentation":"By default, PO boxes are considered a valid address type.\n\nYou can override this to invalidate PO Boxes.\n","validation":"boolean"},{"name":"contacts","validation":"array","documentation":"An array of [Contact](/docs/js/appendix/contact_object) that can be displayed as saved addresses in the Address Element. The first contact will be automatically selected.\n"},{"name":"defaultValues","validation":"object","documentation":"Provide the initial information that will be displayed in the Address Element.\nThe form will render with empty fields if not provided.\n","expanded":true,"subspec":[{"name":"name","validation":"string","documentation":"Provide the initial full name or organization name.\n"},{"name":"firstName","validation":"string","documentation":"Provide the initial first name.\nThe [display.name](/docs/js/elements_object/create_address_element#address_element_create-options-display-name) option must be set to `split` if this property is specified.\n"},{"name":"lastName","validation":"string","documentation":"Provide the initial last name.\nThe [display.name](/docs/js/elements_object/create_address_element#address_element_create-options-display-name) option must be set to `split` if this property is specified.\n"},{"name":"phone","validation":"string","documentation":"Provide the initial phone number value.\nThe [fields.phone](/docs/js/elements_object/create_address_element#address_element_create-options-fields-phone) option must be set to `always` if this property is specified.\n"},{"name":"address","validation":"object","documentation":"Provide the initial address details.\n","subspec":[{"name":"line1","validation":"string"},{"name":"line2","validation":"string"},{"name":"city","validation":"string"},{"name":"state","validation":"string"},{"name":"postal_code","validation":"string"},{"name":"country","validation":"string"}]}]},{"name":"fields","validation":"object","documentation":"By default, the Address Element will collect all the necessary information needed for an address.\nIn some cases, it might be necessary to collect other types of information. You can specify other types of fields to render\nin the form with this option.\n","expanded":true,"subspec":[{"name":"phone","validation":"'always' | 'auto' | 'never'","documentation":"Specify `always` to enable phone number collection in the Address Element.\nOnly collect phone numbers if you need them for the transaction. Default is `auto`.\n"}]},{"name":"validation","validation":"object","documentation":"By default, the Address Element will enforce preset validation for each field.\nYou can customize the settings by using this option.\n","expanded":true,"subspec":[{"name":"phone","validation":"object","expanded":true,"subspec":[{"name":"required","validation":"'always' | 'auto' | 'never'","documentation":"Specify `always` to make phone number a required field.\nThe [fields.phone](/docs/js/elements_object/create_address_element#address_element_create-options-fields-phone) option must be set to `always` if this property is specified.\nDefault is `auto`.\n"}]}]},{"name":"display","validation":"object","documentation":"You can customize how certain fields are displayed.\n","expanded":true,"subspec":[{"name":"name","validation":"'full' | 'split' | 'organization'","documentation":"By default, the Address Element will display a full name field.\nSpecify 'split' to display a first name field and a last name field.\nSpecify 'organization' to display an organization field.\n"}]}],"required":true}]},"table_content":{"items":[{"name":"type","documentation":"The type of Element being created, which is `address` in this case.\n","validation":"'address'","render_as_value":"'address'","required":true},{"name":"options","documentation":"Options for creating the Address Element.\n","validation":"object","expanded":true,"subspec":[{"name":"mode","documentation":"Specify which mode you would like to use Address Element for.\n\nWhen `shipping` mode is used with the Payment Element and Link Authentication Element, it will automatically pass shipping information when confirming Payment Intent or Setup Intent.\n\nWhen `billing` mode is used with the Payment Element, it will automatically pass the billing information when confirming Payment Intent or Setup Intent.\n","validation":"'shipping' | 'billing'","required":true},{"name":"autocomplete","validation":"object","documentation":"By default, the Address Element will have autocomplete enabled with Stripe provided Google Maps API key for certain countries if any of the following condition is met:\n* If Payment Element is mounted in the same elements group as Address Element in a single page application.\n* If the Address Element is used in an active Link session.\n\nYou can customize the autocomplete setting with this option.\n","expanded":true,"subspec":[{"name":"mode","validation":"‘automatic’ | ‘disabled’ | ‘google_maps_api’","required":true,"documentation":"Specify `disabled` to disable autocomplete in the Address Element.\n\nSpecify `google_maps_api` to enable [Google Maps API](https://developers.google.com/maps/documentation/javascript/places) with your own key. It will only be used when Stripe provided Google Maps API key is not available.\n\nThe default setting is `automatic`, where we’ll support autocomplete when possible.\n"},{"name":"apiKey","validation":"string","documentation":"Specify your own [Google Maps API key](https://developers.google.com/maps/documentation/javascript/places#add-places-api-to-the-api-keys-api-restrictions-list) with it.\n\n**Only needs to be passed in when `autocomplete.mode` is set to `google_maps_api`.**\n"}]},{"name":"allowedCountries","documentation":"By default, the Address Element will display all countries for selection.\n\nYou can specify which countries are displayed in the Address Element with a list of two-letter country codes.\nIf only one country is specified, the country field will not display.\n","validation":"array"},{"name":"blockPoBox","documentation":"By default, PO boxes are considered a valid address type.\n\nYou can override this to invalidate PO Boxes.\n","validation":"boolean"},{"name":"contacts","validation":"array","documentation":"An array of [Contact](/docs/js/appendix/contact_object) that can be displayed as saved addresses in the Address Element. The first contact will be automatically selected.\n"},{"name":"defaultValues","validation":"object","documentation":"Provide the initial information that will be displayed in the Address Element.\nThe form will render with empty fields if not provided.\n","expanded":true,"subspec":[{"name":"name","validation":"string","documentation":"Provide the initial full name or organization name.\n"},{"name":"firstName","validation":"string","documentation":"Provide the initial first name.\nThe [display.name](/docs/js/elements_object/create_address_element#address_element_create-options-display-name) option must be set to `split` if this property is specified.\n"},{"name":"lastName","validation":"string","documentation":"Provide the initial last name.\nThe [display.name](/docs/js/elements_object/create_address_element#address_element_create-options-display-name) option must be set to `split` if this property is specified.\n"},{"name":"phone","validation":"string","documentation":"Provide the initial phone number value.\nThe [fields.phone](/docs/js/elements_object/create_address_element#address_element_create-options-fields-phone) option must be set to `always` if this property is specified.\n"},{"name":"address","validation":"object","documentation":"Provide the initial address details.\n","subspec":[{"name":"line1","validation":"string"},{"name":"line2","validation":"string"},{"name":"city","validation":"string"},{"name":"state","validation":"string"},{"name":"postal_code","validation":"string"},{"name":"country","validation":"string"}]}]},{"name":"fields","validation":"object","documentation":"By default, the Address Element will collect all the necessary information needed for an address.\nIn some cases, it might be necessary to collect other types of information. You can specify other types of fields to render\nin the form with this option.\n","expanded":true,"subspec":[{"name":"phone","validation":"'always' | 'auto' | 'never'","documentation":"Specify `always` to enable phone number collection in the Address Element.\nOnly collect phone numbers if you need them for the transaction. Default is `auto`.\n"}]},{"name":"validation","validation":"object","documentation":"By default, the Address Element will enforce preset validation for each field.\nYou can customize the settings by using this option.\n","expanded":true,"subspec":[{"name":"phone","validation":"object","expanded":true,"subspec":[{"name":"required","validation":"'always' | 'auto' | 'never'","documentation":"Specify `always` to make phone number a required field.\nThe [fields.phone](/docs/js/elements_object/create_address_element#address_element_create-options-fields-phone) option must be set to `always` if this property is specified.\nDefault is `auto`.\n"}]}]},{"name":"display","validation":"object","documentation":"You can customize how certain fields are displayed.\n","expanded":true,"subspec":[{"name":"name","validation":"'full' | 'split' | 'organization'","documentation":"By default, the Address Element will display a full name field.\nSpecify 'split' to display a first name field and a last name field.\nSpecify 'organization' to display an organization field.\n"}]}],"required":true}]},"request":{"title":"Create an Address Element","snippets":{"js":"// Create the Address Element in shipping mode\nvar addressElement = elements.create('address', {\n mode: 'shipping',\n});\n\n// Create the Address Element in billing mode\nvar addressElement = elements.create('address', {\n mode: 'billing',\n});\n","es_next":"// Create the Address Element in shipping mode\nconst addressElement = elements.create('address', {\n mode: 'shipping',\n});\n\n// Create the Address Element in billing mode\nconst addressElement = elements.create('address', {\n mode: 'billing',\n});\n"}},"section_tag":"address_element_create"},"display_on_load":true},"address_element_get":{"title":"Get an Address Element","group_title":"The Element","group_anchor":"element","anchor":"address_element_get","section_anchor":"address_element","subsection_anchors":null,"path":"/elements_object/get_address_element","gate":false,"data":{"section_type":"method","title":"Get an Address Element","description":"This method retrieves a previously created Address Element.\n","signature":{"object_name":"elements","method_name":"getElement","args":[{"name":"type","documentation":"The type of Element being retrieved, which is `address` in this case.\n","validation":"'address'","render_as_value":"'address'","required":true}]},"table_content":{"items":[{"name":"type","documentation":"The type of Element being retrieved, which is `address` in this case.\n","validation":"'address'","render_as_value":"'address'","required":true}]},"request":{"title":"Get an Address Element","snippets":{"js":"var addressElement = elements.getElement('address');\n","es_next":"const addressElement = elements.getElement('address');\n"}},"returns":"`elements.getElement('address')` returns one of the following:\n\n* An instance of an Address Element.\n* `null`, when no Address Element has been created.\n","section_tag":"address_element_get"},"display_on_load":true},"address_element_update":{"title":"Update an Address Element","group_title":"The Element","group_anchor":"element","anchor":"address_element_update","section_anchor":"address_element","subsection_anchors":null,"path":"/elements_object/update_address_element","gate":false,"data":{"section_type":"method","title":"Update an Address Element","description":"Updates the options the [Address Element](/docs/js/element/address_element)\nwas initialized with. Updates are merged into the existing configuration.\n","signature":{"object_name":"element","method_name":"update","args":[{"name":"options","documentation":"The same as the [fields and validation options in `element.create`](/docs/js/elements_object/create_address_element).\n","validation":"object","required":true}]},"table_content":{"items":[{"name":"options","documentation":"Options for updating the Address Element.\n","validation":"object","expanded":true,"subspec":[{"name":"fields","validation":"object","documentation":"By default, the Address Element will collect all the necessary information needed for an address.\nIn some cases, it might be necessary to collect other types of information. You can specify other types of fields to render\nin the form with this option.\n","expanded":true,"subspec":[{"name":"phone","validation":"'always' | 'auto' | 'never'","documentation":"Specify `always` to enable phone number collection in the Address Element.\nOnly collect phone numbers if you need them for the transaction. Default is `auto`.\n"}]},{"name":"validation","validation":"object","documentation":"By default, the Address Element will enforce preset validation for each field.\nYou can customize the settings by using this option.\n","expanded":true,"subspec":[{"name":"phone","validation":"object","expanded":true,"subspec":[{"name":"required","validation":"'always' | 'auto' | 'never'","documentation":"Specify `always` to make phone number a required field.\nThe [fields.phone](/docs/js/elements_object/create_address_element#address_element_create-options-fields-phone) option must be set to `always` if this property is specified.\nDefault is `auto`.\n"}]}]}]}]},"request":{"title":"Update an Address Element","snippets":{"js":"var addressElement = elements.getElement('address');\n\naddressElement.update({\n validation: {\n phone: {\n required: 'never',\n },\n },\n});\n","es_next":"const addressElement = elements.getElement('address');\n\naddressElement.update({\n validation: {\n phone: {\n required: 'never',\n },\n },\n});\n"}},"section_tag":"address_element_update"},"display_on_load":true},"address_element_get_value":{"title":"Get value from an Address Element","group_title":"The Element","group_anchor":"element","anchor":"address_element_get_value","section_anchor":"address_element","subsection_anchors":null,"path":"/elements_object/get_value_address_element","gate":false,"data":{"section_type":"method","title":"Get value from an Address Element","description":"Validates and retrieves form values from an Address Element. If there are any input validation errors,\nthe errors will display by their respective fields.\n","signature":{"object_name":"element","method_name":"getValue"},"request":{"title":"Get valaue from an Address Element","snippets":{"js":"var addressElement = elements.getElement('address');\n\naddressElement.getValue()\n.then(function(result) {\n if (result.complete) {\n // Allow user to proceed to the next step\n // Optionally, use value to store the address details\n }\n})\n","es_next":"const addressElement = elements.getElement('address');\nconst {complete, value} = await addressElement.getValue();\nif (complete) {\n // Allow user to proceed to the next step\n // Optionally store the address details with value\n}\n"}},"response":{"title":"Response","snippets":{"response":"{\n complete: false,\n isNewAddress: true,\n value: {\n name: \"\",\n firstName?: \"\",\n lastName? \"\",\n phone?: \"\",\n address: {\n line1: \"\",\n line2: null,\n city: \"\",\n state: \"\",\n country: 'US',\n postal_code: \"\"\n }\n }\n}\n"}},"returns":"`addressElement.getValue()` returns a promise. This promise will return an object with the following:\n\n* `complete`, `true` if the value is well-formed and potentially complete.\n The `complete` value can be used to progressively disclose the next parts of your form or to enable form submission.\n It is not an indicator of whether a customer is done with their input—it only indicates that the Element contains a potentially complete, well-formed value.\n In many cases the customer could still add further input.\n* `isNewAddress`, `true` if the address is a new address.\n* `value`, an object containing the current address information. The `firstName` and\n `lastName` properties only appear if the `display.name` option is set to `split`.\n The `phone` property only appears if the `fields.phone` option is set to `always`.\n","section_tag":"address_element_get_value"},"display_on_load":true},"issuing_elements":{"title":"Issuing Elements","group_title":"The Element","group_anchor":"element","anchor":"issuing_elements","section_anchor":"issuing_elements","subsection_anchors":["issuing_elements_create"],"path":"/element/issuing","gate":false,"data":{"section_type":"generic","title":"Issuing Elements","description":"[Issuing Elements](/docs/issuing/elements) allows you to display\nthe sensitive data of your Issuing cards in a PCI-compliant manner.\n","section_tag":"issuing_elements"},"display_on_load":true},"issuing_elements_create":{"title":"Create an Issuing Element","group_title":"The Element","group_anchor":"element","anchor":"issuing_elements_create","section_anchor":"issuing_elements","subsection_anchors":null,"path":"/issuing_elements/create","gate":false,"data":{"section_type":"method","title":"Create an Element","description":"This method creates an instance of an individual Issuing Element.\n\nIt takes the `type` of Element to create as well as an `options` object.\n","signature":{"object_name":"elements","method_name":"create","args":[{"name":"type","documentation":"The type of Element being created. One of: `issuingCardNumberDisplay`, `issuingCardCvcDisplay`,\n`issuingCardExpiryDisplay`, `issuingCardPinDisplay`, or `issuingCardCopyButton`.\n","validation":"string","required":true,"selectable":true},{"name":"options","documentation":"All Issuing Elements accept a common set of options","validation":"object","required":true}]},"types_parent":"type","types_data":{"issuingCardNumberDisplay":{"render_as_value":"'issuingCardNumberDisplay'","request":{"title":"Create a issuingCardNumberDisplay Element","snippets":{"js":"var element = elements.create('issuingCardNumberDisplay', {\n issuingCard: 'ic_1ITi6XKYfU8ZP6raDAXem8ql',\n nonce: 'ephkn_priv_v9QGxPyA1F1VHjB4dpLhHfw4',\n ephemeralKeySecret: 'ek_live_YWNjdF8xSmtzQWtQbUd...',\n});\n","es_next":"const element = elements.create('issuingCardNumberDisplay', {\n issuingCard: 'ic_1ITi6XKYfU8ZP6raDAXem8ql',\n nonce: 'ephkn_priv_v9QGxPyA1F1VHjB4dpLhHfw4',\n ephemeralKeySecret: 'ek_live_YWNjdF8xSmtzQWtQbUd...',\n});\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of Element being created. One of: `issuingCardNumberDisplay`, `issuingCardCvcDisplay`,\n`issuingCardExpiryDisplay`, `issuingCardPinDisplay`, or `issuingCardCopyButton`.\n","validation":"string","required":true},{"name":"options","validation":"object","required":true,"documentation":"Options for creating an Issuing element.\n","subspec":[{"name":"issuingCard","documentation":"ID of the [Issuing card](/docs/api/issuing/cards/object) to be displayed in this Element.\n","validation":"string"},{"name":"ephemeralKeySecret","documentation":"The `secret` component of the ephemeral key created\nto display this Element.\n","validation":"string"},{"name":"nonce","documentation":"The ephemeral key nonce used to create the ephemeral\nkey provided to this Element.\n","validation":"string"},{"name":"style","documentation":"Customize the appearance of this Element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object","required":false}]}]}},"issuingCardCvcDisplay":{"render_as_value":"'issuingCardCvcDisplay'","request":{"title":"Create a issuingCardCvcDisplay Element","snippets":{"js":"var element = elements.create('issuingCardCvcDisplay', {\n issuingCard: 'ic_1ITi6XKYfU8ZP6raDAXem8ql',\n nonce: 'ephkn_priv_v9QGxPyA1F1VHjB4dpLhHfw4',\n ephemeralKeySecret: 'ek_live_YWNjdF8xSmtzQWtQbUd...',\n});\n","es_next":"const element = elements.create('issuingCardCvcDisplay', {\n issuingCard: 'ic_1ITi6XKYfU8ZP6raDAXem8ql',\n nonce: 'ephkn_priv_v9QGxPyA1F1VHjB4dpLhHfw4',\n ephemeralKeySecret: 'ek_live_YWNjdF8xSmtzQWtQbUd...',\n});\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of Element being created. One of: `issuingCardNumberDisplay`, `issuingCardCvcDisplay`,\n`issuingCardExpiryDisplay`, `issuingCardPinDisplay`, or `issuingCardCopyButton`.\n","validation":"string","required":true},{"name":"options","validation":"object","required":true,"documentation":"Options for creating an Issuing element.\n","subspec":[{"name":"issuingCard","documentation":"ID of the [Issuing card](/docs/api/issuing/cards/object) to be displayed in this Element.\n","validation":"string"},{"name":"ephemeralKeySecret","documentation":"The `secret` component of the ephemeral key created\nto display this Element.\n","validation":"string"},{"name":"nonce","documentation":"The ephemeral key nonce used to create the ephemeral\nkey provided to this Element.\n","validation":"string"},{"name":"style","documentation":"Customize the appearance of this Element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object","required":false}]}]}},"issuingCardExpiryDisplay":{"render_as_value":"'issuingCardExpiryDisplay'","request":{"title":"Create a issuingCardExpiryDisplay Element","snippets":{"js":"var element = elements.create('issuingCardExpiryDisplay', {\n issuingCard: 'ic_1ITi6XKYfU8ZP6raDAXem8ql',\n nonce: 'ephkn_priv_v9QGxPyA1F1VHjB4dpLhHfw4',\n ephemeralKeySecret: 'ek_live_YWNjdF8xSmtzQWtQbUd...',\n});\n","es_next":"const element = elements.create('issuingCardExpiryDisplay', {\n issuingCard: 'ic_1ITi6XKYfU8ZP6raDAXem8ql',\n nonce: 'ephkn_priv_v9QGxPyA1F1VHjB4dpLhHfw4',\n ephemeralKeySecret: 'ek_live_YWNjdF8xSmtzQWtQbUd...',\n});\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of Element being created. One of: `issuingCardNumberDisplay`, `issuingCardCvcDisplay`,\n`issuingCardExpiryDisplay`, `issuingCardPinDisplay`, or `issuingCardCopyButton`.\n","validation":"string","required":true},{"name":"options","validation":"object","required":true,"documentation":"Options for creating an Issuing element.\n","subspec":[{"name":"issuingCard","documentation":"ID of the [Issuing card](/docs/api/issuing/cards/object) to be displayed in this Element.\n","validation":"string"},{"name":"ephemeralKeySecret","documentation":"The `secret` component of the ephemeral key created\nto display this Element.\n","validation":"string"},{"name":"nonce","documentation":"The ephemeral key nonce used to create the ephemeral\nkey provided to this Element.\n","validation":"string"},{"name":"style","documentation":"Customize the appearance of this Element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object","required":false}]}]}},"issuingCardPinDisplay":{"render_as_value":"'issuingCardPinDisplay'","request":{"title":"Create a issuingCardPinDisplay Element","snippets":{"js":"var element = elements.create('issuingCardPinDisplay', {\n issuingCard: 'ic_1ITi6XKYfU8ZP6raDAXem8ql',\n nonce: 'ephkn_priv_v9QGxPyA1F1VHjB4dpLhHfw4',\n ephemeralKeySecret: 'ek_live_YWNjdF8xSmtzQWtQbUd...',\n});\n","es_next":"const element = elements.create('issuingCardPinDisplay', {\n issuingCard: 'ic_1ITi6XKYfU8ZP6raDAXem8ql',\n nonce: 'ephkn_priv_v9QGxPyA1F1VHjB4dpLhHfw4',\n ephemeralKeySecret: 'ek_live_YWNjdF8xSmtzQWtQbUd...',\n});\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of Element being created. One of: `issuingCardNumberDisplay`, `issuingCardCvcDisplay`,\n`issuingCardExpiryDisplay`, `issuingCardPinDisplay`, or `issuingCardCopyButton`.\n","validation":"string","required":true},{"name":"options","validation":"object","required":true,"documentation":"Options for creating an Issuing element.\n","subspec":[{"name":"issuingCard","documentation":"ID of the [Issuing card](/docs/api/issuing/cards/object) to be displayed in this Element.\n","validation":"string"},{"name":"ephemeralKeySecret","documentation":"The `secret` component of the ephemeral key created\nto display this Element.\n","validation":"string"},{"name":"nonce","documentation":"The ephemeral key nonce used to create the ephemeral\nkey provided to this Element.\n","validation":"string"},{"name":"style","documentation":"Customize the appearance of this Element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object","required":false}]}]}},"issuingCardCopyButton":{"render_as_value":"'issuingCardCopyButton'","request":{"title":"Create a issuingCardCopyButton Element","snippets":{"js":"var element = elements.create('issuingCardCopyButton', {\n toCopy: 'number',\n});\n","es_next":"const element = elements.create('issuingCardCopyButton', {\n toCopy: 'number',\n});\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of Element being created. One of: `issuingCardNumberDisplay`, `issuingCardCvcDisplay`,\n`issuingCardExpiryDisplay`, `issuingCardPinDisplay`, or `issuingCardCopyButton`.\n","validation":"string","required":true},{"name":"options","validation":"object","required":true,"documentation":"Options for creating an Issuing element.\n","subspec":[{"name":"toCopy","documentation":"Reference to the type of Issuing card data to copy. One of `number`, `cvc`, `expiry`, or `pin`.\n","validation":"string"},{"name":"style","documentation":"Customize the appearance of this Element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object","required":false}]}]}}},"section_tag":"issuing_elements_create"},"display_on_load":true},"other_element":{"title":"Other Elements","group_title":"The Element","group_anchor":"element","anchor":"other_element","section_anchor":"other_element","subsection_anchors":["elements_create","elements_get_element","element_update","element_container"],"path":"/element/other_element","gate":false,"data":{"section_type":"generic","title":"Other Elements","description":"Stripe also offers a [set of Elements for individual payment methods](/docs/payments/elements) that you can use in your payment flows.\n","section_tag":"other_element"},"display_on_load":true},"elements_create":{"title":"Create an Element","group_title":"The Element","group_anchor":"element","anchor":"elements_create","section_anchor":"other_element","subsection_anchors":null,"path":"/elements_object/create_element","gate":false,"data":{"section_type":"method","title":"Create an Element","description":"This method creates an instance of an individual `Element`.\n\nIt takes the `type` of `Element` to create as well as an `options` object.\n","signature":{"object_name":"elements","method_name":"create","args":[{"name":"type","documentation":"The type of `Element` being created.\n","validation":"string","required":true,"selectable":true},{"name":"options","documentation":"All elements accept a common set of options, and then some element-specific options.\n","validation":"object","required":false}]},"types_parent":"type","types_data":{"card":{"render_as_value":"'card'","request":{"title":"Create a card Element","snippets":{"js":"var cardElement = elements.create('card');\n","es_next":"const cardElement = elements.create('card');\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating. In this case, `card`.\n","validation":"'card'","required":true},{"name":"options","documentation":"Options for creating a `card` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"value","documentation":"A pre-filled set of values to include in the input (e.g., `{postalCode: '94110'}`).\nNote that sensitive card information (card number, CVC, and expiration date) cannot be pre-filled\n","validation":"string"},{"name":"hidePostalCode","documentation":"Hide the postal code field.\nDefault is `false`.\nIf you are already collecting a full billing address or postal code elsewhere, set this to `true`.\n","validation":"boolean"},{"name":"iconStyle","documentation":"Appearance of the icon in the Element.\nEither `solid` or `default`.\n","validation":"string"},{"name":"hideIcon","documentation":"Hides the icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"},{"name":"disableLink","documentation":"Disables and hides the Link button in the Card Element.\nDefault is `false`.\nYou can also disable Link in the Card Element for all instances of the Card Element in the [Link settings](https://dashboard.stripe.com/settings/link) if you have early access.\n","validation":"boolean"}]}]}},"cardNumber":{"render_as_value":"'cardNumber'","request":{"title":"Create a cardNumber Element","snippets":{"js":"var cardNumberElement = elements.create('cardNumber');\n","es_next":"const cardNumberElement = elements.create('cardNumber');\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating.\nIn this case, `cardNumber`.\n","validation":"'cardNumber'","required":true},{"name":"options","documentation":"Options for creating a `cardNumber` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"placeholder","documentation":"Customize the placeholder text.\n","validation":"string"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"},{"name":"showIcon","documentation":"Show a card brand icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"iconStyle","documentation":"Appearance of the icon in the Element.\nEither `solid` or `default`.\n","validation":"string"}]}]}},"cardExpiry":{"render_as_value":"'cardExpiry'","request":{"title":"Create a cardExpiry Element","snippets":{"js":"var cardExpiryElement = elements.create('cardExpiry');\n","es_next":"const cardExpiryElement = elements.create('cardExpiry');\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating.\nIn this case, `cardExpiry`.\n","validation":"'cardExpiry'","required":true},{"name":"options","documentation":"Options for creating a `cardExpiry` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"placeholder","documentation":"Customize the placeholder text.\n","validation":"string"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"cardCvc":{"render_as_value":"'cardCvc'","request":{"title":"Create a cardCvc Element","snippets":{"js":"var cardCvcElement = elements.create('cardCvc');\n","es_next":"const cardCvcElement = elements.create('cardCvc');\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating.\nIn this case, `cardCvc`.\n","validation":"'cardCvc'","required":true},{"name":"options","documentation":"Options for creating a `cardCvc` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"placeholder","documentation":"Customize the placeholder text.\n","validation":"string"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"fpxBank":{"render_as_value":"'fpxBank'","request":{"title":"Create a fpx Element","snippets":{"js":"var fpxElement = elements.create(\n 'fpxBank',\n {\n accountHolderType: 'individual',\n }\n);\n","es_next":"const fpxElement = elements.create(\n 'fpxBank',\n {\n accountHolderType: 'individual',\n }\n);\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating.\nIn this case, `fpxBank`.\n","validation":"'fpxBank'","required":true},{"name":"options","documentation":"Options for creating an `fpxBank` element.\n","validation":"object","required":true,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"value","documentation":"A pre-filled value for the Element.\nCan be one of the banks listed in the [FPX guide](/docs/payments/fpx/accept-a-payment#bank-reference) (e.g., `affin_bank`).\n","validation":"string"},{"name":"accountHolderType","validation":"string","documentation":"Can be one of `individual` or `company`.\n","required":true},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"iban":{"render_as_value":"'iban'","request":{"title":"Create an iban Element","snippets":{"js":"var ibanElement = elements.create('iban');\n","es_next":"const ibanElement = elements.create('iban');\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating.\nIn this case, `iban`.\n","validation":"'iban'","required":true},{"name":"options","documentation":"Options for creating an `iban` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"supportedCountries","documentation":"Specify the list of countries or country-groups whose IBANs you want to allow.\nMust be `['SEPA']`.\n","validation":"array"},{"name":"placeholderCountry","documentation":"Customize the country and format of the placeholder IBAN.\nDefault is `DE`.\n","validation":"string"},{"name":"iconStyle","documentation":"Appearance of the icon in the Element.\nEither `solid` or `default`.\n","validation":"string"},{"name":"hideIcon","documentation":"Hides the icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"idealBank":{"render_as_value":"'idealBank'","request":{"title":"Create an ideal Element","snippets":{"js":"var idealElement = elements.create('idealBank');\n","es_next":"const idealElement = elements.create('idealBank');\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating.\nIn this case, `idealBank`.\n","validation":"'idealBank'","required":true},{"name":"options","documentation":"Options for creating an `idealBank` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"value","documentation":"A pre-filled value for the Element.\nCan be one of the banks listed in the [iDEAL guide](/docs/payments/ideal/accept-a-payment#bank-reference) (e.g., `abn_amro`).\n","validation":"string"},{"name":"hideIcon","documentation":"Hides the icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"p24Bank":{"render_as_value":"'p24Bank'","request":{"title":"Create a Przelewy24 Element","snippets":{"js":"var p24Element = elements.create('p24Bank');\n","es_next":"const p24Element = elements.create('p24Bank');\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating.\nIn this case, `p24Bank`.\n","validation":"'p24Bank'","required":true},{"name":"options","documentation":"Options for creating an `p24Bank` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"value","documentation":"A pre-filled value for the Element.\nCan be one of the banks listed in the [Przelewy24 guide](/docs/payments/p24/accept-a-payment#web-collect-payment-details) (e.g., `abn_amro`).\n","validation":"string"},{"name":"hideIcon","documentation":"Hides the icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"epsBank":{"render_as_value":"'epsBank'","request":{"title":"Create an EPS Element","snippets":{"js":"var epsElement = elements.create('epsBank');\n","es_next":"const epsElement = elements.create('epsBank');\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating.\nIn this case, `epsBank`.\n","validation":"'epsBank'","required":true},{"name":"options","documentation":"Options for creating an `epsBank` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"value","documentation":"A pre-filled value for the Element.\nCan be one of the banks listed in the [EPS guide](/docs/payments/eps/accept-a-payment#web-collect-payment-details) (e.g., `alior_bank`).\n","validation":"string"},{"name":"hideIcon","documentation":"Hides the icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"paymentRequestButton":{"render_as_value":"'paymentRequestButton'","request":{"title":"Create a paymentRequestButton Element","snippets":{"js":"var paymentRequest = stripe.paymentRequest({\n country: 'US',\n currency: 'usd',\n total: {label: 'Demo total', amount: 1099},\n requestPayerName: true,\n requestPayerEmail: true,\n});\n\nvar paymentRequestButtonElement = elements.create(\n 'paymentRequestButton',\n {\n paymentRequest: paymentRequest,\n style: {\n paymentRequestButton: {\n theme: 'light',\n },\n },\n },\n);\n","es_next":"const paymentRequest = stripe.paymentRequest({\n country: 'US',\n currency: 'usd',\n total: {label: 'Demo total', amount: 1099},\n requestPayerName: true,\n requestPayerEmail: true,\n});\n\nconst paymentRequestButtonElement = elements.create(\n 'paymentRequestButton',\n {\n paymentRequest,\n style: {\n paymentRequestButton: {\n theme: 'light',\n },\n },\n },\n);\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating.\nIn this case, `paymentRequestButton`.\n","validation":"'paymentRequestButton'","required":true},{"name":"options","documentation":"Options for creating a `paymentRequestButton` element.\n","validation":"object","required":true,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"An object used to customize the appearance of the Payment Request Button.\nThe object must have a single `paymentRequestButton` field, containing any of the following sub-fields:\n","validation":"object","subspec":[{"name":"type","validation":"string","required":false,"documentation":"Preferred button type to display. Available types, by wallet:\n\n\nBrowser card: `default`, `book`, `buy`, or `donate`.\n\nGoogle Pay: `default`, `buy`, or `donate`.\n\nApple Pay: `default`, `book`, `buy`, `donate`, `check-out`, `subscribe`, `reload`, `add-money`, `top-up`, `order`, `rent`, `support`, `contribute`, `tip`\n\n\nWhen a wallet does not support the provided value, `default` is used as a fallback.\n"},{"name":"theme","validation":"string","required":false,"documentation":"One of `dark`, `light`, or `light-outline`.\nThe default is `dark`.\n"},{"name":"height","validation":"string","required":false,"documentation":"The height of the Payment Request Button. Accepts `px` unit values.\n"}]},{"name":"paymentRequest","documentation":"A [PaymentRequest](/docs/js/payment_request) object used to configure the element.\n","validation":"PaymentRequest","required":true}]}]}},"auBankAccount":{"render_as_value":"'auBankAccount'","request":{"title":"Create an auBankAccount Element","snippets":{"js":"var auBankAccountElement = elements.create('auBankAccount');\n","es_next":"const auBankAccountElement = elements.create('auBankAccount');\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating. In this case, `auBankAccount`.\n","validation":"'auBankAccount'","required":true},{"name":"options","documentation":"Options for creating an `auBankAccount` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"iconStyle","documentation":"Appearance of the icon in the Element.\nEither `solid` or `default`.\n","validation":"string"},{"name":"hideIcon","documentation":"Hides the icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"affirmMessage":{"render_as_value":"'affirmMessage'","request":{"title":"Create an affirmMessage Element","snippets":{"js":"var options = {\n amount: 10000, // $100.00 USD\n currency: 'USD'\n};\nvar affirmMessageElement =\n elements.create('affirmMessage', options);\n","es_next":"const options = {\n amount: 10000, // $100.00 USD\n currency: 'USD'\n};\nconst affirmMessageElement =\n elements.create('affirmMessage', options);\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating. In this case, `affirmMessage`.\n","validation":"'affirmMessage'","required":true},{"name":"options","documentation":"Options for displaying an `affirmMessage` element. [See visual examples in the docs.](/docs/payments/affirm/site-messaging)\n","validation":"object","required":true,"subspec":[{"name":"amount","validation":"number","required":true,"documentation":"The total amount in the [smallest currency unit](/docs/currencies#zero-decimal).\n"},{"name":"currency","validation":"string","required":true,"documentation":"The currency. Only `USD` supported currently.\n"},{"name":"logoColor","validation":"string","documentation":"The logo color to display. One of `primary`, `black`,\nor `white`. [See logo examples](/docs/payments/affirm/site-messaging#customize-the-message).\n\nDefaults to `primary`.\n"},{"name":"fontColor","validation":"string","documentation":"The font color. Any string value valid for the font-color css property.\nExamples include: `red` and `#112233`. \n\nDefaults to `black`.\n"},{"name":"fontSize","validation":"string","documentation":"The font size. Any string value valid for the font-size css property.\nExamples include: `1em` and `9px`. \n\nDefaults to `1em`.\n"},{"name":"textAlign","validation":"string","documentation":"The text alignment. One of `start`, `end`, `left`, `right`, `center`, or `justify`. \n\nDefaults to `start`.\n"}]}]}},"afterpayClearpayMessage":{"render_as_value":"'afterpayClearpayMessage'","request":{"title":"Create an afterpayClearpayMessage Element","snippets":{"js":"var options = {\n amount: 1000, // $10.00 USD\n currency: 'USD'\n};\n\nvar afterpayClearpayMessageElement =\n elements.create('afterpayClearpayMessage', options);\n","es_next":"const options = {\n amount: 1000, // $10.00 USD\n currency: 'USD'\n};\n\nconst afterpayClearpayMessageElement =\n elements.create('afterpayClearpayMessage', options);\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating. In this case, `afterpayClearpayMessage`.\n","validation":"'afterpayClearpayMessage'","required":true},{"name":"options","documentation":"Options for displaying an `afterpayClearpayMessage` element. [See visual examples in the docs.](/docs/payments/afterpay-clearpay/site-messaging)\n","validation":"object","required":true,"subspec":[{"name":"amount","validation":"number","required":true,"documentation":"The total amount, divided into 4 installments, in the\n[smallest currency unit](/docs/currencies#zero-decimal).\n"},{"name":"currency","validation":"string","required":true,"documentation":"The currency. One of `USD`, `AUD`, `CAD`, `GBP`, or `NZD`.\n"},{"name":"logoType","validation":"string","documentation":"The logo style to display. One of `badge`\nor `lockup`. [See logo examples](/docs/payments/afterpay-clearpay/site-messaging#customize-the-message).\n\nDefaults to `badge`.\n"},{"name":"badgeTheme","validation":"string","documentation":"The badge color theme, applied when `logoType` is set to `badge`.\nOne of `black-on-mint`, `black-on-white`, `mint-on-black`, or\n`white-on-black`.\n\nDefaults to `black-on-mint`.\n"},{"name":"lockupTheme","validation":"string","documentation":"The lockup color theme, applied when `logoType` is set to `lockup`.\nOne of `black`, `white`, or `mint`.\n\nDefaults to `black`.\n"},{"name":"modalTheme","validation":"string","documentation":"The background color for the info modal. One of `mint` or\n`white`.\n\nDefaults to `mint`.\n"},{"name":"introText","validation":"string","documentation":"The leading text for the mesage. One of `In`, `in`, `Or`,\n`or`, `Pay`, `pay`, `Pay in`, or `pay in`.\n\nDefaults to `or`.\n"},{"name":"modalLinkStyle","validation":"string","documentation":"The style of modal link to display. One of `circled-info-icon`, `more-info-text`,\nor `learn-more-text`.\n\nDefaults to `circled-info-icon`.\n"},{"name":"isEligible","documentation":"Indicates whether an item is eligible for purchase with Afterpay / Clearpay.\n\nDefaults to `true`.\n","validation":"boolean"},{"name":"isCartEligible","documentation":"Indicates whether an entire cart is eligible for purchase with Afterpay / Clearpay.\n\nDefaults to `true`.\n","validation":"boolean"},{"name":"showInterestFree","documentation":"Determines whether 'interest-free' is displayed in the message.\n\nDefaults to `true`.\n","validation":"boolean"},{"name":"showWith","documentation":"Determines whether 'with' is displayed before the logo.\n\nDefaults to `true`.\n","validation":"boolean"},{"name":"max","validation":"number","documentation":"The maximum `amount` allowed for a purchase. See [transaction limits](/docs/payments/afterpay-clearpay#collection-schedule) for more details.\n\nDefaults to `200000`.\n"},{"name":"min","validation":"number","documentation":"The minimum `amount` allowed for a purchase. See [transaction limits](/docs/payments/afterpay-clearpay#collection-schedule) for more details.\n\nDefaults to `1000`.\n"},{"name":"showLowerLimit","documentation":"Determines whether the lower limit is displayed when `amount` exceeds price limits.\n\nDefaults to `true`.\n","validation":"boolean"},{"name":"showUpperLimit","documentation":"Determines whether the upper limit is displayed when `amount` exceeds price limits.\n\nDefaults to `true`.\n","validation":"boolean"}]}]}},"paymentMethodMessaging":{"render_as_value":"'paymentMethodMessaging'","request":{"title":"Create a paymentMethodMessaging Element","snippets":{"js":"const options = {\n amount: 9900, // $99.00 USD\n currency: 'USD',\n paymentMethodTypes: ['klarna', 'afterpay_clearpay', 'affirm'],\n // the country that the end-buyer is in\n countryCode: 'US'\n};\nconst paymentMethodMessagingElement =\n elements.create('paymentMethodMessaging', options);\n","es_next":"const options = {\n amount: 9900, // $99.00 USD\n currency: 'USD',\n paymentMethodTypes: ['klarna', 'afterpay_clearpay', 'affirm'],\n // the country that the end-buyer is in\n countryCode: 'US'\n};\nconst paymentMethodMessagingElement =\n elements.create('paymentMethodMessaging', options);\n"}},"table_content":{"items":[{"name":"type","documentation":"The type of element you are creating. In this case, `paymentMethodMessaging`.\n","validation":"'paymentMethodMessaging'","required":true},{"name":"options","documentation":"Options for displaying a `paymentMethodMessaging` element. [See visual examples in the docs.](/docs/payments/payment-method-messaging)\n","validation":"object","required":true,"subspec":[{"name":"amount","validation":"number","required":true,"documentation":"The total amount in the [smallest currency unit](/docs/currencies#zero-decimal).\n"},{"name":"currency","validation":"string","required":true,"documentation":"The currency. One of `USD`, `GBP`, `EUR`, `DKK`, `NOK`, `SEK`, `CAD`, `AUD`.\n"},{"name":"country","validation":"string","required":true,"documentation":"The end-buyer country. One of `US`, `CA`, `AU`, `NZ`, `GB`, `IE`, `FR`, `ES`, `DE`,\n`AT`, `BE`, `DK`, `FI`, `IT`, `NL`, `NO`, `SE`.\n"},{"name":"paymentMethodTypes","validation":"array","required":true,"documentation":"The payment methods to show messaging for. Any combination of `affirm`, `afterpay_clearpay`, `klarna`.\n"}]}]}}},"section_tag":"elements_create"},"display_on_load":true},"elements_get_element":{"title":"Get an Element","group_title":"The Element","group_anchor":"element","anchor":"elements_get_element","section_anchor":"other_element","subsection_anchors":null,"path":"/elements_object/get_element","gate":false,"data":{"section_type":"method","title":"Get an Element","description":"This method looks up a previously created [Element](/docs/js/element) by its type.\n","signature":{"object_name":"elements","method_name":"getElement","args":[{"name":"type","documentation":"The type of [Element](/docs/js/elements_object/create_element) to lookup.\n","validation":"string","required":true}]},"table_content":{"items":[{"name":"type","documentation":"The type of [Element](/docs/js/elements_object/create_element) to lookup.\n","validation":"string","required":true}]},"request":{"title":"Get an Element","snippets":{"js":"var cardElement = elements.getElement('card');\n","es_next":"const cardElement = elements.getElement('card');\n"}},"returns":"`elements.getElement` returns one of the following:\n\n* An instance of an `Element` with a matching type.\n* `null`, when no `Element` with a matching type has been created.\n","section_tag":"elements_get_element"},"display_on_load":true},"element_update":{"title":"Update an Element","group_title":"The Element","group_anchor":"element","anchor":"element_update","section_anchor":"other_element","subsection_anchors":null,"path":"/element/other_methods/update","gate":false,"data":{"section_type":"method","title":"Update an Element","description":"Updates the options the [Element](/docs/js/element)\nwas initialized with. Updates are merged into the existing configuration.\n\nIf you collect certain information in a different part of your interface\n(e.g., ZIP or postal code), use `element.update` with the appropriate information.\n\nThe styles of an `Element` can be dynamically changed using `element.update`.\nThis method can be used to simulate CSS media queries that automatically adjust\nthe size of elements when viewed on different devices.\n","signature":{"object_name":"element","method_name":"update","args":[{"name":"options","validation":"object","required":true,"documentation":"The [same options as `element.create`](#elements_create-options).\n"}]},"types_parent":"object","types_data":{"card":{"request":{"title":"Update a card element","snippets":{"js":"// Update an element with details collected elsewhere on your page\nvar myPostalCodeField = document.querySelector('input[name=\"my-postal-code\"]');\nmyPostalCodeField.addEventListener('change', function(event) {\n cardElement.update({value: {postalCode: event.target.value}});\n});\n\n// Dynamically change the styles of an element\nwindow.addEventListener('resize', function(event) {\n if (window.innerWidth \u003C= 320) {\n cardElement.update({style: {base: {fontSize: '13px'}}});\n } else {\n cardElement.update({style: {base: {fontSize: '16px'}}});\n }\n});\n","es_next":"// Update an element with details collected elsewhere on your page\nconst myPostalCodeField = document.querySelector(\n 'input[name=\"my-postal-code\"]',\n);\nmyPostalCodeField.addEventListener('change', ({target}) =\u003E {\n cardElement.update({value: {postalCode: target.value}});\n});\n\n// Dynamically change the styles of an element\nwindow.addEventListener('resize', (event) =\u003E {\n if (window.innerWidth \u003C= 320) {\n cardElement.update({style: {base: {fontSize: '13px'}}});\n } else {\n cardElement.update({style: {base: {fontSize: '16px'}}});\n }\n});\n"}},"table_content":{"items":[{"name":"options","documentation":"Options for updating a `card` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"value","documentation":"A pre-filled set of values to include in the input (e.g., `{postalCode: '94110'}`).\nNote that sensitive card information (card number, CVC, and expiration date) cannot be pre-filled\n","validation":"string"},{"name":"hidePostalCode","documentation":"Hide the postal code field.\nDefault is `false`.\nIf you are already collecting a full billing address or postal code elsewhere, set this to `true`.\n","validation":"boolean"},{"name":"iconStyle","documentation":"Appearance of the icon in the Element.\nEither `solid` or `default`.\n","validation":"string"},{"name":"hideIcon","documentation":"Hides the icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"cardNumber":{"request":{"title":"Update a cardNumber Element","snippets":{"js":"cardNumberElement.update(options);\n","es_next":"cardNumberElement.update(options);\n"}},"table_content":{"items":[{"name":"options","documentation":"Options for updating a `cardNumber` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"placeholder","documentation":"Customize the placeholder text.\n","validation":"string"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"},{"name":"showIcon","documentation":"Show a card brand icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"iconStyle","documentation":"Appearance of the icon in the Element.\nEither `solid` or `default`.\n","validation":"string"}]}]}},"cardExpiry":{"request":{"title":"Update a cardExpiry Element","snippets":{"js":"cardExpiryElement.update(options);\n","es_next":"cardExpiryElement.update(options);\n"}},"table_content":{"items":[{"name":"options","documentation":"Options for updating a `cardExpiry` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"placeholder","documentation":"Customize the placeholder text.\n","validation":"string"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"cardCvc":{"request":{"title":"Update a cardCvc Element","snippets":{"js":"cardCvcElement.update(options);\n","es_next":"cardCvcElement.update(options);\n"}},"table_content":{"items":[{"name":"options","documentation":"Options for updating a `cardCvc` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"placeholder","documentation":"Customize the placeholder text.\n","validation":"string"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"iban":{"request":{"title":"Update an iban Element","snippets":{"js":"ibanElement.update(options);\n","es_next":"ibanElement.update(options);\n"}},"table_content":{"items":[{"name":"options","documentation":"Options for updating an `iban` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"supportedCountries","documentation":"Specify the list of countries or country-groups whose IBANs you want to allow.\nMust be `['SEPA']`.\n","validation":"array"},{"name":"placeholderCountry","documentation":"Customize the country and format of the placeholder IBAN.\nDefault is `DE`.\n","validation":"string"},{"name":"iconStyle","documentation":"Appearance of the icon in the Element.\nEither `solid` or `default`.\n","validation":"string"},{"name":"hideIcon","documentation":"Hides the icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"idealBank":{"request":{"title":"Update an ideal Element","snippets":{"js":"idealElement.update(options);\n","es_next":"idealElement.update(options);\n"}},"table_content":{"items":[{"name":"options","documentation":"Options for updating an `idealBank` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"value","documentation":"A pre-filled value for the Element.\nCan be one of the banks listed in the [iDEAL guide](/docs/payments/ideal/accept-a-payment#bank-reference) (e.g., `abn_amro`).\n","validation":"string"},{"name":"hideIcon","documentation":"Hides the icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"p24Bank":{"request":{"title":"Update a Przelewy24 Element","snippets":{"js":"p24Element.update(options);\n","es_next":"p24Element.update(options);\n"}},"table_content":{"items":[{"name":"options","documentation":"Options for updating an `p24Bank` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"value","documentation":"A pre-filled value for the Element.\nCan be one of the banks listed in the [Przelewy24 guide](/docs/payments/p24/accept-a-payment#web-collect-payment-details) (e.g., `abn_amro`).\n","validation":"string"},{"name":"hideIcon","documentation":"Hides the icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"epsBank":{"request":{"title":"Update an EPS Element","snippets":{"js":"epsElement.update(options);\n","es_next":"epsElement.update(options);\n"}},"table_content":{"items":[{"name":"options","documentation":"Options for updating an `epsBank` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"value","documentation":"A pre-filled value for the Element.\nCan be one of the banks listed in the [EPS guide](/docs/payments/eps/accept-a-payment#web-collect-payment-details) (e.g., `alior_bank`).\n","validation":"string"},{"name":"hideIcon","documentation":"Hides the icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"paymentRequestButton":{"request":{"title":"Update a paymentRequestButton Element","snippets":{"js":"paymentRequestButtonElement.update(options);\n","es_next":"paymentRequestButtonElement.update(options);\n"}},"table_content":{"items":[{"name":"options","documentation":"Options for updating a `paymentRequestButton` element.\n","validation":"object","required":true,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"An object used to customize the appearance of the Payment Request Button.\nThe object must have a single `paymentRequestButton` field, containing any of the following sub-fields:\n","validation":"object","subspec":[{"name":"type","validation":"string","required":false,"documentation":"Preferred button type to display. Available types, by wallet:\n\n\nBrowser card: `default`, `book`, `buy`, or `donate`.\n\nGoogle Pay: `default`, `buy`, or `donate`.\n\nApple Pay: `default`, `book`, `buy`, `donate`, `check-out`, `subscribe`, `reload`, `add-money`, `top-up`, `order`, `rent`, `support`, `contribute`, `tip`\n\n\nWhen a wallet does not support the provided value, `default` is used as a fallback.\n"},{"name":"theme","validation":"string","required":false,"documentation":"One of `dark`, `light`, or `light-outline`.\nThe default is `dark`.\n"},{"name":"height","validation":"string","required":false,"documentation":"The height of the Payment Request Button. Accepts `px` unit values.\n"}]},{"name":"paymentRequest","documentation":"A [PaymentRequest](/docs/js/payment_request) object used to configure the element.\n","validation":"PaymentRequest","required":true}]}]}},"auBankAccount":{"request":{"title":"Update an auBankAccount Element","snippets":{"js":"auBankAccountElement.update({disabled: true});\n","es_next":"auBankAccountElement.update({disabled: true});\n"}},"table_content":{"items":[{"name":"options","documentation":"Options for updating an `auBankAccount` element.\n","validation":"object","required":false,"subspec":[{"name":"classes","documentation":"Set custom class names on the container DOM element when the Stripe element is in a particular state.\n","validation":"object","subspec":[{"name":"base","documentation":"The base class applied to the container.\nDefaults to `StripeElement`.\n","validation":"string"},{"name":"complete","documentation":"The class name to apply when the `Element` is complete.\nDefaults to `StripeElement--complete`.\n","validation":"string"},{"name":"empty","documentation":"The class name to apply when the `Element` is empty.\nDefaults to `StripeElement--empty`.\n","validation":"string"},{"name":"focus","documentation":"The class name to apply when the `Element` is focused.\nDefaults to `StripeElement--focus`.\n","validation":"string"},{"name":"invalid","documentation":"The class name to apply when the `Element` is invalid.\nDefaults to `StripeElement--invalid`.\n","validation":"string"},{"name":"webkitAutofill","documentation":"The class name to apply when the `Element` has its value autofilled by the browser (only on Chrome and Safari).\nDefaults to `StripeElement--webkit-autofill`.\n","validation":"string"}]},{"name":"style","documentation":"Customize the appearance of this element using CSS properties passed in a [Style](/docs/js/appendix/style) object.\n","validation":"object"},{"name":"iconStyle","documentation":"Appearance of the icon in the Element.\nEither `solid` or `default`.\n","validation":"string"},{"name":"hideIcon","documentation":"Hides the icon in the Element.\nDefault is `false`.\n","validation":"boolean"},{"name":"disabled","documentation":"Applies a disabled state to the Element such that user input is not accepted.\nDefault is `false`.\n","validation":"boolean"}]}]}},"affirmMessage":{"request":{"title":"Update an affirmMessage Element","snippets":{"js":"affirmMessageElement.update(options);\n","es_next":"affirmMessageElement.update(options);\n"}},"table_content":{"items":[{"name":"options","documentation":"Options for updating an `affirmMessage` element.\n","validation":"object","required":true,"subspec":[{"name":"amount","validation":"number","required":true,"documentation":"The total amount in the [smallest currency unit](/docs/currencies#zero-decimal).\n"},{"name":"currency","validation":"string","required":true,"documentation":"The currency. Only `USD` supported currently.\n"},{"name":"logoColor","validation":"string","documentation":"The logo color to display. One of `primary`, `black`,\nor `white`. [See logo examples](/docs/payments/affirm/site-messaging#customize-the-message).\n\nDefaults to `primary`.\n"},{"name":"fontColor","validation":"string","documentation":"The font color. Any string value valid for the font-color css property.\nExamples include: `red` and `#112233`. \n\nDefaults to `black`.\n"},{"name":"fontSize","validation":"string","documentation":"The font size. Any string value valid for the font-size css property.\nExamples include: `1em` and `9px`. \n\nDefaults to `1em`.\n"},{"name":"textAlign","validation":"string","documentation":"The text alignment. One of `start`, `end`, `left`, `right`, `center`, or `justify`. \n\nDefaults to `start`.\n"}]}]}}},"section_tag":"element_update"},"display_on_load":true},"element_container":{"title":"Style the Element container","group_title":"The Element","group_anchor":"element","anchor":"element_container","section_anchor":"other_element","subsection_anchors":null,"path":"/element/the_element_container","gate":false,"data":{"section_type":"generic","title":"Style the Element container","description":"Style the container you mount an [Element](/docs/js/element) to as if it were an `\u003Cinput\u003E` on your page.\nFor example, to control `padding` and `border` on an `Element`, set these properties on the container.\nThis is usually done by re-using the classes that you have applied to your DOM `\u003Cinput\u003E` elements.\nAfter the `Element` is mounted, the `.StripeElement` class is added to the container.\nAdditionally, the following classes are automatically added to the container when the `Element` is complete, empty, focused, invalid, or autofilled by the browser:\n\n* `.StripeElement--complete`\n* `.StripeElement--empty`\n* `.StripeElement--focus`\n* `.StripeElement--invalid`\n* `.StripeElement--webkit-autofill` (Chrome and Safari only)\n\nThese class names can be customized using the `classes` [option](/docs/js/elements_object/create_element#elements_create-options-classes) when you [create an Element](#elements_create).\n","request":{"title":"The Element container","snippets":{"html":"\u003Cstyle\u003E\n .my-input {\n padding: 10px;\n border: 1px solid #ccc;\n }\n\u003C/style\u003E\n\n\u003Cform\u003E\n \u003Cdiv\u003E\n \u003Clabel\u003EName\u003C/label\u003E\n \u003Cinput class=\"my-input\"\u003E\n \u003C/div\u003E\n \u003Cdiv\u003E\n \u003Clabel\u003ECard\u003C/label\u003E\n \u003C!-- Using the same \"my-input\" class on the --\u003E\n \u003C!-- regular input above and on this container. --\u003E\n \u003Cdiv class=\"my-input\" id=\"card-element\"\u003E\u003C/div\u003E\n \u003C/div\u003E\n\u003C/form\u003E\n"}},"section_tag":"element_container"},"display_on_load":true},"element_mount":{"title":"Mount an Element","group_title":"The Element","group_anchor":"element","anchor":"element_mount","section_anchor":"element_mount","subsection_anchors":null,"path":"/element/mount","gate":false,"data":{"section_type":"method","title":"Mount an Element","description":"The `element.mount` method attaches your [Element](/docs/js/element) to the DOM.\n`element.mount` accepts either a CSS Selector (e.g., `'#card-element'`) or a DOM element.\n\nYou need to create a container DOM element to mount an `Element`.\nIf the container DOM element has a label, the `Element` is automatically focused when its label is clicked.\nThere are two ways to do this:\n\n1. Mount the instance within a `\u003Clabel\u003E`.\n2. Create a `\u003Clabel\u003E` with a `for` attribute, referencing the ID of your container.\n","signature":{"object_name":"element","method_name":"mount","args":[{"name":"domElement","documentation":"The CSS selector or DOM element where your [Element](/docs/js/element) will be mounted.\n","validation":"string | DOM element","required":true}]},"table_content":{"items":[{"name":"domElement","documentation":"The CSS selector or DOM element where your [Element](/docs/js/element) will be mounted.\n","validation":"string | DOM element","required":true}]},"request":{"title":"Mount an Element","snippets":{"html":"\u003C!-- Mount the instance within a \u003Clabel\u003E --\u003E\n\u003Clabel\u003ECard\n \u003Cdiv id=\"card-element\"\u003E\u003C/div\u003E\n\u003C/label\u003E\n\n\u003C!--\n Or create a \u003Clabel\u003E with a 'for' attribute,\n referencing the ID of your container.\n--\u003E\n\u003Clabel for=\"card-element\"\u003ECard\u003C/label\u003E\n\u003Cdiv id=\"card-element\"\u003E\u003C/div\u003E\n\n\u003Cscript\u003E\n cardElement.mount('#card-element');\n\u003C/script\u003E\n"}},"section_tag":"element_mount"},"display_on_load":true},"element_other_methods":{"title":"Element methods","group_title":"The Element","group_anchor":"element","anchor":"element_other_methods","section_anchor":"element_other_methods","subsection_anchors":["element_blur","element_clear","element_destroy","element_focus","element_unmount"],"path":"/element/other_methods","gate":false,"data":{"section_type":"generic","title":"Element methods","description":"Below are a number of methods that are in common between all [Element](/docs/js/element) UIs.\n","section_tag":"element_other_methods"},"display_on_load":true},"element_blur":{"title":"Blur an Element","group_title":"The Element","group_anchor":"element","anchor":"element_blur","section_anchor":"element_other_methods","subsection_anchors":null,"path":"/element/other_methods/blur","gate":false,"data":{"section_type":"method","title":"Blur an Element","description":"Blurs the [Element](/docs/js/element).\n","signature":{"object_name":"element","method_name":"blur"},"request":{"title":"Blur an Element","snippets":{"js":"cardElement.blur();\n","es_next":"cardElement.blur();\n"}},"section_tag":"element_blur"},"display_on_load":true},"element_clear":{"title":"Clear an Element's values","group_title":"The Element","group_anchor":"element","anchor":"element_clear","section_anchor":"element_other_methods","subsection_anchors":null,"path":"/element/other_methods/clear","gate":false,"data":{"section_type":"method","title":"Clear an Element's values","description":"Clears the value(s) of the [Element](/docs/js/element).\n","signature":{"object_name":"element","method_name":"clear"},"request":{"title":"Clear an Element","snippets":{"js":"cardElement.clear();\n","es_next":"cardElement.clear();\n"}},"section_tag":"element_clear"},"display_on_load":true},"element_destroy":{"title":"Destroy an Element","group_title":"The Element","group_anchor":"element","anchor":"element_destroy","section_anchor":"element_other_methods","subsection_anchors":null,"path":"/element/other_methods/destroy","gate":false,"data":{"section_type":"method","title":"Destroy an Element","description":"Removes the [Element](/docs/js/element) from the DOM and destroys it.\nA destroyed `Element` can not be re-activated or re-mounted to the DOM.\n","signature":{"object_name":"element","method_name":"destroy"},"request":{"title":"Destroy an Element","snippets":{"js":"cardElement.destroy();\n","es_next":"cardElement.destroy();\n"}},"section_tag":"element_destroy"},"display_on_load":true},"element_focus":{"title":"Focus an Element","group_title":"The Element","group_anchor":"element","anchor":"element_focus","section_anchor":"element_other_methods","subsection_anchors":null,"path":"/element/other_methods/focus","gate":false,"data":{"section_type":"method","title":"Focus an Element","description":"Focuses the [Element](/docs/js/element).\n","callout":"This method will currently not work on iOS 13+ due to a system limitation.\n","signature":{"object_name":"element","method_name":"focus"},"request":{"title":"Focus an Element","snippets":{"js":"cardElement.focus();\n","es_next":"cardElement.focus();\n"}},"section_tag":"element_focus"},"display_on_load":true},"element_unmount":{"title":"Unmount an Element","group_title":"The Element","group_anchor":"element","anchor":"element_unmount","section_anchor":"element_other_methods","subsection_anchors":null,"path":"/element/other_methods/unmount","gate":false,"data":{"section_type":"method","title":"Unmount an Element","description":"Unmounts the [Element](/docs/js/element) from the DOM.\nCall [`element.mount`](/docs/js/element/mount) to re-attach it to the DOM.\n","signature":{"object_name":"element","method_name":"unmount"},"request":{"title":"Unmount an Element","snippets":{"js":"cardElement.unmount();\n","es_next":"cardElement.unmount();\n"}},"section_tag":"element_unmount"},"display_on_load":true},"element_events":{"title":"Listen to Element events","group_title":"The Element","group_anchor":"element","anchor":"element_events","section_anchor":"element_events","subsection_anchors":["element_on_change","element_on_ready","element_on_focus","element_on_blur","element_on_escape","element_on_click","element_on_loaderror","element_on_loaderstart","element_on_networkschange"],"path":"/element/events","gate":false,"data":{"section_type":"generic","title":"Element events","description":"The only way to communicate with your [Element](/docs/js/element) is by listening to an event.\nAn Element might emit any of the events below.\nAll events have a payload object that has an `elementType` property with the type of the `Element` that emitted the event.\n","section_tag":"element_events"},"display_on_load":true},"element_on_change":{"title":"Change event","group_title":"The Element","group_anchor":"element","anchor":"element_on_change","section_anchor":"element_events","subsection_anchors":null,"path":"/element/events/on_change","gate":false,"data":{"section_type":"method","title":"Change event","description":"The change event is triggered when the `Element`'s value changes.\nThe event payload always contains certain keys, in addition to some `Element`-specific keys.\n","signature":{"object_name":"element","method_name":"on","args":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true,"render_as_value":"'change'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true}]},"callout":"Consult with your legal counsel regarding your requirements and obligations about how you collect, use, and store customers' personal data","types_parent":"object","types_data":{"paymentElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"empty","documentation":"`true` if the value is empty.\n","validation":"boolean"},{"name":"complete","documentation":"`true` if all required fields for the selected payment method in the Payment Element\nhave been filled with potentially valid input.\n","validation":"boolean"},{"name":"collapsed","documentation":"`true` if the Payment Element is currently collapsed\n","validation":"boolean"},{"name":"value","documentation":"An object containing the current selected PaymentMethod type.\n","validation":"object"}]}]},"request":{"title":"Handle a payment element change event","snippets":{"js":"paymentElement.on('change', function(event) {\n if (event.complete) {\n // enable payment button\n }\n});\n","es_next":"cardElement.on('change', (event) =\u003E {\n if (event.complete) {\n // enable payment button\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n elementType: 'payment',\n complete: false,\n empty: false,\n collapsed: false,\n value: { type: \"card\" },\n}\n"}}},"linkAuthenticationElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"empty","documentation":"`true` if the value is empty.\n","validation":"boolean"},{"name":"complete","documentation":"`true` if the value is well-formed and potentially complete.\nThe `complete` value can be used to progressively disclose the next parts of your form or to enable form submission.\n\nIt is not an indicator of whether a customer is done with their input—it only indicates that the Element contains a potentially complete, well-formed value.\nIn many cases the customer could still add further input.\n\nThe `complete` value should not be used to perform an action such as advancing the cursor to a subsequent field or performing a tokenization request.\n","validation":"boolean"},{"name":"value","documentation":"An object containing the current email.\n","validation":"object"}]}]},"request":{"title":"Handle a link authentication element change event","snippets":{"js":"linkAuthenticationElement.on('change', function(event) {\n if (event.complete) {\n // Handle change complete event\n }\n});\n","es_next":"linkAuthenticationElement.on('change', (event) =\u003E {\n if (event.complete) {\n // Handle change complete event\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n elementType: 'linkAuthentication',\n empty: false,\n complete: false,\n value: { email: \"\" },\n}\n"}}},"addressElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"empty","documentation":"`true` if the value is empty.\n","validation":"boolean"},{"name":"complete","documentation":"`true` if the value is well-formed and potentially complete.\nThe `complete` value can be used to progressively disclose the next parts of your form or to enable form submission.\n\nIt is not an indicator of whether a customer is done with their input—it only indicates that the Element contains a potentially complete, well-formed value.\nIn many cases the customer could still add further input.\n\nThe `complete` value should not be used to perform an action such as advancing the cursor to a subsequent field or performing a tokenization request.\n","validation":"boolean"},{"name":"isNewAddress","documentation":"`true` if the address is a new address.\n","validation":"boolean"},{"name":"value","documentation":"An object containing the current address information. The `firstName` and\n`lastName` properties only appear if the `display.name` option is set to `split`.\nThe `phone` property only appears if the `fields.phone` option is set to `always`.\n","validation":"object"}]}]},"request":{"title":"Handle an address element change event","snippets":{"js":"addressElement.on('change', function(event) {\n if (event.complete) {\n // extract potentially complete address\n }\n});\n","es_next":"addressElement.on('change', (event) =\u003E {\n if (event.complete) {\n // extract potentially complete address\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n elementType: 'address',\n elementMode: 'shipping',\n empty: false,\n complete: false,\n isNewAddress: false,\n value: {\n name: \"\",\n firstName?: \"\",\n lastName?: \"\",\n address: {\n line1: \"\",\n line2: null,\n city: \"\",\n state: \"\",\n postal_code: \"\",\n country: \"\",\n },\n phone?: \"\",\n },\n}\n"}}},"cardElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"empty","documentation":"`true` if the value is empty.\n","validation":"boolean"},{"name":"complete","documentation":"`true` if the value is well-formed and potentially complete.\nThe `complete` value can be used to progressively disclose the next parts of your form or to enable form submission.\n\nIt is not an indicator of whether a customer is done with their input—it only indicates that the Element contains a potentially complete, well-formed value.\nIn many cases the customer could still add further input.\n\nThe `complete` value should not be used to perform an action such as advancing the cursor to a subsequent field or performing a tokenization request.\n","validation":"boolean"},{"name":"error","documentation":"The current validation error, if any.\nComprised of `message`, `code`, and `type`.\nThe `type` is always set to `validation_error`.\n","validation":"object"},{"name":"value","documentation":"An object similar to the one used for value when [creating an Element](#elements_create-elementOptions).\n\nOnly present for non-sensitive values, like `postalCode`.\n","validation":"string, object"},{"name":"brand","documentation":"The card brand of the card number being entered.\nCan be one of `visa`, `mastercard`, `amex`, `discover`, `diners`, `jcb`, `unionpay`, or `unknown`.\n","validation":"string"}]}]},"request":{"title":"Handle a card change event","snippets":{"js":"cardElement.on('change', function(event) {\n if (event.complete) {\n // enable payment button\n } else if (event.error) {\n // show validation to customer\n }\n});\n","es_next":"cardElement.on('change', (event) =\u003E {\n if (event.complete) {\n // enable payment button\n } else if (event.error) {\n // show validation to customer\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n complete: false,\n brand: 'visa',\n elementType: 'card',\n empty: false,\n error: undefined,\n value: { postalCode: \"\" },\n}\n"}}},"cardNumberElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"empty","documentation":"`true` if the value is empty.\n","validation":"boolean"},{"name":"complete","documentation":"`true` if the value is well-formed and potentially complete.\nThe `complete` value can be used to progressively disclose the next parts of your form or to enable form submission.\n\nIt is not an indicator of whether a customer is done with their input—it only indicates that the Element contains a potentially complete, well-formed value.\nIn many cases the customer could still add further input.\n\nThe `complete` value should not be used to perform an action such as advancing the cursor to a subsequent field or performing a tokenization request.\n","validation":"boolean"},{"name":"error","documentation":"The current validation error, if any.\nComprised of `message`, `code`, and `type`.\nThe `type` is always set to `validation_error`.\n","validation":"object"},{"name":"brand","documentation":"The card brand of the card number being entered.\nCan be one of `visa`, `mastercard`, `amex`, `discover`, `diners`, `jcb`, `unionpay`, or `unknown`.\n","validation":"string"}]}]},"request":{"title":"Handle a cardNumber change event","snippets":{"js":"cardNumberElement.on('change', function(event) {\n if (event.error) {\n // show validation to customer\n }\n});\n","es_next":"cardNumberElement.on('change', (event) =\u003E {\n if (event.error) {\n // show validation to customer\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n complete: true,\n brand: 'visa',\n elementType: 'cardNumber',\n empty: false,\n error: undefined,\n}\n"}}},"cardExpiryElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"empty","documentation":"`true` if the value is empty.\n","validation":"boolean"},{"name":"complete","documentation":"`true` if the value is well-formed and potentially complete.\nThe `complete` value can be used to progressively disclose the next parts of your form or to enable form submission.\n\nIt is not an indicator of whether a customer is done with their input—it only indicates that the Element contains a potentially complete, well-formed value.\nIn many cases the customer could still add further input.\n\nThe `complete` value should not be used to perform an action such as advancing the cursor to a subsequent field or performing a tokenization request.\n","validation":"boolean"},{"name":"error","documentation":"The current validation error, if any.\nComprised of `message`, `code`, and `type`.\nThe `type` is always set to `validation_error`.\n","validation":"object"}]}]},"request":{"title":"Handle a cardExpiry change event","snippets":{"js":"cardExpiryElement.on('change', function(event) {\n if (event.error) {\n // show validation to customer\n }\n});\n","es_next":"cardExpiryElement.on('change', (event) =\u003E {\n if (event.error) {\n // show validation to customer\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n complete: true,\n elementType: 'cardExpiry',\n empty: false,\n error: undefined,\n}\n"}}},"cardCvcElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"empty","documentation":"`true` if the value is empty.\n","validation":"boolean"},{"name":"complete","documentation":"`true` if the value is well-formed and potentially complete.\nThe `complete` value can be used to progressively disclose the next parts of your form or to enable form submission.\n\nIt is not an indicator of whether a customer is done with their input—it only indicates that the Element contains a potentially complete, well-formed value.\nIn many cases the customer could still add further input.\n\nThe `complete` value should not be used to perform an action such as advancing the cursor to a subsequent field or performing a tokenization request.\n","validation":"boolean"},{"name":"error","documentation":"The current validation error, if any.\nComprised of `message`, `code`, and `type`.\nThe `type` is always set to `validation_error`.\n","validation":"object"}]}]},"request":{"title":"Handle a cardCvc change event","snippets":{"js":"cardCvcElement.on('change', function(event) {\n if (event.error) {\n // show validation to customer\n }\n});\n","es_next":"cardCvcElement.on('change', (event) =\u003E {\n if (event.error) {\n // show validation to customer\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n complete: true,\n elementType: 'cardCvc',\n empty: false,\n error: undefined,\n}\n"}}},"auBankAccountElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"empty","documentation":"`true` if the BSB number and account number are empty.\n","validation":"boolean"},{"name":"complete","documentation":"`true` if the value is well-formed and potentially complete.\nThe value is potentially complete when the BSB number is a known\nBSB number and when the account number matches the length required\nby the bank (or is between 5-9 digits for banks without a specific\naccount number length).\n","validation":"boolean"},{"name":"error","documentation":"The current validation error, if any.\nComprised of `message`, `code`, and `type`.\nThe `type` is always set to `validation_error`.\n","validation":"object"},{"name":"bankName","documentation":"The financial institution corresponding to BSB number entered into the Element.\n","validation":"string"},{"name":"branchName","documentation":"The financial institution’s branch name corresponding to BSB number entered into the Element.\n","validation":"string"}]}]},"request":{"title":"Handle an auBankAccount change event","snippets":{"js":"auBankAccountElement.on('change', function(event) {\n if (event.error) {\n // show validation to customer\n } else if (event.bankName \u0026\u0026 event.branchName) {\n // show both bank and branch name\n } else if (event.bankName) {\n // show bank name\n }\n});\n","es_next":"auBankAccountElement.on('change', (event) =\u003E {\n if (event.error) {\n // show validation to customer\n } else if (event.bankName \u0026\u0026 event.branchName) {\n // show both bank and branch name\n } else if (event.bankName) {\n // show bank name\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n bankName: 'Stripe Test Bank',\n branchName: 'Stripe Test Branch'\n complete: true,\n elementType: 'auBankAccount',\n empty: false,\n error: undefined,\n}\n"}}},"ibanElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"empty","documentation":"`true` if the value is empty.\n","validation":"boolean"},{"name":"complete","documentation":"`true` if the value is well-formed and potentially complete.\nThe `complete` value can be used to progressively disclose the next parts of your form or to enable form submission.\n\nIt is not an indicator of whether a customer is done with their input—it only indicates that the Element contains a potentially complete, well-formed value.\nIn many cases the customer could still add further input.\n\nThe `complete` value should not be used to perform an action such as advancing the cursor to a subsequent field or performing a tokenization request.\n","validation":"boolean"},{"name":"error","documentation":"The current validation error, if any.\nComprised of `message`, `code`, and `type`.\nThe `type` is always set to `validation_error`.\n","validation":"object"},{"name":"country","documentation":"The country code of the entered IBAN.\n","validation":"string"},{"name":"bankName","documentation":"The financial institution that services the account whose IBAN was entered into the Element.\n","validation":"string"}]}]},"request":{"title":"Handle an iban change event","snippets":{"js":"ibanElement.on('change', function(event) {\n if (event.error) {\n // show validation to customer\n }\n});\n","es_next":"ibanElement.on('change', (event) =\u003E {\n if (event.error) {\n // show validation to customer\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n complete: true,\n elementType: 'iban',\n empty: false,\n country: 'IE',\n bankName: 'BofA',\n error: undefined,\n}\n"}}},"idealBankElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"empty","documentation":"`true` if the value is empty.\n","validation":"boolean"},{"name":"complete","documentation":"`true` if the value is well-formed and potentially complete.\nThe `complete` value can be used to progressively disclose the next parts of your form or to enable form submission.\n\nIt is not an indicator of whether a customer is done with their input—it only indicates that the Element contains a potentially complete, well-formed value.\nIn many cases the customer could still add further input.\n\nThe `complete` value should not be used to perform an action such as advancing the cursor to a subsequent field or performing a tokenization request.\n","validation":"boolean"},{"name":"error","documentation":"The current validation error, if any.\nComprised of `message`, `code`, and `type`.\nThe `type` is always set to `validation_error`.\n","validation":"object"},{"name":"value","documentation":"The selected bank.\nCan be one of the banks listed in the [iDEAL guide](/docs/payments/ideal/accept-a-payment#bank-reference).\n","validation":"string, object"}]}]},"request":{"title":"Handle an idealBank change event","snippets":{"js":"idealBankElement.on('change', function(event) {\n if (event.error) {\n // show validation to customer\n }\n});\n","es_next":"idealBankElement.on('change', (event) =\u003E {\n if (event.error) {\n // show validation to customer\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n complete: true,\n value: 'Banks McBank'\n elementType: 'idealBank',\n empty: false,\n error: undefined,\n}\n"}}},"p24BankElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"empty","documentation":"`true` if the value is empty.\n","validation":"boolean"},{"name":"complete","documentation":"`true` if the value is well-formed and potentially complete.\nThe `complete` value can be used to progressively disclose the next parts of your form or to enable form submission.\n\nIt is not an indicator of whether a customer is done with their input—it only indicates that the Element contains a potentially complete, well-formed value.\nIn many cases the customer could still add further input.\n\nThe `complete` value should not be used to perform an action such as advancing the cursor to a subsequent field or performing a tokenization request.\n","validation":"boolean"},{"name":"error","documentation":"The current validation error, if any.\nComprised of `message`, `code`, and `type`.\nThe `type` is always set to `validation_error`.\n","validation":"object"},{"name":"value","documentation":"The selected bank.\nCan be one of the banks listed in the [Przelewy24 guide](/docs/payments/p24/accept-a-payment#web-collect-payment-details).\n","validation":"string, object"}]}]},"request":{"title":"Handle an p24Bank change event","snippets":{"js":"p24BankElement.on('change', function(event) {\n if (event.error) {\n // show validation to customer\n }\n});\n","es_next":"p24BankElement.on('change', (event) =\u003E {\n if (event.error) {\n // show validation to customer\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n complete: true,\n value: 'Banks McBank'\n elementType: 'p24Bank',\n empty: false,\n error: undefined,\n}\n"}}},"epsBankElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `change`.\n","validation":"'change'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"empty","documentation":"`true` if the value is empty.\n","validation":"boolean"},{"name":"complete","documentation":"`true` if the value is well-formed and potentially complete.\nThe `complete` value can be used to progressively disclose the next parts of your form or to enable form submission.\n\nIt is not an indicator of whether a customer is done with their input—it only indicates that the Element contains a potentially complete, well-formed value.\nIn many cases the customer could still add further input.\n\nThe `complete` value should not be used to perform an action such as advancing the cursor to a subsequent field or performing a tokenization request.\n","validation":"boolean"},{"name":"error","documentation":"The current validation error, if any.\nComprised of `message`, `code`, and `type`.\nThe `type` is always set to `validation_error`.\n","validation":"object"},{"name":"value","documentation":"The selected bank.\nCan be one of the banks listed in the [EPS guide](/docs/payments/eps/accept-a-payment#web-collect-payment-details).\n","validation":"string, object"}]}]},"request":{"title":"Handle an epsBank change event","snippets":{"js":"epsBankElement.on('change', function(event) {\n if (event.error) {\n // show validation to customer\n }\n});\n","es_next":"epsBankElement.on('change', (event) =\u003E {\n if (event.error) {\n // show validation to customer\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n complete: true,\n value: 'Banks McBank'\n elementType: 'epsBank',\n empty: false,\n error: undefined,\n}\n"}}}},"section_tag":"element_on_change"},"display_on_load":true},"element_on_ready":{"title":"Ready event","group_title":"The Element","group_anchor":"element","anchor":"element_on_ready","section_anchor":"element_events","subsection_anchors":null,"path":"/element/events/on_ready","gate":false,"data":{"section_type":"method","title":"Ready event","description":"Triggered when the `Element` is fully rendered and can accept `element.focus` calls.\n","signature":{"object_name":"element","method_name":"on","args":[{"name":"event","documentation":"The name of the event.\nIn this case, `ready`.\n","validation":"'ready'","required":true,"render_as_value":"'ready'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n\nAfter it's called, it passes an event object with the following properties:\n","validation":"function","required":true,"subspec_title":"handler event object properties","expanded":true,"subspec":[{"name":"elementType","validation":"string","required":true,"documentation":"The type of element the event is fired from.\n"}]}]},"table_content":{"items":[{"name":"event","documentation":"The name of the event.\nIn this case, `ready`.\n","validation":"'ready'","required":true,"render_as_value":"'ready'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n\nAfter it's called, it passes an event object with the following properties:\n","validation":"function","required":true,"subspec_title":"handler event object properties","expanded":true,"subspec":[{"name":"elementType","validation":"string","required":true,"documentation":"The type of element the event is fired from.\n"}]}]},"request":{"title":"Handle an Element ready event","snippets":{"js":"element.on('ready', function(event) {\n // Handle ready event\n});\n","es_next":"element.on('ready', (event) =\u003E {\n // Handle ready event\n});\n"}},"section_tag":"element_on_ready"},"display_on_load":true},"element_on_focus":{"title":"Focus event","group_title":"The Element","group_anchor":"element","anchor":"element_on_focus","section_anchor":"element_events","subsection_anchors":null,"path":"/element/events/on_focus","gate":false,"data":{"section_type":"method","title":"Focus event","description":"Triggered when the `Element` gains focus.\n","signature":{"object_name":"element","method_name":"on","args":[{"name":"event","documentation":"The name of the event.\nIn this case, `focus`.\n","validation":"'focus'","required":true,"render_as_value":"'focus'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n","validation":"function","required":true}]},"table_content":{"items":[{"name":"event","documentation":"The name of the event.\nIn this case, `focus`.\n","validation":"'focus'","required":true,"render_as_value":"'focus'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n","validation":"function","required":true}]},"request":{"title":"Handle an Element focus event","snippets":{"js":"element.on('focus', function(event) {\n // Handle focus event\n});\n","es_next":"element.on('focus', (event) =\u003E {\n // Handle focus event\n});\n"}},"section_tag":"element_on_focus"},"display_on_load":true},"element_on_blur":{"title":"Blur event","group_title":"The Element","group_anchor":"element","anchor":"element_on_blur","section_anchor":"element_events","subsection_anchors":null,"path":"/element/events/on_blur","gate":false,"data":{"section_type":"method","title":"Blur event","description":"Triggered when the `Element` loses focus.\n","signature":{"object_name":"element","method_name":"on","args":[{"name":"event","documentation":"The name of the event.\nIn this case, `blur`.\n","validation":"'blur'","required":true,"render_as_value":"'blur'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n","validation":"function","required":true}]},"table_content":{"items":[{"name":"event","documentation":"The name of the event.\nIn this case, `blur`.\n","validation":"'blur'","required":true,"render_as_value":"'blur'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n","validation":"function","required":true}]},"request":{"title":"Handle an Element blur event","snippets":{"js":"element.on('blur', function(event) {\n // Handle blur event\n});\n","es_next":"element.on('blur', (event) =\u003E {\n // Handle blur event\n});\n"}},"section_tag":"element_on_blur"},"display_on_load":true},"element_on_escape":{"title":"Escape event","group_title":"The Element","group_anchor":"element","anchor":"element_on_escape","section_anchor":"element_events","subsection_anchors":null,"path":"/element/events/on_escape","gate":false,"data":{"section_type":"method","title":"Escape event","description":"Triggered when the escape key is pressed within an Element.\n","signature":{"object_name":"element","method_name":"on","args":[{"name":"event","documentation":"The name of the event.\nIn this case, `escape`.\n","validation":"'escape'","required":true,"render_as_value":"'escape'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n","validation":"function","required":true}]},"table_content":{"items":[{"name":"event","documentation":"The name of the event.\nIn this case, `escape`.\n","validation":"'escape'","required":true,"render_as_value":"'escape'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n","validation":"function","required":true}]},"request":{"title":"Handle an Element escape event","snippets":{"js":"element.on('escape', function(event) {\n // Handle escape event\n});\n","es_next":"element.on('escape', (event) =\u003E {\n // Handle escape event\n});\n"}},"section_tag":"element_on_escape"},"display_on_load":true},"element_on_click":{"title":"Click event","group_title":"The Element","group_anchor":"element","anchor":"element_on_click","section_anchor":"element_events","subsection_anchors":null,"path":"/element/events/on_click","gate":false,"data":{"section_type":"method","title":"Click event","types_parent":"object","signature":{"object_name":"element","method_name":"on","args":[{"name":"event","documentation":"The name of the event.\nIn this case, `click`.\n","validation":"'click'","required":true,"render_as_value":"'click'"}]},"types_data":{"paymentRequestButton":{"description":"Triggered when the `Element` is clicked.\n","table_content":{"items":[{"name":"event","documentation":"The name of the event.\nIn this case, `click`.\n","validation":"'click'","required":true,"render_as_value":"'click'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n\nAfter it's called, it passes an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"preventDefault","validation":"function","documentation":"Calling this function synchronously prevents the browser's payment interface from being shown.\nIf you have your own form validation logic, you can call this when form validation fails.\n"}]}]},"request":{"title":"Handle a payment request button click event","snippets":{"js":"paymentRequestButtonElement.on('click', function(event) {\n // If form validation fails\n if (!formValidated) {\n event.preventDefault();\n }\n});\n","es_next":"paymentRequestButtonElement.on('click', (event) =\u003E {\n // If form validation fails\n if (!formValidated) {\n event.preventDefault();\n }\n});\n"}}},"issuingCardCopyButton":{"description":"Triggered when the `Element` is clicked.\n","table_content":{"items":[{"name":"event","documentation":"The name of the event.\nIn this case, `click`.\n","validation":"'click'","required":true,"render_as_value":"'click'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n\nWhen called it will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"preventDefault","validation":"function","documentation":"Calling this function synchronously prevents the browser's payment interface from being shown.\nThis can be used to validate the form before the payment interface is shown.\n"}]}]},"request":{"title":"Handle an issuing card copy button click event","snippets":{"js":"issuingCardCopyButtonElement.on('click', function(event) {\n // Handle click event\n});\n","es_next":"issuingCardCopyButtonElement.on('click', (event) =\u003E {\n // Handle click event\n});\n"}}}},"section_tag":"element_on_click"},"display_on_load":true},"element_on_loaderror":{"title":"LoadError event","group_title":"The Element","group_anchor":"element","anchor":"element_on_loaderror","section_anchor":"element_events","subsection_anchors":null,"path":"/element/events/on_loaderror","gate":false,"data":{"section_type":"method","title":"LoadError event","description":"Triggered when the `Element` fails to load.\n\n**This event is only emitted from the `payment`, `linkAuthentication`, and `address` Elements.**\n","signature":{"object_name":"element","method_name":"on","args":[{"name":"event","documentation":"The name of the event.\nIn this case, `loaderror`.\n","validation":"'loaderror'","required":true,"render_as_value":"'loaderror'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n\nWhen called it will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"error","validation":"object","documentation":"An `error` object that describes the failure.\n"}]}]},"table_content":{"items":[{"name":"event","documentation":"The name of the event.\nIn this case, `loaderror`.\n","validation":"'loaderror'","required":true,"render_as_value":"'loaderror'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n\nWhen called it will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"},{"name":"error","validation":"object","documentation":"An `error` object that describes the failure.\n"}]}]},"request":{"title":"Handle an Element loaderror event","snippets":{"js":"paymentElement.on('loaderror', function(event) {\n // Handle loaderror event\n});\n","es_next":"paymentElement.on('loaderror', (event) =\u003E {\n // Handle loaderror event\n});\n"}},"section_tag":"element_on_loaderror"},"display_on_load":true},"element_on_loaderstart":{"title":"LoaderStart event","group_title":"The Element","group_anchor":"element","anchor":"element_on_loaderstart","section_anchor":"element_events","subsection_anchors":null,"path":"/element/events/on_loaderstart","gate":false,"data":{"section_type":"method","title":"LoadStart event","description":"Triggered when the [loader](/docs/js/elements_object/create#stripe_elements-options-loader) UI is mounted to the DOM and ready to be displayed.\n\n**This event is only emitted from the `payment`, `linkAuthentication`, and `address` Elements.**\n","signature":{"object_name":"element","method_name":"on","args":[{"name":"event","documentation":"The name of the event.\nIn this case, `loaderstart`.\n","validation":"'loaderstart'","required":true,"render_as_value":"'loaderstart'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n\nWhen called it will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"}]}]},"table_content":{"items":[{"name":"event","documentation":"The name of the event.\nIn this case, `loaderstart`.\n","validation":"'loaderstart'","required":true,"render_as_value":"'loaderstart'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n\nWhen called it will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"elementType","documentation":"The type of element that emitted this event.\n","validation":"string"}]}]},"request":{"title":"Handle an Element loaderstart event","snippets":{"js":"paymentElement.on('loaderstart', function(event) {\n // Handle loaderstart event\n});\n","es_next":"paymentElement.on('loaderstart', (event) =\u003E {\n // Handle loaderstart event\n});\n"}},"section_tag":"element_on_loaderstart"},"display_on_load":true},"element_on_networkschange":{"title":"NetworksChange event","group_title":"The Element","group_anchor":"element","anchor":"element_on_networkschange","section_anchor":"element_events","subsection_anchors":null,"path":"/element/events/on_networkschange","gate":false,"data":{"section_type":"method","title":"NetworksChange event","description":"Triggered when there is a change to the available networks the provided card can run on.\nIf the list of available networks is still loading, an event with `networks: null` and `loading: true` is triggered.\nWhen the list of available networks loads, Stripe triggers an additional event that contains the list of these networks and shows `loading: false`.\nRefer to our [card brand choice guide](/docs/card-brand-choice#identifying-the-available-card-networks) for further details.\n","signature":{"object_name":"element","method_name":"on","args":[{"name":"event","documentation":"The name of the event. In this case, `networkschange`.\n","validation":"'networkschange'","required":true,"render_as_value":"'networkschange'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true}]},"types_parent":"object","types_data":{"cardElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `networkschange`.\n","validation":"'networkschange'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"loading","documentation":"`true` if the networks are loading. `false` when Stripe returns all the available networks.\n","validation":"boolean"},{"name":"networks","documentation":"All available networks for the card number provided. `null` if the networks are still loading.\n","validation":"stringArray | null"}]}]},"request":{"title":"Handle a card networkschange event","snippets":{"js":"cardElement.on('networkschange', function(event) {\n if (event.networks \u0026\u0026 event.networks.length \u003E= 1) {\n // collect card brand preference\n }\n});\n","es_next":"cardElement.on('networkschange', (event) =\u003E {\n if (event.networks \u0026\u0026 event.networks.length \u003E= 1) {\n // collect card brand preference\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n loading: false,\n networks: ['visa', 'cartes_bancaires'],\n}\n"}}},"cardNumberElement":{"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `networkschange`.\n","validation":"'networkschange'","required":true},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that\nyou provide that will be called when the event is fired. When called\nit will be passed an event object with the following properties:\n","validation":"function","subspec_title":"handler event object properties","required":true,"expanded":true,"subspec":[{"name":"loading","documentation":"`true` if the networks are loading. `false` when Stripe returns all the available networks.\n","validation":"boolean"},{"name":"networks","documentation":"All available networks for the card number provided. `null` if the networks are still loading.\n","validation":"stringArray | null"}]}]},"request":{"title":"Handle a cardNumber networkschange event","snippets":{"js":"cardNumberElement.on('networkschange', function(event) {\n if (event.networks \u0026\u0026 event.networks.length \u003E= 1) {\n // collect card brand preference\n }\n});\n","es_next":"cardNumberElement.on('networkschange', (event) =\u003E {\n if (event.networks \u0026\u0026 event.networks.length \u003E= 1) {\n // collect card brand preference\n }\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n loading: false,\n networks: ['visa', 'cartes_bancaires'],\n}\n"}}}},"section_tag":"element_on_networkschange"},"display_on_load":true},"element_input_validation":{"title":"Input validation","group_title":"The Element","group_anchor":"element","anchor":"element_input_validation","section_anchor":"element_input_validation","subsection_anchors":null,"path":"/element/input_validation","gate":false,"data":{"section_type":"generic","title":"Input validation","description":"Stripe elements validate customer input as it is typed.\nTo help your customers catch mistakes, listen to `change` events on an `Element` and display any errors.\n","request":{"title":"Display validation errors from an Element","snippets":{"js":"cardElement.on('change', function(event) {\n var displayError = document.getElementById('card-errors');\n if (event.error) {\n displayError.textContent = event.error.message;\n } else {\n displayError.textContent = '';\n }\n});\n","es_next":"cardElement.on('change', ({error}) =\u003E {\n const displayError = document.getElementById('payment-errors');\n if (error) {\n displayError.textContent = error.message;\n }\n});\n"}},"section_tag":"element_input_validation"},"display_on_load":true},"element_postal_code_formatting":{"title":"Postal code formatting","group_title":"The Element","group_anchor":"element","anchor":"element_postal_code_formatting","section_anchor":"element_postal_code_formatting","subsection_anchors":null,"path":"/element/postal_code_formatting","gate":false,"data":{"section_type":"generic","title":"Postal code formatting","description":"The `card` element automatically determines your customer’s billing address country based on their card number.\nUsing this information, the postal code field validation reflects whether that country uses numeric or alphanumeric-formatted postal codes, or if the country uses postal codes at all.\nFor instance, if a U.S. card is entered, the postal code field only accepts a five-digit numeric value.\nIf it’s a UK card, an alphanumeric value can be provided instead.\n\nMany of our test cards have a U.S. billing address country.\nWhen using these to test your payment form, you must also use a five-digit U.S. ZIP code (e.g., 12345).\nTo test elements with other postal code formats, use our [international test card numbers](/docs/testing#international-cards).\n","section_tag":"element_postal_code_formatting"},"display_on_load":true},"payment_intents_intro":{"title":"Introduction","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"payment_intents_intro","section_anchor":"payment_intents_intro","subsection_anchors":null,"path":"/payment_intents","gate":false,"data":{"section_type":"generic","title":"Payment Intents","description":"Accept global payments online with the [Payment Intents APIs](/docs/payments/payment-intents).\nFor step-by-step instructions on using the Payment Intents APIs, see the [accept a payment guide](https://stripe.com/docs/payments/accept-a-payment).\n\nThe following Stripe.js methods are available to use as part of your integration.\n","section_tag":"payment_intents_intro"},"display_on_load":true},"confirm_payment_intent":{"title":"Confirm a PaymentIntent","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"confirm_payment_intent","section_anchor":"confirm_payment_intent","subsection_anchors":null,"path":"/payment_intents/confirm_payment","gate":false,"data":{"section_type":"method","title":"Confirm a payment","description":"Use `stripe.confirmPayment` to confirm a [PaymentIntent](/docs/api/payment_intents) using data collected\nby the [Payment Element](/docs/js/element/payment_element), or with manually provided data via `confirmParams`.\nWhen called, `stripe.confirmPayment` will attempt to complete any [required actions](/docs/payments/intents),\nsuch as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.\nYour user will be redirected to the `return_url` you pass once the confirmation is complete.\n","signature":{"object_name":"stripe","method_name":"confirmPayment","args":[{"name":"options","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"elements","documentation":"Required unless a `clientSecret` is provided.\n\nThe [Elements](#payment_element_create) instance that was used to create the Payment Element.\n","validation":"object","required":true,"requirement_text":"Conditionally required"},{"name":"clientSecret","documentation":"Required unless the provided `elements` instance contains a [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret).\n\nThe client secret of the `PaymentIntent`.\n","validation":"string","required":true,"requirement_text":"Conditionally required"},{"name":"confirmParams","documentation":"Parameters that will be passed on to the Stripe API. Refer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"return_url","documentation":"The url your customer will be directed to after they complete payment.\n","validation":"string","required":true},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment, if collected.\n\n**Note**: When the [Address Element](/docs/js/element/address_element) in shipping mode is being used, shipping address details are collected from the Address Element and passed\nto the PaymentIntents [confirm endpoint](https://stripe.com/docs/api/payment_intents/confirm) as the [shipping](https://stripe.com/docs/api/payment_intents/confirm#confirm_payment_intent-shipping)\nparameter.\nYou can also include additional `shipping` fields, which will be merged with the data collected from the Element.\nValues passed here will override details collected by Elements.\n","validation":"object","badge_text":"recommended"},{"name":"payment_method_data","documentation":"When you call `stripe.confirmPayment`, payment details are collected from the Element and passed to the PaymentIntents\n[confirm endpoint](https://stripe.com/docs/api/payment_intents/confirm) as the [payment_method_data](https://stripe.com/docs/api/payment_intents/confirm#confirm_payment_intent-payment_method_data)\nparameter. You can also include additional `payment_method_data` fields, which will be merged with the data collected from the Element.\n","validation":"object","subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\nDetails collected by Elements will override values passed here.\nBilling fields that are omitted in the Payment Element via the `fields` option required.\n\n**Note**: When the [Address Element](/docs/js/element/address_element) in billing mode is being used, billing address details are collected from the Address Element and passed\nto the PaymentIntents [confirm endpoint](https://stripe.com/docs/api/payment_intents/confirm) as the [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details)\nparameter. The values collected from the Address Element will take precedence.\n","validation":"object"}]}]},{"name":"redirect","documentation":"By default, `stripe.confirmPayment` will always redirect to your `return_url` after a successful confirmation.\nIf you set `redirect: \"if_required\"`, then `stripe.confirmPayment` will only redirect if your user chooses a redirect-based payment method.\n\n**Note**: Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.\nWhen a non-redirect based payment method is successfully confirmed, `stripe.confirmPayment` will resolve with a `{paymentIntent}` object.\n","validation":"'always' | 'if_required'"}]}]},"table_content":{"items":[{"name":"options","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"elements","documentation":"Required unless a `clientSecret` is provided.\n\nThe [Elements](#payment_element_create) instance that was used to create the Payment Element.\n","validation":"object","required":true,"requirement_text":"Conditionally required"},{"name":"clientSecret","documentation":"Required unless the provided `elements` instance contains a [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret).\n\nThe client secret of the `PaymentIntent`.\n","validation":"string","required":true,"requirement_text":"Conditionally required"},{"name":"confirmParams","documentation":"Parameters that will be passed on to the Stripe API. Refer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"return_url","documentation":"The url your customer will be directed to after they complete payment.\n","validation":"string","required":true},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment, if collected.\n\n**Note**: When the [Address Element](/docs/js/element/address_element) in shipping mode is being used, shipping address details are collected from the Address Element and passed\nto the PaymentIntents [confirm endpoint](https://stripe.com/docs/api/payment_intents/confirm) as the [shipping](https://stripe.com/docs/api/payment_intents/confirm#confirm_payment_intent-shipping)\nparameter.\nYou can also include additional `shipping` fields, which will be merged with the data collected from the Element.\nValues passed here will override details collected by Elements.\n","validation":"object","badge_text":"recommended"},{"name":"payment_method_data","documentation":"When you call `stripe.confirmPayment`, payment details are collected from the Element and passed to the PaymentIntents\n[confirm endpoint](https://stripe.com/docs/api/payment_intents/confirm) as the [payment_method_data](https://stripe.com/docs/api/payment_intents/confirm#confirm_payment_intent-payment_method_data)\nparameter. You can also include additional `payment_method_data` fields, which will be merged with the data collected from the Element.\n","validation":"object","subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\nDetails collected by Elements will override values passed here.\nBilling fields that are omitted in the Payment Element via the `fields` option required.\n\n**Note**: When the [Address Element](/docs/js/element/address_element) in billing mode is being used, billing address details are collected from the Address Element and passed\nto the PaymentIntents [confirm endpoint](https://stripe.com/docs/api/payment_intents/confirm) as the [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details)\nparameter. The values collected from the Address Element will take precedence.\n","validation":"object"}]}]},{"name":"redirect","documentation":"By default, `stripe.confirmPayment` will always redirect to your `return_url` after a successful confirmation.\nIf you set `redirect: \"if_required\"`, then `stripe.confirmPayment` will only redirect if your user chooses a redirect-based payment method.\n\n**Note**: Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.\nWhen a non-redirect based payment method is successfully confirmed, `stripe.confirmPayment` will resolve with a `{paymentIntent}` object.\n","validation":"'always' | 'if_required'"}]}]},"request":{"title":"Confirm a payment intent","snippets":{"js":"stripe.confirmPayment({\n elements,\n confirmParams: {\n // Return URL where the customer should be redirected after the PaymentIntent is confirmed.\n return_url: 'https://example.com',\n },\n})\n.then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmPayment(\n {\n elements,\n confirmParams: {\n // Return URL where the customer should be redirected after the PaymentIntent is confirmed.\n return_url: 'https://example.com',\n },\n }\n);\nif (error) {\n // Inform the customer that there was an error.\n}\n"}},"returns":"`stripe.confirmPayment` will return a `Promise`.\nUpon a successful confirmation, your user will be redirected to the `return_url` you provide\nbefore the Promise ever resolves.\n\nIf the confirmation fails, the `Promise` will resolve with an `{error}` object that describes the failure.\nWhen the [error type](/docs/api/errors#errors-type) is `card_error` or `validation_error`, you can display the error\nmessage in `error.message` directly to your user. An error type of `invalid_request_error` could be due to an invalid\nrequest or 3DS authentication failures.\n\nNote that for some payment methods such as iDEAL or Afterpay Clearpay, your user will first be redirected to an intermediate page to authorize the payment.\nIf they fail to authorize the payment, they will be redirected back to your `return_url` and the PaymentIntent will have a `status` of `requires_payment_method`.\nIn this case you should attempt to recollect payment from the user.\n","callout":"Note that `stripe.confirmPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","section_tag":"confirm_payment_intent"},"display_on_load":true},"confirm_payment_intent_payment_method":{"title":"Confirm a PaymentIntent by payment method","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"confirm_payment_intent_payment_method","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":["stripe_confirm_card_payment","stripe_confirm_us_bank_account_payment","stripe_confirm_acss_debit_payment","stripe_confirm_affirm_payment","stripe_confirm_afterpay_clearpay_payment","stripe_confirm_alipay_payment","stripe_confirm_au_becs_debit_payment","stripe_confirm_bancontact_payment","stripe_confirm_blik_payment","stripe_confirm_boleto_payment","stripe_confirm_customer_balance_payment","stripe_confirm_cashapp_payment","stripe_confirm_eps_payment","stripe_confirm_fpx_payment","stripe_confirm_giropay_payment","stripe_confirm_grabpay_payment","stripe_confirm_ideal_payment","stripe_confirm_klarna_payment","stripe_confirm_konbini_payment","stripe_confirm_oxxo_payment","stripe_confirm_p24_payment","stripe_confirm_paynow_payment","stripe_confirm_paypal_payment","stripe_confirm_pix_payment","stripe_confirm_promptpay_payment","stripe_confirm_sepa_debit_payment","stripe_confirm_sofort_payment","stripe_confirm_wechat_pay_payment"],"path":"/payment_intents/payment_method","gate":false,"data":{"section_type":"generic","title":"Confirm a PaymentIntent by payment method","description":"Below are a number of methods used to confirm a PaymentIntent for a specific payment method type.\n","section_tag":"confirm_payment_intent_payment_method"},"display_on_load":true},"stripe_confirm_card_payment":{"title":"Confirm a card payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_card_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_card_payment","gate":false,"data":{"section_type":"method","title":"Confirm a card payment","description":"Use `stripe.confirmCardPayment` when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide and carry out 3DS or other next actions if they are required.\n\nIf you are using [Dynamic 3D Secure](/docs/payments/3d-secure#three-ds-radar), `stripe.confirmCardPayment` will trigger your Radar rules to execute and may open a dialog for your customer to authenticate their payment.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIt can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmCardPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment, if collected.\n","validation":"object","badge_text":"recommended"},{"name":"return_url","documentation":"If you are [handling next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), pass in a `return_url`.\nIf the subsequent action is `redirect_to_url`, this URL will be used on the return path for the redirect.\n","validation":"string"},{"name":"receipt_email","documentation":"Email address that the receipt for the resulting payment will be sent to.\n","validation":"string"},{"name":"setup_future_usage","documentation":"Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf present, the payment method used with this PaymentIntent can be [attached to a Customer](/docs/api/payment_methods/attach), even after the transaction completes.\n\nUse `on_session` if you intend to only reuse the payment method when your customer is present in your checkout flow.\nUse `off_session` if your customer may or may not be in your checkout flow.\nSee [saving card details during payment](/docs/payments/save-during-payment) to learn more.\n\nStripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules.\nFor example, if your customer is impacted by [SCA](/docs/strong-customer-authentication), using `off_session` will ensure that they are authenticated while processing this PaymentIntent.\nYou will then be able to collect [off-session payments](/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.\n","validation":"string"},{"name":"payment_method_options","documentation":"An object containing payment-method-specific configuration to confirm the [PaymentIntent](/docs/api/payment_intents) with.\n","validation":"object","expanded":false,"subspec":[{"name":"card","documentation":"Configuration for this card payment.\n","validation":"object","expanded":true,"subspec":[{"name":"cvc","documentation":"Use the provided `cardCvc` [Element](/docs/js/element) when confirming the PaymentIntent with an existing PaymentMethod.\n","validation":"Element"},{"name":"network","documentation":"Selected network to process this PaymentIntent on. Depends on the [available networks](/docs/card-brand-choice#identifying-the-available-card-networks) of the card attached to the PaymentIntent. Can only be set at confirm-time.\n","validation":"string"}]}]}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [handle next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/stripe-js/elements/payment-request-button#complete-payment-intents)).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment, if collected.\n","validation":"object","badge_text":"recommended"},{"name":"return_url","documentation":"If you are [handling next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), pass in a `return_url`.\nIf the subsequent action is `redirect_to_url`, this URL will be used on the return path for the redirect.\n","validation":"string"},{"name":"receipt_email","documentation":"Email address that the receipt for the resulting payment will be sent to.\n","validation":"string"},{"name":"setup_future_usage","documentation":"Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nIf present, the payment method used with this PaymentIntent can be [attached to a Customer](/docs/api/payment_methods/attach), even after the transaction completes.\n\nUse `on_session` if you intend to only reuse the payment method when your customer is present in your checkout flow.\nUse `off_session` if your customer may or may not be in your checkout flow.\nSee [saving card details during payment](/docs/payments/save-during-payment) to learn more.\n\nStripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules.\nFor example, if your customer is impacted by [SCA](/docs/strong-customer-authentication), using `off_session` will ensure that they are authenticated while processing this PaymentIntent.\nYou will then be able to collect [off-session payments](/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.\n","validation":"string"},{"name":"payment_method_options","documentation":"An object containing payment-method-specific configuration to confirm the [PaymentIntent](/docs/api/payment_intents) with.\n","validation":"object","expanded":false,"subspec":[{"name":"card","documentation":"Configuration for this card payment.\n","validation":"object","expanded":true,"subspec":[{"name":"cvc","documentation":"Use the provided `cardCvc` [Element](/docs/js/element) when confirming the PaymentIntent with an existing PaymentMethod.\n","validation":"Element"},{"name":"network","documentation":"Selected network to process this PaymentIntent on. Depends on the [available networks](/docs/card-brand-choice#identifying-the-available-card-networks) of the card attached to the PaymentIntent. Can only be set at confirm-time.\n","validation":"string"}]}]}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [handle next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/stripe-js/elements/payment-request-button#complete-payment-intents)).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm a card payment","snippets":{"js":"stripe\n .confirmCardPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n card: cardElement,\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmCardPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n card: cardElement,\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n },\n);\n"}},"callout":"Note that `stripe.confirmCardPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n\nAdditionally, `stripe.confirmCardPayment` may trigger a [3D Secure](/docs/payments/3d-secure) authentication challenge.\nThis will be shown in a modal dialog and may be confusing for customers using assistive technologies like screen readers.\nYou should make your form accessible by ensuring that success or error messages are clearly read out after this method completes.\n","returns":"`stripe.confirmCardPayment` will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","use_cases":[{"name":"with_element","title":"with payment data from an Element","description":"Use `stripe.confirmCardPayment` with payment data from an [Element](/docs/js/element)\nby passing a `card` or `cardNumber` Element as `payment_method[card]` in the\ndata argument.\n\nThe new `PaymentMethod` will be created with data collected by the `Element`\nand will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected by a `card` or `cardNumber` [Element](/docs/js/element).\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"card","documentation":"Uses the provided `card` or `cardNumber` [Element](/docs/js/element) for confirmation.\n","validation":"Element","required":true},{"name":"billing_details","documentation":"The [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.\n","validation":"object","badge_text":"recommended"}]}]},"request":{"title":"Confirm with an Element","snippets":{"js":"stripe\n .confirmCardPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n card: cardElement,\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmCardPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n card: cardElement,\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n },\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"Use `stripe.confirmCardPayment` with an existing `PaymentMethod` by passing its `id` to `payment_method`.\nThe `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmCardPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmCardPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n);\n"}}},{"name":"token","title":"with an existing token","description":"For backwards compatibility, you can convert an existing `Token` into a `PaymentMethod` with `stripe.confirmCardPayment` by passing the `Token` to `payment_method[card][token]`.\nThe newly created `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using an existing token.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"card","documentation":"An object of card data.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"token","documentation":"Converts the provided token into a `PaymentMethod` to use for confirmation.\n","validation":"string","required":true}]},{"name":"billing_details","documentation":"The [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.\n","validation":"object","badge_text":"recommended"}]}]},"request":{"title":"Confirm with existing token","snippets":{"js":"stripe\n .confirmCardPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n card: {\n token: 'tok_visa',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmCardSetup(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n card: {\n token: 'tok_visa',\n },\n },\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmCardPayment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmCardPayment('{PAYMENT_INTENT_CLIENT_SECRET}')\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmCardPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_card_payment"},"display_on_load":true},"stripe_confirm_us_bank_account_payment":{"title":"Confirm an ACH Direct Debit payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_us_bank_account_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_us_bank_account_payment","gate":false,"data":{"section_type":"method","title":"Confirm an ACH Direct Debit payment","description":"Use `stripe.confirmUsBankAccountPayment` in the [Accept a payment flow](/docs/payments/ach-debit/accept-a-payment) for the [ACH Direct Debit](/docs/payments/ach-debit) payment method to record the customer’s authorization for payment.\n\nWhen you confirm a [PaymentIntent](/docs/api/payment_intents), it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nWe suggest using `stripe.collectBankAccountForPayment`, which automatically collects bank account details and attaches a `PaymentMethod`. You may also choose to reuse an existing `PaymentMethod` or manually collect bank account details using the `data` parameter. These use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmUsBankAccountPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"}]}]},"request":{"title":"Confirm an ACH Direct Debit payment","snippets":{"js":"stripe.confirmUsBankAccountPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n us_bank_account: {\n routing_number: '110000000',\n account_number: '000123456789',\n account_holder_type: 'individual',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + result.paymentIntent.id);\n console.log(\"PaymentIntent status: \" + result.paymentIntent.status);\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmUsBankAccountPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n us_bank_account: {\n routing_number: '110000000',\n account_number: '000123456789',\n account_holder_type: 'individual',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + paymentIntent.id);\n console.log(\"PaymentIntent status: \" + paymentIntent.status);\n}\n"}},"returns":"`stripe.confirmUsBankAccountPayment` will return a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.paymentIntent`: the successfully confirmed [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) and our [integration guide](/docs/payments/ach-debit/accept-a-payment) for all possible errors.\n","use_cases":[{"name":"existing_payment_method","title":"with an existing PaymentMethod","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmUsBankAccountPayment`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},"request":{"title":"Confirm with an existing PaymentMethod","snippets":{"js":"stripe.confirmUsBankAccountPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + result.paymentIntent.id);\n console.log(\"PaymentIntent status: \" + result.paymentIntent.status);\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmUsBankAccountPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + paymentIntent.id);\n console.log(\"PaymentIntent status: \" + paymentIntent.status);\n}\n"}}},{"name":"attached_payment_method","title":"with an attached PaymentMethod","description":"If you have successfully called `stripe.collectBankAccountForPayment` or attached a `PaymentMethod` to this `PaymentIntent` already, then you can confirm the `PaymentIntent` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmUsBankAccountPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + result.paymentIntent.id);\n console.log(\"PaymentIntent status: \" + result.paymentIntent.status);\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmUsBankAccountPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n);\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + paymentIntent.id);\n console.log(\"PaymentIntent status: \" + paymentIntent.status);\n}\n"}}},{"name":"self_collected_bank_account","title":"with self collected bank account information","description":"If you already know the customer’s bank account information, or want to collect it yourself, you can pass them in directly to create a new `PaymentMethod` and confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` is required. Providing `email` allows your customer to receive [ACH Direct Debit mandate and microdeposit emails](/docs/payments/ach-debit#mandate-and-microdeposit-emails).\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name. The first and last name must be at minimum 2 characters each.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":false}]},{"name":"us_bank_account","documentation":"The customer's [bank account information](/docs/api/payment_methods/create#create_payment_method-us_bank_account).\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"account_number","documentation":"The customer’s bank account number.\n","validation":"string","required":true},{"name":"routing_number","documentation":"The routing number of the customer’s bank.\n","validation":"string","required":true},{"name":"account_holder_type","documentation":"Account holder type: individual or company.\n","validation":"string","required":true},{"name":"account_type","documentation":"Account type: checkings or savings. Defaults to checking if omitted.\n","validation":"string","required":false}]}]}]},"request":{"title":"Confirm with bank account information","snippets":{"js":"stripe.confirmUsBankAccountPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n us_bank_account: {\n routing_number: '110000000',\n account_number: '000123456789',\n account_holder_type: 'individual',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + result.paymentIntent.id);\n console.log(\"PaymentIntent status: \" + result.paymentIntent.status);\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmUsBankAccountPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n us_bank_account: {\n routing_number: '110000000',\n account_number: '000123456789',\n account_holder_type: 'individual',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + paymentIntent.id);\n console.log(\"PaymentIntent status: \" + paymentIntent.status);\n}\n"}}}],"section_tag":"stripe_confirm_us_bank_account_payment"},"display_on_load":true},"stripe_confirm_acss_debit_payment":{"title":"Confirm an ACSS Debit payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_acss_debit_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_acss_debit_payment","gate":false,"data":{"section_type":"method","title":"Confirm a Canadian pre-authorized debit payment","description":"Use `stripe.confirmAcssDebitPayment` in the [Accept a payment](/docs/payments/accept-a-payment) flow for the [Canadian pre-authorized debit](/docs/payments/acss-debit) payment method when the customer submits your payment form.\nWhen called, it will automatically load an on-page modal UI to collect bank account details and verification, accept a hosted mandate agreement, and confirm the [PaymentIntent](/docs/api/payment_intents) when the user submits the form.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/acss-debit/accept-a-payment) for more details.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\n`stripe.confirmAcssDebitPayment` automatically creates a new `PaymentMethod` for you when your customer completes the modal UI.\nIt can also be called with an existing `PaymentMethod`, which will load the modal UI to collect a new mandate agreement.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmAcssDebitPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"skipMandate","documentation":"Set this to `true` if you want to skip displaying the mandate confirmation.\n","validation":"boolean","required":false}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"skipMandate","documentation":"Set this to `true` if you want to skip displaying the mandate confirmation.\n","validation":"boolean","required":false}]}]},"request":{"title":"Confirm Canadian pre-authorized debit payment","snippets":{"js":"stripe.confirmAcssDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + result.paymentIntent.id);\n console.log(\"PaymentIntent status: \" + result.paymentIntent.status);\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmAcssDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + paymentIntent.id);\n console.log(\"PaymentIntent status: \" + paymentIntent.status);\n}\n"}},"returns":"`stripe.confirmAcssDebitPayment` will return a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.paymentIntent`: the successfully confirmed [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) and our [integration guide](/docs/payments/acss-debit/accept-a-payment) for all possible errors.\n","callout":"Note that `stripe.confirmAcssDebitPayment` may take several seconds to complete.\nDuring that time, disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf you receive an error result, show it to the customer, re-enable the form, and hide the waiting indicator.\n","use_cases":[{"name":"new_payment_method","title":"with a new PaymentMethod","description":"You can pass in the customer’s billing details to create a new `PaymentMethod` and confirm the `PaymentIntent`.\nYou are required to collect and include the customer’s name and email address. This method loads an on-page modal UI\nthat handles bank account details collection and verification, presents a hosted mandate agreement and collects authorization for you.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name. The first and last name must be at minimum 2 characters each.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with a new PaymentMethod","snippets":{"js":"stripe.confirmAcssDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + result.paymentIntent.id);\n console.log(\"PaymentIntent status: \" + result.paymentIntent.status);\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmAcssDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + paymentIntent.id);\n console.log(\"PaymentIntent status: \" + paymentIntent.status);\n}\n"}}},{"name":"existing_payment_method","title":"with an existing PaymentMethod","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmAcssDebitPayment`.\nThis method loads an on-page modal UI that only presents a hosted mandate agreement and collects authorization for you.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},"request":{"title":"Confirm with an existing PaymentMethod","snippets":{"js":"stripe.confirmAcssDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + result.paymentIntent.id);\n console.log(\"PaymentIntent status: \" + result.paymentIntent.status);\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmAcssDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + paymentIntent.id);\n console.log(\"PaymentIntent status: \" + paymentIntent.status);\n}\n"}}},{"name":"attached_payment_method","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` without passing in any additional data.\nThis method loads an on-page modal UI that only presents a hosted mandate agreement and collects authorization for you.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmAcssDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + result.paymentIntent.id);\n console.log(\"PaymentIntent status: \" + result.paymentIntent.status);\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmAcssDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n);\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + paymentIntent.id);\n console.log(\"PaymentIntent status: \" + paymentIntent.status);\n}\n"}}},{"name":"self_collected_bank_account","title":"with self collected bank account information","description":"If you already know the customer’s bank account information, or want to collect it yourself, you can pass them in directly to create a new `PaymentMethod` and confirm the `PaymentIntent`.\nIn this case, this method does not load the on-page modal UI, so you will need to [build your own mandate agreement page](/docs/payments/acss-debit/custom-pad-agreement).\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name. The first and last name must be at minimum 2 characters each.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]},{"name":"acss_debit","documentation":"The customer's [bank account information](/docs/api/payment_methods/create#create_payment_method-acss_debit).\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"account_number","documentation":"The customer’s bank account number.\n","validation":"string","required":true},{"name":"institution_number","documentation":"The institution number of the customer’s bank.\n","validation":"string","required":true},{"name":"transit_number","documentation":"The transit number of the customer’s bank.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with bank account information","snippets":{"js":"stripe.confirmAcssDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n acss_debit: {\n institution_number: '000',\n transit_number: '11000',\n account_number: '000123456789',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + result.paymentIntent.id);\n console.log(\"PaymentIntent status: \" + result.paymentIntent.status);\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmAcssDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n acss_debit: {\n institution_number: '000',\n transit_number: '11000',\n account_number: '000123456789',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + paymentIntent.id);\n console.log(\"PaymentIntent status: \" + paymentIntent.status);\n}\n"}}},{"name":"existing_payment_method_skip_mandate","title":"with an existing PaymentMethod but skip mandate display","description":"If you have already created a `PaymentMethod` and built your own mandate agreement page,\nyou can reuse it by passing its `id` to `payment_method` when calling `stripe.confirmAcssDebitPayment` and skip the on-page modal UI at the same time.\n","table_content":{"title":"Data and options argument paramters","items":[{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"skipMandate","documentation":"Set to `true` to skip the on-page modal UI.\n","validation":"boolean","required":true}]}]},"request":{"title":"Confirm with an existing PaymentMethod but skip mandate display","snippets":{"js":"stripe.confirmAcssDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n {\n skipMandate: true,\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + result.paymentIntent.id);\n console.log(\"PaymentIntent status: \" + result.paymentIntent.status);\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmAcssDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n {\n skipMandate: true,\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on PaymentIntent's status.\n console.log(\"PaymentIntent ID: \" + paymentIntent.id);\n console.log(\"PaymentIntent status: \" + paymentIntent.status);\n}\n"}}}],"section_tag":"stripe_confirm_acss_debit_payment"},"display_on_load":true},"stripe_confirm_affirm_payment":{"title":"Confirm an Affirm payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_affirm_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_affirm_payment","gate":false,"data":{"section_type":"method","title":"Confirm an Affirm payment","description":"Use `stripe.confirmAffirmPayment` in the Affirm payment method creation flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide, and it will automatically redirect the customer to authorize the transaction.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmAffirmPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment.\n","validation":"object","expanded":false,"subspec":[{"name":"name","validation":"string","required":true},{"name":"address","validation":"object","required":true}],"required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/affirm/accept-a-payment#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment.\n","validation":"object","expanded":false,"subspec":[{"name":"name","validation":"string","required":true},{"name":"address","validation":"object","required":true}],"required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/affirm/accept-a-payment#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm an Affirm payment","snippets":{"js":"stripe.confirmAffirmPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}'\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmAffirmPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}},"returns":"By default, `stripe.confirmAffirmPayment` will trigger a redirect when successful.\nIf there is an error, or when handling `next_action`s manually by using the `handleActions: false` option, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmAffirmPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"new","title":"without an existing payment method","description":"If you have not already created a `PaymentMethod`, you can pass payment method parameters, and the newly created `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass payment method billing details.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the payment.\n","validation":"object","badge_text":"recommended","expanded":false,"subspec":[{"name":"email","validation":"string","required":true},{"name":"name","validation":"string","required":true},{"name":"address","validation":"object","required":true}]}]},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment.\n","validation":"object","expanded":false,"subspec":[{"name":"name","validation":"string","required":true},{"name":"address","validation":"object","required":true}],"required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm without existing payment method","snippets":{"js":"stripe.confirmAffirmPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n address: {\n line1: '123 Main Street',\n city: 'San Francisco',\n state: 'CA',\n country: 'US',\n postal_code: '94321'\n }\n }\n },\n shipping: {\n name: 'Jenny Rosen',\n address: {\n line1: '123 Main Street',\n city: 'San Francisco',\n state: 'CA',\n country: 'US',\n postal_code: '94321'\n }\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmAffirmPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n address: {\n line1: '123 Main Street',\n city: 'San Francisco',\n state: 'CA',\n country: 'US',\n postal_code: '94321'\n }\n }\n },\n shipping: {\n name: 'Jenny Rosen',\n address: {\n line1: '123 Main Street',\n city: 'San Francisco',\n state: 'CA',\n country: 'US',\n postal_code: '94321'\n }\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` and it will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment.\n","validation":"object","expanded":false,"subspec":[{"name":"name","validation":"string","required":true},{"name":"address","validation":"object","required":true}],"required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmAffirmPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n shipping: {\n name: 'Jenny Rosen',\n address: {\n line1: '123 Main Street',\n city: 'San Francisco',\n state: 'CA',\n country: 'US',\n postal_code: '94321'\n }\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(result) {\n // Inform the customer that there was an error.\n});\n","es_next":"const {error} = await stripe.confirmAffirmPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n shipping: {\n name: 'Jenny Rosen',\n address: {\n line1: '123 Main Street',\n city: 'San Francisco',\n state: 'CA',\n country: 'US',\n postal_code: '94321'\n }\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `return_url` and a `PaymentMethod` to this `PaymentIntent`, then you can confirm without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmAffirmPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}'\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmAffirmPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_affirm_payment"},"display_on_load":true},"stripe_confirm_afterpay_clearpay_payment":{"title":"Confirm an Afterpay Clearpay payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_afterpay_clearpay_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_afterpay_clearpay_payment","gate":false,"data":{"section_type":"method","title":"Confirm an Afterpay Clearpay payment","description":"Use `stripe.confirmAfterpayClearpayPayment` in the Afterpay Clearpay payment method creation flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide, and it will automatically redirect the customer to authorize the transaction.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmAfterpayClearpayPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/afterpay-clearpay/accept-a-payment#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/afterpay-clearpay/accept-a-payment#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm an Afterpay Clearpay payment","snippets":{"js":"stripe.confirmAfterpayClearpayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}'\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmAfterpayClearpayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}},"returns":"By default, `stripe.confirmAfterpayClearpayPayment` will trigger a redirect when successful.\nIf there is an error, or when handling `next_action`s manually by using the `handleActions: false` option, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmAfterpayClearpayPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"new","title":"without an existing payment method","description":"If you have not already created a `PaymentMethod`, you can pass payment method parameters, and the newly created `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass payment method billing details.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the payment.\n","validation":"object","required":true,"expanded":false,"subspec":[{"name":"email","validation":"string","required":true},{"name":"name","validation":"string","required":true},{"name":"address","validation":"object","required":true}]}]},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment.\n","validation":"object","badge_text":"recommended","expanded":false,"subspec":[{"name":"name","validation":"string","required":true},{"name":"address","validation":"object","required":true}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm without existing payment method","snippets":{"js":"stripe.confirmAfterpayClearpayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n address: {\n line1: '123 Main Street',\n city: 'San Francisco',\n state: 'CA',\n country: 'US',\n postal_code: '94321'\n }\n }\n },\n shipping: {\n name: 'Jenny Rosen',\n address: {\n line1: '123 Main Street',\n city: 'San Francisco',\n state: 'CA',\n country: 'US',\n postal_code: '94321'\n }\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmAfterpayClearpayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n address: {\n line1: '123 Main Street',\n city: 'San Francisco',\n state: 'CA',\n country: 'US',\n postal_code: '94321'\n }\n }\n },\n shipping: {\n name: 'Jenny Rosen',\n address: {\n line1: '123 Main Street',\n city: 'San Francisco',\n state: 'CA',\n country: 'US',\n postal_code: '94321'\n }\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` and it will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmAfterpayClearpayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(result) {\n // Inform the customer that there was an error.\n});\n","es_next":"const {error} = await stripe.confirmAfterpayClearpayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `return_url` and a `PaymentMethod` to this `PaymentIntent`, then you can confirm without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmAfterpayClearpayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}'\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmAfterpayClearpayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_afterpay_clearpay_payment"},"display_on_load":true},"stripe_confirm_alipay_payment":{"title":"Confirm an Alipay payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_alipay_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_alipay_payment","gate":false,"data":{"section_type":"method","title":"Confirm an Alipay payment","description":"Use `stripe.confirmAlipayPayment` in the Alipay payment method creation flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide, and it will automatically redirect the customer to authorize the transaction.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmAlipayPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/ideal#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/ideal#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm an Alipay payment","snippets":{"js":"stripe.confirmAlipayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmAlipayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n"}},"returns":"By default, `stripe.confirmAlipayPayment` will trigger a redirect when successful.\nIf there is an error, or when handling `next_action`s manually by using the `handleActions: false` option, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmAlipayPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"new","title":"Without an existing payment method","description":"If you have not already created a `PaymentMethod`, the newly created `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm without existing payment method","snippets":{"js":"stripe.confirmAlipayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmAlipayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n"}}},{"name":"existing","title":"With an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` and it will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmAlipayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(result) {\n // Inform the customer that there was an error.\n});\n","es_next":"const {error} = await stripe.confirmAlipayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n"}}},{"name":"attached","title":"With an attached PaymentMethod","description":"If you have already attached a `return_url` and a `PaymentMethod` to this `PaymentIntent`, then you can confirm without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmAlipayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}'\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmAlipayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_alipay_payment"},"display_on_load":true},"stripe_confirm_au_becs_debit_payment":{"title":"Confirm a BECS debit payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_au_becs_debit_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_au_becs_debit_payment","gate":false,"data":{"section_type":"method","title":"Confirm a BECS Debit payment","description":"Use `stripe.confirmAuBecsDebitPayment` in the [BECS Direct Debit Payments](/docs/payments/au-becs-debit) with Payment Methods flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/au-becs-debit) for more details.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmAuBecsDebitPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up the BECS Direct Debit account for reuse, set this\nparameter to `off_session`. BECS Direct Debit only accepts an\n`off_session` value for this parameter. If a `customer` is\nprovided on this [PaymentIntent](/docs/api/payment_intents),\nthe [PaymentMethod](/docs/api/payment_methods) will be attached\nto the customer when the PaymentIntent transitions to\n`processing`.\n","validation":"string"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up the BECS Direct Debit account for reuse, set this\nparameter to `off_session`. BECS Direct Debit only accepts an\n`off_session` value for this parameter. If a `customer` is\nprovided on this [PaymentIntent](/docs/api/payment_intents),\nthe [PaymentMethod](/docs/api/payment_methods) will be attached\nto the customer when the PaymentIntent transitions to\n`processing`.\n","validation":"string"}]}]},"request":{"title":"Confirm a BECS Debit payment","snippets":{"js":"stripe\n .confirmAuBecsDebitPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n au_becs_debit: auBankAccountElement,\n billing_details: {\n name: 'John Smith',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmAuBecsDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n au_becs_debit: auBankAccountElement,\n billing_details: {\n name: 'John Smith',\n email: '[email protected]',\n },\n },\n },\n);\n"}},"returns":"`stripe.confirmAuBecsDebitPayment` will return a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.paymentIntent`: the successful PaymentIntent.\n* `result.error`: an error.\n Refer to the API reference for all possible errors.\n","callout":"Note that `stripe.confirmAuBecsDebitPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"with_element","title":"with payment data from an Element","description":"Create and attach a new PaymentMethod with `stripe.confirmAuBecsDebitPayment` by passing an `auBankAccount` [Element](/docs/js/element) to `payment_method[au_becs_debit]`.\nThe new `PaymentMethod` will be created with the data collected by the `Element` and will be used to confirm the `PaymentIntent`.\nAdditionally, to create a BECS Direct Debit `PaymentMethod`, you are required to collect and include the account holder's name and the customer's email address.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an `object` to confirm the payment using data collected by an `auBankAccount` [Element](/docs/js/element).\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"au_becs_debit","documentation":"An `auBankAccount` Element.\n","validation":"Element","required":true},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The account holder's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with an Element","snippets":{"js":"stripe\n .confirmAuBecsDebitPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n au_becs_debit: auBankAccountElement,\n billing_details: {\n name: 'John Smith',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmAuBecsDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n au_becs_debit: auBankAccountElement,\n billing_details: {\n name: 'John Smith',\n email: '[email protected]',\n },\n },\n },\n);\n"}}},{"name":"self_collected","title":"with self collected data","description":"If you already know the customer’s BSB number and bank account number or want to collect it yourself, then you do not need to use the `auBankAccount` Element with `stripe.confirmAuBecsDebitPayment`.\nYou can pass in the customer’s bank account information directly to create a new `PaymentMethod` and confirm the `PaymentIntent`.\nTo create a BECS Direct Debit `PaymentMethod`, you are required to collect and include the account holder's name and the customer's email address.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected without an `Element`.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"au_becs_debit","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"bsb_number","documentation":"A Bank State Branch (BSB) number.\n","validation":"string","required":true},{"name":"account_number","documentation":"A bank account number.\n","validation":"string","required":true}]},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The account holder's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmAuBecsDebitPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n au_becs_debit: {\n bsb_number: '000000',\n account_number: '000123456'\n },\n billing_details: {\n name: 'John Smith',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmAuBecsDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n au_becs_debit: {\n bsb_number: '000000',\n account_number: '000123456'\n },\n billing_details: {\n name: 'John Smith',\n email: '[email protected]',\n },\n },\n },\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmAuBecsDebitPayment`.\nIt will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmAuBecsDebitPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmAuBecsDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmAuBecsDebitPayment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmAuBecsDebitPayment('{PAYMENT_INTENT_CLIENT_SECRET}')\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmAuBecsDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_au_becs_debit_payment"},"display_on_load":true},"stripe_confirm_bancontact_payment":{"title":"Confirm a Bancontact payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_bancontact_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_bancontact_payment","gate":false,"data":{"section_type":"method","title":"Confirm a Bancontact payment","description":"Use `stripe.confirmBancontactPayment` in the [Bancontact Payments with Payment Methods](/docs/payments/bancontact/accept-a-payment) flow when the customer submits your payment form.\nWhen called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmBancontactPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this Bancontact payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/bancontact/accept-a-payment?platform=web#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this Bancontact payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/bancontact/accept-a-payment?platform=web#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm a Bancontact payment","snippets":{"js":"stripe\n .confirmBancontactPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmBancontactPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}},"returns":"`stripe.confirmBancontactPayment` will trigger a redirect when successful.\nIf there is an error, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmBancontactPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"existing","title":"with an existing payment method","description":"Use `stripe.confirmBancontactPayment` with an existing `PaymentMethod` by passing its `id` to `payment_method`.\nThe `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this Bancontact payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmBancontactPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n // Inform the customer that there was an error.\n });\n","es_next":"const {error} = await stripe.confirmBancontactPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"self_collected","title":"with collected data","description":"Your customer's name is required for the Bancontact authorization to succeed.\nYou can pass in the customer’s name directly to create a new `PaymentMethod` and confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm with the customer's name.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"An object detailing billing information.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email. Required when `setup_future_usage` is set to `off_session`.\n","validation":"string","required":false}]}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this Bancontact payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmBancontactPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmBancontactPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmBancontactPayment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmBancontactPayment('{PAYMENT_INTENT_CLIENT_SECRET}')\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmBancontactPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_bancontact_payment"},"display_on_load":true},"stripe_confirm_blik_payment":{"title":"Confirm a BLIK payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_blik_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_blik_payment","gate":false,"data":{"section_type":"method","title":"Confirm a BLIK payment","description":"Use `stripe.confirmBlikPayment` in the [BLIK Payments with Payment Methods](/docs/payments/blik) flow when the customer submits your payment form.\nWhen called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically prompt the customer to authorize the transaction.\n","signature":{"object_name":"stripe","method_name":"confirmBlikPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"required":true,"subspec":[{"name":"payment_method_options","documentation":"An object that contains transaction specific data.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"code","documentation":"Your customer's 6-digit BLIK code.\n","validation":"string","expanded":true,"required":true}]},{"name":"payment_method","documentation":"Use this parameter to supply additional data relevant to the transaction, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the transaction.","validation":"object"}]}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to manually determine if the confirmation has succeeded or failed.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"required":true,"subspec":[{"name":"payment_method_options","documentation":"An object that contains transaction specific data.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"code","documentation":"Your customer's 6-digit BLIK code.\n","validation":"string","expanded":true,"required":true}]},{"name":"payment_method","documentation":"Use this parameter to supply additional data relevant to the transaction, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the transaction.","validation":"object"}]}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to manually determine if the confirmation has succeeded or failed.\n","validation":"boolean"}]}]},"request":{"title":"Confirm a BLIK payment","snippets":{"js":"stripe\n .confirmBlikPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n blik: {},\n billing_details: {}\n },\n payment_method_options: {\n blik: {\n code: '{CODE}'\n }\n }\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmBlikPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n blik: {},\n billing_details: {}\n },\n payment_method_options: {\n blik: {\n code: '{CODE}'\n }\n }\n }\n);\n"}},"returns":"By default, `stripe.confirmBlikPayment` will only return when the payment has succeeded or failed.\nIf there is an error, or when handling next actions manually by using the `handleActions: false` option, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmBlikPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[],"section_tag":"stripe_confirm_blik_payment"},"display_on_load":true},"stripe_confirm_boleto_payment":{"title":"Confirm a Boleto payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_boleto_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_boleto_payment","gate":false,"data":{"section_type":"method","title":"Confirm a Boleto payment","description":"Use `stripe.confirmBoletoPayment` in the [Boleto Payment](/docs/payments/boleto) with Payment Methods flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/boleto) for more details.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmBoletoPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set to `false`.\nThe Boleto private beta does not handle the next actions for you automatically (e.g. display Boleto details). Please refer to our [Stripe Boleto integration guide](/docs/payments/boleto) for more info.\n","validation":"boolean","required":true}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set to `false`.\nThe Boleto private beta does not handle the next actions for you automatically (e.g. display Boleto details). Please refer to our [Stripe Boleto integration guide](/docs/payments/boleto) for more info.\n","validation":"boolean","required":true}]}]},"request":{"title":"Confirm a Boleto payment","snippets":{"js":"stripe.confirmBoletoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n boleto: {\n tax_id: '000.000.000-00'\n },\n billing_details: {\n name: 'Fulaninho de Silva',\n email: '[email protected]',\n address: {\n line1: '1234 Avenida Paulista',\n city: 'Sao Paulo',\n state: 'SP',\n postal_code: '01310100',\n country: 'BR',\n },\n },\n },\n },\n {\n handleActions: false,\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmBoletoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n boleto: {\n tax_id: '000.000.000-00'\n },\n billing_details: {\n name: 'Fulaninho de Silva',\n email: '[email protected]',\n address: {\n line1: '1234 Avenida Paulista',\n city: 'Sao Paulo',\n state: 'SP',\n postal_code: '01310100',\n country: 'BR',\n },\n },\n },\n },\n {\n handleActions: false,\n }\n);\n"}},"returns":"`stripe.confirmBoletoPayment` will return a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.paymentIntent`: the successful PaymentIntent.\n* `result.error`: an error.\n Refer to the API reference for all possible errors.\n","callout":"Note that `stripe.confirmBoletoPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"collected","title":"with collected data","description":"You can pass in the customer’s billing details to create a new `PaymentMethod` and confirm the `PaymentIntent`.\nTo create a Boleto `PaymentMethod`, you are required to collect and include the customer’s name, email, Brazilian tax id (CPF/CNPJ) and address.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"boleto","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"tax_id","documentation":"The customer's Brazilian tax id (CPF/CNPJ).\n","validation":"string","required":true}]},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name`, `email` and `address`.\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name. The first and last name must be at minimum 2 characters each.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true},{"name":"address","documentation":"The customer's address: street name, city, state and postal code\n","validation":"string","required":true,"expanded":true,"subspec":[{"name":"line1","documentation":"The customer's address line 1 (e.g. street or company name).\n","validation":"string","required":true},{"name":"line2","documentation":"The customer's address line 2 (e.g. apartment, suite, unit, or building).\n","validation":"string","required":false},{"name":"city","documentation":"The customer's address city (e.g. Sao Paulo).\n","validation":"string","required":true},{"name":"state","documentation":"The customer's address state (e.g. SP).\n","validation":"string","required":true},{"name":"postal_code","documentation":"The customer's CEP (i.e. Brazilian postal code). Must be 8 digits long.\n","validation":"string","required":true},{"name":"country","documentation":"Must be BR.\n","validation":"string","required":true}]}]}]}]},"request":{"title":"Confirm with collected data","snippets":{"js":"stripe.confirmBoletoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n boleto: {\n tax_id: '000.000.000-00'\n },\n billing_details: {\n name: 'Fulaninho de Silva',\n email: '[email protected]',\n address: {\n line1: '1234 Avenida Paulista',\n city: 'Sao Paulo',\n state: 'SP',\n postal_code: '01310100',\n country: 'BR',\n },\n },\n },\n },\n {\n handleActions: false,\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmBoletoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n boleto: {\n tax_id: '000.000.000-00'\n },\n billing_details: {\n name: 'Fulaninho de Silva',\n email: '[email protected]',\n address: {\n line1: '1234 Avenida Paulista',\n city: 'Sao Paulo',\n state: 'SP',\n postal_code: '01310100',\n country: 'BR',\n },\n },\n },\n },\n {\n handleActions: false,\n }\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmBoletoPayment`.\nIt will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmBoletoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n {\n handleActions: false,\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmBoletoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n {\n handleActions: false,\n }\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmBoletoPayment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmBoletoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {},\n {\n handleActions: false,\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmBoletoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {},\n {\n handleActions: false,\n }\n);\n"}}}],"section_tag":"stripe_confirm_boleto_payment"},"display_on_load":true},"stripe_confirm_customer_balance_payment":{"title":"Confirm a Customer Balance payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_customer_balance_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_customer_balance_payment","gate":false,"data":{"section_type":"method","title":"Confirm a Customer Balance payment","description":"Use `stripe.confirmCustomerBalancePayment` in the [Customer Balance](/docs/payments/customer-balance) payment flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide.\nRefer to our [integration guide](/docs/payments/bank-transfers/accept-a-payment) for more details.\n\nSince the [Customer Balance](/docs/payments/customer-balance) payment method draws from a balance, the attempt will succeed or fail depending on the current balance amount.\nTo collect more funds from the customer when the cash balance is insufficient, use the customer balance with [bank transfer funding](/docs/payments/bank-transfers/accept-a-payment) parameters.\n\nThe confirmation attempt will finish in one of the following result states:\n1. If the customer balance is greater than or equal to the amount, the PaymentIntent response will have a `status` of `succeeded`. The `funding_type` will be ignored.\n2. If the customer balance is less than the amount, and you do not set the `funding_type`, the PaymentIntent response will have a `status` of `requires_payment_method`.\n3. If the customer balance is less than the amount, and you set the `funding_type`, the PaymentIntent response will have a `status` of `requires_action`. The `paymentIntent.next_action.display_bank_transfer_instructions` hash will contain bank transfer details for funding the [Customer Balance](/docs/payments/customer-balance).\n","signature":{"object_name":"stripe","method_name":"confirmCustomerBalancePayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"An object specifying the `customer_balance` type.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"customer_balance","documentation":"Set to `{}`.\n","validation":"object","required":true}]},{"name":"payment_method_options","documentation":"Additional payment specific configuration options. See the [with collected data](#stripe_confirm_customer_balance_payment-collected) use case below.\n","validation":"object"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set to `false`.\nThe [Customer Balance](/docs/payments/customer-balance) does not handle the next actions for you automatically (e.g. displaying bank transfer details). To make future upgrades easier, this option is required to always be sent. Please refer to our [Stripe Customer Balance integration guide](/docs/payments/bank-transfers) for more info.\n","validation":"boolean","required":true}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"An object specifying the `customer_balance` type.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"customer_balance","documentation":"Set to `{}`.\n","validation":"object","required":true}]},{"name":"payment_method_options","documentation":"Additional payment specific configuration options. See the [with collected data](#stripe_confirm_customer_balance_payment-collected) use case below.\n","validation":"object"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set to `false`.\nThe [Customer Balance](/docs/payments/customer-balance) does not handle the next actions for you automatically (e.g. displaying bank transfer details). To make future upgrades easier, this option is required to always be sent. Please refer to our [Stripe Customer Balance integration guide](/docs/payments/bank-transfers) for more info.\n","validation":"boolean","required":true}]}]},"request":{"title":"Confirm a Customer Balance payment","snippets":{"js":"stripe.confirmCustomerBalancePayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n customer_balance: {},\n }\n },\n {\n handleActions: false,\n }\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'requires_payment_method') {\n // If `payment_method_options.funding_type` wasn't set this\n // is where you would need to handle the insufficient customer\n // balance state.\n } else if (paymentIntent.status === 'requires_action') {\n // If the current customer balance is insufficient to cover\n // the amount, and you've passed\n // `payment_method_options.funding_type` for funding the\n // customer balance, you can display the bank transfer\n // instructions to your user.\n if (paymentIntent.next_action.type === 'display_bank_transfer_instructions') {\n // Bank transfer details can be found under:\n // paymentIntent.next_action.display_bank_transfer_instructions\n }\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmCustomerBalancePayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n customer_balance: {},\n }\n },\n {\n handleActions: false,\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'requires_payment_method') {\n // If `payment_method_options.funding_type` wasn't set this\n // is where you would need to handle the insufficient customer\n // balance state.\n} else if (paymentIntent.status === 'requires_action') {\n // If the current customer balance is insufficient to cover\n // the amount, and you've passed\n // `payment_method_options.funding_type` for funding the\n // customer balance, you can display the bank transfer\n // instructions to your user.\n if (paymentIntent.next_action.type === 'display_bank_transfer_instructions') {\n // Bank transfer details can be found under:\n // paymentIntent.next_action.display_bank_transfer_instructions\n }\n}\n"}},"returns":"`stripe.confirmCustomerBalancePayment` will return a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.paymentIntent`: when the [Customer Balance](/docs/payments/customer-balance) is sufficient to pay the amount, a [PaymentIntent](/docs/api/payment_intents) with `status` of `succeeded`.\n* `result.paymentIntent`: when the [Customer Balance](/docs/payments/customer-balance) is insufficient to pay the amount, and `funding_type` data was provided, a [PaymentIntent](/docs/api/payment_intents) with `status` of `requires_action`.\n* `result.paymentIntent`: when the [Customer Balance](/docs/payments/customer-balance) is insufficient to pay the amount, and no `funding_type` data was provided, a [PaymentIntent](/docs/api/payment_intents) with `status` of `requires_payment_method`.\n* `result.error`: an error.\n Refer to the API reference for all possible errors.\n","callout":"Note that `stripe.confirmCustomerBalancePayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"collected","title":"with collected data","description":"You can pass in the customer’s [bank transfer funding](/docs/payments/bank-transfers/accept-a-payment) details to create a new `PaymentMethod` and confirm the `PaymentIntent`.\n\nIf the [Customer Balance](/docs/payments/customer-balance) was not enough to pay the amount, the `status` is `requires_action`. The `paymentIntent.next_action.display_bank_transfer_instructions` hash contains bank transfer details for funding the [Customer Balance](/docs/payments/customer-balance).\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"customer_balance","documentation":"Set to `{}`.\n","validation":"object","required":true}]},{"name":"payment_method_options","documentation":"Additional payment-specific configuration options.\n","validation":"object","required":false,"expanded":true,"subspec":[{"name":"funding_type","documentation":"The funding method type to be used when there are not enough funds in the [Customer Balance](/docs/payments/customer-balance). Permitted values include: `bank_transfer`.\n","validation":"string","required":false},{"name":"bank_transfer","documentation":"The customer's chosen bank transfer method.\n","validation":"object","required":false,"subspec":[{"name":"type","documentation":"The list of bank transfer types allowed to use for funding. Permitted values include: `us_bank_account`, `eu_bank_account`, `id_bank_account`, `gb_bank_account`, `jp_bank_account`, or `mx_bank_account`.\n","validation":"string","required":true},{"name":"eu_bank_account","documentation":"Details for the customer's EU bank account transfer.\nRequired if the type is `eu_bank_account`.\n","validation":"object","required":false,"subspec":[{"name":"country","documentation":"The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, `NL`.\n","validation":"string","required":true}]},{"name":"id_bank_account","documentation":"Details for the customer's Indonesian bank account transfer.\nRequired if the type is `id_bank_account`.\n","validation":"object","required":false,"subspec":[{"name":"bank","documentation":"Bank where the account is held. One of `bca`, `bni`.\n","validation":"string","required":true}]},{"name":"requested_address_types","documentation":"List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. Permitted values include: `aba`, `swift`, `sort_code`, `zengin`, `iban`, `spei`, `id_bban`, or `sepa`.\n","validation":"array","required":false}]}]}]},"request":{"title":"Confirm with collected data","snippets":{"js":"stripe.confirmCustomerBalancePayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n customer_balance: {\n },\n },\n payment_method_options: {\n customer_balance: {\n funding_type: 'bank_transfer',\n bank_transfer: {\n type: 'us_bank_account',\n },\n },\n },\n },\n {\n handleActions: false,\n }\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'requires_payment_method') {\n // If `payment_method_options.funding_type` wasn't set this\n // is where you would need to handle the insufficient customer\n // balance state.\n } else if (paymentIntent.status === 'requires_action') {\n // If the current customer balance is insufficient to cover\n // the amount, and you've passed\n // `payment_method_options.funding_type` for funding the\n // customer balance, you can display the bank transfer\n // instructions to your user.\n if (paymentIntent.next_action.type === 'display_bank_transfer_instructions') {\n // Bank transfer details can be found under:\n // paymentIntent.next_action.display_bank_transfer_instructions\n }\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmCustomerBalancePayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n customer_balance: {\n },\n },\n payment_method_options: {\n customer_balance: {\n funding_type: 'bank_transfer',\n bank_transfer: {\n type: 'us_bank_account',\n },\n },\n },\n },\n {\n handleActions: false,\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'requires_payment_method') {\n // If `payment_method_options.funding_type` wasn't set this\n // is where you would need to handle the insufficient customer\n // balance state.\n} else if (paymentIntent.status === 'requires_action') {\n // If the current customer balance is insufficient to cover\n // the amount, and you've passed\n // `payment_method_options.funding_type` for funding the\n // customer balance, you can display the bank transfer\n // instructions to your user.\n if (paymentIntent.next_action.type === 'display_bank_transfer_instructions') {\n // Bank transfer details can be found under:\n // paymentIntent.next_action.display_bank_transfer_instructions\n }\n}\n"}}}],"section_tag":"stripe_confirm_customer_balance_payment"},"display_on_load":true},"stripe_confirm_cashapp_payment":{"title":"Confirm a Cash App Pay payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_cashapp_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_cashapp_payment","gate":false,"data":{"section_type":"method","title":"Confirm a Cash App Pay payment","description":"Use `stripe.confirmCashappPayment` in the Cash App Pay payment method creation flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide and handle the [NextAction](/docs/api/payment_intents/object#payment_intent_object-next_action) for the customer to authorize the payment.\n\nWhen you confirm a [PaymentIntent](/docs/api/payment_intents), it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\n\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmCashappPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you would like to [handle displaying the Cash App Pay QR code or handle the authorization redirect](/docs/payments/cash-app-pay/accept-a-payment?platform=web\u0026ui=API#handle-redirect) yourself.\n","validation":"boolean","required":false}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you would like to [handle displaying the Cash App Pay QR code or handle the authorization redirect](/docs/payments/cash-app-pay/accept-a-payment?platform=web\u0026ui=API#handle-redirect) yourself.\n","validation":"boolean","required":false}]}]},"request":{"title":"Confirm a Cash App Pay payment","snippets":{"js":"stripe.confirmCashappPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}'\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error} = await stripe.confirmCashappPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}'\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}},"returns":"By default, `stripe.confirmCashappPayment` will display Cash App Pay QR code in desktop web app, or trigger a redirect in mobile web app. If\nthere is an error, or when handling next actions manually by using the\n`handleActions: false` option, it will return a `Promise` which resolves with a `result`\nobject. This object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmCashappPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"new","title":"Without an existing payment method","description":"If you have not already created a `PaymentMethod`, you can pass payment method parameters, and the newly created `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm without existing payment method","snippets":{"js":"stripe.confirmCashappPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n type: 'cashapp',\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error, paymentIntent} = await stripe.confirmCashappPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n type: 'cashapp',\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}},{"name":"existing","title":"With an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` and it will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmCashappPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmCashappPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}},{"name":"attached","title":"With an attached PaymentMethod","description":"If you have already attached a `return_url` and a `PaymentMethod` to this `PaymentIntent`, then you can confirm without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmCashappPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}'\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error} = await stripe.confirmCashappPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}'\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}}],"section_tag":"stripe_confirm_cashapp_payment"},"display_on_load":true},"stripe_confirm_eps_payment":{"title":"Confirm an EPS payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_eps_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_eps_payment","gate":false,"data":{"section_type":"method","title":"Confirm an EPS payment","description":"Use `stripe.confirmEpsPayment` in the [EPS Payments with Payment Methods](/docs/payments/eps/accept-a-payment) flow when the customer submits your payment form.\nWhen called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmEpsPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/eps/accept-a-payment?platform=web#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/eps/accept-a-payment?platform=web#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm an EPS payment","snippets":{"js":"stripe\n .confirmEpsPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmEpsPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}},"returns":"`stripe.confirmEpsPayment` will trigger a redirect when successful.\nIf there is an error, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmEpsPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"existing","title":"with an existing payment method","description":"Use `stripe.confirmEpsPayment` with an existing `PaymentMethod` by passing its `id` to `payment_method`.\nThe `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmEpsPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n // Inform the customer that there was an error.\n });\n","es_next":"const {error} = await stripe.confirmEpsPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"self_collected","title":"with collected data","description":"Your customer's name is required for the EPS authorization to succeed.\nYou can pass in the customer’s name directly to create a new `PaymentMethod` and confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm with the customer's name.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"An object detailing billing information.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":true}]}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmEpsPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmEpsPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmEpsPayment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmEpsPayment('{PAYMENT_INTENT_CLIENT_SECRET}')\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmEpsPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_eps_payment"},"display_on_load":true},"stripe_confirm_fpx_payment":{"title":"Confirm an FPX payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_fpx_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_fpx_payment","gate":false,"data":{"section_type":"method","title":"Confirm an FPX payment","description":"Use `stripe.confirmFpxPayment` in the [FPX payment method creation](/docs/stripe-js/elements/fpx-bank) flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide, and it will automatically redirect the customer to authorize the transaction.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmFpxPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/fpx/accept-a-payment#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/fpx/accept-a-payment#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm an FPX payment","snippets":{"js":"stripe.confirmFpxPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n fpx: fpxBankElement\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmFpxPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n fpx: fpxBankElement\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n"}},"returns":"By default, `stripe.confirmFpxPayment` will trigger a redirect when successful.\nIf there is an error, or when handling `next_action`s manually by using the `handleActions: false` option, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmFpxPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"with_element","title":"with payment data from an Element","description":"Create and attach a new PaymentMethod by passing an `fpxBank` [Element](/docs/js/element) to `payment_method[fpx]`.\nThe new `PaymentMethod` will be created with the [bank code](/docs/payments/fpx/accept-a-payment#bank-reference) collected by the `Element` and will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an `object` to confirm using data collected by an `fpxBank` [Element](/docs/js/element).\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"fpx","documentation":"An `fpxBank` [Element](/docs/js/element).\n","validation":"Element","badge_text":"recommended"}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with an Element","snippets":{"js":"stripe.confirmFpxPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n fpx: fpxBankElement\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmFpxPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n fpx: fpxBankElement\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` and it will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmFpxPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(result) {\n // Inform the customer that there was an error.\n});\n","es_next":"const {error} = await stripe.confirmFpxPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n"}}},{"name":"self_collected","title":"with self collected data","description":"If you already know the customer’s bank or want to collect it yourself, then you do not need to use the `fpxBank` [Element](/docs/js/element).\nYou can pass in the customer’s [bank code](/docs/payments/fpx/accept-a-payment#bank-reference) directly.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected by an `fpxBank` [Element](/docs/js/element).\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"fpx","documentation":"An object detailing the customer's FPX bank.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"bank","documentation":"The customer's [bank](/docs/payments/fpx/accept-a-payment#bank-reference).\n","validation":"string","required":true}]}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmFpxPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n fpx: {\n bank: 'ambank',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmFpxPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n fpx: {\n bank: 'ambank',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `return_url` and a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmFpxPayment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmFpxPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}'\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmFpxPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_fpx_payment"},"display_on_load":true},"stripe_confirm_giropay_payment":{"title":"Confirm a giropay payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_giropay_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_giropay_payment","gate":false,"data":{"section_type":"method","title":"Confirm a giropay payment","description":"Use `stripe.confirmGiropayPayment` in the [giropay Payments with Payment Methods](/docs/payments/giropay/accept-a-payment) flow when the customer submits your payment form.\nWhen called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmGiropayPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/fpx/accept-a-payment#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/fpx/accept-a-payment#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm a giropay payment","snippets":{"js":"stripe\n .confirmGiropayPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmGiropayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}},"returns":"`stripe.confirmGiropayPayment` will trigger a redirect when successful.\nIf there is an error, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmGiropayPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"existing","title":"with an existing payment method","description":"Use `stripe.confirmGiropayPayment` with an existing `PaymentMethod` by passing its `id` to `payment_method`.\nThe `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmGiropayPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n // Inform the customer that there was an error.\n });\n","es_next":"const {error} = await stripe.confirmGiropayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"self_collected","title":"with collected data","description":"Your customer's name is required for the giropay authorization to succeed.\nYou can pass in the customer’s name directly to create a new `PaymentMethod` and confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm with the customer's name.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"An object detailing billing information.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":true}]}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmGiropayPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmGiropayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmGiropayPayment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmGiropayPayment('{PAYMENT_INTENT_CLIENT_SECRET}')\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmGiropayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_giropay_payment"},"display_on_load":true},"stripe_confirm_grabpay_payment":{"title":"Confirm a GrabPay payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_grabpay_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_grabpay_payment","gate":false,"data":{"section_type":"method","title":"Confirm a GrabPay payment","description":"Use `stripe.confirmGrabPayPayment` in the [GrabPay payments with Payment Methods](/docs/payments/grabpay)\nflow when the customer submits your payment form. When called, it will confirm the\n[PaymentIntent](/docs/api/payment_intents), and automatically redirect the customer to\nauthorize the transaction. Once authorization is complete, the customer will be redirected\nback to your specified `return_url`.\n","signature":{"object_name":"stripe","method_name":"confirmGrabPayPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret)\nof the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request. Refer to the [Payment Intents API](/docs/api/payment_intents/confirm)\nfor a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an\nobject containing data to create a `PaymentMethod` with. See the use case sections\nbelow for details.\n","validation":"string | object"},{"name":"return_url","documentation":"The URL your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/grabpay#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret)\nof the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request. Refer to the [Payment Intents API](/docs/api/payment_intents/confirm)\nfor a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an\nobject containing data to create a `PaymentMethod` with. See the use case sections\nbelow for details.\n","validation":"string | object"},{"name":"return_url","documentation":"The URL your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/grabpay#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm a GrabPay payment","snippets":{"js":"stripe\n .confirmGrabPayPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmGrabPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n },\n);\n"}},"returns":"By default, `stripe.confirmGrabPayPayment` will trigger a redirect when successful. If\nthere is an error, or when handling next actions manually by using the\n`handleActions: false` option, it will return a `Promise` which resolves with a `result`\nobject. This object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error. Refer to the [API reference](/docs/api#errors) for all\n possible errors.\n","callout":"Note that `stripe.confirmGrabPayPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting\nindicator like a spinner. If you receive an error result, you should be sure to show that\nerror to the customer, re-enable the form, and hide the waiting indicator.\n","use_cases":[{"name":"new","title":"with a new PaymentMethod","description":"You can confirm the `PaymentIntent` using `stripe.confirmGrabPayPayment` without\npassing in any additional data. This will automatically create and attach a new\n`PaymentMethod`.\n","table_content":{"title":"Data argument properties","items":[{"name":"return_url","documentation":"The URL your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm with a new PaymentMethod","snippets":{"js":"stripe\n .confirmGrabPayPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmGrabPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n },\n);\n"}}},{"name":"existing","title":"with an existing PaymentMethod","description":"Use `stripe.confirmGrabPayPayment` with an existing `PaymentMethod` by passing its\n`id` to `payment_method`. The `PaymentMethod` will be used to confirm the\n`PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The URL your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmGrabPayPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmGrabPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the\n // authorization.\n return_url: \"https://example.com/checkout/complete\",\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, you can then\nconfirm the `PaymentIntent` using `stripe.confirmGrabPayPayment` without passing in\nany additional data.\n","table_content":{"title":"Data argument properties","items":[{"name":"return_url","documentation":"The URL your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmGrabPayPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmGrabPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n },\n);\n"}}}],"section_tag":"stripe_confirm_grabpay_payment"},"display_on_load":true},"stripe_confirm_ideal_payment":{"title":"Confirm an iDEAL payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_ideal_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_ideal_payment","gate":false,"data":{"section_type":"method","title":"Confirm an iDEAL payment","description":"Use `stripe.confirmIdealPayment` in the [iDEAL Payments with Payment Methods](/docs/payments/ideal) flow when the customer submits your payment form.\nWhen called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmIdealPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this iDEAL payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/ideal/accept-a-payment?platform=web#web-handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this iDEAL payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/ideal/accept-a-payment?platform=web#web-handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm an iDEAL payment","snippets":{"js":"stripe\n .confirmIdealPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n ideal: idealBankElement,\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmIdealPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n ideal: idealBankElement,\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}},"returns":"By default, `stripe.confirmIdealPayment` will trigger a redirect when successful.\nIf there is an error, or when handling next actions manually by using the `handleActions: false` option, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmIdealPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"with_element","title":"with payment data from an Element","description":"Create and attach a new `PaymentMethod` with `stripe.confirmIdealPayment` by passing an `idealBank` [Element](/docs/js/element) to `payment_method[ideal]`.\nThe new `PaymentMethod` will be created with the [bank code](/docs/payments/ideal/accept-a-payment?platform=web\u0026ui=element#bank-reference) collected by the `Element` and will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected by an `idealBank` [Element](/docs/js/element).\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"ideal","documentation":"An `idealBank` [Element](/docs/js/element).\n","validation":"Element","badge_text":"recommended"},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\nRequired when `setup_future_usage` is set to `off_session`.\n","validation":"object","required":false,"expanded":false,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":false},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":false}]}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this iDEAL payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},"request":{"title":"Confirm with an Element","snippets":{"js":"stripe\n .confirmIdealPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n ideal: idealBankElement,\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmIdealPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n ideal: idealBankElement,\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"Use `stripe.confirmIdealPayment` with an existing `PaymentMethod` by passing its `id` to `payment_method`.\nThe `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this iDEAL payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmIdealPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n // Inform the customer that there was an error.\n });\n","es_next":"const {error} = await stripe.confirmIdealPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"self_collected","title":"with self collected data","description":"If you already know the customer’s bank or want to collect it yourself, then you do not need to use the `idealBank` [Element](/docs/js/element).\nYou can pass in the customer’s [bank code](/docs/payments/ideal/accept-a-payment?platform=web\u0026ui=element#bank-reference) directly to create a new `PaymentMethod` and confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected by an `idealBank` [Element](/docs/js/element).\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"ideal","documentation":"An object detailing the customer's iDEAL bank.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"bank","documentation":"The customer's [bank](/docs/payments/ideal/accept-a-payment?platform=web\u0026ui=element#bank-reference).\n","validation":"string","required":true}]},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\nRequired when `setup_future_usage` is set to `off_session`.\n","validation":"object","required":false,"expanded":false,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":false},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":false}]}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this iDEAL payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmIdealPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n ideal: {\n bank: 'abn_amro',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmIdealPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n ideal: {\n bank: 'abn_amro',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmIdealPayment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmIdealPayment('{PAYMENT_INTENT_CLIENT_SECRET}')\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmIdealPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_ideal_payment"},"display_on_load":true},"stripe_confirm_klarna_payment":{"title":"Confirm a Klarna payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_klarna_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_klarna_payment","gate":false,"data":{"section_type":"method","title":"Confirm a Klarna payment","description":"Use `stripe.confirmKlarnaPayment` in the Klarna payment method creation flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide, and it will automatically redirect the customer to authorize the transaction.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmKlarnaPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/klarna/accept-a-payment#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/klarna/accept-a-payment#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm a Klarna payment","snippets":{"js":"stripe.confirmKlarnaPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}'\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmKlarnaPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}},"returns":"By default, `stripe.confirmKlarnaPayment` will trigger a redirect when successful.\nIf there is an error, or when handling `next_action`s manually by using the `handleActions: false` option, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmKlarnaPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"new","title":"Without an existing payment method","description":"If you have not already created a `PaymentMethod`, the newly created `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm without existing payment method","snippets":{"js":"stripe.confirmKlarnaPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n address: {\n country: 'DE',\n },\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmKlarnaPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n address: {\n country: 'DE',\n },\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n"}}},{"name":"existing","title":"With an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` and it will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmKlarnaPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(result) {\n // Inform the customer that there was an error.\n});\n","es_next":"const {error} = await stripe.confirmKlarnaPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n"}}},{"name":"attached","title":"With an attached PaymentMethod","description":"If you have already attached a `return_url` and a `PaymentMethod` to this `PaymentIntent`, then you can confirm without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmKlarnaPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}'\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmKlarnaPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_klarna_payment"},"display_on_load":true},"stripe_confirm_konbini_payment":{"title":"Confirm a Konbini payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_konbini_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_konbini_payment","gate":false,"data":{"section_type":"method","title":"Confirm a Konbini payment","description":"Use `stripe.confirmKonbiniPayment` in the [Konbini](/docs/payments/konbini) payment flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/konbini/accept-a-payment) for more details.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmKonbiniPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","validation":"object | string"},{"name":"payment_method_options","documentation":"An object containing payment-method-specific configuration to confirm the [PaymentIntent](/docs/api/payment_intents) with.\n","validation":"Object","required":false,"expanded":false,"subspec":[{"name":"konbini","documentation":"Configuration for this Konbini payment.\n","validation":"object","expanded":true,"subspec":[{"name":"confirmation_number","documentation":"An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.\nMay not be all 0 and could be rejected in case of insufficient uniqueness. We recommend to use the customer’s phone number.\n","validation":"string","required":false}]}]}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to handle next actions yourself. Please refer to our [integration guide](/docs/payments/konbini/accept-a-payment) for more info. Default is `true`.\n","validation":"boolean","required":false}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","validation":"object | string"},{"name":"payment_method_options","documentation":"An object containing payment-method-specific configuration to confirm the [PaymentIntent](/docs/api/payment_intents) with.\n","validation":"Object","required":false,"expanded":false,"subspec":[{"name":"konbini","documentation":"Configuration for this Konbini payment.\n","validation":"object","expanded":true,"subspec":[{"name":"confirmation_number","documentation":"An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.\nMay not be all 0 and could be rejected in case of insufficient uniqueness. We recommend to use the customer’s phone number.\n","validation":"string","required":false}]}]}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to handle next actions yourself. Please refer to our [integration guide](/docs/payments/konbini/accept-a-payment) for more info. Default is `true`.\n","validation":"boolean","required":false}]}]},"request":{"title":"Confirm a Konbini payment","snippets":{"js":"stripe.confirmKonbiniPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: '花子山田',\n email: '[email protected]',\n },\n },\n payment_method_options: {\n konbini: {\n confirmation_number: '08012341234',\n },\n },\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmKonbiniPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: '花子山田',\n email: '[email protected]',\n },\n },\n payment_method_options: {\n konbini: {\n confirmation_number: '08012341234',\n },\n },\n }\n);\n"}},"returns":"`stripe.confirmKonbiniPayment` will return a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.paymentIntent`: the successful PaymentIntent.\n* `result.error`: an error.\n Refer to the API reference for all possible errors.\n","callout":"Note that `stripe.confirmKonbiniPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"collected","title":"with collected data","description":"You can pass in the customer’s billing details to create a new `PaymentMethod` and confirm the `PaymentIntent`.\nTo create a Konbini `PaymentMethod`, you are required to collect and include the customer’s name and email.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's full name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email address.\n","validation":"string","required":true}]}]},{"name":"payment_method_options","documentation":"An object containing payment-method-specific configuration to confirm the [PaymentIntent](/docs/api/payment_intents) with.\n","validation":"Object","required":false,"expanded":false,"subspec":[{"name":"konbini","documentation":"Configuration for this Konbini payment.\n","validation":"object","expanded":true,"subspec":[{"name":"confirmation_number","documentation":"An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.\nMay not be all 0 and could be rejected in case of insufficient uniqueness. We recommend to use the customer’s phone number.\n","validation":"string","required":false}]}]}]},"request":{"title":"Confirm with collected data","snippets":{"js":"stripe.confirmKonbiniPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: '花子山田',\n email: '[email protected]',\n },\n },\n payment_method_options: {\n konbini: {\n confirmation_number: '08012341234',\n },\n },\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmKonbiniPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: '花子山田',\n email: '[email protected]',\n },\n },\n payment_method_options: {\n konbini: {\n confirmation_number: '08012341234',\n },\n },\n }\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmKonbiniPayment`.\nIt will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true},{"name":"payment_method_options","documentation":"An object containing payment-method-specific configuration to confirm the [PaymentIntent](/docs/api/payment_intents) with.\n","validation":"Object","required":false,"expanded":false,"subspec":[{"name":"konbini","documentation":"Configuration for this Konbini payment.\n","validation":"object","expanded":true,"subspec":[{"name":"confirmation_number","documentation":"An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.\nMay not be all 0 and could be rejected in case of insufficient uniqueness. We recommend to use the customer’s phone number.\n","validation":"string","required":false}]}]}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmKonbiniPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n payment_method_options: {\n konbini: {\n confirmation_number: '08012341234',\n },\n },\n },\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmKonbiniPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n payment_method_options: {\n konbini: {\n confirmation_number: '08012341234',\n },\n },\n }\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmKonbiniPayment` without passing in any additional data.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method_options","documentation":"An object containing payment-method-specific configuration to confirm the [PaymentIntent](/docs/api/payment_intents) with.\n","validation":"Object","required":false,"expanded":false,"subspec":[{"name":"konbini","documentation":"Configuration for this Konbini payment.\n","validation":"object","expanded":true,"subspec":[{"name":"confirmation_number","documentation":"An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.\nMay not be all 0 and could be rejected in case of insufficient uniqueness. We recommend to use the customer’s phone number.\n","validation":"string","required":false}]}]}]},"request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmKonbiniPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method_options: {\n konbini: {\n confirmation_number: '08012341234',\n },\n },\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmKonbiniPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method_options: {\n konbini: {\n confirmation_number: '08012341234',\n },\n },\n }\n);\n"}}}],"section_tag":"stripe_confirm_konbini_payment"},"display_on_load":true},"stripe_confirm_oxxo_payment":{"title":"Confirm an OXXO payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_oxxo_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_oxxo_payment","gate":false,"data":{"section_type":"method","title":"Confirm an Oxxo payment","description":"Use `stripe.confirmOxxoPayment` in the [OXXO Payment](/docs/payments/oxxo) with Payment Methods flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/oxxo) for more details.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmOxxoPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe OXXO integration guide](/docs/payments/oxxo) for more info. Default is `true`.\n","validation":"boolean","required":false}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe OXXO integration guide](/docs/payments/oxxo) for more info. Default is `true`.\n","validation":"boolean","required":false}]}]},"request":{"title":"Confirm an Oxxo payment","snippets":{"js":"stripe.confirmOxxoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Fulano de Tal',\n email: '[email protected]',\n },\n },\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmOxxoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Fulano de Tal',\n email: '[email protected]',\n },\n },\n }\n);\n"}},"returns":"`stripe.confirmOxxoPayment` will return a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.paymentIntent`: the successful PaymentIntent.\n* `result.error`: an error.\n Refer to the API reference for all possible errors.\n","callout":"Note that `stripe.confirmOxxoPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n\nAdditionally, `stripe.confirmOxxoPayment` will pop up a modal with the voucher. This modal contains all the information required\nto pay the voucher at OXXO stores, such as the amount, a reference number and corresponding barcode.\n","use_cases":[{"name":"collected","title":"with collected data","description":"You can pass in the customer’s billing details to create a new `PaymentMethod` and confirm the `PaymentIntent`.\nTo create a OXXO `PaymentMethod`, you are required to collect and include the customer’s name and email address.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name. The first and last name must be at minimum 2 characters each.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with collected data","snippets":{"js":"stripe.confirmOxxoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Fulano de Tal',\n email: '[email protected]',\n },\n },\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmOxxoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Fulano de Tal',\n email: '[email protected]',\n },\n },\n }\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmOxxoPayment`.\nIt will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmOxxoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmOxxoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmOxxoPayment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmOxxoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmOxxoPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n);\n"}}}],"section_tag":"stripe_confirm_oxxo_payment"},"display_on_load":true},"stripe_confirm_p24_payment":{"title":"Confirm a Przelewy24 payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_p24_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_p24_payment","gate":false,"data":{"section_type":"method","title":"Confirm a Przelewy24 payment","description":"Use `stripe.confirmP24Payment` in the [Przelewy24 Payments with Payment Methods](/docs/payments/p24/accept-a-payment) flow when the customer submits your payment form.\nWhen called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmP24Payment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/p24/accept-a-payment?platform=web#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/p24/accept-a-payment?platform=web#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm a P24 payment","snippets":{"js":"stripe\n .confirmP24Payment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n billing_details: {\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmP24Payment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}},"returns":"`stripe.confirmP24Payment` will trigger a redirect when successful.\nIf there is an error, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmP24Payment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"existing","title":"with an existing payment method","description":"Use `stripe.confirmP24Payment` with an existing `PaymentMethod` by passing its `id` to `payment_method`.\nThe `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmP24Payment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n // Inform the customer that there was an error.\n });\n","es_next":"const {error} = await stripe.confirmP24Payment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"self_collected","title":"with collected data","description":"Your customer's email address is required for the Przelewy24 authorization to succeed.\nYou can pass in the customer’s email address directly to create a new `PaymentMethod` and confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm with the customer's email address.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"An object detailing billing information.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"email","documentation":"The customer's email address.\n","validation":"string","required":true}]}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmP24Payment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n billing_details: {\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmP24Payment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmP24Payment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmP24Payment('{PAYMENT_INTENT_CLIENT_SECRET}')\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmP24Payment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_p24_payment"},"display_on_load":true},"stripe_confirm_paynow_payment":{"title":"Confirm a PayNow payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_paynow_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_paynow_payment","gate":false,"data":{"section_type":"method","title":"Confirm a PayNow payment","description":"Use `stripe.confirmPayNowPayment` in the PayNow payment method creation flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide and handle the [NextAction](/docs/api/payment_intents/object#payment_intent_object-next_action) for the customer to authorize the payment.\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmPayNowPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Default is `true`. Set this to `false` if you would like to [handle displaying the PayNow QR code yourself](/docs/payments/paynow#confirm-payment-intent).\n","validation":"boolean","required":false}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Default is `true`. Set this to `false` if you would like to [handle displaying the PayNow QR code yourself](/docs/payments/paynow#confirm-payment-intent).\n","validation":"boolean","required":false}]}]},"request":{"title":"Confirm a PayNow payment","snippets":{"js":"stripe.confirmPayNowPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error} = await stripe.confirmPayNowPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}},"returns":"By default, `stripe.confirmPayNowPayment` will display the PayNow QR code overlay. If\nthere is an error, or when handling next actions manually by using the\n`handleActions: false` option, it will return a `Promise` which resolves with a `result`\nobject. This object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmPayNowPayment` may take several seconds to complete and display the QR code.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"new","title":"Without an existing payment method","description":"If you have not already created a `PaymentMethod`, you can pass payment method parameters, and the newly created `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass payment method billing details.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the payment method.\n","validation":"object","badge_text":"recommended"}]}]},"request":{"title":"Confirm without existing payment method","snippets":{"js":"stripe.confirmPayNowPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: '{NAME}',\n email: '{EMAIL}'\n },\n },\n }\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error, paymentIntent} = await stripe.confirmPayNowPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: '{NAME}',\n email: '{EMAIL}'\n },\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}},{"name":"existing","title":"With an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` and it will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmPayNowPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error} = await stripe.confirmPayNowPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}},{"name":"attached","title":"With an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmPayNowPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error} = await stripe.confirmPayNowPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}}],"section_tag":"stripe_confirm_paynow_payment"},"display_on_load":true},"stripe_confirm_paypal_payment":{"title":"Confirm a PayPal payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_paypal_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_paypal_payment","gate":false,"data":{"section_type":"method","title":"Confirm a PayPal payment","description":"Use `stripe.confirmPayPalPayment` in the [PayPal Payments with Payment Methods](/docs/payments/paypal/accept-a-payment) flow when the customer submits your payment form.\nWhen called, it will confirm the `PaymentIntent`, and it will automatically redirect the customer to authorize the transaction.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\n","signature":{"object_name":"stripe","method_name":"confirmPayPalPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\nSee the use case sections below for details.\n","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\nSee the use case sections below for details.\n","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]}]},"request":{"title":"Confirm a PayPal payment","snippets":{"js":"stripe\n .confirmPayPalPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmPayPalPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n },\n);\n"}},"returns":"`stripe.confirmPayPalPayment` will trigger a redirect when successful.\nIf there is an error, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmPayPalPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"new","title":"with a new PaymentMethod","description":"You can confirm the `PaymentIntent` using `stripe.confirmPayPalPayment` without\npassing in any additional data. This will automatically create and attach a new\n`PaymentMethod`.\n","table_content":{"title":"Data argument properties","items":[{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm with a new PaymentMethod","snippets":{"js":"stripe\n .confirmPayPalPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmPayPalPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n },\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"Use `stripe.confirmPayPalPayment` with an existing `PaymentMethod` by passing its `id` to `payment_method`.\nThe `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmPayPalPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: \"https://example.com/checkout/complete\",\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmPayPalPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: \"https://example.com/checkout/complete\",\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmPayPalPayment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmPayPalPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmPayPalPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/checkout/complete\",\n },\n);\n"}}}],"section_tag":"stripe_confirm_paypal_payment"},"display_on_load":true},"stripe_confirm_pix_payment":{"title":"Confirm a Pix payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_pix_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_pix_payment","gate":false,"data":{"section_type":"method","title":"Confirm a Pix payment","description":"Use `stripe.confirmPixPayment` in the [Pix Payment](/docs/payments/pix) with Payment Methods flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/pix) for more details.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmPixPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","validation":"string | object"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Default to be `true`. Set this to `false` if you would like to [handle displaying the Pix QR code yourself](https://stripe.com/docs/payments/pix/accept-a-payment#confirm-payment-intent).\n","validation":"boolean","required":false}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","validation":"string | object"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Default to be `true`. Set this to `false` if you would like to [handle displaying the Pix QR code yourself](https://stripe.com/docs/payments/pix/accept-a-payment#confirm-payment-intent).\n","validation":"boolean","required":false}]}]},"request":{"title":"Confirm a Pix payment","snippets":{"js":"stripe.confirmPixPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmPixPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n);\n"}},"returns":"By default, `stripe.confirmPixPayment` will display the Pix QR code overlay. If\nthere is an error, or when handling next actions manually by using the\n`handleActions: false` option, it will return a `Promise` which resolves with a `result`\nobject. This object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmPixPayment` may take several seconds to complete and display the QR code.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"new","title":"without an existing payment method","description":"If you have not already created a `PaymentMethod`, you can pass payment method parameters, and the newly created `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass payment method paramters or and empty payment method object.\n","validation":"object","required":true,"expanded":false}]},"request":{"title":"Confirm without existing payment method","snippets":{"js":"stripe.confirmPixPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {},\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmPixPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {},\n }\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` and it will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmPixPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmPixPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmPixPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmPixPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n);\n"}}}],"section_tag":"stripe_confirm_pix_payment"},"display_on_load":true},"stripe_confirm_promptpay_payment":{"title":"Confirm a PromptPay payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_promptpay_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_promptpay_payment","gate":false,"data":{"section_type":"method","title":"Confirm a PromptPay payment","description":"Use `stripe.confirmPromptPayPayment` in the PromptPay payment method creation flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide and handle the [NextAction](/docs/api/payment_intents/object#payment_intent_object-next_action) for the customer to authorize the payment.\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmPromptPayPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Default to be `true`. Set this to `false` if you would like to [handle displaying the PromptPay QR code yourself](https://stripe.com/docs/payments/promptpay/accept-a-payment#confirm-payment-intent).\n","validation":"boolean","required":false}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Default to be `true`. Set this to `false` if you would like to [handle displaying the PromptPay QR code yourself](https://stripe.com/docs/payments/promptpay/accept-a-payment#confirm-payment-intent).\n","validation":"boolean","required":false}]}]},"request":{"title":"Confirm a PromptPay payment","snippets":{"js":"stripe.confirmPromptPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error} = await stripe.confirmPromptPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}},"returns":"By default, `stripe.confirmPromptPayPayment` will display the PromptPay QR code overlay. If\nthere is an error, or when handling next actions manually by using the\n`handleActions: false` option, it will return a `Promise` which resolves with a `result`\nobject. This object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmPromptPayPayment` may take several seconds to complete and display the QR code.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"new","title":"Without an existing payment method","description":"If you have not already created a `PaymentMethod`, you can pass payment method parameters, and the newly created `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass payment method billing details.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the payment method.\n","validation":"object","badge_text":"recommended"}]}]},"request":{"title":"Confirm without existing payment method","snippets":{"js":"stripe.confirmPromptPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: '{NAME}',\n email: '{EMAIL}'\n },\n },\n }\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error, paymentIntent} = await stripe.confirmPromptPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: '{NAME}',\n email: '{EMAIL}'\n },\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}},{"name":"existing","title":"With an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` and it will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmPromptPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error} = await stripe.confirmPromptPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}},{"name":"attached","title":"With an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmPromptPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error} = await stripe.confirmPromptPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}}],"section_tag":"stripe_confirm_promptpay_payment"},"display_on_load":true},"stripe_confirm_sepa_debit_payment":{"title":"Confirm a SEPA debit payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_sepa_debit_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_sepa_debit_payment","gate":false,"data":{"section_type":"method","title":"Confirm a SEPA Debit payment","description":"Use `stripe.confirmSepaDebitPayment` in the [SEPA Direct Debit Payments](/docs/payments/sepa-debit) with Payment Methods flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/sepa-debit) for more details.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmSepaDebitPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up the SEPA Direct Debit account for reuse, set\nthis parameter to `off_session`. SEPA Direct Debit only\naccepts an `off_session` value for this parameter. If a\n`customer` is provided on this\n[PaymentIntent](/docs/api/payment_intents), the\n[PaymentMethod](/docs/api/payment_methods) will be attached to\nthe customer when the PaymentIntent transitions to\n`processing`.\n","validation":"string"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up the SEPA Direct Debit account for reuse, set\nthis parameter to `off_session`. SEPA Direct Debit only\naccepts an `off_session` value for this parameter. If a\n`customer` is provided on this\n[PaymentIntent](/docs/api/payment_intents), the\n[PaymentMethod](/docs/api/payment_methods) will be attached to\nthe customer when the PaymentIntent transitions to\n`processing`.\n","validation":"string"}]}]},"request":{"title":"Confirm a SEPA Debit payment","snippets":{"js":"stripe\n .confirmSepaDebitPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n sepa_debit: ibanElement,\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmSepaDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n sepa_debit: ibanElement,\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n },\n);\n"}},"returns":"`stripe.confirmSepaDebitPayment` will return a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.paymentIntent`: the successful PaymentIntent.\n* `result.error`: an error.\n Refer to the API reference for all possible errors.\n","callout":"Note that `stripe.confirmSepaDebitPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"with_element","title":"with payment data from an Element","description":"Create and attach a new PaymentMethod with `stripe.confirmSepaDebitPayment` by passing an `iban` [Element](/docs/js/element) to `payment_method[sepa_debit]`.\nThe new `PaymentMethod` will be created with the data collected by the `Element` and will be used to confirm the `PaymentIntent`.\nAdditionally, to create a SEPA Direct Debit `PaymentMethod`, you are required to collect and include the customer’s name and email address.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an `object` to confirm the payment using data collected by an `iban` [Element](/docs/js/element).\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"sepa_debit","documentation":"An `iban` Element.\n","validation":"Element","required":true},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with an Element","snippets":{"js":"stripe\n .confirmSepaDebitPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n sepa_debit: ibanElement,\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmSepaDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n sepa_debit: ibanElement,\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n },\n);\n"}}},{"name":"self_collected","title":"with self collected data","description":"If you already know the customer’s IBAN account number or want to collect it yourself, then you do not need to use the `iban` Element with `stripe.confirmSepaDebitPayment`.\nYou can pass in the customer’s account number directly to create a new `PaymentMethod` and confirm the `PaymentIntent`.\nTo create a SEPA Direct Debit `PaymentMethod`, you are required to collect and include the customer’s name and email address.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected without an `Element`.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"sepa_debit","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"iban","documentation":"An IBAN account number.\n","validation":"string","required":true}]},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmSepaDebitPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n sepa_debit: {\n iban: 'DE89370400440532013000',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmSepaDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n sepa_debit: {\n iban: 'DE89370400440532013000',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n },\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmSepaDebitPayment`.\nIt will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmSepaDebitPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmSepaDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmSepaDebitPayment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmSepaDebitPayment('{PAYMENT_INTENT_CLIENT_SECRET}')\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmSepaDebitPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_sepa_debit_payment"},"display_on_load":true},"stripe_confirm_sofort_payment":{"title":"Confirm a Sofort payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_sofort_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_sofort_payment","gate":false,"data":{"section_type":"method","title":"Confirm a Sofort payment","description":"Use `stripe.confirmSofortPayment` in the [Sofort Payments with Payment Methods](/docs/payments/sofort) flow when the customer submits your payment form.\nWhen called, it will confirm the `PaymentIntent` with `data` you provide. It will then automatically redirect the customer to authorize the transaction.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\n\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmSofortPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this SOFORT payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this SOFORT payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm a Sofort payment","snippets":{"js":"stripe\n .confirmSofortPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n sofort: {\n country: 'DE'\n }\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmSofortPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n sofort: {\n country: 'DE'\n }\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}},"returns":"`stripe.confirmSofortPayment` will trigger a redirect when successful.\nIf there is an error, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmSofortPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"existing","title":"with an existing payment method","description":"Use `stripe.confirmSofortPayment` with an existing `PaymentMethod` by passing its `id` to `payment_method`.\nThe `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this SOFORT payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmSofortPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n // Inform the customer that there was an error.\n });\n","es_next":"const {error} = await stripe.confirmSofortPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"self_collected","title":"with collected data","description":"The country of your customer's bank is required for the Sofort authorization to succeed.\nYou can pass in the country of your customer's bank directly to create a new `PaymentMethod` and confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm with the customer's name.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"sofort","documentation":"An object detailing SOFORT specific parameters.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"country","documentation":"The country code where customer's bank is located.\n","validation":"string","required":true}]},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\nRequired when `setup_future_usage` is set to `off_session`.\n","validation":"object","required":false,"expanded":false,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":false},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":false}]}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"},{"name":"setup_future_usage","documentation":"To set up a SEPA Direct Debit payment method using the bank details from this SOFORT payment,\nset this parameter to `off_session`. When using this parameter, a `customer` will need\nto be set on the [PaymentIntent](/docs/api/payment_intents). The newly created SEPA Direct Debit\n[PaymentMethod](/docs/api/payment_methods) will be attached to this customer.\n","validation":"string"}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmSofortPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: {\n sofort: {\n country: 'DE'\n }\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmSofortPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n sofort: {\n country: 'DE'\n }\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm the `PaymentIntent` using `stripe.confirmSofortPayment` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmSofortPayment('{PAYMENT_INTENT_CLIENT_SECRET}')\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmSofortPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_sofort_payment"},"display_on_load":true},"stripe_confirm_wechat_pay_payment":{"title":"Confirm a WeChat Pay payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_confirm_wechat_pay_payment","section_anchor":"confirm_payment_intent_payment_method","subsection_anchors":null,"path":"/payment_intents/confirm_wechat_pay_payment","gate":false,"data":{"section_type":"method","title":"Confirm a WeChat Pay payment","description":"Use `stripe.confirmWechatPayPayment` in the WeChat Pay payment method creation flow when the customer submits your payment form.\nWhen called, it will confirm the [PaymentIntent](/docs/api/payment_intents) with `data` you provide and handle the [NextAction](/docs/api/payment_intents/object#payment_intent_object-next_action) for the customer to authorize the payment.\nWhen you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmWechatPayPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you would like to [handle displaying the WeChat Pay QR code yourself](/docs/payments/wechat-pay/accept-a-payment?platform=web#submit-payment).\n","validation":"boolean","required":false}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Payment Intents API](/docs/api/payment_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you would like to [handle displaying the WeChat Pay QR code yourself](/docs/payments/wechat-pay/accept-a-payment?platform=web#submit-payment).\n","validation":"boolean","required":false}]}]},"request":{"title":"Confirm a WeChat Pay payment","snippets":{"js":"stripe.confirmWechatPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error} = await stripe.confirmWechatPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}},"returns":"By default, `stripe.confirmWechatPayPayment` will display WeChat Pay QR code. If\nthere is an error, or when handling next actions manually by using the\n`handleActions: false` option, it will return a `Promise` which resolves with a `result`\nobject. This object has either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmWechatPayPayment` may take several seconds to complete and display the QR code.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"new","title":"Without an existing payment method","description":"If you have not already created a `PaymentMethod`, you can pass payment method parameters, and the newly created `PaymentMethod` will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass payment method billing details.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the payment method.\n","validation":"object","badge_text":"recommended"}]}]},"request":{"title":"Confirm without existing payment method","snippets":{"js":"stripe.confirmWechatPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: '{NAME}',\n email: '{EMAIL}'\n },\n wechat_pay: {},\n },\n }\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error, paymentIntent} = await stripe.confirmWechatPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: '{NAME}',\n email: '{EMAIL}'\n },\n wechat_pay: {},\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}},{"name":"existing","title":"With an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` and it will be used to confirm the `PaymentIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe.confirmWechatPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error} = await stripe.confirmWechatPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}},{"name":"attached","title":"With an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `PaymentIntent`, then you can confirm without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmWechatPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n).then(function({error, paymentIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error} = await stripe.confirmWechatPayPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {}\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (paymentIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (paymentIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}}],"section_tag":"stripe_confirm_wechat_pay_payment"},"display_on_load":true},"stripe_retrieve_payment_intent":{"title":"Retrieve a PaymentIntent","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_retrieve_payment_intent","section_anchor":"stripe_retrieve_payment_intent","subsection_anchors":null,"path":"/payment_intents/retrieve_payment_intent","gate":false,"data":{"section_type":"method","title":"Retrieve a PaymentIntent","description":"Retrieve a [PaymentIntent](/docs/api/payment_intents) using its [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret).\n","signature":{"object_name":"stripe","method_name":"retrievePaymentIntent","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the [PaymentIntent](/docs/api/payment_intents) to retrieve.\n","validation":"string","required":true}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the [PaymentIntent](/docs/api/payment_intents) to retrieve.\n","validation":"string","required":true}]},"request":{"title":"Retrieve a PaymentIntent","snippets":{"js":"stripe\n .retrievePaymentIntent('{PAYMENT_INTENT_CLIENT_SECRET}')\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.retrievePaymentIntent(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n);\n\n// Handle error or paymentIntent\n"}},"returns":"This method returns a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.paymentIntent`: a [PaymentIntent](/docs/api/payment_intents) was retrieved successfully.\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_retrieve_payment_intent"},"display_on_load":true},"stripe_verify_microdeposits_for_payment":{"title":"Verify with micro-deposits for payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_verify_microdeposits_for_payment","section_anchor":"stripe_verify_microdeposits_for_payment","subsection_anchors":null,"path":"/payment_intents/verify_microdeposits_for_payment","gate":false,"data":{"section_type":"method","title":"Verify with micro-deposits for payment","description":"Use `stripe.verifyMicrodepositsForPayment` in the [Accept a Canadian pre-authorized debit payment](/docs/payments/acss-debit/accept-a-payment) or [Accept an ACH Direct Debit payment](/docs/payments/ach-debit/accept-a-payment) flow to verify a customer's bank account with micro-deposits.\n\nIt should be only called when [PaymentIntent](/docs/api/payment_intents) is in the `requires_action` state, and contains a `next_action` field that has a `type` equal to `verify_with_microdeposits`.\nRefer to our [integration guide](/docs/payments/acss-debit/accept-a-payment) for more details.\n","signature":{"object_name":"stripe","method_name":"verifyMicrodepositsForPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"amounts","documentation":"An array of two positive integers, in *cents*, equal to the values of the micro-deposits sent to the bank account.\n","validation":"array"},{"name":"descriptor_code","documentation":"A six-character code starting with SM present in the microdeposit sent to the bank account.\n","validation":"string"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"amounts","documentation":"An array of two positive integers, in *cents*, equal to the values of the micro-deposits sent to the bank account.\n","validation":"array"},{"name":"descriptor_code","documentation":"A six-character code starting with SM present in the microdeposit sent to the bank account.\n","validation":"string"}]}]},"request":{"title":"Verify with micro-deposits for payment","snippets":{"js":"stripe.verifyMicrodepositsForPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n amounts: [32, 45],\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.verifyMicrodepositsForPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n amounts: [32, 45],\n }\n);\n\n// Handle the paymentIntent or error\n"}},"returns":"`stripe.verifyMicrodepositsForPayment` will return a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.paymentIntent`: the [PaymentIntent](/docs/api/payment_intents) with a `status` of `processing`.\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) and our [integration guide](/docs/payments/acss-debit/accept-a-payment) for all possible errors.\n","callout":"Verification can fail for several reasons. The failure may happen synchronously as a direct error response, or asynchronously through a `payment_intent.payment_failed` webhook event.\nRefer to our [integration guide](/docs/payments/acss-debit/accept-a-payment) for more details.\n","section_tag":"stripe_verify_microdeposits_for_payment"},"display_on_load":true},"stripe_create_radar_session":{"title":"Create a Radar Session","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_create_radar_session","section_anchor":"stripe_create_radar_session","subsection_anchors":null,"path":"/payment_intents/create_radar_session","gate":false,"data":{"section_type":"method","title":"Create a Radar session","description":"Use `stripe.createRadarSession()` to associate client browser information with a Radar Session ID. This ID can then be passed to Stripe when [creating charges and payment methods](/docs/radar/radar-session) to associate client browser information with those charges and improve Radar's ability to identify fraud.\n\nWe've prefilled the example with your [test API key](https://dashboard.stripe.com/account/apikeys), `pk_test_VD0jz708gfrfx9oMbWDopyaS`, which you can also find [here](https://dashboard.stripe.com/apikeys).\nOnly you can see this value.\n\n","callout":"Note that `stripe.createRadarSession` should be non-blocking. If you receive an error from this function, continue on with completing charges without passing through a Radar Session ID.\n","signature":{"object_name":"stripe","method_name":"createRadarSession","args":[]},"request":{"title":"Create a Radar Session","snippets":{"js":"var stripe = Stripe('pk_test_VD0jz708gfrfx9oMbWDopyaS');\nstripe.createRadarSession().then(function(result) {\n // Handle result.error or result.radarSession\n});\n","es_next":"var stripe = Stripe('pk_test_VD0jz708gfrfx9oMbWDopyaS');\nconst {radarSession, error} = await stripe.createRadarSession();\n"}},"returns":"This method returns a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.radarSession`: a Radar Session was created successfully.\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors and the [FPX guide](/docs/payments/fpx/accept-a-payment#error-codes) for FPX specific errors.\n\nAfter you receive a Radar Session ID, pass it to your server and subsequently include it in your API requests to create charges, payment methods, or to create or confirm a PaymentIntent.\n","section_tag":"stripe_create_radar_session"},"display_on_load":true},"stripe_handle_next_action_for_payment":{"title":"Handle a next action","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_handle_next_action_for_payment","section_anchor":"stripe_handle_next_action_for_payment","subsection_anchors":null,"path":"/payment_intents/handle_next_action","gate":false,"data":{"section_type":"method","title":"Handle a next action","description":"Use `stripe.handleNextAction` in the [finalizing payments on the server](/docs/payments/finalize-payments-on-the-server#next-actions)\nflow to finish confirmation of a [PaymentIntent](/docs/api/payment_intents) with the `requires_action` status.\nIt will throw an error if the PaymentIntent has a different status.\n\nDepending on the payment method and required action, the customer may be temporarily redirected from your site\nand brought back to the `return_url` [parameter](/docs/api/payment_intents/confirm#confirm_payment_intent-return_url) provided when the PaymentIntent is confirmed.\n","callout":"Note that `stripe.handleNextAction` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n\nAdditionally, `stripe.handleNextAction` may trigger a [3D Secure](/docs/payments/3d-secure) authentication challenge.\nThe authentication challenge requires a context switch that can be hard to follow on a screen-reader.\nEnsure that your form is accessible by ensuring that success or error messages are clearly read out.\n","signature":{"object_name":"stripe","method_name":"handleNextAction","args":[{"name":"options","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string"}]}]},"table_content":{"items":[{"name":"options","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string"}]}]},"request":{"title":"Handle a next action","snippets":{"js":"stripe.handleNextAction({\n clientSecret: '{PAYMENT_INTENT_CLIENT_SECRET}'\n}).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {\n paymentIntent,\n error\n} = await stripe.handleNextAction({\n clientSecret: '{PAYMENT_INTENT_CLIENT_SECRET}',\n});\n\n// Handle the paymentIntent or error\n"}},"returns":"This method returns a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.paymentIntent`: a [PaymentIntent](/docs/api/payment_intents) with the `processing` or `succeeded` status.\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_handle_next_action_for_payment"},"display_on_load":true},"stripe_handle_card_action":{"title":"Handle a card action","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_handle_card_action","section_anchor":"stripe_handle_card_action","subsection_anchors":null,"path":"/payment_intents/handle_card_action","gate":false,"data":{"section_type":"method","title":"Handle a card action","description":"Use `stripe.handleCardAction` in the Payment Intents API [manual confirmation](/docs/payments/payment-intents/web-manual) flow to handle a [PaymentIntent](/docs/api/payment_intents) with the `requires_action` status.\nIt will throw an error if the `PaymentIntent` has a different status.\n","callout":"Note that `stripe.handleCardAction` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n\nAdditionally, `stripe.handleCardAction` may trigger a [3D Secure](/docs/payments/3d-secure) authentication challenge.\nThe authentication challenge requires a context switch that can be hard to follow on a screen-reader.\nEnsure that your form is accessible by ensuring that success or error messages are clearly read out.\n","signature":{"object_name":"stripe","method_name":"handleCardAction","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent` to handle.\n","validation":"string","required":true}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent` to handle.\n","validation":"string","required":true}]},"request":{"title":"Handle a card action","snippets":{"js":"stripe\n .handleCardAction('{PAYMENT_INTENT_CLIENT_SECRET}')\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.handleCardAction(\n '{{PAYMENT_INTENT_CLIENT_SECRET}}',\n);\n\n// Handle the paymentIntent or error\n"}},"returns":"This method returns a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.paymentIntent`: a [PaymentIntent](/docs/api/payment_intents) with the `requires_confirmation` status to confirm server-side.\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_handle_card_action"},"display_on_load":true},"stripe_collect_bank_account_for_payment":{"title":"Collect bank account details for payment","group_title":"Payment Intents","group_anchor":"payment_intents","anchor":"stripe_collect_bank_account_for_payment","section_anchor":"stripe_collect_bank_account_for_payment","subsection_anchors":null,"path":"/payment_intents/collect_bank_account_for_payment","gate":false,"data":{"section_type":"method","title":"Collect bank account details for payment","description":"Use `stripe.collectBankAccountForPayment` in the [Accept a payment](/docs/payments/ach-debit/accept-a-payment) flow for the [ACH Direct Debit](/docs/payments/ach-debit) payment method to collect the customer’s bank account in your payment form.\nWhen called, it will automatically load an on-page modal UI to collect bank account details and verification, and attach the [PaymentMethod](/docs/api/payment_methods) to the [PaymentIntent](/docs/api/payment_intents).\n","signature":{"object_name":"stripe","method_name":"collectBankAccountForPayment","args":[{"name":"options","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"params","validation":"object","required":true,"expanded":true,"subspec":[{"name":"payment_method_type","documentation":"The payment method type for the bank account details (e.g. `us_bank_account`)\n","validation":"string","required":true},{"name":"payment_method_data","documentation":"Payment method specific data to be sent with the request\n","validation":"object","required":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` is required. Providing `email` allows your customer to receive [ACH Direct Debit mandate and microdeposit emails](/docs/payments/ach-debit#mandate-and-microdeposit-emails).\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name. The first and last name must be at minimum 2 characters each.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":false}]}]}]}],"required":true}]},"table_content":{"items":[{"name":"options","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"params","validation":"object","required":true,"expanded":true,"subspec":[{"name":"payment_method_type","documentation":"The payment method type for the bank account details (e.g. `us_bank_account`)\n","validation":"string","required":true},{"name":"payment_method_data","documentation":"Payment method specific data to be sent with the request\n","validation":"object","required":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` is required. Providing `email` allows your customer to receive [ACH Direct Debit mandate and microdeposit emails](/docs/payments/ach-debit#mandate-and-microdeposit-emails).\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name. The first and last name must be at minimum 2 characters each.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":false}]}]}]}],"required":true}]},"request":{"title":"Collect bank account details for payment","snippets":{"js":"stripe.collectBankAccountForPayment(\n {\n clientSecret: '{PAYMENT_INTENT_CLIENT_SECRET}',\n params: {\n payment_method_type: 'us_bank_account',\n payment_method_data: {\n billing_details: {name: 'Jenny Rosen', email: '[email protected]'},\n },\n },\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.collectBankAccountForPayment(\n {\n clientSecret: '{PAYMENT_INTENT_CLIENT_SECRET}',\n params: {\n payment_method_type: 'us_bank_account',\n payment_method_data: {\n billing_details: {name: 'Jenny Rosen', email: '[email protected]'},\n },\n },\n }\n);\n\n// Handle the paymentIntent or error\n"}},"returns":"When the `stripe.collectBankAccountForPayment` completes successfully, it returns a PaymentIntent.\nIf the customer provided their account, the PaymentIntent is in the `requires_confirmation` state. If the customer closed the dialog without providing their account, the PaymentIntent is in the `requires_payment_method` state.\nUse [stripe.confirmUsBankAccountPayment](/docs/js/payment_intents/confirm_us_bank_account_payment) to complete the process.\n","section_tag":"stripe_collect_bank_account_for_payment"},"display_on_load":true},"setup_intents_intro":{"title":"Introduction","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"setup_intents_intro","section_anchor":"setup_intents_intro","subsection_anchors":null,"path":"/setup_intents","gate":false,"data":{"section_type":"generic","title":"Setup Intents","description":"Use the [Setup Intents APIs](/docs/payments/setup-intents) to save a card and charge it later.\nFor step-by-step instructions on using the Setup Intents APIs, see the [set up recurring payments guide](/docs/payments/save-and-reuse).\n\nThe following Stripe.js methods are available for working with Setup Intents.\n","section_tag":"setup_intents_intro"},"display_on_load":true},"confirm_setup_intent":{"title":"Confirm a SetupIntent","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"confirm_setup_intent","section_anchor":"confirm_setup_intent","subsection_anchors":null,"path":"/setup_intents/confirm_setup","gate":false,"data":{"section_type":"method","title":"Confirm a setup","description":"Use `stripe.confirmSetup` to confirm a [SetupIntent](/docs/api/setup_intents) using data collected\nby the [Payment Element](/docs/js/element/payment_element), or with manually provided data via `confirmParams`.\nWhen called, `stripe.confirmSetup` will attempt to complete any [required actions](/docs/payments/intents),\nsuch as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.\nYour user will be redirected to the `return_url` you pass once the authorization is complete.\n","signature":{"object_name":"stripe","method_name":"confirmSetup","args":[{"name":"options","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"elements","documentation":"Required unless a `clientSecret` is provided.\n\nThe [Elements](#payment_element_create) instance that was used to create the Payment Element.\n","validation":"object","required":true,"requirement_text":"Conditionally required"},{"name":"clientSecret","documentation":"Required unless the provided `elements` instance contains a [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret).\n\nThe client secret of the `SetupIntent`.\n","validation":"string","required":true,"requirement_text":"Conditionally required"},{"name":"confirmParams","documentation":"Parameters that will be passed on to the Stripe API. Refer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true},{"name":"payment_method_data","documentation":"When you call `stripe.confirmSetup`, payment details are collected from the Element and passed to the SetupIntents\n[confirm endpoint](https://stripe.com/docs/api/setup_intents/confirm) as the [payment_method_data](https://stripe.com/docs/api/setup_intents/confirm#confirm_setup_intent-payment_method)\nparameter. You can also include additional `payment_method_data` fields, which will be merged with the data collected from the Element.\n","validation":"object","subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\nDetails collected by Elements will override values passed here.\nBilling fields that are omitted in the Payment Element via the `fields` option required.\n","validation":"object"}]}]},{"name":"redirect","documentation":"By default, `stripe.confirmSetup` will always redirect to your `return_url` after a successful confirmation.\nIf you set `redirect: \"if_required\"`, then `stripe.confirmSetup` will only redirect if your user chooses a redirect-based payment method.\n\n**Note**: Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.\nWhen a non-redirect based payment method is successfully confirmed, `stripe.confirmSetup` will resolve with a `{setupIntent}` object.\n","validation":"'always' | 'if_required'"}]}]},"table_content":{"items":[{"name":"options","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"elements","documentation":"Required unless a `clientSecret` is provided.\n\nThe [Elements](#payment_element_create) instance that was used to create the Payment Element.\n","validation":"object","required":true,"requirement_text":"Conditionally required"},{"name":"clientSecret","documentation":"Required unless the provided `elements` instance contains a [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret).\n\nThe client secret of the `SetupIntent`.\n","validation":"string","required":true,"requirement_text":"Conditionally required"},{"name":"confirmParams","documentation":"Parameters that will be passed on to the Stripe API. Refer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true},{"name":"payment_method_data","documentation":"When you call `stripe.confirmSetup`, payment details are collected from the Element and passed to the SetupIntents\n[confirm endpoint](https://stripe.com/docs/api/setup_intents/confirm) as the [payment_method_data](https://stripe.com/docs/api/setup_intents/confirm#confirm_setup_intent-payment_method)\nparameter. You can also include additional `payment_method_data` fields, which will be merged with the data collected from the Element.\n","validation":"object","subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\nDetails collected by Elements will override values passed here.\nBilling fields that are omitted in the Payment Element via the `fields` option required.\n","validation":"object"}]}]},{"name":"redirect","documentation":"By default, `stripe.confirmSetup` will always redirect to your `return_url` after a successful confirmation.\nIf you set `redirect: \"if_required\"`, then `stripe.confirmSetup` will only redirect if your user chooses a redirect-based payment method.\n\n**Note**: Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.\nWhen a non-redirect based payment method is successfully confirmed, `stripe.confirmSetup` will resolve with a `{setupIntent}` object.\n","validation":"'always' | 'if_required'"}]}]},"request":{"title":"Confirm a setup intent","snippets":{"js":"stripe.confirmSetup({\n elements,\n confirmParams: {\n // Return URL where the customer should be redirected after the SetupIntent is confirmed.\n return_url: 'https://example.com',\n },\n})\n.then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n});\n","es_next":"const {error} = await stripe.confirmSetup(\n {\n elements,\n confirmParams: {\n // Return URL where the customer should be redirected after the SetupIntent is confirmed.\n return_url: 'https://example.com',\n },\n }\n);\nif (error) {\n // Inform the customer that there was an error.\n}\n"}},"returns":"`stripe.confirmSetup` will return a `Promise`.\nUpon a successful authorization, your user will be redirected to the `return_url` you provide\nbefore the Promise ever resolves.\n\nIf the authorization fails, the `Promise` will resolve with an `{error}` object that describes the failure.\nWhen the [error type](/docs/api/errors#errors-type) is `card_error` or `validation_error`, you can display the error\nmessage in `error.message` directly to your user. An error type of `invalid_request_error` could be due to an invalid\nrequest or 3DS authentication failures.\n\nNote that for some payment methods such as iDEAL or Afterpay Clearpay, your user will first be redirected to an intermediate page to authorize the payment.\nIf they fail to authorize the payment, they will be redirected back to your `return_url` and the SetupIntent will have a `status` of `requires_payment_method`.\nIn this case you should attempt to recollect payment from the user.\n","callout":"Note that `stripe.confirmSetup` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","section_tag":"confirm_setup_intent"},"display_on_load":true},"confirm_setup_intent_payment_method":{"title":"Confirm a SetupIntent by payment method","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"confirm_setup_intent_payment_method","section_anchor":"confirm_setup_intent_payment_method","subsection_anchors":["stripe_confirm_card_setup","stripe_confirm_us_bank_account_setup","stripe_confirm_acss_debit_setup","stripe_confirm_au_becs_debit_setup","stripe_confirm_bacs_debit_setup","stripe_confirm_bancontact_setup","stripe_confirm_cashapp_setup","stripe_confirm_ideal_setup","stripe_confirm_paypal_setup","stripe_confirm_sepa_debit_setup","stripe_confirm_sofort_setup"],"path":"/setup_intents/payment_method","gate":false,"data":{"section_type":"generic","title":"Confirm a SetupIntent by payment method","description":"Below are a number of methods used to confirm a SetupIntent for a specific payment method type.\n","section_tag":"confirm_setup_intent_payment_method"},"display_on_load":true},"stripe_confirm_card_setup":{"title":"Confirm card setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_confirm_card_setup","section_anchor":"confirm_setup_intent_payment_method","subsection_anchors":null,"path":"/setup_intents/confirm_card_setup","gate":false,"data":{"section_type":"method","title":"Confirm card setup","description":"Use `stripe.confirmCardSetup` in the [Setup Intents API flow](/docs/payments/save-and-reuse) when the customer submits your payment form.\nWhen called, it will confirm the [SetupIntent](/docs/api/setup_intents) with `data` you provide and carry out 3DS or other next actions if they are required.\n\nWhen you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIt can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmCardSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"If you are [handling next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), pass in a `return_url`.\nIf the subsequent action is `redirect_to_url`, this URL will be used on the return path for the redirect.\n","validation":"string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [handle next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/stripe-js/elements/payment-request-button#complete-payment-intents)).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Either the `id` of an existing [PaymentMethod](/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.\nSee the use case sections below for details.\n","badge_text":"recommended","validation":"string | object"},{"name":"return_url","documentation":"If you are [handling next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), pass in a `return_url`.\nIf the subsequent action is `redirect_to_url`, this URL will be used on the return path for the redirect.\n","validation":"string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [handle next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/stripe-js/elements/payment-request-button#complete-payment-intents)).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm card setup","snippets":{"js":"stripe\n .confirmCardSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n card: cardElement,\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {setupIntent, error} = await stripe.confirmCardSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n card: cardElement,\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n },\n);\n"}},"callout":"Note that `stripe.confirmCardSetup` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n\nAdditionally, `stripe.confirmCardSetup` may trigger a [3D Secure](/docs/payments/3d-secure) authentication challenge.\nThis will be shown in a modal dialog and may be confusing for customers using assistive technologies like screen readers.\nYou should make your form accessible by ensuring that success or error messages are clearly read out after this method completes.\n","returns":"`stripe.confirmCardSetup` will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","use_cases":[{"name":"with_element","title":"with payment data from an Element","description":"Use `stripe.confirmCardSetup` with payment data from an [Element](/docs/js/element) by passing a `card` or `cardNumber` `Element` to `payment_method[card]`.\nThe new `PaymentMethod` will be created with data collected by the `Element` and will be used to confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected by a `card` or `cardNumber` [Element](/docs/js/element).\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"card","documentation":"Uses the provided `card` or `cardNumber` [Element](/docs/js/element) for confirmation.\n","validation":"Element","required":true},{"name":"billing_details","documentation":"The [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.\n","validation":"object","badge_text":"recommended"}]}]},"request":{"title":"Confirm with an Element","snippets":{"js":"stripe\n .confirmCardSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n card: cardElement,\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {setupIntent, error} = await stripe.confirmCardSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n card: cardElement,\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n },\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"Use `stripe.confirmCardSetup` with an existing `PaymentMethod` by passing its `id` to `payment_method`.\nThe `PaymentMethod` will be used to confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmCardSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {setupIntent, error} = await stripe.confirmCardSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n);\n"}}},{"name":"token","title":"with an existing token","description":"For backwards compatibility, you can convert an existing `Token` into a `PaymentMethod` with `stripe.confirmCardSetup` by passing the `Token` to `payment_method[card][token]`.\nThe newly created `PaymentMethod` will be used to confirm the `PaymentMethod`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using an existing token.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"card","documentation":"An object of card data.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"token","documentation":"Converts the provided token into a `PaymentMethod` to use for confirmation.\n","validation":"string","required":true}]},{"name":"billing_details","documentation":"The [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.\n","validation":"object","badge_text":"recommended"}]}]},"request":{"title":"Confirm with existing token","snippets":{"js":"stripe\n .confirmCardSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n card: {\n token: 'tok_visa',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {setupIntent, error} = await stripe.confirmCardSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n card: {\n token: 'tok_visa',\n },\n },\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `SetupIntent`, then you can confirm the `SetupIntent` using `stripe.confirmCardSetup` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmCardSetup('{SETUP_INTENT_CLIENT_SECRET}')\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {setupIntent, error} = await stripe.confirmCardSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n);\n"}}}],"section_tag":"stripe_confirm_card_setup"},"display_on_load":true},"stripe_confirm_us_bank_account_setup":{"title":"Confirm an ACH Direct Debit setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_confirm_us_bank_account_setup","section_anchor":"confirm_setup_intent_payment_method","subsection_anchors":null,"path":"/setup_intents/confirm_us_bank_account_setup","gate":false,"data":{"section_type":"method","title":"Confirm an ACH Direct Debit setup","description":"\nUse `stripe.confirmUsBankAccountSetup` in the [Save bank details](/docs/payments/ach-debit/set-up-payment) flow for the [ACH Direct Debit](/docs/payments/ach-debit) payment method to record the customer’s authorization for future payments.\n\nWhen you confirm a [SetupIntent](/docs/api/setup_intents), it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nWe suggest using `stripe.collectBankAccountForSetup`, which automatically collects bank account details and attaches a [PaymentMethod](/docs/api/payment_methods). You may also choose to reuse an existing `PaymentMethod` or manually collect bank account details using the `data` parameter. These use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmUsBankAccountSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"}]}]},"request":{"title":"Confirm an ACH Direct Debit setup","snippets":{"js":"stripe.confirmUsBankAccountSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n us_bank_account: {\n routing_number: '110000000',\n account_number: '000123456789',\n account_holder_type: 'individual',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + result.setupIntent.id);\n console.log(\"SetupIntent status: \" + result.setupIntent.status);\n }\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmUsBankAccountSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n us_bank_account: {\n routing_number: '110000000',\n account_number: '000123456789',\n account_holder_type: 'individual',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + setupIntent.id);\n console.log(\"SetupIntent status: \" + setupIntent.status);\n}\n"}},"returns":"`stripe.confirmUsBankAccountSetup` will return a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) and our [integration guide](/docs/payments/ach-debit/set-up-payment) for all possible errors.\n","use_cases":[{"name":"existing_payment_method","title":"with an existing PaymentMethod","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmUsBankAccountSetup`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},"request":{"title":"Confirm with an existing PaymentMethod","snippets":{"js":"stripe.confirmUsBankAccountSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + result.setupIntent.id);\n console.log(\"SetupIntent status: \" + result.setupIntent.status);\n }\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmUsBankAccountSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + setupIntent.id);\n console.log(\"SetupIntent status: \" + setupIntent.status);\n}\n"}}},{"name":"attached_payment_method","title":"with an attached PaymentMethod","description":"If you have successfully called `stripe.collectBankAccountForSetup` or attached a `PaymentMethod` to this `SetupIntent` already, then you can confirm the `SetupIntent` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmUsBankAccountSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {}\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + result.setupIntent.id);\n console.log(\"SetupIntent status: \" + result.setupIntent.status);\n }\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmUsBankAccountSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {}\n);\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + setupIntent.id);\n console.log(\"SetupIntent status: \" + setupIntent.status);\n}\n"}}},{"name":"self_collected_bank_account","title":"with self collected bank account information","description":"If you already know the customer’s bank account information, or want to collect it yourself, you can pass them in directly to create a new `PaymentMethod` and confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` is required. Providing `email` allows your customer to receive [ACH Direct Debit mandate and microdeposit emails](/docs/payments/ach-debit#mandate-and-microdeposit-emails).\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name. The first and last name must be at minimum 2 characters each.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":false}]},{"name":"us_bank_account","documentation":"The customer's [bank account information](/docs/api/payment_methods/create#create_payment_method-us_bank_account).\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"account_number","documentation":"The customer’s bank account number.\n","validation":"string","required":true},{"name":"routing_number","documentation":"The routing number of the customer’s bank.\n","validation":"string","required":true},{"name":"account_holder_type","documentation":"Account holder type: individual or company.\n","validation":"string","required":true},{"name":"account_type","documentation":"Account type: checkings or savings. Defaults to checking if omitted.\n","validation":"string","required":false}]}]}]},"request":{"title":"Confirm with bank account information","snippets":{"js":"stripe.confirmUsBankAccountSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n us_bank_account: {\n routing_number: '110000000',\n account_number: '000123456789',\n account_holder_type: 'individual',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + result.setupIntent.id);\n console.log(\"SetupIntent status: \" + result.setupIntent.status);\n }\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmUsBankAccountSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n us_bank_account: {\n routing_number: '110000000',\n account_number: '000123456789',\n account_holder_type: 'individual',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + setupIntent.id);\n console.log(\"SetupIntent status: \" + setupIntent.status);\n}\n"}}}],"section_tag":"stripe_confirm_us_bank_account_setup"},"display_on_load":true},"stripe_confirm_acss_debit_setup":{"title":"Confirm an ACSS Debit setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_confirm_acss_debit_setup","section_anchor":"confirm_setup_intent_payment_method","subsection_anchors":null,"path":"/setup_intents/confirm_acss_debit_setup","gate":false,"data":{"section_type":"method","title":"Confirm a Canadian pre-authorized debit setup","description":"Use `stripe.confirmAcssDebitSetup` in the [Save bank details](/docs/payments/acss-debit/set-up-payment) flow to set up a [Canadian pre-authorized debit](/docs/payments/acss-debit) payment method for future payments.\nWhen called, it will automatically pop up a modal to collect bank account details and verification, accept the mandate, and confirm the [SetupIntent](/docs/api/setup_intents) when the user submits the form.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/acss-debit/set-up-payment) for more details.\n\nWhen you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\n`stripe.confirmAcssDebitSetup` automatically creates a new `PaymentMethod` for you when your customer completes the modal UI.\nIt can also be called with an existing `PaymentMethod`, which will load the modal UI to collect a new mandate agreement.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmAcssDebitSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"skipMandate","documentation":"Set this to `true` if you want to skip displaying the mandate confirmation.\n","validation":"boolean","required":false}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"skipMandate","documentation":"Set this to `true` if you want to skip displaying the mandate confirmation.\n","validation":"boolean","required":false}]}]},"request":{"title":"Confirm Canadian pre-authorized debit setup","snippets":{"js":"stripe.confirmAcssDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + result.setupIntent.id);\n console.log(\"SetupIntent status: \" + result.setupIntent.status);\n }\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmAcssDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + setupIntent.id);\n console.log(\"SetupIntent status: \" + setupIntent.status);\n}\n"}},"returns":"`stripe.confirmAcssDebitSetup` will return a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) and our [integration guide](/docs/payments/acss-debit/set-up-payment) for all possible errors.\n","callout":"Note that `stripe.confirmAcssDebitSetup` may take several seconds to complete.\nDuring that time, disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf you receive an error result, show it to the customer, re-enable the form, and hide the waiting indicator.\n","use_cases":[{"name":"new_payment_method","title":"with a new PaymentMethod","description":"You can pass in the customer’s billing details to create a new `PaymentMethod` and confirm the `SetupIntent`.\nYou are required to collect and include the customer’s name and email address. This method loads an on-page modal UI\nthat handles bank account details collection and verification, presents a hosted mandate agreement and collects authorization for you.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name. The first and last name must be at minimum 2 characters each.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with a new PaymentMethod","snippets":{"js":"stripe.confirmAcssDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + result.setupIntent.id);\n console.log(\"SetupIntent status: \" + result.setupIntent.status);\n }\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmAcssDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + setupIntent.id);\n console.log(\"SetupIntent status: \" + setupIntent.status);\n}\n"}}},{"name":"existing_payment_method","title":"with an existing PaymentMethod","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmAcssDebitSetup`.\nThis method loads an on-page modal UI that only presents a hosted mandate agreement and collects authorization for you.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},"request":{"title":"Confirm with an existing PaymentMethod","snippets":{"js":"stripe.confirmAcssDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + result.setupIntent.id);\n console.log(\"SetupIntent status: \" + result.setupIntent.status);\n }\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmAcssDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + setupIntent.id);\n console.log(\"SetupIntent status: \" + setupIntent.status);\n}\n"}}},{"name":"attached_payment_method","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `SetupIntent`, then you can confirm the `SetupIntent` without passing in any additional data.\nThis method loads an on-page modal UI that only presents a hosted mandate agreement and collects authorization for you.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmAcssDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {}\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + result.setupIntent.id);\n console.log(\"SetupIntent status: \" + result.setupIntent.status);\n }\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmAcssDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {}\n);\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + setupIntent.id);\n console.log(\"SetupIntent status: \" + setupIntent.status);\n}\n"}}},{"name":"self_collected_bank_account","title":"with self collected bank account information","description":"If you already know the customer’s bank account information, or want to collect it yourself, you can pass them in directly to create a new `PaymentMethod` and confirm the `SetupIntent`.\nIn this case, this method does not load the on-page modal UI, so you will need to [build your own mandate agreement page](/docs/payments/acss-debit/custom-pad-agreement).\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name. The first and last name must be at minimum 2 characters each.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]},{"name":"acss_debit","documentation":"The customer's [bank account information](/docs/api/payment_methods/create#create_payment_method-acss_debit).\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"account_number","documentation":"The customer’s bank account number.\n","validation":"string","required":true},{"name":"institution_number","documentation":"The institution number of the customer’s bank.\n","validation":"string","required":true},{"name":"transit_number","documentation":"The transit number of the customer’s bank.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with bank account information","snippets":{"js":"stripe.confirmAcssDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n acss_debit: {\n institution_number: '000',\n transit_number: '11000',\n account_number: '000123456789',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + result.setupIntent.id);\n console.log(\"SetupIntent status: \" + result.setupIntent.status);\n }\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmAcssDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n acss_debit: {\n institution_number: '000',\n transit_number: '11000',\n account_number: '000123456789',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + setupIntent.id);\n console.log(\"SetupIntent status: \" + setupIntent.status);\n}\n"}}},{"name":"existing_payment_method_skip_mandate","title":"with an existing PaymentMethod but skip mandate display","description":"If you have already created a `PaymentMethod` and built your own mandate agreement page,\nyou can reuse it by passing its `id` to `payment_method` when calling `stripe.confirmAcssDebitSetup` and skip the on-page modal UI at the same time.\n","table_content":{"title":"Data and options argument paramters","items":[{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"skipMandate","documentation":"Set to `true` to skip the on-page modal UI.\n","validation":"boolean","required":true}]}]},"request":{"title":"Confirm with an existing PaymentMethod but skip mandate display","snippets":{"js":"stripe.confirmAcssDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n {\n skipMandate: true,\n }\n).then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + result.setupIntent.id);\n console.log(\"SetupIntent status: \" + result.setupIntent.status);\n }\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmAcssDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n {\n skipMandate: true,\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(error.message);\n} else {\n // Handle next step based on SetupIntent's status.\n console.log(\"SetupIntent ID: \" + setupIntent.id);\n console.log(\"SetupIntent status: \" + setupIntent.status);\n}\n"}}}],"section_tag":"stripe_confirm_acss_debit_setup"},"display_on_load":true},"stripe_confirm_au_becs_debit_setup":{"title":"Confirm BECS Debit setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_confirm_au_becs_debit_setup","section_anchor":"confirm_setup_intent_payment_method","subsection_anchors":null,"path":"/setup_intents/confirm_au_becs_debit_setup","gate":false,"data":{"section_type":"method","title":"Confirm BECS Debit setup","description":"Use `stripe.confirmAuBecsDebitSetup` in the [BECS Direct Debit Payments](/docs/payments/au-becs-debit) flow when the customer submits your payment form.\nWhen called, it will confirm the [SetupIntent](/docs/api/setup_intents) with `data` you provide.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/au-becs-debit) for more details.\n\nWhen you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIt can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmAuBecsDebitSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"}]}]},"request":{"title":"Confirm BECS Debit setup","snippets":{"js":"stripe\n .confirmAuBecsDebitSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n au_becs_debit: auBankAccountElement,\n billing_details: {\n name: 'John Smith',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {error, setupIntent} = await stripe.confirmAuBecsDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n au_becs_debit: auBankAccountElement,\n billing_details: {\n name: 'John Smith',\n email: '[email protected]',\n },\n },\n },\n);\n"}},"callout":"Note that `stripe.confirmAuBecsDebitSetup` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","returns":"`stripe.confirmAuBecsDebitSetup` will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","use_cases":[{"name":"with_element","title":"with payment data from an Element","description":"Create and attach a new `PaymentMethod` with `stripe.confirmAuBecsDebitSetup` by passing an `auBankAccount` [Element](/docs/js/element) to `payment_method[au_becs_debit]`.\nThe new `PaymentMethod` will be created with the data collected by the `Element` and will be used to confirm the `SetupIntent`.\nAdditionally, to create a BECS Direct Debit `PaymentMethod`, you are required to collect and include the account holder's name and the customer’s email address.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an `object` to confirm using data collected by an `auBankAccount`\nElement.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"au_becs_debit","documentation":"An `auBankAccount` [Element](/docs/js/element).\n","validation":"Element","required":true},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with an Element","snippets":{"js":"stripe\n .confirmAuBecsDebitSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n au_becs_debit: auBankAccountElement,\n billing_details: {\n name: 'John Smith',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {error, setupIntent} = await stripe.confirmAuBecsDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n au_becs_debit: auBankAccountElement,\n billing_details: {\n name: 'John Smith',\n email: '[email protected]',\n },\n },\n },\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmAuBecsDebitSetup` and it will be used to confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmAuBecsDebitSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {error, setupIntent} = await stripe.confirmAuBecsDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n);\n"}}},{"name":"self_collected","title":"with self collected data","description":"If you already know the customer’s BSB number and bank account number or want to collect it yourself, then you do not need to use the `auBankAccount` [Element](/docs/js/element).\nYou can pass in the customer’s bank account information directly to create a new `PaymentMethod` and confirm the `SetupIntent`.\nAdditionally, to create a BECS Direct Debit `PaymentMethod`, you are required to collect and include the account holder's name and the customer's email address.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected without an `Element`.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"au_becs_debit","documentation":"An object of self-collected bank account data.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"bsb_number","documentation":"A Bank State Branch (BSB) number.\n","validation":"string","required":true},{"name":"account_number","documentation":"A bank account number.\n","validation":"string","required":true}]},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The account holder's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmAuBecsDebitSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n au_becs_debit: {\n bsb_number: '000000',\n account_number: '000123456'\n },\n billing_details: {\n name: 'John Smith',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {setupIntent, error} = await stripe.confirmAuBecsDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n au_becs_debit: {\n bsb_number: '000000',\n account_number: '000123456'\n },\n billing_details: {\n name: 'John Smith',\n email: '[email protected]',\n },\n },\n },\n);\n"}}}],"section_tag":"stripe_confirm_au_becs_debit_setup"},"display_on_load":true},"stripe_confirm_bacs_debit_setup":{"title":"Confirm Bacs Debit setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_confirm_bacs_debit_setup","section_anchor":"confirm_setup_intent_payment_method","subsection_anchors":null,"path":"/setup_intents/confirm_bacs_debit_setup","gate":false,"data":{"section_type":"method","title":"Confirm Bacs Debit setup","description":"Use `stripe.confirmBacsDebitSetup` in the [Bacs Direct Debit Payments](/docs/payments/payment-methods/bacs-debit) flow when the customer submits your payment form.\nWhen called, it will confirm the [SetupIntent](/docs/api/setup_intents) with `data` you provide.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/payment-methods/bacs-debit) for more details.\n\nWhen you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIt can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmBacsDebitSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"}]}]},"request":{"title":"Confirm Bacs Debit setup","snippets":{"js":"stripe\n .confirmBacsDebitSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n bacs_debit: {\n sort_code: '108800',\n account_number: '000123456'\n },\n billing_details: {\n address: {\n line1: addressLine1,\n city: addressCity,\n country: addressCountry,\n postal_code: addressPostalCode,\n },\n email: customerEmail,\n name: customerName,\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {setupIntent, error} = await stripe.confirmBacsDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n bacs_debit: {\n sort_code: '108800',\n account_number: '000123456'\n },\n billing_details: {\n address: {\n line1: addressLine1,\n city: addressCity,\n country: addressCountry,\n postal_code: addressPostalCode,\n },\n email: customerEmail,\n name: customerName,\n },\n },\n },\n);\n"}},"callout":"Note that `stripe.confirmBacsDebitSetup` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","returns":"`stripe.confirmBacsDebitSetup` will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","use_cases":[{"name":"self_collected","title":"with self collected data","description":"You can also pass in the customer’s bank account information directly to create a new `PaymentMethod` and confirm the `SetupIntent`.\nAdditionally, to create a Bacs Direct Debit `PaymentMethod`, you are required to collect and include the account holder's name and the customer's email address.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using payment method data.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"bacs_debit","documentation":"An object of self-collected bank account data.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"account_number","documentation":"A bank account number.\n","validation":"string","required":true},{"name":"sort_code","documentation":"A sort code.\n","validation":"string","required":true}]},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"address","documentation":"The account holder's address.\n","validation":"string","required":true,"subspec":[{"name":"line1","documentation":"Line 1 of the account holder's address.\n","validation":"string","required":true},{"name":"city","documentation":"The account holder's city.\n","validation":"string","required":true},{"name":"country","documentation":"The account holder's country.\n","validation":"string","required":true},{"name":"postal_code","documentation":"The account holder's postal code.\n","validation":"string","required":true}]},{"name":"name","documentation":"The account holder's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmBacsDebitSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n bacs_debit: {\n sort_code: '108800',\n account_number: '000123456'\n },\n billing_details: {\n address: {\n line1: addressLine1,\n city: addressCity,\n country: addressCountry,\n postal_code: addressPostalCode,\n },\n email: customerEmail,\n name: customerName,\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {setupIntent, error} = await stripe.confirmBacsDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n bacs_debit: {\n sort_code: '108800',\n account_number: '000123456'\n },\n billing_details: {\n address: {\n line1: addressLine1,\n city: addressCity,\n country: addressCountry,\n postal_code: addressPostalCode,\n },\n email: customerEmail,\n name: customerName,\n },\n },\n },\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmBacsDebitSetup` and it will be used to confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmBacsDebitSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {error, setupIntent} = await stripe.confirmBacsDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n);\n"}}}],"section_tag":"stripe_confirm_bacs_debit_setup"},"display_on_load":true},"stripe_confirm_bancontact_setup":{"title":"Confirm Bancontact setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_confirm_bancontact_setup","section_anchor":"confirm_setup_intent_payment_method","subsection_anchors":null,"path":"/setup_intents/confirm_bancontact_setup","gate":false,"data":{"section_type":"method","title":"Confirm Bancontact setup","description":"Use `stripe.confirmBancontactSetup` in the [Set up future payments](/docs/payments/bancontact/set-up-payment) flow to use Bancontact bank details to set up a\nSEPA Direct Debit payment method for future payments. When called, it will confirm a `SetupIntent` with `data` you provide, and it will\nautomatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified `return_url`.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/bancontact/set-up-payment) for more details.\n\nWhen you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIt can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmBancontactSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/bancontact/accept-a-payment?platform=web#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/bancontact/accept-a-payment?platform=web#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm Bancontact setup","snippets":{"js":"stripe\n .confirmBancontactSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmBancontactSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}},"callout":"Note that `stripe.confirmBancontactSetup` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","returns":"`stripe.confirmBancontactSetup` will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","use_cases":[{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmBancontactSetup` and it will be used to confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmBancontactSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {error, setupIntent} = await stripe.confirmBancontactSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n);\n"}}},{"name":"self_collected","title":"with self collected data","description":"Your customer's name and email are required for the Bancontact authorization to succeed.\nYou can pass in these properties directly to create a new `PaymentMethod` and confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm with the customer's name and email.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmBancontactSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmBancontactSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}}],"section_tag":"stripe_confirm_bancontact_setup"},"display_on_load":true},"stripe_confirm_cashapp_setup":{"title":"Confirm Cash App Pay setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_confirm_cashapp_setup","section_anchor":"confirm_setup_intent_payment_method","subsection_anchors":null,"path":"/setup_intents/confirm_cashapp_setup","gate":false,"data":{"section_type":"method","title":"Confirm an Cash App Pay setup","description":"\nUse `stripe.confirmCashappSetup` in the [Save payment details](/docs/payments/cash-app-pay/set-up-payment) flow for the [Cash App Pay](/docs/payments/cash-app-pay) payment method to record the customer’s authorization for future payments.\n\nWhen you confirm a [SetupIntent](/docs/api/setup_intents), it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\n\nIn addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIf you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmCashappSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you would like to [handle displaying the Cash App Pay QR code or handle the authorization redirect](docs/payments/cash-app-pay/set-up-payment?platform=web\u0026ui=API#web-create-setup-intent) yourself.\n","validation":"boolean","required":false}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you would like to [handle displaying the Cash App Pay QR code or handle the authorization redirect](docs/payments/cash-app-pay/set-up-payment?platform=web\u0026ui=API#web-create-setup-intent) yourself.\n","validation":"boolean","required":false}]}]},"request":{"title":"Confirm a Cash App Pay setup","snippets":{"js":"stripe.confirmCashappSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n type: 'cashapp',\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(error, setupIntent) {\n if (error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else if (setupIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (setupIntent.status === 'requires_action'){\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error, setupIntent} = await stripe.confirmCashappSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n type: 'cashapp',\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (setupIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (setupIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}},"returns":"By default, `stripe.confirmCashappSetup` will display Cash App Pay QR code in desktop web app, or trigger a redirect in mobile web app. If\nthere is an error, or when handling next actions manually by using the\n`handleActions: false` option, it will return a `Promise` which resolves with a `result`\nThis object has either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) and our [integration guide](/docs/payments/cash-app-pay/set-up-payment) for all possible errors.\n","callout":"Note that `stripe.confirmCashappSetup` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"new","title":"Without an existing payment method","description":"If you have not already created a `PaymentMethod`, you can pass payment method parameters, and the newly created `PaymentMethod` will be used to confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm with bank account information","snippets":{"js":"stripe.confirmCashappSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n type: 'cashapp',\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function(error, setupIntent) {\n if (error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else if (setupIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (setupIntent.status === 'requires_action'){\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {error, setupIntent} = await stripe.confirmCashappSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n type: 'cashapp',\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n} else if (setupIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (setupIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}},{"name":"existing","title":"with an existing PaymentMethod","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmCashappSetup`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm with an existing PaymentMethod","snippets":{"js":"stripe.confirmCashappSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n).then(function({error, setupIntent}) {\n if (error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else if (setupIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (setupIntent.status === 'requires_action'){\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmCashappSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href\n }\n);\n\nif (error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n} else if (setupIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (setupIntent.status === 'requires_action'){\n // Inform the customer that the payment did not go through\n}\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `return_url` and a `PaymentMethod` to this `SetupIntent`, then you can confirm without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe.confirmCashappSetup(\n '{SETUP_INTENT_CLIENT_SECRET}'\n).then(function({setupIntent, error}) {\n if (error) {\n // Inform the customer that there was an error.\n } else if (setupIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n } else if (setupIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n }\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmCashappSetup(\n '{SETUP_INTENT_CLIENT_SECRET}'\n);\nif (error) {\n // Inform the customer that there was an error.\n} else if (setupIntent.status === 'succeeded') {\n // Inform the customer that the payment was successful\n} else if (setupIntent.status === 'requires_action') {\n // Inform the customer that the payment did not go through\n}\n"}}}],"section_tag":"stripe_confirm_cashapp_setup"},"display_on_load":true},"stripe_confirm_ideal_setup":{"title":"Confirm iDEAL setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_confirm_ideal_setup","section_anchor":"confirm_setup_intent_payment_method","subsection_anchors":null,"path":"/setup_intents/confirm_ideal_setup","gate":false,"data":{"section_type":"method","title":"Confirm iDEAL setup","description":"Use `stripe.confirmIdealSetup` in the [Set up future payments](/docs/payments/ideal/set-up-payment) flow to use iDEAL bank details to set up a\nSEPA Direct Debit payment method for future payments. When called, it will confirm a `SetupIntent` with `data` you provide, and it will\nautomatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified `return_url`.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/ideal/set-up-payment) for more details.\n\nWhen you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIt can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmIdealSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/ideal/accept-a-payment?platform=web#web-handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/ideal/accept-a-payment?platform=web#web-handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm iDEAL setup","snippets":{"js":"stripe\n .confirmIdealSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n ideal: idealBankElement,\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {error, setupIntent} = await stripe.confirmIdealSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n ideal: idealBankElement,\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n },\n);\n"}},"callout":"Note that `stripe.confirmIdealSetup` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","returns":"`stripe.confirmIdealSetup` will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","use_cases":[{"name":"with_element","title":"with payment data from an Element","description":"Create and attach a new SEPA Direct Debit `PaymentMethod` with `stripe.confirmIdealSetup` by passing an `idealBank` [Element](/docs/js/element) to `payment_method[ideal]`.\nThe new `PaymentMethod` will be created with the data collected by the `Element` and will be used to confirm the `SetupIntent`.\nAdditionally, to create a SEPA Direct Debit `PaymentMethod`, you are required to collect and include the customer’s name and email address.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected by an `idealBank`\nElement.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"ideal","documentation":"An `idealBank` [Element](/docs/js/element).\n","validation":"Element","required":true},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with an Element","snippets":{"js":"stripe\n .confirmIdealSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n ideal: idealBankElement,\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {error, setupIntent} = await stripe.confirmIdealSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n ideal: idealBankElement,\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n },\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmIdealSetup` and it will be used to confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmIdealSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {error, setupIntent} = await stripe.confirmIdealSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n);\n"}}},{"name":"self_collected","title":"with self collected data","description":"If you already know the customer’s bank or want to collect it yourself, then you do not need to use the `idealBank` [Element](/docs/js/element).\nYou can pass in the customer’s [bank code](/docs/payments/ideal/accept-a-payment?platform=web\u0026ui=element#bank-reference) directly to create a new `PaymentMethod` and confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm using data collected by an `idealBank`\nElement.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"ideal","documentation":"An object detailing the customer's iDEAL bank.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"bank","documentation":"The customer's [bank](/docs/payments/ideal/accept-a-payment?platform=web\u0026ui=element#bank-reference).\n","validation":"string","required":true}]},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmIdealSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n ideal: {\n bank: 'abn_amro',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmIdealSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n ideal: {\n bank: 'abn_amro',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}}],"section_tag":"stripe_confirm_ideal_setup"},"display_on_load":true},"stripe_confirm_paypal_setup":{"title":"Confirm PayPal setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_confirm_paypal_setup","section_anchor":"confirm_setup_intent_payment_method","subsection_anchors":null,"path":"/setup_intents/confirm_paypal_setup","gate":false,"data":{"section_type":"method","title":"Confirm a PayPal setup","description":"Use `stripe.confirmPayPalSetup` in the [PayPal Payments with Setup Intents](/docs/payments/paypal/set-up-payment) flow when the customer submits your setup form.\nWhen called, it will confirm the `SetupIntent`, and it will automatically redirect the customer to authorize the setup.\nOnce authorization is complete, the customer will be redirected back to your specified `return_url`.\n","signature":{"object_name":"stripe","method_name":"confirmPayPalSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\nSee the use case sections below for details.\n","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing [PaymentMethod](/docs/api/payment_methods).\nSee the use case sections below for details.\n","validation":"string | object"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]}]},"request":{"title":"Confirm a PayPal setup","snippets":{"js":"stripe\n .confirmPayPalSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/setup/complete\",\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmPayPalSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/setup/complete\",\n },\n);\n"}},"returns":"`stripe.confirmPayPalSetup` will trigger a redirect when successful.\nIf there is an error, it will return a `Promise` which resolves with a `result` object.\nThis object has either:\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","callout":"Note that `stripe.confirmPayPalSetup` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","use_cases":[{"name":"new","title":"with a new PaymentMethod","description":"You can confirm the `SetupIntent` using `stripe.confirmPayPalSetup` without\npassing in any additional data. This will automatically create and attach a new\n`PaymentMethod`.\n","table_content":{"title":"Data argument properties","items":[{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm with a new PaymentMethod","snippets":{"js":"stripe\n .confirmPayPalSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/setup/complete\",\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmPayPalSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/setup/complete\",\n },\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"Use `stripe.confirmPayPalSetup` with an existing `PaymentMethod` by passing its `id` to `payment_method`.\nThe `PaymentMethod` will be used to confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmPayPalPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: \"https://example.com/setup/complete\",\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmPayPalPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n // Return URL where the customer should be redirected after the authorization.\n return_url: \"https://example.com/setup/complete\",\n },\n);\n"}}},{"name":"attached","title":"with an attached PaymentMethod","description":"If you have already attached a `PaymentMethod` to this `SetupIntent`, then you can confirm the `SetupIntent` using `stripe.confirmPayPalSetup` without passing in any additional data.\n","request":{"title":"Confirm with an attached PaymentMethod","snippets":{"js":"stripe\n .confirmPayPalSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/setup/complete\",\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {setupIntent, error} = await stripe.confirmPayPalSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n // Return URL where the customer should be redirected after\n // the authorization.\n return_url: \"https://example.com/setup/complete\",\n },\n);\n"}}}],"section_tag":"stripe_confirm_paypal_setup"},"display_on_load":true},"stripe_confirm_sepa_debit_setup":{"title":"Confirm SEPA Debit setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_confirm_sepa_debit_setup","section_anchor":"confirm_setup_intent_payment_method","subsection_anchors":null,"path":"/setup_intents/confirm_sepa_debit_setup","gate":false,"data":{"section_type":"method","title":"Confirm SEPA Debit setup","description":"Use `stripe.confirmSepaDebitSetup` in the [SEPA Direct Debit with Setup Intents](/docs/payments/sepa-debit-setup-intents) flow when the customer submits your payment form.\nWhen called, it will confirm the `SetupIntent` with `data` you provide.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/sepa-debit-setup-intents) for more details.\n\nWhen you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIt can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmSepaDebitSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"}]}]},"request":{"title":"Confirm SEPA Debit setup","snippets":{"js":"stripe\n .confirmSepaDebitSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n sepa_debit: ibanElement,\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {error, setupIntent} = await stripe.confirmSepaDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n sepa_debit: ibanElement,\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n },\n);\n"}},"callout":"Note that `stripe.confirmSepaDebitSetup` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","returns":"`stripe.confirmSepaDebitSetup` will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","use_cases":[{"name":"with_element","title":"with payment data from an Element","description":"Create and attach a new `PaymentMethod` with `stripe.confirmSepaDebitSetup` by passing an `iban` [Element](/docs/js/element) to `payment_method[sepa_debit]`.\nThe new `PaymentMethod` will be created with the data collected by the `Element` and will be used to confirm the `SetupIntent`.\nAdditionally, to create a SEPA Direct Debit `PaymentMethod`, you are required to collect and include the customer’s name and email address.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an `object` to confirm using data collected by an `iban`\nElement.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"sepa_debit","documentation":"An `iban` [Element](/docs/js/element).\n","validation":"Element","required":true},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with an Element","snippets":{"js":"stripe\n .confirmSepaDebitSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n sepa_debit: ibanElement,\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {error, setupIntent} = await stripe.confirmSepaDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n sepa_debit: ibanElement,\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n },\n);\n"}}},{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmSepaDebitSetup` and it will be used to confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmSepaDebitSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {error, setupIntent} = await stripe.confirmSepaDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n);\n"}}},{"name":"self_collected","title":"with self collected data","description":"If you already know the customer’s IBAN account number or want to collect it yourself, then you do not need to use the `iban` [Element](/docs/js/element).\nYou can pass in the customer’s account number directly to create a new `PaymentMethod` and confirm the `SetupIntent`.\nAdditionally, to create a SEPA Direct Debit `PaymentMethod`, you are required to collect and include the customer’s name and email address.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an `object` to confirm using data collected by an `iban`\nElement.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"sepa_debit","documentation":"An object of self-collected IBAN data.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"iban","documentation":"An IBAN account number.\n","validation":"string","required":true}]},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmSepaDebitSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n sepa_debit: {\n iban: 'DE89370400440532013000',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {setupIntent, error} = await stripe.confirmSepaDebitSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n sepa_debit: {\n iban: 'DE89370400440532013000',\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n },\n);\n"}}}],"section_tag":"stripe_confirm_sepa_debit_setup"},"display_on_load":true},"stripe_confirm_sofort_setup":{"title":"Confirm Sofort setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_confirm_sofort_setup","section_anchor":"confirm_setup_intent_payment_method","subsection_anchors":null,"path":"/setup_intents/confirm_sofort_setup","gate":false,"data":{"section_type":"method","title":"Confirm Sofort setup","description":"Use `stripe.confirmSofortSetup` in the [Set up future payments](/docs/payments/sofort/set-up-payment) flow to use SOFORT bank details to set up a\nSEPA Direct Debit payment method for future payments. When called, it will confirm a `SetupIntent` with `data` you provide, and it will\nautomatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified `return_url`.\nNote that there are some additional requirements to this flow that are not covered in this reference.\nRefer to our [integration guide](/docs/payments/sofort/set-up-payment) for more details.\n\nWhen you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](/docs/api/payment_methods).\nIn addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.\nIt can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.\nThese use cases are detailed in the sections that follow.\n","signature":{"object_name":"stripe","method_name":"confirmSofortSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\nRefer to the [Setup Intents API](/docs/api/setup_intents/confirm) for a full list of parameters.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"The `id` of an existing PaymentMethod or an object of collected data.\nSee use cases below for details.\n","validation":"object | string","badge_text":"recommended"},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},{"name":"options","documentation":"An options object to control the behavior of this method.\n","validation":"object","expanded":true,"subspec":[{"name":"handleActions","documentation":"Set this to `false` if you want to [manually handle the authorization redirect](/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect).\nDefault is `true`.\n","validation":"boolean"}]}]},"request":{"title":"Confirm SOFORT setup","snippets":{"js":"stripe\n .confirmSofortSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n sofort: {\n country: 'DE'\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmSofortSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n sofort: {\n country: 'DE'\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}},"callout":"Note that `stripe.confirmSofortSetup` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","returns":"`stripe.confirmSofortSetup` will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","use_cases":[{"name":"existing","title":"with an existing payment method","description":"If you have already created a `PaymentMethod`, you can pass its `id` to `payment_method` when calling `stripe.confirmSofortSetup` and it will be used to confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"The `id` of an existing `PaymentMethod`.\n","validation":"string","required":true},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with existing payment method","snippets":{"js":"stripe\n .confirmSofortSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {error, setupIntent} = await stripe.confirmSofortSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n);\n"}}},{"name":"self_collected","title":"with self collected data","description":"Your customer's name, email and the country of their bank are required for the SOFORT authorization to succeed.\nYou can pass in these properties directly to create a new `PaymentMethod` and confirm the `SetupIntent`.\n","table_content":{"title":"Data argument properties","items":[{"name":"payment_method","documentation":"Pass an object to confirm with the customer's name and email.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"country","documentation":"The country code where customer's bank is located.\n","validation":"string","required":true},{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` and `email` are required.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":true}]}]},{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication.\n","validation":"string","badge_text":"recommended"}]},"request":{"title":"Confirm with self collected data","snippets":{"js":"stripe\n .confirmSofortSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: {\n sofort: {\n country: 'DE'\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n })\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n }\n });\n","es_next":"const {error} = await stripe.confirmSofortSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: {\n sofort: {\n country: 'DE'\n },\n billing_details: {\n name: 'Jenny Rosen',\n email: '[email protected]',\n },\n },\n // Return URL where the customer should be redirected after the authorization.\n return_url: window.location.href,\n },\n);\n"}}}],"section_tag":"stripe_confirm_sofort_setup"},"display_on_load":true},"stripe_retrieve_setup_intent":{"title":"Retrieve a SetupIntent","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_retrieve_setup_intent","section_anchor":"stripe_retrieve_setup_intent","subsection_anchors":null,"path":"/setup_intents/retrieve_setup_intent","gate":false,"data":{"section_type":"method","title":"Retrieve a SetupIntent","description":"Retrieve a [SetupIntent](/docs/api/setup_intents) using its client secret.\n","signature":{"object_name":"stripe","method_name":"retrieveSetupIntent","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent` to retrieve.\n","validation":"string","required":true}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent` to retrieve.\n","validation":"string","required":true}]},"request":{"title":"Retrieve a SetupIntent","snippets":{"js":"stripe\n .retrieveSetupIntent(\n '{SETUP_INTENT_CLIENT_SECRET}',\n )\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.retrieveSetupIntent(\n '{SETUP_INTENT_CLIENT_SECRET}',\n);\n\n// Handle result.error or result.paymentIntent\n"}},"returns":"This method returns a `Promise` which resolves with a `result` object.\nThis object has either:\n* `result.setupIntent`: a [SetupIntent](/docs/api/setup_intents) was retrieved successfully.\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_retrieve_setup_intent"},"display_on_load":true},"stripe_verify_microdeposits_for_setup":{"title":"Verify with micro-deposits for setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_verify_microdeposits_for_setup","section_anchor":"stripe_verify_microdeposits_for_setup","subsection_anchors":null,"path":"/setup_intents/verify_microdeposits_for_setup","gate":false,"data":{"section_type":"method","title":"Verify with micro-deposits for setup","description":"Use `stripe.verifyMicrodepositsForSetup` in the [Save details for future payments with pre-authorized debit in Canada](/docs/payments/acss-debit/set-up-payment) or [Save details for future payments with ACH Direct Debit](/docs/payments/ach-debit/set-up-payment) flow to verify a customer's bank account with micro-deposits.\n\nIt should be only called when [SetupIntent](/docs/api/setup_intents) is in the `requires_action` state, and contains a `next_action` field that has a `type` equal to `verify_with_microdeposits`.\nRefer to our [integration guide](/docs/payments/acss-debit/set-up-payment) for more details.\n","signature":{"object_name":"stripe","method_name":"verifyMicrodepositsForSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"amounts","documentation":"An array of two positive integers, in *cents*, equal to the values of the micro-deposits sent to the bank account.\n","validation":"array"},{"name":"descriptor_code","documentation":"A six-character code starting with SM present in the microdeposit sent to the bank account.\n","validation":"string"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"amounts","documentation":"An array of two positive integers, in *cents*, equal to the values of the micro-deposits sent to the bank account.\n","validation":"array"},{"name":"descriptor_code","documentation":"A six-character code starting with SM present in the microdeposit sent to the bank account.\n","validation":"string"}]}]},"request":{"title":"Verify with micro-deposits for setup","snippets":{"js":"stripe.verifyMicrodepositsForSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n amounts: [32, 45],\n }\n).then(function(result) {\n // Handle result.error or result.setupIntent\n});\n","es_next":"const {setupIntent, error} = await stripe.verifyMicrodepositsForSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n amounts: [32, 45],\n }\n);\n\n// Handle the setupIntent or error\n"}},"returns":"`stripe.verifyMicrodepositsForSetup` will return a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.setupIntent`: the [SetupIntent](/docs/api/setup_intents) with a `status` of `succeeded`.\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) and our [integration guide](/docs/payments/acss-debit/set-up-payment) for all possible errors.\n","callout":"Verification can fail for several reasons. The failure may happen synchronously as a direct error response, or asynchronously through a `payment_intent.payment_failed` webhook event.\nRefer to our [integration guide](/docs/payments/acss-debit/accept-a-payment) for more details.\n","section_tag":"stripe_verify_microdeposits_for_setup"},"display_on_load":true},"stripe_handle_next_action_for_setup":{"title":"Handle a next action","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_handle_next_action_for_setup","section_anchor":"stripe_handle_next_action_for_setup","subsection_anchors":null,"path":"/setup_intents/handle_next_action","gate":false,"data":{"section_type":"method","title":"Handle a next action","description":"Use `stripe.handleNextAction` in the [finalizing payments on the server](/docs/payments/finalize-payments-on-the-server#next-actions)\nflow to finish confirmation of a [SetupIntent](/docs/api/setup_intents) with the `requires_action` status.\nIt will throw an error if the SetupIntent has a different status.\n\nDepending on the payment method and required action, the customer may be temporarily redirected from your site\nand brought back to the `return_url` [parameter](/docs/api/setup_intents/confirm#confirm_setup_intent-return_url) provided when the SetupIntent is confirmed.\n","callout":"Note that `stripe.handleNextAction` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n\nAdditionally, `stripe.handleNextAction` may trigger a [3D Secure](/docs/payments/3d-secure) authentication challenge.\nThe authentication challenge requires a context switch that can be hard to follow on a screen-reader.\nEnsure that your form is accessible by ensuring that success or error messages are clearly read out.\n","signature":{"object_name":"stripe","method_name":"handleNextAction","args":[{"name":"options","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string"}]}]},"table_content":{"items":[{"name":"options","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string"}]}]},"request":{"title":"Handle a next action","snippets":{"js":"stripe.handleNextAction({\n clientSecret: '{SETUP_INTENT_CLIENT_SECRET}'\n}).then(function(result) {\n // Handle result.error or result.setupIntent\n});\n","es_next":"const {\n setupIntent,\n error\n} = await stripe.handleNextAction({\n clientSecret: '{SETUP_INTENT_CLIENT_SECRET}',\n});\n\n// Handle the setupIntent or error\n"}},"returns":"This method returns a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.setupIntent`: a [SetupIntent](/docs/api/setup_intents) with the `processing` or `succeeded` status.\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_handle_next_action_for_setup"},"display_on_load":true},"stripe_collect_bank_account_for_setup":{"title":"Collect bank account details for setup","group_title":"Setup Intents","group_anchor":"setup_intents","anchor":"stripe_collect_bank_account_for_setup","section_anchor":"stripe_collect_bank_account_for_setup","subsection_anchors":null,"path":"/setup_intents/collect_bank_account_for_setup","gate":false,"data":{"section_type":"method","title":"Collect bank account details for setup","description":"Use `stripe.collectBankAccountForSetup` in the [Save bank details](/docs/payments/ach-debit/set-up-payment) flow for the [ACH Direct Debit](/docs/payments/ach-debit) payment method to collect the customer’s bank account in your payment form.\nWhen called, it will automatically load an on-page modal UI to collect bank account details and verification, and attach the [PaymentMethod](/docs/api/payment_methods) to the [SetupIntent](/docs/api/setup_intents).\n","signature":{"object_name":"stripe","method_name":"collectBankAccountForSetup","args":[{"name":"options","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"params","validation":"object","required":true,"expanded":true,"subspec":[{"name":"payment_method_type","documentation":"The payment method type for the bank account details (e.g. `us_bank_account`)\n","validation":"string","required":true},{"name":"payment_method_data","documentation":"Payment method specific data to be sent with the request\n","validation":"object","required":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` is required. Providing `email` allows your customer to receive [ACH Direct Debit mandate and microdeposit emails](/docs/payments/ach-debit#mandate-and-microdeposit-emails).\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name. The first and last name must be at minimum 2 characters each.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":false}]}]}]}],"required":true}]},"table_content":{"items":[{"name":"options","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"params","validation":"object","required":true,"expanded":true,"subspec":[{"name":"payment_method_type","documentation":"The payment method type for the bank account details (e.g. `us_bank_account`)\n","validation":"string","required":true},{"name":"payment_method_data","documentation":"Payment method specific data to be sent with the request\n","validation":"object","required":true,"subspec":[{"name":"billing_details","documentation":"The customer's [billing_details](/docs/api/payment_methods/create#create_payment_method-billing_details).\n`name` is required. Providing `email` allows your customer to receive [ACH Direct Debit mandate and microdeposit emails](/docs/payments/ach-debit#mandate-and-microdeposit-emails).\n","validation":"Object","required":true,"expanded":true,"subspec":[{"name":"name","documentation":"The customer's name. The first and last name must be at minimum 2 characters each.\n","validation":"string","required":true},{"name":"email","documentation":"The customer's email.\n","validation":"string","required":false}]}]}]}],"required":true}]},"request":{"title":"Collect bank account details for setup","snippets":{"js":"stripe.collectBankAccountForSetup(\n {\n clientSecret: '{SETUP_INTENT_CLIENT_SECRET}',\n params: {\n payment_method_type: 'us_bank_account',\n payment_method_data: {\n billing_details: {name: 'Jenny Rosen', email: '[email protected]'},\n },\n },\n }\n).then(function(result) {\n // Handle result.error or result.setupIntent\n});\n","es_next":"const {setupIntent, error} = await stripe.collectBankAccountForSetup(\n {\n clientSecret: '{SETUP_INTENT_CLIENT_SECRET}',\n params: {\n payment_method_type: 'us_bank_account',\n payment_method_data: {\n billing_details: {name: 'Jenny Rosen', email: '[email protected]'},\n },\n },\n }\n);\n\n// Handle the setupIntent or error\n"}},"returns":"When the `stripe.collectBankAccountForSetup` completes successfully, it returns a SetupIntent.\nIf the customer provided their account, the SetupIntent is in the `requires_confirmation` state. If the customer closed the dialog without providing their account, the SetupIntent is in the `requires_payment_method` state.\nUse [stripe.confirmUsBankAccountSetup](/docs/js/setup_intents/confirm_us_bank_account_setup) to complete the process.\n","section_tag":"stripe_collect_bank_account_for_setup"},"display_on_load":true},"payment_request_intro":{"title":"Introduction","group_title":"The Payment Request object","group_anchor":"payment_request","anchor":"payment_request_intro","section_anchor":"payment_request_intro","subsection_anchors":null,"path":"/payment_request","gate":false,"data":{"section_type":"generic","title":"The Payment Request object","description":"A `PaymentRequest` object is used to collect payment information through an interface controlled and styled by the browser itself (i.e., not by you or your page).\n\nSee the [Payment Request Button Element quickstart](/docs/stripe-js/elements/payment-request-button) for a high-level overview of when you’d want to do this.\n","section_tag":"payment_request_intro"},"display_on_load":true},"stripe_payment_request":{"title":"Create a PaymentRequest object","group_title":"The Payment Request object","group_anchor":"payment_request","anchor":"stripe_payment_request","section_anchor":"stripe_payment_request","subsection_anchors":null,"path":"/payment_request/create","gate":false,"data":{"section_type":"method","title":"Create a PaymentRequestObject","description":"Use `stripe.paymentRequest` to create a `PaymentRequest` object.\nCreating a `PaymentRequest` requires that you configure it with an `options` object.\n\nIn Safari, `stripe.paymentRequest` uses Apple Pay, and in other browsers it uses the [Payment Request API standard](https://www.w3.org/TR/payment-request/).\n","callout":"`stripe.paymentRequest` abstracts over a number of implementation\ndetails to work uniformly across Apple Pay and the Payment Request\nbrowser standard. In particular, under the hood we set `supportedNetworks`\nto its most permissive setting, dynamically accounting for country\nand platform. It is currently not possible to override this and make\n`supportedNetworks` be more restrictive.\n","signature":{"object_name":"stripe","method_name":"paymentRequest","args":[{"name":"options","required":true,"expanded":true,"validation":"object","documentation":"A set of options to create this `PaymentRequest` instance with.\nThese options can be updated using [`paymentRequest.update`](/docs/js/payment_request/update).\n","subspec":[{"name":"country","documentation":"The two-letter country code of your Stripe account (e.g., `US`).\n","validation":"string","required":true},{"name":"currency","documentation":"Three character currency code (e.g., `usd`).\n","validation":"string","required":true},{"name":"total","documentation":"A [PaymentItem](#payment_item_object) object.\nThis `PaymentItem` is shown to the customer in the browser’s payment interface.\n","validation":"PaymentItem","required":true},{"name":"displayItems","documentation":"An array of [PaymentItem](#payment_item_object) objects.\nThese objects are shown as line items in the browser’s payment interface.\nNote that the sum of the line item amounts does not need to add up to the `total` amount above.\n","validation":"array","required":false},{"name":"requestPayerName","documentation":"By default, the browser‘s payment interface only asks the customer for actual payment information.\nA customer name can be collected by setting this option to `true`.\nThis collected name will appears in the [PaymentResponse](/docs/js/appendix/payment_response) object.\n\nWe highly recommend you collect name as this also results in collection of billing address for Apple Pay.\nThe billing address can be used to perform address verification and block fraudulent payments.\nFor all other payment methods, the billing address is automatically collected when available.\n","validation":"boolean","required":false,"badge_text":"recommended"},{"name":"requestPayerEmail","documentation":"See the [`requestPayerName`](#payment_request_create-options-requestPayerName) option.\n","validation":"boolean","required":false},{"name":"requestPayerPhone","documentation":"See the [`requestPayerName`](#payment_request_create-options-requestPayerName) option.\n","validation":"boolean","required":false},{"name":"requestShipping","documentation":"Collect shipping address by setting this option to `true`.\nThe address appears in the [PaymentResponse](/docs/js/appendix/payment_response).\n\nYou must also supply a valid [ShippingOptions] to the `shippingOptions` property.\nThis can be up front at the time `stripe.paymentRequest` is called, or in response to a `shippingaddresschange` event using the `updateWith` callback.\n","validation":"boolean","required":false},{"name":"shippingOptions","documentation":"An array of [ShippingOption](/docs/js/appendix/shipping_option) objects.\nThe first shipping option listed appears in the browser payment interface as the default option.\n","validation":"array","required":false},{"name":"disableWallets","documentation":"An array of wallet strings.\nCan be one or more of `applePay`, `googlePay`, `link`, and `browserCard`.\nUse this option to disable Apple Pay, Google Pay, Link, and/or browser-saved cards.\n","validation":"array","required":false}]}]},"table_content":{"items":[{"name":"options","required":true,"expanded":true,"validation":"object","documentation":"A set of options to create this `PaymentRequest` instance with.\nThese options can be updated using [`paymentRequest.update`](/docs/js/payment_request/update).\n","subspec":[{"name":"country","documentation":"The two-letter country code of your Stripe account (e.g., `US`).\n","validation":"string","required":true},{"name":"currency","documentation":"Three character currency code (e.g., `usd`).\n","validation":"string","required":true},{"name":"total","documentation":"A [PaymentItem](#payment_item_object) object.\nThis `PaymentItem` is shown to the customer in the browser’s payment interface.\n","validation":"PaymentItem","required":true},{"name":"displayItems","documentation":"An array of [PaymentItem](#payment_item_object) objects.\nThese objects are shown as line items in the browser’s payment interface.\nNote that the sum of the line item amounts does not need to add up to the `total` amount above.\n","validation":"array","required":false},{"name":"requestPayerName","documentation":"By default, the browser‘s payment interface only asks the customer for actual payment information.\nA customer name can be collected by setting this option to `true`.\nThis collected name will appears in the [PaymentResponse](/docs/js/appendix/payment_response) object.\n\nWe highly recommend you collect name as this also results in collection of billing address for Apple Pay.\nThe billing address can be used to perform address verification and block fraudulent payments.\nFor all other payment methods, the billing address is automatically collected when available.\n","validation":"boolean","required":false,"badge_text":"recommended"},{"name":"requestPayerEmail","documentation":"See the [`requestPayerName`](#payment_request_create-options-requestPayerName) option.\n","validation":"boolean","required":false},{"name":"requestPayerPhone","documentation":"See the [`requestPayerName`](#payment_request_create-options-requestPayerName) option.\n","validation":"boolean","required":false},{"name":"requestShipping","documentation":"Collect shipping address by setting this option to `true`.\nThe address appears in the [PaymentResponse](/docs/js/appendix/payment_response).\n\nYou must also supply a valid [ShippingOptions] to the `shippingOptions` property.\nThis can be up front at the time `stripe.paymentRequest` is called, or in response to a `shippingaddresschange` event using the `updateWith` callback.\n","validation":"boolean","required":false},{"name":"shippingOptions","documentation":"An array of [ShippingOption](/docs/js/appendix/shipping_option) objects.\nThe first shipping option listed appears in the browser payment interface as the default option.\n","validation":"array","required":false},{"name":"disableWallets","documentation":"An array of wallet strings.\nCan be one or more of `applePay`, `googlePay`, `link`, and `browserCard`.\nUse this option to disable Apple Pay, Google Pay, Link, and/or browser-saved cards.\n","validation":"array","required":false}]}]},"request":{"title":"Create a PaymentRequestObject","snippets":{"js":"var paymentRequest = stripe.paymentRequest({\n country: 'US',\n currency: 'usd',\n total: {\n label: 'Demo total',\n amount: 1000,\n },\n requestPayerName: true,\n requestPayerEmail: true,\n});\n","es_next":"const paymentRequest = stripe.paymentRequest({\n country: 'US',\n currency: 'usd',\n total: {\n label: 'Demo total',\n amount: 1000,\n },\n requestPayerName: true,\n requestPayerEmail: true,\n});\n"}},"section_tag":"stripe_payment_request"},"display_on_load":true},"payment_request_can_make_payment":{"title":"Check if a payment can be made","group_title":"The Payment Request object","group_anchor":"payment_request","anchor":"payment_request_can_make_payment","section_anchor":"payment_request_can_make_payment","subsection_anchors":null,"path":"/payment_request/can_make_payment","gate":false,"data":{"section_type":"method","title":"Check if a payment can be made","description":"Returns a `Promise` that resolves with an object detailing if an\nenabled wallet is ready to pay. If no wallet is available, it\nresolves with `null`. The resolution object has the properties\nin the table below.\n\n**NOTE**: The `paymentRequestButton` element automatically shows the correct wallet branding.\nYou shouldn't need to inspect the return object's properties unless you are building your own custom button.\n","signature":{"object_name":"paymentRequest","method_name":"canMakePayment"},"callout":"`canMakePayment` resolves to `null` outside the following supported cases:\n\n* Safari 10.1+ (desktop and mobile)\n * with a saved Apple Pay card\n * or when in a Private Browsing window\n * or when the “Allow websites to check if Apple Pay is set up” preference is disabled\n* Chrome 61+ (desktop and mobile)\n * with a saved Google Pay card\n * or when the browser has a saved card (i.e. autofill)\n\nFor more information, see [Testing your integration](/docs/stripe-js/elements/payment-request-button#testing).\n","table_content":{"title":"Return object properties","items":[{"name":"applePay","documentation":"`true` if Apple Pay wallet is ready to pay.\nIn this case:\n - `paymentRequestButton` Element will show as a branded Apple Pay button automatically.\n - When using a custom button, you‘ll want to show a button that conforms to the Apple Pay [Human Interface Guidelines](https://developer.apple.com/apple-pay/web-human-interface-guidelines/).\n","validation":"boolean"},{"name":"googlePay","documentation":"`true` if Google Pay wallet is ready to pay.\nIn this case:\n - `paymentRequestButton` Element will show as a branded Google Pay button automatically.\n - When using a custom button, you'll want to show a button that conforms to the Google Pay [Brand Guidelines](https://developers.google.com/pay/api/web/guides/brand-guidelines).\n","validation":"boolean"},{"name":"link","documentation":"`true` if Link wallet is ready to pay.\nIn this case:\n - `paymentRequestButton` Element will show as a branded Link button automatically.\n - Link is not supported in custom button configurations.\n","validation":"boolean"}]},"request":{"title":"paymentRequest.canMakePayment","snippets":{"es_next":"const result = await paymentRequest.canMakePayment();\nif (result) {\n // Mount paymentRequestButtonElement to the DOM\n}\n","js":"paymentRequest.canMakePayment().then(result =\u003E {\n if (result) {\n // Mount paymentRequestButtonElement to the DOM\n }\n});\n"}},"response":{"title":"Return object","snippets":{"success":"{\n applePay: true,\n googlePay: false,\n link: false,\n}\n"}},"section_tag":"payment_request_can_make_payment"},"display_on_load":true},"payment_request_show":{"title":"Show the payment request interface","group_title":"The Payment Request object","group_anchor":"payment_request","anchor":"payment_request_show","section_anchor":"payment_request_show","subsection_anchors":null,"path":"/payment_request/show","gate":false,"data":{"section_type":"method","title":"Show the payment request interface","description":"Shows the browser’s payment interface.\nWhen using the `paymentRequestButton` [Element](/docs/js/element), this is called for you automatically.\nThis method must be called as the result of a user interaction (for example, in a click handler).\n","signature":{"object_name":"paymentRequest","method_name":"show"},"request":{"title":"Show the payment request interface","snippets":{"js":"paymentRequest.show();\n","es_next":"paymentRequest.show();\n"}},"section_tag":"payment_request_show"},"display_on_load":true},"payment_request_update":{"title":"Update a PaymentRequest object","group_title":"The Payment Request object","group_anchor":"payment_request","anchor":"payment_request_update","section_anchor":"payment_request_update","subsection_anchors":null,"path":"/payment_request/update","gate":false,"data":{"section_type":"method","title":"Update a PaymentRequest object","description":"`PaymentRequest` instances can be updated with an options object.\nAvailable options are documented below.\n\n`paymentRequest.update` can only be called when the browser payment interface is not showing.\nListen to the [click](/docs/js/element/events) and [cancel](/docs/js/element/events) events to detect if the payment interface has been initiated.\nTo update the `PaymentRequest` right before the payment interface is initiated, call `paymentRequest.update` in your click event handler.\n","signature":{"object_name":"paymentRequest","method_name":"update","args":[{"name":"options","required":true,"validation":"object","documentation":"A set of options to update this PaymentRequest instance with.\n","expanded":true,"subspec":[{"name":"currency","documentation":"Three character currency code (e.g., `usd`).\n","validation":"string","required":false},{"name":"total","documentation":"A [PaymentItem](#payment_item_object) object.\nThis `PaymentItem` is shown to the customer in the browser’s payment interface.\n","validation":"object","required":false},{"name":"displayItems","documentation":"An array of [PaymentItem](#payment_item_object) objects.\nThese payment items are shown as line items in the browser’s payment interface.\nNote that the sum of the line item amounts does not need to add up to the `total` amount above.\n","validation":"array","required":false},{"name":"shippingOptions","documentation":"An array of [ShippingOption](/docs/js/appendix/shipping_option) objects.\nThe first shipping option listed appears in the browser payment interface as the default option.\n","validation":"array","required":false}]}]},"table_content":{"items":[{"name":"options","required":true,"validation":"object","documentation":"A set of options to update this PaymentRequest instance with.\n","expanded":true,"subspec":[{"name":"currency","documentation":"Three character currency code (e.g., `usd`).\n","validation":"string","required":false},{"name":"total","documentation":"A [PaymentItem](#payment_item_object) object.\nThis `PaymentItem` is shown to the customer in the browser’s payment interface.\n","validation":"object","required":false},{"name":"displayItems","documentation":"An array of [PaymentItem](#payment_item_object) objects.\nThese payment items are shown as line items in the browser’s payment interface.\nNote that the sum of the line item amounts does not need to add up to the `total` amount above.\n","validation":"array","required":false},{"name":"shippingOptions","documentation":"An array of [ShippingOption](/docs/js/appendix/shipping_option) objects.\nThe first shipping option listed appears in the browser payment interface as the default option.\n","validation":"array","required":false}]}]},"request":{"title":"Update a PaymentRequest","snippets":{"js":"paymentRequest.update({\n total: {\n label: 'Demo total',\n amount: 2000,\n },\n shippingOptions: [\n {\n id: 'basic',\n label: 'Ground shipping',\n detail: 'Ground shipping via UPS or FedEx',\n amount: 995,\n },\n ],\n});\n","es_next":"paymentRequest.update({\n total: {\n label: 'Demo total',\n amount: 2000,\n },\n shippingOptions: [\n {\n id: 'basic',\n label: 'Ground shipping',\n detail: 'Ground shipping via UPS or FedEx',\n amount: 995,\n },\n ],\n});\n"}},"section_tag":"payment_request_update"},"display_on_load":true},"payment_request_events":{"title":"Listen to PaymentRequest events","group_title":"The Payment Request object","group_anchor":"payment_request","anchor":"payment_request_events","section_anchor":"payment_request_events","subsection_anchors":["payment_request_on_token","payment_request_on_payment_method","payment_request_on_source","payment_request_on_cancel","payment_request_on_shipping_address_change","payment_request_on_shipping_option_change"],"path":"/payment_request/events","gate":false,"data":{"section_type":"generic","title":"PaymentRequest events","description":"`PaymentRequest` instances emit several different types of events.\n","section_tag":"payment_request_events"},"display_on_load":true},"payment_request_on_token":{"title":"Token event","group_title":"The Payment Request object","group_anchor":"payment_request","anchor":"payment_request_on_token","section_anchor":"payment_request_events","subsection_anchors":null,"path":"/payment_request/events/on_token","gate":false,"data":{"section_type":"method","title":"Token event","description":"Stripe.js automatically creates a [Token](/docs/api/tokens) after the customer is done interacting with the browser’s payment interface.\nTo access the created `Token`, listen for this event.\n","signature":{"object_name":"paymentRequest","method_name":"on","args":[{"name":"event","documentation":"The name of the event. In this case, `token`.\n","validation":"string","required":true,"render_as_value":"'token'"},{"name":"handler","documentation":"A callback function that will be called with a [PaymentResponse](/docs/js/appendix/payment_response) object when the event is fired.\nThe `PaymentResponse` object will contain a `token` field.\n","validation":"function","required":true}]},"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `token`.\n","validation":"string","required":true,"render_as_value":"'token'"},{"name":"handler","documentation":"A callback function that will be called with a [PaymentResponse](/docs/js/appendix/payment_response) object when the event is fired.\nThe `PaymentResponse` object will contain a `token` field.\n","validation":"function","required":true}]},"request":{"title":"Handle 'token' event","snippets":{"js":"paymentRequest.on('token', function(event) {\n // event.token is available\n});\n","es_next":"paymentRequest.on('token', ({token}) =\u003E {\n // token is available\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n token: {\n id: \"tok_1FlM3yDbZnUGiCm0LMM4gqzs\",\n object: \"token\",\n // ...\n },\n complete: function(status) {\n // Call this when you have processed the token data provided by\n // the API. Note that you must must call complete within 30\n // seconds.\n },\n ...,\n}\n"}},"section_tag":"payment_request_on_token"},"display_on_load":true},"payment_request_on_payment_method":{"title":"PaymentMethod event","group_title":"The Payment Request object","group_anchor":"payment_request","anchor":"payment_request_on_payment_method","section_anchor":"payment_request_events","subsection_anchors":null,"path":"/payment_request/events/on_paymentmethod","gate":false,"data":{"section_type":"method","title":"PaymentMethod event","description":"Stripe.js automatically creates a [PaymentMethod](/docs/api/payment_methods) after the customer is done interacting with the browser’s payment interface.\nTo access the created `PaymentMethod`, listen for this event.\n","signature":{"object_name":"paymentRequest","method_name":"on","args":[{"name":"event","documentation":"The name of the event. In this case, `paymentmethod`.\n","validation":"string","required":true,"render_as_value":"'paymentmethod'"},{"name":"handler","documentation":"A callback function that will be called with a [PaymentResponse](/docs/js/appendix/payment_response) object when the event is fired.\nThe `PaymentResponse` object will contain a `paymentMethod` field.\n","validation":"function","required":true}]},"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `paymentmethod`.\n","validation":"string","required":true,"render_as_value":"'paymentmethod'"},{"name":"handler","documentation":"A callback function that will be called with a [PaymentResponse](/docs/js/appendix/payment_response) object when the event is fired.\nThe `PaymentResponse` object will contain a `paymentMethod` field.\n","validation":"function","required":true}]},"request":{"title":"Handle 'paymentmethod' event","snippets":{"js":"paymentRequest.on('paymentmethod', function(event) {\n // event.paymentMethod is available\n});\n","es_next":"paymentRequest.on('paymentmethod', ({paymentMethod}) =\u003E {\n // paymentMethod is available\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n paymentMethod: {\n id: \"src_1FlM3yDbZnUGiCm0P8eqjAuI\",\n object: \"payment_method\",\n // ...,\n },\n complete: function(status) {\n // Call this when you have processed the payment method data\n // provided by the API. Note that you must must call complete\n // within 30 seconds.\n },\n ...,\n}\n"}},"section_tag":"payment_request_on_payment_method"},"display_on_load":true},"payment_request_on_source":{"title":"Source event","group_title":"The Payment Request object","group_anchor":"payment_request","anchor":"payment_request_on_source","section_anchor":"payment_request_events","subsection_anchors":null,"path":"/payment_request/events/on_source","gate":false,"data":{"section_type":"method","title":"Source event","description":"Stripe.js automatically creates a [Source](/docs/api/sources) after the customer is done interacting with the browser’s payment interface.\nTo access the created source, listen for this event.\n","signature":{"object_name":"paymentRequest","method_name":"on","args":[{"name":"event","documentation":"The name of the event. In this case, `source`.\n","validation":"string","required":true,"render_as_value":"'source'"},{"name":"handler","documentation":"A callback function that will be called with a [PaymentResponse](/docs/js/appendix/payment_response) object when the event is fired.\nThe `PaymentResponse` object will contain a `source` field.\n","validation":"function","required":true}]},"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `source`.\n","validation":"string","required":true,"render_as_value":"'source'"},{"name":"handler","documentation":"A callback function that will be called with a [PaymentResponse](/docs/js/appendix/payment_response) object when the event is fired.\nThe `PaymentResponse` object will contain a `source` field.\n","validation":"function","required":true}]},"request":{"title":"Handle 'source' event","snippets":{"js":"paymentRequest.on('source', function(event) {\n // event.source is available\n});\n","es_next":"paymentRequest.on('source', ({source}) =\u003E {\n // source is available\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n source: {\n id: \"src_1FlM3yDbZnUGiCm0P8eqjAuI\",\n object: \"source\",\n // ...\n }\n complete: function(status) {\n // Call this when you have processed the source data provided\n // by the API. Note that you must must call complete within 30\n // seconds.\n },\n ...,\n}\n"}},"section_tag":"payment_request_on_source"},"display_on_load":true},"payment_request_on_cancel":{"title":"Cancel event","group_title":"The Payment Request object","group_anchor":"payment_request","anchor":"payment_request_on_cancel","section_anchor":"payment_request_events","subsection_anchors":null,"path":"/payment_request/events/on_cancel","gate":false,"data":{"section_type":"method","title":"Cancel event","description":"The `cancel` event is emitted from a [PaymentRequest](/docs/js/payment_request) when the browser‘s payment interface is dismissed.\n\nNote that in some browsers, the payment interface may be dismissed by the customer even after they authorize the payment.\nThis means that you may receive a `cancel` event on your PaymentRequest object after receiving a `token`, `paymentmethod`, or `source` event.\nIf you’re using the `cancel` event as a hook for canceling the customer’s order, make sure you also refund the payment that you just created.\n","signature":{"object_name":"paymentRequest","method_name":"on","args":[{"name":"event","documentation":"The name of the event.\nIn this case, `cancel`.\n","validation":"string","required":true,"render_as_value":"'cancel'"},{"name":"handler","documentation":"A callback function that you will provide that will be called when the event is fired.\n","validation":"function","required":true}]},"table_content":{"items":[{"name":"event","documentation":"The name of the event.\nIn this case, `cancel`.\n","validation":"string","required":true,"render_as_value":"'cancel'"},{"name":"handler","documentation":"A callback function that you will provide that will be called when the event is fired.\n","validation":"function","required":true}]},"request":{"title":"Handle 'cancel' event","snippets":{"js":"paymentRequest.on('cancel', function() {\n // handle cancel event\n});\n","es_next":"paymentRequest.on('cancel', () =\u003E {\n // handle cancel event\n});\n"}},"section_tag":"payment_request_on_cancel"},"display_on_load":true},"payment_request_on_shipping_address_change":{"title":"Shipping address change event","group_title":"The Payment Request object","group_anchor":"payment_request","anchor":"payment_request_on_shipping_address_change","section_anchor":"payment_request_events","subsection_anchors":null,"path":"/payment_request/events/on_shipping_address_change","gate":false,"data":{"section_type":"method","title":"Shipping address change event","description":"The `shippingaddresschange` event is emitted from a [PaymentRequest](/docs/js/payment_request) whenever the customer selects a new address in the browser's payment interface.\n","signature":{"object_name":"paymentRequest","method_name":"on","args":[{"name":"event","documentation":"The name of the event. In this case, `shippingaddresschange`.\n","validation":"string","required":true,"render_as_value":"'shippingaddresschange'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n\nWhen called it will be passed an event object with the following properties:\n","validation":"function","required":true,"expanded":true,"subspec_title":"handler event object properties","subspec":[{"name":"updateWith","validation":"function","documentation":"`updateWith(updateDetails) =\u003E void` is a Stripe.js provided function that is called with an [UpdateDetails](/docs/js/appendix/update_details) object to merge your updates into the current `PaymentRequest` object.\nNote that if you subscribe to `shippingaddresschange` events, then you must call `updateWith` within 30 seconds.\n"},{"name":"shippingAddress","validation":"ShippingAddress","documentation":"The customer's selected [ShippingAddress](/docs/js/appendix/shipping_address).\n\nTo maintain privacy, browsers may anonymize the shipping address by removing sensitive information that is not necessary to calculate shipping costs.\nDepending on the country, some fields can be missing or partially redacted.\nFor example, the shipping address in the U.S. may only contain a city, state, and ZIP code.\nThe full shipping address appears in the [PaymentResponse](/docs/js/appendix/payment_response) object after the purchase is confirmed in the browser’s payment interface\n"}]}]},"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `shippingaddresschange`.\n","validation":"string","required":true,"render_as_value":"'shippingaddresschange'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n\nWhen called it will be passed an event object with the following properties:\n","validation":"function","required":true,"expanded":true,"subspec_title":"handler event object properties","subspec":[{"name":"updateWith","validation":"function","documentation":"`updateWith(updateDetails) =\u003E void` is a Stripe.js provided function that is called with an [UpdateDetails](/docs/js/appendix/update_details) object to merge your updates into the current `PaymentRequest` object.\nNote that if you subscribe to `shippingaddresschange` events, then you must call `updateWith` within 30 seconds.\n"},{"name":"shippingAddress","validation":"ShippingAddress","documentation":"The customer's selected [ShippingAddress](/docs/js/appendix/shipping_address).\n\nTo maintain privacy, browsers may anonymize the shipping address by removing sensitive information that is not necessary to calculate shipping costs.\nDepending on the country, some fields can be missing or partially redacted.\nFor example, the shipping address in the U.S. may only contain a city, state, and ZIP code.\nThe full shipping address appears in the [PaymentResponse](/docs/js/appendix/payment_response) object after the purchase is confirmed in the browser’s payment interface\n"}]}]},"request":{"title":"Handle 'shippingaddresschange' event","snippets":{"js":"paymentRequest.on('shippingaddresschange', function(event) {\n var updateWith = event.updateWith;\n var shippingAddress = event.shippingAddress;\n // handle shippingaddresschange event\n\n // call event.updateWith within 30 seconds\n updateWith(updateDetails);\n});\n","es_next":"paymentRequest.on('shippingaddresschange', (event) =\u003E {\n const {updateWith, shippingAddress} = event;\n // handle shippingaddresschange event\n\n // call event.updateWith within 30 seconds\n updateWith(updateDetails);\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n shippingAddress: {\n country: \"US\",\n addressLine: [\n \"185 Berry St.\",\n \"Suite 500\",\n ],\n region: \"CA\",\n city: \"San Francisco\",\n ...,\n },\n updateWith: function(updateDetails) {\n // Call this function to merge your updates into the current\n // PaymentRequest object. Note that you must call this\n // within 30 seconds.\n },\n}\n"}},"section_tag":"payment_request_on_shipping_address_change"},"display_on_load":true},"payment_request_on_shipping_option_change":{"title":"Shipping option change event","group_title":"The Payment Request object","group_anchor":"payment_request","anchor":"payment_request_on_shipping_option_change","section_anchor":"payment_request_events","subsection_anchors":null,"path":"/payment_request/events/on_shipping_option_change","gate":false,"data":{"section_type":"method","title":"Shipping option change event","description":"The `shippingoptionchange` event is emitted from a [PaymentRequest](/docs/js/payment_request) whenever the customer selects a new shipping option in the browser's payment interface.\n","signature":{"object_name":"paymentRequest","method_name":"on","args":[{"name":"event","documentation":"The name of the event. In this case, `shippingoptionchange`.\n","validation":"string","required":true,"render_as_value":"'shippingoptionchange'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n\nWhen called it will be passed an event object with the following properties:\n","validation":"function","required":true,"expanded":true,"subspec_title":"handler event object properties","subspec":[{"name":"updateWith","validation":"function","documentation":"`updateWith(updateDetails) =\u003E void` is a Stripe.js provided function that is called with an [UpdateDetails](/docs/js/appendix/update_details) object to merge your updates into the current `PaymentRequest` object.\nNote that if you subscribe to `shippingoptionchange` events, then you must call `updateWith` within 30 seconds.\n"},{"name":"shippingOption","validation":"ShippingOption","documentation":"The customer's selected [ShippingOption](/docs/js/appendix/shipping_option).\n"}]}]},"table_content":{"items":[{"name":"event","documentation":"The name of the event. In this case, `shippingoptionchange`.\n","validation":"string","required":true,"render_as_value":"'shippingoptionchange'"},{"name":"handler","documentation":"`handler(event) =\u003E void` is a **callback function** that you provide that will be called when the event is fired.\n\nWhen called it will be passed an event object with the following properties:\n","validation":"function","required":true,"expanded":true,"subspec_title":"handler event object properties","subspec":[{"name":"updateWith","validation":"function","documentation":"`updateWith(updateDetails) =\u003E void` is a Stripe.js provided function that is called with an [UpdateDetails](/docs/js/appendix/update_details) object to merge your updates into the current `PaymentRequest` object.\nNote that if you subscribe to `shippingoptionchange` events, then you must call `updateWith` within 30 seconds.\n"},{"name":"shippingOption","validation":"ShippingOption","documentation":"The customer's selected [ShippingOption](/docs/js/appendix/shipping_option).\n"}]}]},"request":{"title":"Handle 'shippingoptionchange' event","snippets":{"js":"paymentRequest.on('shippingoptionchange', function(event) {\n var updateWith = event.updateWith;\n var shippingOption = event.shippingOption;\n // handle shippingoptionchange event\n\n // call event.updateWith within 30 seconds\n updateWith(updateDetails);\n});\n","es_next":"paymentRequest.on('shippingoptionchange', (event) =\u003E {\n const {updateWith, shippingOption} = event;\n // handle shippingoptionschange event\n\n // call event.updateWith within 30 seconds\n updateWith(updateDetails);\n});\n"}},"response":{"title":"Handler event object","snippets":{"success":"{\n shippingOption: {\n id: \"someUniqueID\",\n label: \"Ground\",\n detail: \"UPS standard ground shipping\",\n amount: 999,\n },\n updateWith: function(updateDetails) {\n // Call this function to merge your updates into the current\n // PaymentRequest object. Note that you must must call this\n // within 30 seconds.\n },\n}\n"}},"section_tag":"payment_request_on_shipping_option_change"},"display_on_load":true},"payment_methods_intro":{"title":"Introduction","group_title":"Payment Methods","group_anchor":"payment_methods","anchor":"payment_methods_intro","section_anchor":"payment_methods_intro","subsection_anchors":null,"path":"/payment_methods","gate":false,"data":{"section_type":"generic","title":"Payment Methods","description":"PaymentMethod objects represent your customer's payment instruments. They can be used with PaymentIntents to collect payments or saved to Customer objects to store instrument details for future payments.\n\nRelated guides: [Payment Methods](/docs/payments/payment-methods) and [More Payment Scenarios](/docs/payments/more-payment-scenarios).\n","section_tag":"payment_methods_intro"},"display_on_load":true},"stripe_create_payment_method":{"title":"Create a PaymentMethod","group_title":"Payment Methods","group_anchor":"payment_methods","anchor":"stripe_create_payment_method","section_anchor":"stripe_create_payment_method","subsection_anchors":null,"path":"/payment_methods/create_payment_method","gate":false,"data":{"section_type":"method","title":"Create a PaymentMethod","description":"Use `stripe.createPaymentMethod` to convert payment information collected by elements into a [PaymentMethod](/docs/api/payment_methods) object that you safely pass to your server to use in an API call.\n\n**NOTE:** In most integrations, you will not need to use this method. Instead, use methods like [stripe.confirmCardPayment](/docs/js/payment_intents/confirm_card_payment), which will automatically create a PaymentMethod when you confirm a [PaymentIntent](/docs/api/payment_intents).\n","signature":{"object_name":"stripe","method_name":"createPaymentMethod","args":[{"name":"paymentMethodData","documentation":"Refer to the [PaymentMethod API](/docs/api/payment_methods/create) for a full list of parameters.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"type","validation":"string","required":true,"documentation":"The type of the [PaymentMethod](/docs/api/payment_methods/create) to create.\nRefer to the [PaymentMethod API](/docs/api/payment_methods/create#create_payment_method-type) for all possible values.\n"},{"name":"card","validation":"Element","required":false,"documentation":"A `card` or `cardNumber` Element.\n"},{"name":"au_becs_debit","validation":"Element","required":false,"documentation":"An `auBankAccount` Element.\n"},{"name":"fpx","validation":"Element","required":false,"documentation":"An `fpx` Element.\n"},{"name":"fpx[bank]","validation":"string","required":false,"documentation":"The customer's [bank](/docs/payments/fpx/accept-a-payment#bank-reference).\n"},{"name":"netbanking[bank]","validation":"string","required":false,"documentation":"The customer's bank.\n"},{"name":"ideal","validation":"Element","required":false,"documentation":"An `idealBank` Element.\n"},{"name":"ideal[bank]","validation":"string","required":false,"documentation":"The customer's [bank](/docs/sources/ideal#specifying-customer-bank).\n"},{"name":"sepa_debit","validation":"Element","required":false,"documentation":"An `iban` Element.\n"},{"name":"sepa_debit[iban]","validation":"string","required":false,"documentation":"An IBAN account number.\n"},{"name":"upi[vpa]","validation":"string","required":false,"documentation":"The customer's VPA.\n"},{"name":"billing_details","validation":"object","required":false,"documentation":"[Billing information](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the PaymentMethod that may be used or required by particular types of payment methods.\n"}]}]},"table_content":{"items":[{"name":"paymentMethodData","documentation":"Refer to the [PaymentMethod API](/docs/api/payment_methods/create) for a full list of parameters.\n","validation":"object","required":true,"expanded":true,"subspec":[{"name":"type","validation":"string","required":true,"documentation":"The type of the [PaymentMethod](/docs/api/payment_methods/create) to create.\nRefer to the [PaymentMethod API](/docs/api/payment_methods/create#create_payment_method-type) for all possible values.\n"},{"name":"card","validation":"Element","required":false,"documentation":"A `card` or `cardNumber` Element.\n"},{"name":"au_becs_debit","validation":"Element","required":false,"documentation":"An `auBankAccount` Element.\n"},{"name":"fpx","validation":"Element","required":false,"documentation":"An `fpx` Element.\n"},{"name":"fpx[bank]","validation":"string","required":false,"documentation":"The customer's [bank](/docs/payments/fpx/accept-a-payment#bank-reference).\n"},{"name":"netbanking[bank]","validation":"string","required":false,"documentation":"The customer's bank.\n"},{"name":"ideal","validation":"Element","required":false,"documentation":"An `idealBank` Element.\n"},{"name":"ideal[bank]","validation":"string","required":false,"documentation":"The customer's [bank](/docs/sources/ideal#specifying-customer-bank).\n"},{"name":"sepa_debit","validation":"Element","required":false,"documentation":"An `iban` Element.\n"},{"name":"sepa_debit[iban]","validation":"string","required":false,"documentation":"An IBAN account number.\n"},{"name":"upi[vpa]","validation":"string","required":false,"documentation":"The customer's VPA.\n"},{"name":"billing_details","validation":"object","required":false,"documentation":"[Billing information](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the PaymentMethod that may be used or required by particular types of payment methods.\n"}]}]},"request":{"title":"Create a PaymentMethod","snippets":{"js":"stripe\n .createPaymentMethod({\n type: 'card',\n card: cardElement,\n billing_details: {\n name: 'Jenny Rosen',\n },\n })\n .then(function(result) {\n // Handle result.error or result.paymentMethod\n });\n","es_next":"const {paymentMethod, error} = await stripe.createPaymentMethod({\n type: 'card',\n card: cardElement,\n billing_details: {\n name: 'Jenny Rosen',\n },\n});\n"}},"returns":"`stripe.createPaymentMethod(paymentMethodData)` returns a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.paymentMethod`: a [PaymentMethod](/docs/api/payment_methods) was created successfully.\n* `result.error`: there was an error.\n This includes client-side validation errors.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_create_payment_method"},"display_on_load":true},"stripe_create_payment_method_elements":{"title":"Create a PaymentMethod with Elements","group_title":"Payment Methods","group_anchor":"payment_methods","anchor":"stripe_create_payment_method_elements","section_anchor":"stripe_create_payment_method_elements","subsection_anchors":null,"path":"/payment_methods/create_payment_method_elements","gate":false,"data":{"section_type":"method","title":"Create a PaymentMethod with Elements","description":"Use `stripe.createPaymentMethod` to convert payment information collected by elements into a [PaymentMethod](/docs/api/payment_methods) object that you safely pass to your server to use in an API call.\n\n**NOTE:** In most integrations, you will not need to use this method. Instead, use methods like [stripe.confirmPayment](/docs/js/payment_intents/confirm_payment), which will automatically create a PaymentMethod when you confirm a [PaymentIntent](/docs/api/payment_intents).\n","signature":{"object_name":"stripe","method_name":"createPaymentMethod","args":[{"name":"options","required":true,"expanded":true,"validation":"object","subspec":[{"name":"elements","documentation":"The [Elements](#payment_element_create) instance that was used to create the Payment Element. It will be used to pull payment method and billing address data from.\n","validation":"object","required":true},{"name":"params","documentation":"Parameters that will be passed on to the Stripe API. Refer to the [PaymentMethod API](/docs/api/payment_methods/create) for a full list of parameters.\n","validation":"object","required":false,"subspec":[{"name":"billing_details","validation":"object","required":false,"documentation":"[Billing information](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the PaymentMethod that may be used or required by particular types of payment methods.\n"}]}]}]},"table_content":{"items":[{"name":"options","required":true,"expanded":true,"validation":"object","subspec":[{"name":"elements","documentation":"The [Elements](#payment_element_create) instance that was used to create the Payment Element. It will be used to pull payment method and billing address data from.\n","validation":"object","required":true},{"name":"params","documentation":"Parameters that will be passed on to the Stripe API. Refer to the [PaymentMethod API](/docs/api/payment_methods/create) for a full list of parameters.\n","validation":"object","required":false,"subspec":[{"name":"billing_details","validation":"object","required":false,"documentation":"[Billing information](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the PaymentMethod that may be used or required by particular types of payment methods.\n"}]}]}]},"request":{"title":"Create a PaymentMethod","snippets":{"js":"stripe\n .createPaymentMethod({\n elements,\n params: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.paymentMethod\n });\n","es_next":"const {paymentMethod, error} = await stripe.createPaymentMethod({\n elements,\n params: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n});\n"}},"returns":"`stripe.createPaymentMethod(options)` returns a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.paymentMethod`: a [PaymentMethod](/docs/api/payment_methods) was created successfully.\n* `result.error`: there was an error.\n This includes client-side validation errors.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_create_payment_method_elements"},"display_on_load":true},"tokens_sources_intro":{"title":"Introduction","group_title":"Tokens and Sources","group_anchor":"tokens_sources","anchor":"tokens_sources_intro","section_anchor":"tokens_sources_intro","subsection_anchors":null,"path":"/tokens_sources","gate":false,"data":{"section_type":"generic","title":"Tokens \u0026 Sources","description":"The [Charges API](/docs/payments/accept-a-payment-charges) is the fastest way to accept U.S. and Canadian payments for your startup or prototype.\nStripe.js provides the following methods to create [Tokens](/docs/api/tokens) and [Sources](/docs/api/sources), which are part of the Charges API.\n\nTo accept payments globally, use the [Payment Intents API](/docs/js/payment_intents) instead.\n","section_tag":"tokens_sources_intro"},"display_on_load":true},"stripe_create_token":{"title":"Create a Token","group_title":"Tokens and Sources","group_anchor":"tokens_sources","anchor":"stripe_create_token","section_anchor":"stripe_create_token","subsection_anchors":null,"path":"/tokens_sources/create_token","gate":false,"data":{"section_type":"method","title":"Create a Token","signature":{"object_name":"stripe","method_name":"createToken","args":[{"name":"tokenType","documentation":"An type of token to create or an element with data to tokenize.\n","validation":"string","required":true,"selectable":true},{"name":"data","documentation":"An object containing information to tokenize.\n","validation":"object"}]},"types_parent":"tokenType","types_data":{"cardElement":{"description":"Use `stripe.createToken` to convert information collected by card elements into a single-use [Token](/docs/api#tokens) that you safely pass to your server to use in an API call.\n","table_content":{"items":[{"name":"tokenType","display_name":"cardElement","documentation":"The `card` [Element](/docs/js/element) you wish to tokenize data from.\nIf applicable, the `Element` tokenizes by pulling data from other elements\nyou’ve created on the same instance of [Elements](#elements_create)—you\nonly need to supply one `Element` as the parameter.\n","validation":"Element","required":true},{"name":"data","documentation":"An object containing additional payment information you might have collected.\n\nAlthough these fields are optional, we highly recommend collecting name and address.\nThis information can be used to perform a number of verifications, such as CVC, ZIP, and address verification.\n[Radar](/docs/radar) includes [built-in](/docs/radar/rules#traditional-bank-checks) rules that can block payments where the ZIP or CVC verifications with the cardholder’s bank failed.\n","validation":"object","subspec":[{"name":"name","documentation":"Cardholder name.\n","validation":"string","badge_text":"recommended"},{"name":"address_line1","validation":"string"},{"name":"address_line2","validation":"string"},{"name":"address_city","validation":"string"},{"name":"address_state","validation":"string"},{"name":"address_zip","validation":"string"},{"name":"address_country","documentation":"A two character country code (for example, `US`).\n","validation":"string","badge_text":"recommended"},{"name":"currency","documentation":"Required in order to [add the card to a Connect account](/docs/connect/bank-debit-card-payouts) (in all other cases, this parameter is not used).\n","validation":"string"}]}]},"request":{"title":"Create token from card","snippets":{"js":"stripe.createToken(cardElement).then(function(result) {\n // Handle result.error or result.token\n});\n","es_next":"const {token, error} = await stripe.createToken(cardElement);\n"}}},"cardNumberElement":{"description":"Use `stripe.createToken` to convert information collected by card elements into a single-use [Token](/docs/api#tokens) that you safely pass to your server to use in an API call.\n","table_content":{"items":[{"name":"tokenType","display_name":"cardNumberElement","documentation":"The `cardNumber` [Element](/docs/js/element) you wish to tokenize data from.\nIf applicable, the `Element` tokenizes by pulling data from other elements\nyou’ve created on the same instance of [Elements](#elements_create)—you\nonly need to supply one `Element` as the parameter.\n","validation":"Element","required":true},{"name":"data","documentation":"An object containing additional payment information you might have collected.\n\nAlthough these fields are optional, we highly recommend collecting name and address.\nThis information can be used to perform a number of verifications, such as CVC, ZIP, and address verification.\n[Radar](/docs/radar) includes [built-in](/docs/radar/rules#traditional-bank-checks) rules that can block payments where the ZIP or CVC verifications with the cardholder’s bank failed.\n","validation":"object","subspec":[{"name":"name","documentation":"Cardholder name.\n","validation":"string","badge_text":"recommended"},{"name":"address_line1","validation":"string"},{"name":"address_line2","validation":"string"},{"name":"address_city","validation":"string"},{"name":"address_state","validation":"string"},{"name":"address_zip","validation":"string"},{"name":"address_country","documentation":"A two character country code (for example, `US`).\n","validation":"string","badge_text":"recommended"},{"name":"currency","documentation":"Required in order to [add the card to a Connect account](/docs/connect/bank-debit-card-payouts) (in all other cases, this parameter is not used).\n","validation":"string"}]}]},"request":{"title":"Create token from cardNumber","snippets":{"js":"stripe.createToken(cardNumberElement).then(function(result) {\n // Handle result.error or result.token\n});\n","es_next":"const {token, error} = await stripe.createToken(cardNumberElement);\n"}}},"cardCvcElement":{"description":"Use `stripe.createToken` to convert information collected by card elements into a single-use [Token](/docs/api#tokens) that you safely pass to your server to use in an API call.\n","table_content":{"items":[{"name":"tokenType","display_name":"cardCvcElement","documentation":"The `cardCvc` [Element](/docs/js/element) you wish to tokenize data from.\n","validation":"Element","required":true},{"name":"data","documentation":"An object containing additional payment information you might have collected.\n\nAlthough these fields are optional, we highly recommend collecting name and address.\nThis information can be used to perform a number of verifications, such as CVC, ZIP, and address verification.\n[Radar](/docs/radar) includes [built-in](/docs/radar/rules#traditional-bank-checks) rules that can block payments where the ZIP or CVC verifications with the cardholder’s bank failed.\n","validation":"object","subspec":[{"name":"name","documentation":"Cardholder name.\n","validation":"string","badge_text":"recommended"},{"name":"address_line1","validation":"string"},{"name":"address_line2","validation":"string"},{"name":"address_city","validation":"string"},{"name":"address_state","validation":"string"},{"name":"address_zip","validation":"string"},{"name":"address_country","documentation":"A two character country code (for example, `US`).\n","validation":"string","badge_text":"recommended"},{"name":"currency","documentation":"Required in order to [add the card to a Connect account](/docs/connect/bank-debit-card-payouts) (in all other cases, this parameter is not used).\n","validation":"string"}]}]},"request":{"title":"Create token from cardCvc","snippets":{"js":"stripe.createToken(cardCvcElement).then(function(result) {\n // Handle result.error or result.token\n});\n","es_next":"const {token, error} = await stripe.createToken(cardCvcElement);\n"}}},"ibanElement":{"description":"Use `stripe.createToken` to convert information collected by an `iban` element into a single-use token that you safely pass to your server to use in an API call.\n","table_content":{"items":[{"name":"tokenType","display_name":"ibanElement","documentation":"An `iban` [Element](/docs/js/element) you wish to tokenize data from.\n","validation":"Element","required":true},{"name":"data","documentation":"An object passed as the second argument. It must have the following properties:\n","validation":"object","required":true,"requirement_text":"Required for iban","expanded":true,"subspec":[{"name":"currency","documentation":"Three character currency code (e.g., `eur`).\n","validation":"string","required":true},{"name":"account_holder_name","documentation":"The name of the account holder.\n","validation":"string","required":true},{"name":"account_holder_type","documentation":"The type of entity that holds the account. Can be either `individual` or `company`.\n","validation":"string","required":true}]}]},"request":{"title":"Create token from iban","snippets":{"js":"stripe\n .createToken(ibanElement, {\n // country and account_number are automatically populated from the IBAN Element\n currency: 'eur',\n account_holder_name: 'Jenny Rosen',\n account_holder_type: 'individual',\n })\n .then(function(result) {\n // Handle result.error or result.token\n });\n","es_next":"const {token, error} = await stripe.createToken(ibanElement, {\n // country and account_number are automatically populated from the IBAN Element\n currency: 'eur',\n account_holder_name: 'Jenny Rosen',\n account_holder_type: 'individual',\n});\n"}}},"pii":{"render_as_value":"'pii'","description":"Use `stripe.createToken` to convert personally identifiable information (PII) into a single-use token for account identity verification.\n","request":{"title":"Create a token for PII","snippets":{"js":"stripe\n .createToken('pii', {\n personal_id_number: '123131185',\n })\n .then(function(result) {\n // Handle result.error or result.token\n });\n","es_next":"const {token, error} = await stripe.createToken('pii', {\n personal_id_number: '123131185',\n});\n"}},"table_content":{"items":[{"name":"tokenType","documentation":"The type of token to create. In this case, `pii`.\n","validation":"'pii'","required":true,"selectable":true},{"name":"data","documentation":"An object passed as the second argument. It must have the following properties:\n","validation":"object","required":true,"requirement_text":"Required for pii","expanded":true,"subspec":[{"name":"personal_id_number","documentation":"The personal ID number.\n","validation":"string","required":true}]}]}},"bank_account":{"render_as_value":"'bank_account'","description":"Use `stripe.createToken` to convert bank account information into a single-use token that you safely pass to your server to use in an API call.\n","table_content":{"items":[{"name":"tokenType","documentation":"The type of token to create. In this case, `bank_account`.\n","validation":"'bank_account'","required":true,"selectable":true},{"name":"data","documentation":"An object passed as the second argument. It must have the following properties:\n","validation":"object","required":true,"requirement_text":"Required for bank_account","expanded":true,"subspec":[{"name":"country","documentation":"Two character country code (e.g., `US`).\n","validation":"string","required":true},{"name":"currency","documentation":"Three character currency code (e.g., `usd`).\n","validation":"string","required":true},{"name":"routing_number","documentation":"The bank routing number (e.g., `111000025`). Optional if the currency is `eur`, as the account number is an IBAN.\n","validation":"string","required":false},{"name":"account_number","documentation":"The bank account number (e.g., `000123456789`).\n","validation":"string","required":true},{"name":"account_holder_name","documentation":"The name of the account holder.\n","validation":"string","required":false},{"name":"account_holder_type","documentation":"The type of entity that holds the account. Can be either `individual` or `company`.\n","validation":"string","required":false},{"name":"account_type","documentation":"The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.\n","validation":"string","required":false}]}]},"request":{"title":"Create a bank account token","snippets":{"js":"stripe\n .createToken('bank_account', {\n country: 'US',\n currency: 'usd',\n routing_number: '110000000',\n account_number: '000123456789',\n account_holder_name: 'Jenny Rosen',\n account_holder_type: 'individual',\n })\n .then(function(result) {\n // Handle result.error or result.token\n });\n","es_next":"const {token, error} = await stripe.createToken('bank_account', {\n country: 'US',\n currency: 'usd',\n routing_number: '110000000',\n account_number: '000123456789',\n account_holder_name: 'Jenny Rosen',\n account_holder_type: 'individual',\n});\n"}}},"person":{"render_as_value":"'person'","description":"Use `stripe.createToken` to create a single-use token that represents the details for a person.\nUse this when creating or updating persons associated with a Connect account.\nSee [the documentation](/docs/connect/account-tokens) to learn more.\n","table_content":{"items":[{"name":"tokenType","documentation":"The type of token to create.\nIn this case, `person`.\n","validation":"'person'","required":true,"selectable":true},{"name":"data","documentation":"[Person data](/docs/api/tokens/create_person) this token will represent.\n","validation":"object","required":true,"expanded":true}]},"request":{"title":"Create a person token","snippets":{"js":"stripe\n .createToken('person', {\n first_name: 'Jane',\n last_name: 'Doe',\n relationship: {owner: true},\n })\n .then(function(result) {\n // Handle result.error or result.token\n });\n","es_next":"const {token, error} = await stripe.createToken('person', {\n first_name: 'Jane',\n last_name: 'Doe',\n relationship: {owner: true},\n});\n"}}},"account":{"render_as_value":"'account'","description":"Use `stripe.createToken` to create a single-use token that wraps a user’s legal entity information.\nUse this when creating or updating a Connect account.\nSee the [account tokens documentation](/docs/connect/account-tokens) to learn more.\n","table_content":{"items":[{"name":"tokenType","documentation":"The type of token to create.\nIn this case, `account`.\n","validation":"'person'","required":true,"selectable":true},{"name":"data","documentation":"[Account data](/docs/api/tokens/create_account) this token will represent.\n","validation":"object","required":true,"expanded":true}]},"request":{"title":"Create a account token","snippets":{"js":"stripe\n .createToken('account', {\n individual: {\n first_name: 'Jane',\n last_name: 'Doe',\n },\n tos_shown_and_accepted: true,\n })\n .then(function(result) {\n // Handle result.error or result.token\n });\n","es_next":"const {token, error} = await stripe.createToken('account', {\n individual: {\n first_name: 'Jane',\n last_name: 'Doe',\n },\n tos_shown_and_accepted: true,\n});\n"}}},"cvc_update":{"render_as_value":"'cvc_update'","description":"Use `stripe.createToken` to tokenize the re-collected CVC on a saved card for use in [CVC re-collection](/docs/payments/accept-a-payment-synchronously#web-recollect-cvc).\n\nFirst, render an element of type `cardCvc` to collect the data. Then, pass the `cardCvc` element to `stripe.createToken` to tokenize the collected data.\n","table_content":{"items":[{"name":"tokenType","documentation":"The type of token to create.\nIn this case, `cvc_update`.\n","validation":"'cvc_update'","required":true,"selectable":true},{"name":"tokenType","display_name":"cardCvcElement","documentation":"The `cardCvc` [Element](/docs/js/element) you wish to tokenize data from.\n","validation":"Element","required":true}]},"request":{"title":"Create token from updated CVC","snippets":{"js":"stripe.createToken('cvc_update',\n cardCvcElement,\n).then(function(result) {\n // Handle result.error or result.token\n});\n","es_next":"const {token, error} = await stripe.createToken('cvc_update',\n cardCvcElement\n);\n"}}}},"returns":"`stripe.createToken` returns a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.token`: a [Token](/docs/api/tokens) was created successfully.\n* `result.error`: there was an error.\n This includes client-side validation errors.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_create_token"},"display_on_load":true},"stripe_create_source":{"title":"Create a Source","group_title":"Tokens and Sources","group_anchor":"tokens_sources","anchor":"stripe_create_source","section_anchor":"stripe_create_source","subsection_anchors":null,"path":"/tokens_sources/create_source","gate":false,"data":{"section_type":"method","title":"Create a Source","description":"Use `stripe.createSource` to convert payment information collected by elements into a [Source](/docs/api#sources) object that you safely pass to your server to use in an API call.\nSee the [Sources documentation](/docs/sources) for more information about sources.\n","signature":{"object_name":"stripe","method_name":"createSource","args":[{"name":"element","documentation":"The [Element](/docs/js/element) containing payment information.\nIf applicable, the `Element` pulls data from other elements you’ve created on the same [Elements](#elements_create) instance.\n","validation":"object","required":true},{"name":"sourceData","documentation":"A required object containing the `type` of `Source` you want to create, and any additional payment information that you have collected.\nSee the [Sources API](/docs/api#create_source) reference for details.\n","validation":"object","required":true}]},"table_content":{"items":[{"name":"element","documentation":"The [Element](/docs/js/element) containing payment information.\nIf applicable, the `Element` pulls data from other elements you’ve created on the same [Elements](#elements_create) instance.\n","validation":"object","required":true},{"name":"sourceData","documentation":"A required object containing the `type` of `Source` you want to create, and any additional payment information that you have collected.\nSee the [Sources API](/docs/api#create_source) reference for details.\n","validation":"object","required":true}]},"request":{"title":"Create a Source","snippets":{"js":"stripe\n .createSource(ibanElement, {\n type: 'sepa_debit',\n currency: 'eur',\n owner: {\n name: 'Jenny Rosen',\n },\n })\n .then(function(result) {\n // Handle result.error or result.source\n });\n","es_next":"const {source, error} = await stripe.createSource(\n ibanElement,\n {\n type: 'sepa_debit',\n currency: 'eur',\n owner: {\n name: 'Jenny Rosen',\n },\n },\n);\n"}},"returns":"This method returns a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.source`: a [Source](/docs/api#sources) was created successfully.\n* `result.error`: there was an error.\n This includes client-side validation errors.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_create_source"},"display_on_load":true},"stripe_create_source_data":{"title":"Create a Source from data","group_title":"Tokens and Sources","group_anchor":"tokens_sources","anchor":"stripe_create_source_data","section_anchor":"stripe_create_source_data","subsection_anchors":null,"path":"/tokens_sources/create_source_data","gate":false,"data":{"section_type":"method","title":"Create source","description":"Use `stripe.createSource` to convert raw payment information into a [Source](/docs/api#sources) object that you can safely pass to your server for use in an API call.\nSee the [Sources documentation](/docs/sources) for more information about sources.\n","callout":"You cannot pass raw card information to `stripe.createSource(sourceData)`.\nInstead, you must gather card information in an Element and use [`stripe.createSource(element, sourceData)`](#stripe_create_source).\nYou can also pass an existing card token to convert it into a `Source` object.\n","signature":{"object_name":"stripe","method_name":"createSource","args":[{"name":"sourceData","documentation":"A required object containing the `type` of `Source` you want to create, and any additional payment information that you have collected.\nSee the [Sources API](/docs/api#create_source) reference for details.\n","validation":"object","required":true}]},"table_content":{"items":[{"name":"sourceData","documentation":"A required object containing the `type` of `Source` you want to create, and any additional payment information that you have collected.\nSee the [Sources API](/docs/api#create_source) reference for details.\n","validation":"object","required":true}]},"request":{"title":"Create a Source","snippets":{"js":"stripe\n .createSource({\n type: 'ideal',\n amount: 1099,\n currency: 'eur',\n owner: {\n name: 'Jenny Rosen',\n },\n redirect: {\n return_url: 'https://shop.example.com/crtA6B28E1',\n },\n })\n .then(function(result) {\n // Handle result.error or result.source\n });\n","es_next":"const {source, error} = await stripe.createSource({\n type: 'ideal',\n amount: 1099,\n currency: 'eur',\n owner: {\n name: 'Jenny Rosen',\n },\n redirect: {\n return_url: 'https://shop.example.com/crtA6B28E1',\n },\n});\n"}},"returns":"This method returns a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.source`: a [Source](/docs/api#sources) was created successfully.\n* `result.error`: there was an error.\n This includes client-side validation errors.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_create_source_data"},"display_on_load":true},"stripe_retrieve_source":{"title":"Retrieve a Source","group_title":"Tokens and Sources","group_anchor":"tokens_sources","anchor":"stripe_retrieve_source","section_anchor":"stripe_retrieve_source","subsection_anchors":null,"path":"/tokens_sources/retrieve_source","gate":false,"data":{"section_type":"method","title":"Retrieve a Source","description":"Retrieve a [Source](/docs/api#sources) using its unique ID and client secret.\n","signature":{"object_name":"stripe","method_name":"retrieveSource","args":[{"name":"source","required":true,"validation":"object","documentation":"An object containing the unique ID and client secret for a `Source`.\n\nYou can use a `Source` object created with `stripe.createSource` as the argument to `stripe.retrieveSource`, as every `Source` object has both `id` and `client_secret` keys.\n","expanded":true,"subspec":[{"name":"id","required":true,"validation":"string","documentation":"Unique identifier of the `Source`.\n"},{"name":"client_secret","required":true,"validation":"string","documentation":"A secret available to the web client that created the `Source`, for purposes of retrieving the `Source` later from that same client.\n"}]}]},"table_content":{"items":[{"name":"source","required":true,"validation":"object","documentation":"An object containing the unique ID and client secret for a `Source`.\n\nYou can use a `Source` object created with `stripe.createSource` as the argument to `stripe.retrieveSource`, as every `Source` object has both `id` and `client_secret` keys.\n","expanded":true,"subspec":[{"name":"id","required":true,"validation":"string","documentation":"Unique identifier of the `Source`.\n"},{"name":"client_secret","required":true,"validation":"string","documentation":"A secret available to the web client that created the `Source`, for purposes of retrieving the `Source` later from that same client.\n"}]}]},"request":{"title":"Retrieve a Source","snippets":{"js":"stripe\n .retrieveSource({\n id: '{SOURCE_ID}',\n client_secret: '{SOURCE_CLIENT_SECRET}',\n })\n .then(function(result) {\n // Handle result.error or result.source\n });\n","es_next":"const {source, error} = await stripe.retrieveSource({\n id: '{{SOURCE_ID}}',\n client_secret: '{{SOURCE_CLIENT_SECRET}}',\n});\n"}},"returns":"This method returns a `Promise` which resolves with a result object.\nThis object has either:\n\n* `result.source`: a [Source](/docs/api#sources) was retrieved successfully.\n* `result.error`: there was an error.\n This includes client-side validation errors.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_retrieve_source"},"display_on_load":true},"stripe_verify_identity":{"title":"Show verification modal","group_title":"Identity","group_anchor":"identity","anchor":"stripe_verify_identity","section_anchor":"stripe_verify_identity","subsection_anchors":null,"path":"/identity/modal","gate":false,"data":{"section_type":"method","title":"Show verification modal","description":"Use `stripe.verifyIdentity` to display an [Identity](/docs/identity) modal that securely collects verification information.\n","signature":{"object_name":"stripe","method_name":"verifyIdentity","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/identity/verification_sessions/object#identity_verification_session_object-client_secret) of the `VerificationSession`.\n","validation":"string","required":true}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/identity/verification_sessions/object#identity_verification_session_object-client_secret) of the `VerificationSession`.\n","validation":"string","required":true}]},"request":{"title":"Show verification modal","snippets":{"js":"var stripe = Stripe('pk_test_VD0jz708gfrfx9oMbWDopyaS');\n\n// Call your backend to create the VerificationSession\nfetch('/create-verification-session', {\n method: 'POST',\n})\n.then(function(response) {\n return response.json();\n})\n.then(function(verificationSession) {\n return stripe.verifyIdentity(verificationSession.client_secret);\n})\n.then(function(result) {\n // If `verifyIdentity` fails due to a browser or network\n // error, you should display the localized error message to your\n // customer using `error.message`.\n if (result.error) {\n alert(result.error.message);\n }\n});\n","es_next":"const stripe = Stripe('pk_test_VD0jz708gfrfx9oMbWDopyaS');\n\n// Call your backend to create the VerificationSession\nconst response = await fetch('/create-verification-session', { method: 'POST' });\nconst verificationSession = await response.json();\n\n// When the user clicks on the button, open the Identity modal.\nconst {error} = await stripe.verifyIdentity(verificationSession.client_secret);\n\nif (error) {\n // If `verifyIdentity` fails due to a browser or network\n // error, display the localized error message to your customer\n // using `error.message`.\n}\n"}},"returns":"This method returns a `Promise` which resolves with a result object.\nIf this method fails, the result object will contain a localized error message in the `error.message` field.\n","section_tag":"stripe_verify_identity"},"display_on_load":true},"stripe_create_ephemeral_key_nonce":{"title":"Create an ephemeral key nonce","group_title":"Issuing","group_anchor":"issuing_elements","anchor":"stripe_create_ephemeral_key_nonce","section_anchor":"stripe_create_ephemeral_key_nonce","subsection_anchors":null,"path":"/issuing/create_ephemeral_key_nonce","gate":false,"data":{"section_type":"method","title":"Create an ephemeral key nonce","description":"Use `stripe.createEphemeralKeyNonce` in the [Issuing Elements](/docs/issuing/elements) flow to create an ephemeral key nonce. Refer to our [integration guide](/docs/issuing/elements#web-api-integration) for more details.\n","signature":{"object_name":"stripe","method_name":"createEphemeralKeyNonce","args":[{"name":"options","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"issuingCard","documentation":"The `id` of an existing [Issuing card](/docs/api/issuing/cards/object). The nonce returned by this method can only be used to retrieve this Issuing card.\n","validation":"string","required":true}],"required":true}]},"table_content":{"items":[{"name":"options","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"issuingCard","documentation":"The `id` of an existing [Issuing card](/docs/api/issuing/cards/object). The nonce returned by this method can only be used to retrieve this Issuing card.\n","validation":"string","required":true}],"required":true}]},"request":{"title":"Create ephemeral key nonce","snippets":{"js":"stripe\n .createEphemeralKeyNonce({\n issuingCard: 'ic_1ITi6XKYfU8ZP6raDAXem8ql'\n })\n .then(function(result) {\n // Handle result.error or result.nonce\n });\n"}},"returns":"`stripe.createEphemeralKeyNonce` will return a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.nonce`: the successful ephemeral key nonce.\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_create_ephemeral_key_nonce"},"display_on_load":true},"stripe_retrieve_issuing_card":{"title":"Retrieve an Issuing card","group_title":"Issuing","group_anchor":"issuing_elements","anchor":"stripe_retrieve_issuing_card","section_anchor":"stripe_retrieve_issuing_card","subsection_anchors":null,"path":"/issuing/retrieve_issuing_card","gate":false,"data":{"section_type":"method","title":"Retrieve an Issuing card","deprecated":true,"description":"Use `stripe.retrieveIssuingCard` in the [Issuing Elements](/docs/issuing/elements) flow to retrieve an Issuing card.\nNote that once you retrieve the card, you still need to display the card details in Elements.\nYou need to pass in the `issuing_elements_2` beta to the Stripe instance to access this method.\nRefer to our [integration guide](/docs/issuing/elements#web-api-integration) for more details.\n","signature":{"object_name":"stripe","method_name":"retrieveIssuingCard","args":[{"name":"issuingCard","documentation":"The `id` of an existing [Issuing card](/docs/api/issuing/cards/object).\n","validation":"string","required":true},{"name":"options","documentation":"An options object to configure the Issuing card retrieved from this method.\n","validation":"object","expanded":true,"subspec":[{"name":"ephemeralKeySecret","documentation":"The ephemeral key secret retrieved from the API.\nThe card `id` used to retrieve the ephemeral key must match the card `id` passed into this method.\nSee the [integration guide](/docs/issuing/elements#create-secure-endpoint) for more details.\n","validation":"string","required":true},{"name":"nonce","documentation":"The ephemeral key nonce returned by [stripe.createEphemeralKeyNonce](/docs/js/issuing/create_ephemeral_key_nonce).\nThe card `id` used to create the nonce must match the card `id` passed into this method.\n","validation":"string","required":true},{"name":"expand","documentation":"An array of Card fields to expand in the response from the Stripe API. Can be one or more of `number`, `cvc`, and `pin.number`. Expand fields as required to display Issuing Elements for those fields.\n","validation":"array","required":false}],"required":true}]},"table_content":{"items":[{"name":"issuingCard","documentation":"The `id` of an existing [Issuing card](/docs/api/issuing/cards/object).\n","validation":"string","required":true},{"name":"options","documentation":"An options object to configure the Issuing card retrieved from this method.\n","validation":"object","expanded":true,"subspec":[{"name":"ephemeralKeySecret","documentation":"The ephemeral key secret retrieved from the API.\nThe card `id` used to retrieve the ephemeral key must match the card `id` passed into this method.\nSee the [integration guide](/docs/issuing/elements#create-secure-endpoint) for more details.\n","validation":"string","required":true},{"name":"nonce","documentation":"The ephemeral key nonce returned by [stripe.createEphemeralKeyNonce](/docs/js/issuing/create_ephemeral_key_nonce).\nThe card `id` used to create the nonce must match the card `id` passed into this method.\n","validation":"string","required":true},{"name":"expand","documentation":"An array of Card fields to expand in the response from the Stripe API. Can be one or more of `number`, `cvc`, and `pin.number`. Expand fields as required to display Issuing Elements for those fields.\n","validation":"array","required":false}],"required":true}]},"request":{"title":"Retrieve an Issuing card","snippets":{"js":"stripe.retrieveIssuingCard(\n 'ic_1ITi6XKYfU8ZP6raDAXem8ql',\n {\n ephemeralKeySecret: 'ek_test_YWNjdF8xSVRpNkhLWWZVOFpQNnJhLGNYbEpnTEJXUUN4aWhsUHFwMXR1S2NsSDdnc3JTdWY_00GReOJAVP ',\n nonce: 'ephkn_pub_i4LvSOayGrKKHm6DYLOOKmzX',\n },\n).then(function(result) {\n // Handle result.error or result.issuingCard\n});\n"}},"returns":"`stripe.retrieveIssuingCard` will return a `Promise` which resolves with a `result` object.\nThis object has either:\n* `result.issuingCard`: the successful [Issuing card](/docs/api/issuing/cards/object).\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_retrieve_issuing_card"},"display_on_load":true},"financial_connections_intro":{"title":"Introduction","group_title":"Financial Connections","group_anchor":"financial_connections","anchor":"financial_connections_intro","section_anchor":"financial_connections_intro","subsection_anchors":null,"path":"/financial_connections","gate":false,"data":{"section_type":"generic","title":"Financial Connections","description":"[Stripe Financial Connections](/docs/financial-connections) enables your users to\nsecurely share their financial data by linking their external financial accounts to your\nbusiness.\n","section_tag":"financial_connections_intro"},"display_on_load":true},"financial_connections_collect_financial_connections_accounts":{"title":"Collect Financial Connections Accounts","group_title":"Financial Connections","group_anchor":"financial_connections","anchor":"financial_connections_collect_financial_connections_accounts","section_anchor":"financial_connections_collect_financial_connections_accounts","subsection_anchors":null,"path":"/financial_connections/collect_financial_connections_accounts","gate":false,"data":{"section_type":"method","title":"Collect Financial Connections Accounts","description":"Use `stripe.collectFinancialConnectionsAccounts` in the [Add a Financial Connections\nAccount to retrieve data](/docs/financial-connections/other-data-powered-products) flow.\nWhen called, it will load the [Authentication Flow](/docs/financial-connections/fundamentals#authentication-flow),\nan on-page modal UI which allows your user to securely link their external financial\naccount(s).\n","signature":{"object_name":"stripe","method_name":"collectFinancialConnectionsAccounts","args":[{"name":"options","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"clientSecret","documentation":"The `client_secret` of the [Financial Connections Session](/docs/api/financial_connections/session).\n","validation":"string","required":true}]}]},"table_content":{"items":[{"name":"options","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"clientSecret","documentation":"The `client_secret` of the [Financial Connections Session](/docs/api/financial_connections/session).\n","validation":"string","required":true}]}]},"request":{"title":"Collect Financial Connections Accounts","snippets":{"js":"stripe.collectFinancialConnectionsAccounts({\n clientSecret: '{FINANCIAL_CONNECTIONS_SESSION_CLIENT_SECRET}'\n})\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n\n // Handle next step based on length of accounts array\n } else if (result.financialConnectionsSession.accounts.length === 0) {\n console.log('No accounts were linked');\n } else {\n console.log(result.financialConnectionsSession.accounts)\n }\n });\n","es_next":"const result = await stripe.collectFinancialConnectionsAccounts({\n clientSecret: '{FINANCIAL_CONNECTIONS_SESSION_CLIENT_SECRET}'\n});\n\nif (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n\n// Handle next step based on length of accounts array\n} else if (result.financialConnectionsSession.accounts.length === 0) {\n console.log('No accounts were linked');\n} else {\n console.log(result.financialConnectionsSession.accounts)\n}\n"}},"returns":"`stripe.collectFinancialConnectionsAccounts` returns a `Promise` which resolves with a\n`result` object. The object has either:\n\n* `result.financialConnectionsSession`: the updated [Financial Connections Session](/docs/api/financial_connections/session)\nobject. The `accounts` property will contain the list of accounts collected during this\nsession. If the user chooses to link no accounts, or exits the Authentication Flow early,\nthe `accounts` array will be empty.\n* `result.error`: there was an error launching the Authentication Flow. For example, the\nFinancial Connections Session has expired, or the Financial Connections Session has\nalready been used.\n","section_tag":"financial_connections_collect_financial_connections_accounts"},"display_on_load":true},"financial_connections_collect_bank_account_token":{"title":"Use Financial Connections to collect a bank account Token for payouts","group_title":"Financial Connections","group_anchor":"financial_connections","anchor":"financial_connections_collect_bank_account_token","section_anchor":"financial_connections_collect_bank_account_token","subsection_anchors":null,"path":"/financial_connections/collect_bank_account_token","gate":false,"data":{"section_type":"method","title":"Use Financial Connections to collect a bank account Token for payouts","description":"Use `stripe.collectBankAccountToken` in the [Add a Financial Connections Account to a\nUS Custom Connect account](/docs/financial-connections/connect-payouts) flow. When\ncalled, it will load the [Authentication Flow](/docs/financial-connections/fundamentals#authentication-flow),\nan on-page modal UI which allows your user to securely link their external financial\naccount for payouts.\n","signature":{"object_name":"stripe","method_name":"collectBankAccountToken","args":[{"name":"options","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"clientSecret","documentation":"The `client_secret` of the [Financial Connections Session](/docs/api/financial_connections/session).\n","validation":"string","required":true}]}]},"table_content":{"items":[{"name":"options","documentation":"","validation":"object","required":true,"expanded":true,"subspec":[{"name":"clientSecret","documentation":"The `client_secret` of the [Financial Connections Session](/docs/api/financial_connections/session).\n","validation":"string","required":true}]}]},"request":{"title":"Use Financial Connections to collect a bank account Token for payouts","snippets":{"js":"stripe.collectBankAccountToken({\n clientSecret: '{FINANCIAL_CONNECTIONS_SESSION_CLIENT_SECRET}'\n})\n .then(function(result) {\n if (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n } else if (result.token) {\n // Use result.token to set your user's external payout account\n console.log(result.token)\n }\n });\n","es_next":"const result = await stripe.collectBankAccountToken({\n clientSecret: '{FINANCIAL_CONNECTIONS_SESSION_CLIENT_SECRET}'\n});\n\nif (result.error) {\n // Inform the customer that there was an error.\n console.log(result.error.message);\n} else if (result.token) {\n // Use result.token to set your user's external payout account\n console.log(result.token)\n}\n"}},"returns":"`stripe.collectBankAccountToken` returns a `Promise` which resolves with a `result`\nobject.\n\nIf an external financial account was successfully collected, the result object will\ncontain:\n\n* `result.token`: a bank account [Token](/docs/api/tokens).\n* `result.financialConnectionsSession`: the updated [Financial Connections Session](/docs/api/financial_connections/session)\nobject. The `accounts` array will contain a single Financial Connections Account\n(representing the same external financial account used for `result.token`).\n\nIf there was an error launching the Authentication Flow, the result object will contain:\n\n* `result.error`: there was an error launching the Authentication Flow. For example, the\nFinancial Connections Session has expired, or the Financial Connections Session has\nalready been used.\n\nIf the user chooses to link no accounts, or exits the Authentication Flow early, the\nresult object will contain:\n\n* `result.financialConnectionsSession`: the updated [Financial Connections Session](/docs/api/financial_connections/session)\nobject. The `accounts` array will be empty.\n","section_tag":"financial_connections_collect_bank_account_token"},"display_on_load":true},"css_font_source_object":{"title":"CssFontSource object","group_title":"Appendix","group_anchor":"appendix","anchor":"css_font_source_object","section_anchor":"css_font_source_object","subsection_anchors":null,"path":"/appendix/css_font_source_object","gate":false,"data":{"section_type":"object","title":"The CssFontSource object","description":"This object is used to pass custom fonts via a stylesheet URL when creating an [Elements](/docs/js/elements_object/create) object.\n","object_name":"CssFontSource","table_content":{"items":[{"name":"cssSrc","documentation":"A relative or absolute URL pointing to a CSS file with [@font-face](https://developer.mozilla.org/en/docs/Web/CSS/@font-face) definitions, for example:\n\n```\nhttps://fonts.googleapis.com/css?family=Open+Sans\n```\n\nNote that if you are using a [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) (CSP), [additional directives](https://stripe.com/docs/security/guide#content-security-policy) may be necessary.\n","validation":"string"}]},"response":{"title":"Example CssFontSource object","snippets":{"success":"{\n cssSrc: 'https://fonts.googleapis.com/css?family=Open+Sans'\n}\n"}},"section_tag":"css_font_source_object"},"display_on_load":true},"custom_font_source_object":{"title":"CustomFontSource object","group_title":"Appendix","group_anchor":"appendix","anchor":"custom_font_source_object","section_anchor":"custom_font_source_object","subsection_anchors":null,"path":"/appendix/custom_font_source_object","gate":false,"data":{"section_type":"object","title":"The CustomFontSource object","description":"This object is used to pass custom fonts when creating an [Elements](/docs/js/elements_object/create) object.\n","object_name":"CustomFontSource","table_content":{"items":[{"name":"family","documentation":"The name to give the font.\n","validation":"string","required":true},{"name":"src","documentation":"A valid [src](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src) value pointing to your custom font file.\nThis is usually (though not always) a link to a file with a `.woff` , `.otf`, or `.svg` suffix.\n","validation":"string","required":true},{"name":"display","documentation":"A valid [font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display) value.\n","validation":"string","required":false},{"name":"style","documentation":"One of `normal`, `italic`, `oblique`.\nDefaults to `normal`.\n","validation":"string","required":false},{"name":"unicodeRange","documentation":"A valid [unicode-range](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range) value.\n","validation":"string","required":false},{"name":"weight","documentation":"A valid [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight).\nNote that this is a string, not a number.\n","validation":"string","required":false}]},"response":{"title":"Example CustomFontSource object","snippets":{"success":"{\n family: 'Avenir',\n src: 'url(https://my-domain.com/assets/avenir.woff)',\n weight: '500',\n}\n"}},"section_tag":"custom_font_source_object"},"display_on_load":true},"contact_object":{"title":"Contact object","group_title":"Appendix","group_anchor":"appendix","anchor":"contact_object","section_anchor":"contact_object","subsection_anchors":null,"path":"/appendix/contact_object","gate":false,"data":{"section_type":"object","title":"The Contact object","description":"The `Contact` object describes a saved contact passed in to the [Address Element](/docs/js/element/address_element).\n","object_name":"Contact","table_content":{"items":[{"name":"name","validation":"string","documentation":"The name of the contact.\nThis might be a person, or a business name.\n"},{"name":"address","validation":"object","documentation":"The address of the contact.\n","expanded":true,"subspec":[{"name":"line1","validation":"string","required":true},{"name":"line2","validation":"string"},{"name":"city","validation":"string","required":true,"documentation":"The name of a city, town, village, etc.\n"},{"name":"state","validation":"string","required":true,"documentation":"The most coarse subdivision of a country.\nDepending on the country, this might correspond to a state, a province, an oblast, a prefecture, or something else along these lines.\n"},{"name":"postal_code","validation":"string","required":true,"documentation":"The postal code or ZIP code, also known as PIN code in India.\n"},{"name":"country","validation":"string","required":true,"documentation":"Two-letter country code, capitalized. Valid two-letter country codes are specified by ISO3166 alpha-2.\n"}]},{"name":"phone","validation":"string","documentation":"The phone number of the contact.\n\nThe [fields.phone](/docs/js/elements_object/create_address_element#address_element_create-options-fields-phone) option must be set to `always` if this property is specified.\n"}]},"response":{"title":"Example Contact object","snippets":{"success":"{\n name: 'Jenny Rosen',\n address: {\n line1: '185 Berry St.',\n city: 'San Francisco',\n state: 'CA',\n postal_code: '94941',\n country: 'US',\n },\n}\n"}},"section_tag":"contact_object"},"display_on_load":true},"payment_item_object":{"title":"PaymentItem object","group_title":"Appendix","group_anchor":"appendix","anchor":"payment_item_object","section_anchor":"payment_item_object","subsection_anchors":null,"path":"/appendix/payment_item_object","gate":false,"data":{"section_type":"object","title":"The PaymentItem object","description":"The `PaymentItem` object is used to configure a [PaymentRequest](/docs/js/payment_request/create).\n","object_name":"PaymentItem","table_content":{"items":[{"name":"amount","documentation":"The amount in the currency's subunit (e.g. cents, yen, etc.)\n","validation":"number","required":true},{"name":"label","documentation":"A name that the browser shows the customer in the payment interface.\n","validation":"string","required":true},{"name":"pending","documentation":"If you might change this amount later (for example, after you have calcluated shipping costs), set this to `true`.\nNote that browsers treat this as a hint for how to display things, and not necessarily as something that will prevent submission.\n","validation":"boolean","required":false}]},"response":{"title":"Example PaymentItem object","snippets":{"success":"{\n amount: 2000,\n label: 'A soft cotton shirt',\n}\n"}},"section_tag":"payment_item_object"},"display_on_load":true},"payment_response_object":{"title":"PaymentResponse object","group_title":"Appendix","group_anchor":"appendix","anchor":"payment_response_object","section_anchor":"payment_response_object","subsection_anchors":null,"path":"/appendix/payment_response","gate":false,"data":{"section_type":"object","title":"The PaymentResponse object","description":"This object is returned as the payload of the `PaymentRequest` object's [`token`](/docs/js/payment_request/events/on_token), [`paymentmethod`](/docs/js/payment_request/events/on_payment_method), or [`source`](/docs/js/payment_request/events/on_source) event handlers.\n","object_name":"PaymentResponse","table_content":{"items":[{"name":"token","documentation":"A [Token](/docs/api/tokens) object.\nPresent if this was the result of a `token` event listener.\n","validation":"object"},{"name":"paymentMethod","documentation":"A [PaymentMethod](/docs/api/payment_methods) object.\nPresent if this was the result of a `paymentmethod` event listener.\n","validation":"object"},{"name":"source","documentation":"A [Source](/docs/api/sources) object.\nPresent if this was the result of a `source` event listener.\n","validation":"object"},{"name":"complete","documentation":"`complete(status) =\u003E void` is a Stripe.js provided function.\nCall this when you have processed the token data provided by the API.\nNote that you must must call `complete` within 30 seconds.\n\nAccepts one of the following values:\n","validation":"function","expanded":true,"subspec_title":"allowed status values","subspec":[{"name":"success","display_name":"'success'","documentation":"Report to the browser that the payment was successful, and that it can close any active payment interface.\n","validation":"value"},{"name":"fail","display_name":"'fail'","documentation":"Report to the browser that you were unable to process the customer‘s payment.\nBrowsers may re-show the payment interface, or simply show a message and close.\n","validation":"value"},{"name":"invalid_payer_name","display_name":"'invalid_payer_name'","documentation":"Equivalent to `fail`, except that the browser can choose to show a more-specific error message.\n","validation":"value"},{"name":"invalid_payer_phone","display_name":"'invalid_payer_phone'","documentation":"Equivalent to `fail`, except that the browser can choose to show a more-specific error message.\n","validation":"value"},{"name":"invalid_payer_email","display_name":"'invalid_payer_email'","documentation":"Equivalent to `fail`, except that the browser can choose to show a more-specific error message.\n","validation":"value"},{"name":"invalid_shipping_address","display_name":"'invalid_shipping_address'","documentation":"Equivalent to `fail`, except that the browser can choose to show a more-specific error message.\n","validation":"value"}]},{"name":"payerName","documentation":"The customer's name.\nOnly present if it was explicitly [asked for](#payment_request_create-options-requestPayerName) when [creating the PaymentRequest object](/docs/js/payment_request/create).\n","validation":"string"},{"name":"payerEmail","documentation":"The customer's email.\nOnly present if it was explicitly [asked for](#payment_request_create-options-requestPayerEmail) when [creating the PaymentRequest object](/docs/js/payment_request/create).\n","validation":"string"},{"name":"payerPhone","documentation":"The customer's phone.\nOnly present if it was explicitly [asked for](#payment_request_create-options-requestPayerPhone) when [creating the PaymentRequest object](/docs/js/payment_request/create).\n","validation":"string"},{"name":"shippingAddress","documentation":"The final [ShippingAddress](/docs/js/appendix/shipping_address) the customer selected.\n\nOnly populated when `requestShipping` is `true` when [creating the PaymentRequest object](/docs/js/payment_request/create), and you've supplied at least one `ShippingOption`.\n","validation":"ShippingAddress"},{"name":"shippingOption","documentation":"The final [ShippingOption](/docs/js/appendix/shipping_option) the customer selected.\n\nOnly present when `requestShipping` is `true` when [creating the PaymentRequest object](/docs/js/payment_request/create), and you've supplied at least one `ShippingOption`.\n","validation":"ShippingOption"},{"name":"walletName","documentation":"The unique name of the wallet the customer chose to authorize payment.\nFor example, `browserCard`.\n","validation":"string"}]},"response":{"title":"Example PaymentResponse object","snippets":{"success":"{\n source: {\n id: \"src_1FlM3yDbZnUGiCm0P8eqjAuI\",\n object: \"source\",\n // ...\n }\n complete: function(status) {\n // Call this when you have processed the source data provided\n // by the API. Note that you must must call complete within 30\n // seconds.\n },\n payerName: 'Jenny Rosen',\n payerEmail: '[email protected]',\n walletName: 'browserCard',\n shippingOption: {\n id: 'basic',\n label: 'Ground shipping',\n detail: 'Ground shipping via UPS or FedEx',\n amount: 995,\n }\n}\n"}},"section_tag":"payment_response_object"},"display_on_load":true},"shipping_option_object":{"title":"ShippingOption object","group_title":"Appendix","group_anchor":"appendix","anchor":"shipping_option_object","section_anchor":"shipping_option_object","subsection_anchors":null,"path":"/appendix/shipping_option","gate":false,"data":{"section_type":"object","title":"The ShippingOption object","description":"The `ShippingOption` object describes a shipping method used with a [PaymentRequest](/docs/js/payment_request/create).\n","object_name":"ShippingOption","table_content":{"items":[{"name":"id","validation":"string","documentation":"A unique ID you create to keep track of this shipping option.\nYou’ll be told the ID of the selected option on changes and on completion.\n"},{"name":"label","documentation":"A short label for this shipping option.\n","validation":"string"},{"name":"detail","documentation":"A longer description of this shipping option.\n","validation":"string"},{"name":"amount","documentation":"The amount to show for this shipping option.\nIf the cost of this shipping option depends on the shipping address the customer enters, listen for the `shippingaddresschange` event.\n","validation":"number"}]},"response":{"title":"Example ShippingOption object","snippets":{"success":"{\n id: 'basic',\n label: 'Ground shipping',\n detail: 'Ground shipping via UPS or FedEx',\n amount: 995,\n}\n"}},"section_tag":"shipping_option_object"},"display_on_load":true},"shipping_address_object":{"title":"ShippingAddress object","group_title":"Appendix","group_anchor":"appendix","anchor":"shipping_address_object","section_anchor":"shipping_address_object","subsection_anchors":null,"path":"/appendix/shipping_address","gate":false,"data":{"section_type":"object","title":"The ShippingAddress object","description":"The `ShippingAddress` object describes a shipping address collected with a [PaymentRequest](/docs/js/payment_request/create).\n","object_name":"ShippingAddress","table_content":{"items":[{"name":"country","validation":"string","documentation":"Two-letter country code, capitalized. Valid two-letter country codes are specified by ISO3166 alpha-2.\n"},{"name":"addressLine","validation":"array","documentation":"An array of address line items.\nFor example, `185 Berry St.`, `Suite 500`, `P.O. Box 12345`, etc.\n"},{"name":"region","validation":"string","documentation":"The most coarse subdivision of a country.\nDepending on the country, this might correspond to a state, a province, an oblast, a prefecture, or something else along these lines.\n"},{"name":"city","validation":"string","documentation":"The name of a city, town, village, etc.\n"},{"name":"postalCode","validation":"string","documentation":"The postal code or ZIP code, also known as PIN code in India.\n"},{"name":"recipient","validation":"string","documentation":"The name of the recipient.\nThis might be a person, a business name, or contain “care of” (c/o) instructions.\n"},{"name":"phone","validation":"string","documentation":"The phone number of the recipient.\nNote that this might be different from any phone number you collect with [`requestPayerPhone`](#payment_request_create-options-requestPayerPhone).\n"},{"name":"sortingCode","validation":"string","documentation":"The sorting code as used in, for example, France.\nNot present on Apple platforms.\n"},{"name":"dependentLocality","validation":"string","documentation":"A logical subdivision of a city.\nCan be used for things like neighborhoods, boroughs, districts, or UK dependent localities. Not present on Apple platforms.\n"}]},"response":{"title":"Example ShippingAddress object","snippets":{"success":"{\n recipient: 'Jenny Rosen',\n addressLine: ['185 Berry St.'],\n city: 'San Francisco',\n region: 'CA',\n postalCode: '94941',\n country: 'US',\n}\n"}},"section_tag":"shipping_address_object"},"display_on_load":true},"style_object":{"title":"Style object","group_title":"Appendix","group_anchor":"appendix","anchor":"style_object","section_anchor":"style_object","subsection_anchors":null,"path":"/appendix/style","gate":false,"data":{"section_type":"object","title":"The Style object","description":"Elements are styled using a `Style` object, which consists of CSS properties nested under objects for any of the following variants:\n\n* `base`, base variant—all other variants inherit from these styles\n* `complete`, applied when the Element has valid input\n* `empty`, applied when the Element has no customer input\n* `invalid`, applied when the Element has invalid input\n\nThe following pseudo-classes and pseudo-elements can also be styled using a nested object inside of a variant:\n\n* `:hover`\n* `:focus`\n* `::placeholder`\n* `::selection`\n* `:-webkit-autofill`\n* `:disabled`, available for all Elements except the `paymentRequestButton` Element.\n* `::-ms-clear`, available for the `cardNumber`, `cardExpiry`, and `cardCvc` Elements.\n Inside the `::-ms-clear` selector, the display property can be customized.\n\nThe following CSS properties are supported:\n","object_name":"Style","table_content":{"title":"Supported CSS properties","items":[{"name":"backgroundColor","validation":"string","documentation":"The [background-color](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color) CSS property.\n\nThis property works best with the `::selection` pseudo-class.\nIn other cases, consider setting the background color on the Element's container instead.\n"},{"name":"color","validation":"string","documentation":"The [color](https://developer.mozilla.org/en-US/docs/Web/CSS/color) CSS property.\n"},{"name":"fontFamily","validation":"string","documentation":"The [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) CSS property.\n"},{"name":"fontSize","validation":"string","documentation":"The [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) CSS property.\n"},{"name":"fontSmoothing","validation":"string","documentation":"The [font-smoothing](https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth) CSS property.\n"},{"name":"fontStyle","validation":"string","documentation":"The [font-style](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style) CSS property.\n"},{"name":"fontVariant","validation":"string","documentation":"The [font-variant](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant) CSS property.\n"},{"name":"fontWeight","validation":"string","documentation":"The [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) CSS property.\n"},{"name":"iconColor","validation":"string","documentation":"A custom property, used to set the color of the icons that are rendered in an Element.\n"},{"name":"lineHeight","validation":"string","documentation":"The [line-height](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height) CSS property.\n\nTo avoid cursors being rendered inconsistently across browsers, consider using a padding on the Element's container instead.\n"},{"name":"letterSpacing","validation":"string","documentation":"The [letter-spacing](https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing) CSS property.\n"},{"name":"textAlign","validation":"string","documentation":"The [text-align](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align) CSS property.\n\nAvailable for the `cardNumber`, `cardExpiry`, `cardCvc` and `iban` Elements.\n"},{"name":"padding","validation":"string","documentation":"The [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) CSS property.\n\nAvailable for the `idealBank` Element.\nAccepts integer length with `px` unit as values.\n"},{"name":"textDecoration","validation":"string","documentation":"The [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) CSS property.\n"},{"name":"textShadow","validation":"string","documentation":"The [text-shadow](https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow) CSS property.\n"},{"name":"textTransform","validation":"string","documentation":"The [text-transform](https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform) CSS property.\n"}]},"request":{"title":"Creating a styled element","snippets":{"js":"var element = elements.create('card', {\n style: {\n base: {\n iconColor: '#c4f0ff',\n color: '#fff',\n fontWeight: '500',\n fontFamily: 'Roboto, Open Sans, Segoe UI, sans-serif',\n fontSize: '16px',\n fontSmoothing: 'antialiased',\n ':-webkit-autofill': {\n color: '#fce883',\n },\n '::placeholder': {\n color: '#87BBFD',\n },\n },\n invalid: {\n iconColor: '#FFC7EE',\n color: '#FFC7EE',\n },\n },\n});\n","es_next":"const element = elements.create('card', {\n style: {\n base: {\n iconColor: '#c4f0ff',\n color: '#fff',\n fontWeight: '500',\n fontFamily: 'Roboto, Open Sans, Segoe UI, sans-serif',\n fontSize: '16px',\n fontSmoothing: 'antialiased',\n ':-webkit-autofill': {\n color: '#fce883',\n },\n '::placeholder': {\n color: '#87BBFD',\n },\n },\n invalid: {\n iconColor: '#FFC7EE',\n color: '#FFC7EE',\n },\n },\n});\n"}},"section_tag":"style_object"},"display_on_load":true},"update_details_object":{"title":"UpdateDetails object","group_title":"Appendix","group_anchor":"appendix","anchor":"update_details_object","section_anchor":"update_details_object","subsection_anchors":null,"path":"/appendix/update_details","gate":false,"data":{"section_type":"object","title":"The UpdateDetails object\n","description":"This object is passed to the `updateWith` callback on a [PaymentRequest's](/docs/js/payment_request/create) `shippingaddresschange` and `shippingoptionchange` events.\n","object_name":"UpdateDetails","table_content":{"items":[{"name":"status","documentation":"The browser uses this value to show an error message to the customer if they‘ve taken an action that invalidates the payment request.\nThe value must be one of the following:\n","validation":"string","expanded":true,"subspec_title":"allowed values","subspec":[{"name":"success","display_name":"'success'","documentation":"Let the customer proceed.\n","validation":"value"},{"name":"fail","display_name":"'fail'","documentation":"Prevent the customer from making the change they just made.\n","validation":"value"},{"name":"invalid_shipping_address","display_name":"'invalid_shipping_address'","documentation":"Equivalent to `fail`, except we show a more specific error message.\nCan only be used in a [`shippingaddresschange`](/docs/js/payment_request/events/on_shipping_address_change) handler.\n","validation":"value"}]},{"name":"total","required":false,"validation":"PaymentItem","documentation":"The new total amount, if applicable, as a [PaymentItem](#payment_item_object) object.\n"},{"name":"displayItems","required":false,"validation":"array","documentation":"An array of [PaymentItem](#payment_item_object) objects.\nThese PaymentItems are shown as line items in the browser‘s payment interface.\nNote that the sum of the line item amounts does not need to add up to the total amount above.\n"},{"name":"shippingOptions","required":false,"validation":"array","documentation":"An array of [ShippingOption](/docs/js/appendix/shipping_option) objects.\nThe first shipping option listed appears in the browser payment interface as the default option.\n"}]},"response":{"title":"Example UpdateDetails object","snippets":{"success":"{\n status: 'success',\n total: {\n amount: 15000,\n label: 'A soft cotton shirt',\n },\n}\n"}},"section_tag":"update_details_object"},"display_on_load":true},"supported_browsers":{"title":"Supported browsers","group_title":"Appendix","group_anchor":"appendix","anchor":"supported_browsers","section_anchor":"supported_browsers","subsection_anchors":null,"path":"/appendix/supported_browsers","gate":false,"data":{"section_type":"generic","title":"Supported browsers\n","description":"Stripe.js strives to support all recent versions of major browsers. For the sake of security and providing the best experience to the majority of customers, we do not support browsers that are no longer receiving security updates and represent a small minority of traffic. We support some older versions of evergreen browsers but recommend merchants keep their systems up to date for the best support.\nWe support the following desktop browser versions:\n\n* Chrome 38+\n* Safari 10.1+\n* Firefox 29+\n* Edge 15+\n* Opera 25+\n\nWe support the following mobile browsers:\n* iOS Safari 9+ and other browsers and web views which use the system-provided WebKit engine\n* Android Chrome 38+\n* Samsung Browser 7.1+\n\nFor browsers not explicitly supported, we limit support as follows:\n* We require TLS 1.2 to be supported by the browser.\n* We require browsers that are sufficiently modern enough that they support [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) and [fetch](https://developer.mozilla.org/en-US/docs/Web/API/fetch) in the JavaScript programming language.\n* We respond to bug reports but do not proactively test other browsers.\n\nIf you have an issue with Stripe.js on a specific browser, please [contact us](https://support.stripe.com/contact) so we can improve its support.\n","section_tag":"supported_browsers"},"display_on_load":true},"supported_locales":{"title":"Supported locales","group_title":"Appendix","group_anchor":"appendix","anchor":"supported_locales","section_anchor":"supported_locales","subsection_anchors":null,"path":"/appendix/supported_locales","gate":false,"data":{"section_type":"generic","title":"Supported locales","description":"The following subset of [IETF language tags](https://en.wikipedia.org/wiki/IETF_language_tag) can be used to configure localization in Stripe.js.\n\nNote that Checkout supports a slightly different set of locales than Stripe.js.\nIf you are using Checkout with [`stripe.redirectToCheckout`](#stripe_redirect_to_checkout), make sure to use a locale that Checkout supports.\n\nValue | Locale | Elements | Checkout\n--------|------------------------------------------|----------|----------\n`auto` | Stripe detects the locale of the browser | ✔ | ✔\n`ar` | Arabic | ✔ |\n`bg` | Bulgarian (Bulgaria) | ✔ | ✔\n`cs` | Czech (Czech Republic) | ✔ | ✔\n`da` | Danish (Denmark) | ✔ | ✔\n`de` | German (Germany) | ✔ | ✔\n`el` | Greek (Greece) | ✔ | ✔\n`en` | English | ✔ | ✔\n`en-GB` | English (United Kingdom) | ✔ | ✔\n`es` | Spanish (Spain) | ✔ | ✔\n`es-419`| Spanish (Latin America) | ✔ | ✔\n`et` | Estonian (Estonia) | ✔ | ✔\n`fi` | Finnish (Finland) | ✔ | ✔\n`fil` | Filipino (Philipines) | ✔ | ✔\n`fr` | French (France) | ✔ | ✔\n`fr-CA` | French (Canada) | ✔ | ✔\n`he` | Hebrew (Israel) | ✔ |\n`hr` | Croatian (Croatia) | ✔ | ✔\n`hu` | Hungarian (Hungary) | ✔ | ✔\n`id` | Indonesian (Indonesia) | ✔ | ✔\n`it` | Italian (Italy) | ✔ | ✔\n`ja` | Japanese (Japan) | ✔ | ✔\n`ko` | Korean (Korea) | ✔ | ✔\n`lt` | Lithuanian (Lithuania) | ✔ | ✔\n`lv` | Latvian (Latvia) | ✔ | ✔\n`ms` | Malay (Malaysia) | ✔ | ✔\n`mt` | Maltese (Malta) | ✔ | ✔\n`nb` | Norwegian Bokmål | ✔ | ✔\n`nl` | Dutch (Netherlands) | ✔ | ✔\n`pl` | Polish (Poland) | ✔ | ✔\n`pt-BR` | Portuguese (Brazil) | ✔ | ✔\n`pt` | Portuguese (Brazil) | ✔ | ✔\n`ro` | Romanian (Romania) | ✔ | ✔\n`ru` | Russian (Russia) | ✔ | ✔\n`sk` | Slovak (Slovakia) | ✔ | ✔\n`sl` | Slovenian (Slovenia) | ✔ | ✔\n`sv` | Swedish (Sweden) | ✔ | ✔\n`th` | Thai (Thailand) | ✔ | ✔\n`tr` | Turkish (Turkey) | ✔ | ✔\n`vi` | Vietnamese (Vietnam) | ✔ | ✔\n`zh` | Chinese Simplified (China) | ✔ | ✔\n`zh-HK` | Chinese Traditional (Hong Kong) | ✔ | ✔\n`zh-TW` | Chinese Traditional (Taiwan) | ✔ | ✔\n","request":{"title":"Create a Stripe instance with a locale","snippets":{"js":"var stripe = Stripe('pk_test_VD0jz708gfrfx9oMbWDopyaS', {\n locale: 'fr'\n});\n","es_next":"const stripe = Stripe('pk_test_VD0jz708gfrfx9oMbWDopyaS', {\n locale: 'fr'\n});\n"}},"section_tag":"supported_locales"},"display_on_load":true},"cookies":{"title":"Cookies","group_title":"Appendix","group_anchor":"appendix","anchor":"cookies","section_anchor":"cookies","subsection_anchors":null,"path":"/appendix/cookies","gate":false,"data":{"section_type":"generic","title":"Cookies\n","description":"Stripe uses cookies to ensure that the site works properly, detect and prevent fraud,\nand understand how people interact with Stripe. There are some cookies that are essential\nfor Stripe to function properly. These Necessary Cookies provide secure access to the site\nand enable page navigation. Other categories of cookies include Advertising Cookies,\nAnalytics Cookies, and Preference Cookies.\n\nYou can find more information in the [Stripe Cookies Policy](/cookies-policy/legal),\nincluding how to opt-out or manage your cookie preferences.\n\n","section_tag":"cookies"},"display_on_load":true},"viewport_meta_requirements":{"title":"Viewport meta tag requirements","group_title":"Appendix","group_anchor":"appendix","anchor":"viewport_meta_requirements","section_anchor":"viewport_meta_requirements","subsection_anchors":null,"path":"/appendix/viewport_meta_requirements","gate":false,"data":{"section_type":"generic","title":"Viewport meta tag requirements","response":{"title":"Example viewport meta tag","snippets":{"success":"\u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\" /\u003E\n"}},"description":"In order to provide a great user experience for 3D Secure on all devices,\nyou should set your page's viewport `width` to `device-width` with the\n[viewport meta tag](https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag).\n\nThere are several other viewport settings, and you can configure those\nbased on your needs. Just make sure you include `width=device-width`\nsomewhere in your configuration.\n","section_tag":"viewport_meta_requirements"},"display_on_load":true},"stripe_checkout_redirect_to_checkout":{"title":"Redirect to Checkout","group_title":"Deprecated","group_anchor":"deprecated","anchor":"stripe_checkout_redirect_to_checkout","section_anchor":"stripe_checkout_redirect_to_checkout","subsection_anchors":null,"path":"/deprecated/redirect_to_checkout","gate":false,"data":{"deprecated":true,"section_type":"method","title":"Redirect to Checkout","description":"Use `stripe.redirectToCheckout` to redirect your customers to [Checkout](/docs/payments/checkout), a Stripe-hosted page to securely collect payment information.\nWhen the customer completes their purchase, they are redirected back to your website.\n","callout":"If you are currently on a beta of the new version of Checkout, read the [Beta Migration Guide](/docs/payments/checkout/migration-from-beta) to upgrade to the latest version.\n","signature":{"object_name":"stripe","method_name":"redirectToCheckout","args":[{"name":"options","documentation":"","validation":"object","required":false,"expanded":true,"subspec":[{"name":"sessionId","documentation":"The ID of the [Checkout Session](/docs/api/checkout/sessions) that is used in [Checkout's client and server integration](/docs/payments/accept-a-payment?integration=checkout).\n","validation":"string","required":false},{"name":"lineItems","documentation":"An array of objects representing the items that your customer would like to purchase.\nThese items are shown as line items in the Checkout interface and make up the total amount to be collected by Checkout.\nUsed with the [client-only](/docs/payments/checkout/client) integration.\n","validation":"array","required":false,"subspec":[{"name":"price","documentation":"The ID of the price that the customer would like to purchase or subscribe to. May also be a SKU or plan.\n","validation":"string","required":true},{"name":"quantity","validation":"integer","documentation":"The quantity of units for the item.\n","required":true}]},{"name":"mode","documentation":"The mode of the Checkout Session, one of `payment` or `subscription`. Required if\nusing `lineItems` with the [client-only](/docs/payments/checkout/client) integration.\n","validation":"string","required":false},{"name":"successUrl","documentation":"The URL to which Stripe should send customers when payment is complete.\nIf you’d like access to the Checkout Session for the successful payment, read more about it in the guide on [fulfilling orders](/docs/payments/checkout/fulfill-orders).\nRequired if using the [client-only](/docs/payments/checkout/client) integration.\n","validation":"string","required":false},{"name":"cancelUrl","documentation":"The URL to which Stripe should send customers when payment is canceled.\nRequired if using the [client-only](/docs/payments/checkout/client) integration.\n","validation":"string","required":false},{"name":"clientReferenceId","documentation":"A unique string to reference the Checkout session.\nThis can be a customer ID, a cart ID, or similar.\nIt is included in the `checkout.session.completed` webhook and can be used to fulfill the purchase.\n","validation":"string","required":false},{"name":"customerEmail","documentation":"The email address used to create the customer object.\nIf you already know your customer's email address, use this attribute to prefill it on Checkout.\n","validation":"string","required":false},{"name":"billingAddressCollection","documentation":"Specify whether Checkout should collect the customer’s billing address.\nIf set to `required`, Checkout will attempt to collect the customer’s billing address.\nIf not set or set to `auto` Checkout will only attempt to collect the billing address when necessary.\n","validation":"string","required":false},{"name":"shippingAddressCollection","documentation":"When set, provides configuration for Checkout to collect a shipping address from a customer.\n","validation":"object","required":false,"subspec":[{"name":"allowedCountries","documentation":"An array of [two-letter ISO country codes](https://www.iban.com/country-codes) representing\nwhich countries Checkout should provide as options for shipping locations.\nUnsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.\n","validation":"array","required":true}]},{"name":"locale","documentation":"A [locale](#supported_locales) that will be used to localize the display of Checkout.\nDefault is `auto` (Stripe detects the locale of the browser).\n","validation":"string","required":false},{"name":"submitType","documentation":"Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the **Submit** button.\n`submitType` can only be specified when using using line items or SKUs, and not subscriptions.\nThe default is `auto`. Supported values are: `auto`, `book`, `donate`, `pay`.\n","validation":"string","required":false},{"name":"items","documentation":"An array of objects representing the items that your customer would like to purchase.\nThese items are shown as line items in the Checkout interface and make up the total amount to be collected by Checkout.\nUsing `lineItems` is preferred.\n","validation":"array","required":false,"subspec":[{"name":"sku, plan","documentation":"The ID of the SKU that the customer would like to purchase, or the ID of the plan or recurring price that the customer would like to subscribe to.\n","validation":"string","required":false},{"name":"quantity","validation":"integer","documentation":"The quantity of units for the item.\n","required":false}]}]}]},"table_content":{"items":[{"name":"options","documentation":"","validation":"object","required":false,"expanded":true,"subspec":[{"name":"sessionId","documentation":"The ID of the [Checkout Session](/docs/api/checkout/sessions) that is used in [Checkout's client and server integration](/docs/payments/accept-a-payment?integration=checkout).\n","validation":"string","required":false},{"name":"lineItems","documentation":"An array of objects representing the items that your customer would like to purchase.\nThese items are shown as line items in the Checkout interface and make up the total amount to be collected by Checkout.\nUsed with the [client-only](/docs/payments/checkout/client) integration.\n","validation":"array","required":false,"subspec":[{"name":"price","documentation":"The ID of the price that the customer would like to purchase or subscribe to. May also be a SKU or plan.\n","validation":"string","required":true},{"name":"quantity","validation":"integer","documentation":"The quantity of units for the item.\n","required":true}]},{"name":"mode","documentation":"The mode of the Checkout Session, one of `payment` or `subscription`. Required if\nusing `lineItems` with the [client-only](/docs/payments/checkout/client) integration.\n","validation":"string","required":false},{"name":"successUrl","documentation":"The URL to which Stripe should send customers when payment is complete.\nIf you’d like access to the Checkout Session for the successful payment, read more about it in the guide on [fulfilling orders](/docs/payments/checkout/fulfill-orders).\nRequired if using the [client-only](/docs/payments/checkout/client) integration.\n","validation":"string","required":false},{"name":"cancelUrl","documentation":"The URL to which Stripe should send customers when payment is canceled.\nRequired if using the [client-only](/docs/payments/checkout/client) integration.\n","validation":"string","required":false},{"name":"clientReferenceId","documentation":"A unique string to reference the Checkout session.\nThis can be a customer ID, a cart ID, or similar.\nIt is included in the `checkout.session.completed` webhook and can be used to fulfill the purchase.\n","validation":"string","required":false},{"name":"customerEmail","documentation":"The email address used to create the customer object.\nIf you already know your customer's email address, use this attribute to prefill it on Checkout.\n","validation":"string","required":false},{"name":"billingAddressCollection","documentation":"Specify whether Checkout should collect the customer’s billing address.\nIf set to `required`, Checkout will attempt to collect the customer’s billing address.\nIf not set or set to `auto` Checkout will only attempt to collect the billing address when necessary.\n","validation":"string","required":false},{"name":"shippingAddressCollection","documentation":"When set, provides configuration for Checkout to collect a shipping address from a customer.\n","validation":"object","required":false,"subspec":[{"name":"allowedCountries","documentation":"An array of [two-letter ISO country codes](https://www.iban.com/country-codes) representing\nwhich countries Checkout should provide as options for shipping locations.\nUnsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.\n","validation":"array","required":true}]},{"name":"locale","documentation":"A [locale](#supported_locales) that will be used to localize the display of Checkout.\nDefault is `auto` (Stripe detects the locale of the browser).\n","validation":"string","required":false},{"name":"submitType","documentation":"Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the **Submit** button.\n`submitType` can only be specified when using using line items or SKUs, and not subscriptions.\nThe default is `auto`. Supported values are: `auto`, `book`, `donate`, `pay`.\n","validation":"string","required":false},{"name":"items","documentation":"An array of objects representing the items that your customer would like to purchase.\nThese items are shown as line items in the Checkout interface and make up the total amount to be collected by Checkout.\nUsing `lineItems` is preferred.\n","validation":"array","required":false,"subspec":[{"name":"sku, plan","documentation":"The ID of the SKU that the customer would like to purchase, or the ID of the plan or recurring price that the customer would like to subscribe to.\n","validation":"string","required":false},{"name":"quantity","validation":"integer","documentation":"The quantity of units for the item.\n","required":false}]}]}]},"request":{"title":"Redirect to Checkout","snippets":{"js":"// Call your backend to create the Checkout Session\nfetch('/create-checkout-session', {\n method: 'POST',\n})\n.then(function(response) {\n return response.json();\n})\n.then(function(session) {\n return stripe.redirectToCheckout({ sessionId: session.id });\n})\n.then(function(result) {\n // If `redirectToCheckout` fails due to a browser or network\n // error, you should display the localized error message to your\n // customer using `error.message`.\n if (result.error) {\n alert(result.error.message);\n }\n});\n","es_next":"// Call your backend to create the Checkout Session\nconst response = await fetch('/create-checkout-session', { method: 'POST' });\nconst session = await response.json();\n\n// When the customer clicks on the button, redirect them to Checkout.\nconst result = await stripe.redirectToCheckout({\n sessionId: session.id,\n});\n\nif (result.error) {\n // If `redirectToCheckout` fails due to a browser or network\n // error, display the localized error message to your customer\n // using `result.error.message`.\n}\n"}},"returns":"This method returns a `Promise` which resolves with a result object.\nIf this method fails, the result object will contain a localized error message in the `error.message` field.\n","section_tag":"stripe_checkout_redirect_to_checkout"},"display_on_load":true},"stripe_handle_card_payment_element":{"title":"Handle a card payment with an Element","group_title":"Deprecated","group_anchor":"deprecated","anchor":"stripe_handle_card_payment_element","section_anchor":"stripe_handle_card_payment_element","subsection_anchors":null,"path":"/deprecated/handle_card_payment_element","gate":false,"data":{"deprecated":true,"section_type":"method","title":"Handle card payment with an Element","description":"*`handleCardPayment` has been renamed to [confirmCardPayment](#stripe_confirm_card_payment).\nIn addition to the rename, we have slightly modified the arguments.\nThese changes do not affect the behavior of the method.\nWhile 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.*\n\nUse `stripe.handleCardPayment(clientSecret, element, data?)` when the customer submits your payment form.\nIt will gather payment information from the element, which can be a `card` or `cardNumber` element, along with any other data you provide.\nIt will then confirm the `PaymentIntent` and carry out 3DS or other `next_action`s if they are required.\n\nIf you are using [Dynamic 3D Secure](/docs/payments/3d-secure#three-ds-radar), `handleCardPayment` will trigger your Radar rules to execute and may open a dialog for your customer to authenticate their payment.\n","callout":"Note that `stripe.handleCardPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n\nAdditionally, `stripe.handleCardPayment` may trigger a [3D Secure](https://stripe.com/docs/payments/3d-secure) authentication challenge.\nThis will be shown in a modal dialog and may be confusing for customers using assistive technologies like screen readers.\nYou should make your form accessible by ensuring that success or error messages are clearly read out after this method completes.\n","signature":{"object_name":"stripe","method_name":"handleCardPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"element","documentation":"A `card` or `cardNumber` [Element](/docs/js/element) that will be used to create a payment method.\n","validation":"Element","required":true},{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"}]},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment, if collected.\n","validation":"object","badge_text":"recommended"},{"name":"receipt_email","documentation":"Email address that the receipt for the resulting payment will be sent to.\n","validation":"string"},{"name":"setup_future_usage","documentation":"Indicates that you intend to make future payments with this [PaymentIntent](/docs/api/payment_intents)'s payment method.\n\nIf present, the `PaymentMethod` used with this PaymentIntent can be [attached to a Customer](/docs/api/payment_methods/attach), even after the transaction completes.\n\nUse `on_session` if you intend to only reuse the `PaymentMethod` when your customer is present in your checkout flow.\nUse `off_session` if your customer may or may not be in your checkout flow.\nSee [saving card details during payment](https://stripe.com/docs/payments/cards/saving-cards-after-payment) to learn more.\n\nStripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules.\nFor example, if your customer is impacted by SCA, using `off_session` will ensure that they are authenticated while processing this PaymentIntent.\nYou will then be able to collect [off-session payments](/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.\n","validation":"string"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"element","documentation":"A `card` or `cardNumber` [Element](/docs/js/element) that will be used to create a payment method.\n","validation":"Element","required":true},{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"}]},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment, if collected.\n","validation":"object","badge_text":"recommended"},{"name":"receipt_email","documentation":"Email address that the receipt for the resulting payment will be sent to.\n","validation":"string"},{"name":"setup_future_usage","documentation":"Indicates that you intend to make future payments with this [PaymentIntent](/docs/api/payment_intents)'s payment method.\n\nIf present, the `PaymentMethod` used with this PaymentIntent can be [attached to a Customer](/docs/api/payment_methods/attach), even after the transaction completes.\n\nUse `on_session` if you intend to only reuse the `PaymentMethod` when your customer is present in your checkout flow.\nUse `off_session` if your customer may or may not be in your checkout flow.\nSee [saving card details during payment](https://stripe.com/docs/payments/cards/saving-cards-after-payment) to learn more.\n\nStripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules.\nFor example, if your customer is impacted by SCA, using `off_session` will ensure that they are authenticated while processing this PaymentIntent.\nYou will then be able to collect [off-session payments](/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.\n","validation":"string"}]}]},"request":{"title":"Handle a card payment","snippets":{"js":"stripe\n .handleCardPayment('{PAYMENT_INTENT_CLIENT_SECRET}', element, {\n payment_method_data: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.handleCardPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n element,\n {\n payment_method_data: {\n billing_details: {\n name: 'Jenny Rosen',\n },\n },\n },\n);\n"}},"returns":"A Promise which resolves with a `result` object.\n\nThe object will have either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: An error. Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_handle_card_payment_element"},"display_on_load":true},"stripe_handle_card_payment":{"title":"Handle a card payment","group_title":"Deprecated","group_anchor":"deprecated","anchor":"stripe_handle_card_payment","section_anchor":"stripe_handle_card_payment","subsection_anchors":null,"path":"/deprecated/handle_card_payment","gate":false,"data":{"deprecated":true,"section_type":"method","title":"Handle card payment","description":"*`handleCardPayment` has been renamed to [confirmCardPayment](#stripe_confirm_card_payment). 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.*\n\nUse `stripe.handleCardPayment(clientSecret, data?)` to advance the [PaymentIntent](/docs/api/payment_intents) towards completion when you are not gathering payment method information from an [Element](/docs/js/elements_object/create_element).\n\nCall this variation when you have already attached a card to this `PaymentIntent` or if you want to attach an existing card to it.\n","callout":"Note that `stripe.handleCardPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n\nAdditionally, `stripe.handleCardPayment` may trigger a [3D Secure](https://stripe.com/docs/payments/3d-secure) authentication challenge.\nThis will be shown in a modal dialog and may be confusing for customers using assistive technologies like screen readers.\nYou should make your form accessible by ensuring that success or error messages are clearly read out after this method completes.\n","signature":{"object_name":"stripe","method_name":"handleCardPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Use `payment_method` to specify an existing [PaymentMethod](/docs/api/payment_methods) to use for this payment.\n\nOnly one of `payment_method_data` and `payment_method` is required.\n","validation":"string"},{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"},{"name":"card[token]","validation":"string","documentation":"Converts the provided token into a `PaymentMethod` to use for the payment.\n"}]},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment, if collected.\n","validation":"object","badge_text":"recommended"},{"name":"receipt_email","documentation":"Email address that the receipt for the resulting payment will be sent to.\n","validation":"string"},{"name":"setup_future_usage","documentation":"Indicates that you intend to make future payments with this [PaymentIntent](/docs/api/payment_intents)'s payment method.\n\nIf present, the `PaymentMethod` used with this PaymentIntent can be [attached to a Customer](/docs/api/payment_methods/attach), even after the transaction completes.\n\nUse `on_session` if you intend to only reuse the `PaymentMethod` when your customer is present in your checkout flow.\nUse `off_session` if your customer may or may not be in your checkout flow.\nSee [saving card details after a payment](https://stripe.com/docs/payments/cards/saving-cards-after-payment) to learn more.\n\nStripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules.\nFor example, if your customer is impacted by SCA, using `off_session` will ensure that they are authenticated while processing this PaymentIntent.\nYou will then be able to collect [off-session payments](/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.\n","validation":"string"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Use `payment_method` to specify an existing [PaymentMethod](/docs/api/payment_methods) to use for this payment.\n\nOnly one of `payment_method_data` and `payment_method` is required.\n","validation":"string"},{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"},{"name":"card[token]","validation":"string","documentation":"Converts the provided token into a `PaymentMethod` to use for the payment.\n"}]},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment, if collected.\n","validation":"object","badge_text":"recommended"},{"name":"receipt_email","documentation":"Email address that the receipt for the resulting payment will be sent to.\n","validation":"string"},{"name":"setup_future_usage","documentation":"Indicates that you intend to make future payments with this [PaymentIntent](/docs/api/payment_intents)'s payment method.\n\nIf present, the `PaymentMethod` used with this PaymentIntent can be [attached to a Customer](/docs/api/payment_methods/attach), even after the transaction completes.\n\nUse `on_session` if you intend to only reuse the `PaymentMethod` when your customer is present in your checkout flow.\nUse `off_session` if your customer may or may not be in your checkout flow.\nSee [saving card details after a payment](https://stripe.com/docs/payments/cards/saving-cards-after-payment) to learn more.\n\nStripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules.\nFor example, if your customer is impacted by SCA, using `off_session` will ensure that they are authenticated while processing this PaymentIntent.\nYou will then be able to collect [off-session payments](/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.\n","validation":"string"}]}]},"request":{"title":"Handle a card payment","snippets":{"js":"stripe\n .handleCardPayment('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.handleCardPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n);\n"}},"returns":"A Promise which resolves with a `result` object.\n\nThe object will have either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: An error. Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_handle_card_payment"},"display_on_load":true},"stripe_confirm_payment_intent_element":{"title":"Confirm a PaymentIntent with an Element","group_title":"Deprecated","group_anchor":"deprecated","anchor":"stripe_confirm_payment_intent_element","section_anchor":"stripe_confirm_payment_intent_element","subsection_anchors":null,"path":"/deprecated/confirm_payment_intent_element","gate":false,"data":{"deprecated":true,"section_type":"method","title":"Confirm a Payment Intent with an Element","description":"*`confirmPaymentIntent` has been deprecated. Going forward, if you wish to confirm on the client without handling next actions, simply pass `{handleActions: false}` as a third argument to [confirmCardPayment](#stripe_confirm_card_payment). While we have no plans to ever remove support for `confirmPaymentIntent`, we think that explicitly opting out of next action handling is easier to understand and will better convey what the method is doing.*\n\nUse `stripe.confirmPaymentIntent(clientSecret, element, data)` when the customer submits your payment form. It will gather payment information from element, along with any other data you provide, and confirm the `PaymentIntent`.\n\nOnly use this method if you want to [handle next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions). Otherwise, use [stripe.handleCardPayment](#stripe_handle_card_payment).\n","callout":"Note that `stripe.confirmPaymentIntent` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","signature":{"object_name":"stripe","method_name":"confirmPaymentIntent","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent` to confirm.\n","validation":"string","required":true},{"name":"element","documentation":"An [Element](/docs/js/element) that will be used to create a payment method.\n","validation":"Element","required":true},{"name":"data","documentation":"Data to be sent with the request. It can contain the following parameters\n","validation":"object","expanded":true,"subspec":[{"name":"return_url","documentation":"If you are [handling next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), pass in a `return_url`.\nIf the subsequent action is `redirect_to_url`, this URL will be used on the return path for the redirect.\n","validation":"string"},{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"}]},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment, if collected.\n","validation":"object","badge_text":"recommended"},{"name":"receipt_email","documentation":"Email address that the receipt for the resulting payment will be sent to.\n","validation":"string"},{"name":"setup_future_usage","documentation":"Indicates that you intend to make future payments with this [PaymentIntent](/docs/api/payment_intents)'s payment method.\n\nIf present, the `PaymentMethod` used with this PaymentIntent can be [attached to a Customer](/docs/api/payment_methods/attach), even after the transaction completes.\n\nUse `on_session` if you intend to only reuse the `PaymentMethod` when your customer is present in your checkout flow.\nUse `off_session` if your customer may or may not be in your checkout flow.\nSee [saving card details after a payment](https://stripe.com/docs/payments/cards/saving-cards-after-payment) to learn more.\n\nStripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules.\nFor example, if your customer is impacted by SCA, using `off_session` will ensure that they are authenticated while processing this PaymentIntent.\nYou will then be able to collect [off-session payments](/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.\n","validation":"string"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent` to confirm.\n","validation":"string","required":true},{"name":"element","documentation":"An [Element](/docs/js/element) that will be used to create a payment method.\n","validation":"Element","required":true},{"name":"data","documentation":"Data to be sent with the request. It can contain the following parameters\n","validation":"object","expanded":true,"subspec":[{"name":"return_url","documentation":"If you are [handling next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), pass in a `return_url`.\nIf the subsequent action is `redirect_to_url`, this URL will be used on the return path for the redirect.\n","validation":"string"},{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"}]},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment, if collected.\n","validation":"object","badge_text":"recommended"},{"name":"receipt_email","documentation":"Email address that the receipt for the resulting payment will be sent to.\n","validation":"string"},{"name":"setup_future_usage","documentation":"Indicates that you intend to make future payments with this [PaymentIntent](/docs/api/payment_intents)'s payment method.\n\nIf present, the `PaymentMethod` used with this PaymentIntent can be [attached to a Customer](/docs/api/payment_methods/attach), even after the transaction completes.\n\nUse `on_session` if you intend to only reuse the `PaymentMethod` when your customer is present in your checkout flow.\nUse `off_session` if your customer may or may not be in your checkout flow.\nSee [saving card details after a payment](https://stripe.com/docs/payments/cards/saving-cards-after-payment) to learn more.\n\nStripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules.\nFor example, if your customer is impacted by SCA, using `off_session` will ensure that they are authenticated while processing this PaymentIntent.\nYou will then be able to collect [off-session payments](/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.\n","validation":"string"}]}]},"request":{"title":"Confirm a PaymentIntent","snippets":{"js":"stripe.confirmPaymentIntent(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n element,\n {\n payment_method_data: {\n billing_details: {\n name: 'Jenny Rosen'\n }\n },\n return_url: 'https://example.com/return_url'\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.confirmPaymentIntent(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n element,\n {\n payment_method_data: {\n billing_details: {\n name: \"Jenny Rosen\"\n }\n },\n return_url: 'https://example.com/return_url'\n }\n);\n"}},"returns":"A Promise which resolves with a `result` object.\n\nThe object will have either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: An error. Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_confirm_payment_intent_element"},"display_on_load":true},"stripe_confirm_payment_intent":{"title":"Confirm a PaymentIntent","group_title":"Deprecated","group_anchor":"deprecated","anchor":"stripe_confirm_payment_intent","section_anchor":"stripe_confirm_payment_intent","subsection_anchors":null,"path":"/deprecated/confirm_payment_intent","gate":false,"data":{"deprecated":true,"section_type":"method","title":"Confirm a Payment Intent","description":"*`confirmPaymentIntent` has been deprecated.\nGoing forward, if you wish to confirm on the client without handling next actions, simply pass `{handleActions: false}` as a third argument to [confirmCardPayment](#stripe_confirm_card_payment).\nWhile we have no plans to ever remove support for `confirmPaymentIntent`, we think that explicitly opting out of next action handling is easier to understand and will better convey what the method is doing.*\n\nUse `stripe.confirmPaymentIntent(clientSecret, data)` to confirm the `PaymentIntent` when you are not gathering payment information from an `Element`.\nCall this variation when you have already attached a payment method to this `PaymentIntent`, or if you want to attach an existing card, token, or `PaymentMethod` to it.\n\nOnly use this method if you want to handle next actions yourself.\nOtherwise, use `stripe.handleCardPayment`.\n\n","callout":"Note that `stripe.confirmPaymentIntent` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","signature":{"object_name":"stripe","method_name":"confirmPaymentIntent","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent` to confirm.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request. It can contain the following parameters\n","validation":"object","expanded":true,"subspec":[{"name":"return_url","documentation":"If you are [handling next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), pass in a `return_url`.\nIf the subsequent action is `redirect_to_url`, this URL will be used on the return path for the redirect.\n","validation":"string"},{"name":"payment_method","documentation":"Use `payment_method` to specify an existing [PaymentMethod](/docs/api/payment_methods) to use for this payment.\n\nOnly one of `payment_method_data` and `payment_method` is required.\n","validation":"string"},{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"},{"name":"card[token]","validation":"string","documentation":"Converts the provided token into a `PaymentMethod` to use for the payment.\n"}]},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment, if collected.\n","validation":"object","badge_text":"recommended"},{"name":"receipt_email","documentation":"Email address that the receipt for the resulting payment will be sent to.\n","validation":"string"},{"name":"setup_future_usage","documentation":"Indicates that you intend to make future payments with this [PaymentIntent](/docs/api/payment_intents)'s payment method.\n\nIf present, the `PaymentMethod` used with this PaymentIntent can be [attached to a Customer](/docs/api/payment_methods/attach), even after the transaction completes.\n\nUse `on_session` if you intend to only reuse the `PaymentMethod` when your customer is present in your checkout flow.\nUse `off_session` if your customer may or may not be in your checkout flow.\nSee [saving card details after a payment](https://stripe.com/docs/payments/cards/saving-cards-after-payment) to learn more.\n\nStripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules.\nFor example, if your customer is impacted by SCA, using `off_session` will ensure that they are authenticated while processing this PaymentIntent.\nYou will then be able to collect [off-session payments](/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.\n","validation":"string"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent` to confirm.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request. It can contain the following parameters\n","validation":"object","expanded":true,"subspec":[{"name":"return_url","documentation":"If you are [handling next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), pass in a `return_url`.\nIf the subsequent action is `redirect_to_url`, this URL will be used on the return path for the redirect.\n","validation":"string"},{"name":"payment_method","documentation":"Use `payment_method` to specify an existing [PaymentMethod](/docs/api/payment_methods) to use for this payment.\n\nOnly one of `payment_method_data` and `payment_method` is required.\n","validation":"string"},{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"},{"name":"card[token]","validation":"string","documentation":"Converts the provided token into a `PaymentMethod` to use for the payment.\n"}]},{"name":"shipping","documentation":"The [shipping details](/docs/api/payment_intents/confirm#confirm_payment_intent-shipping) for the payment, if collected.\n","validation":"object","badge_text":"recommended"},{"name":"receipt_email","documentation":"Email address that the receipt for the resulting payment will be sent to.\n","validation":"string"},{"name":"setup_future_usage","documentation":"Indicates that you intend to make future payments with this [PaymentIntent](/docs/api/payment_intents)'s payment method.\n\nIf present, the `PaymentMethod` used with this PaymentIntent can be [attached to a Customer](/docs/api/payment_methods/attach), even after the transaction completes.\n\nUse `on_session` if you intend to only reuse the `PaymentMethod` when your customer is present in your checkout flow.\nUse `off_session` if your customer may or may not be in your checkout flow.\nSee [saving card details after a payment](https://stripe.com/docs/payments/cards/saving-cards-after-payment) to learn more.\n\nStripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules.\nFor example, if your customer is impacted by SCA, using `off_session` will ensure that they are authenticated while processing this PaymentIntent.\nYou will then be able to collect [off-session payments](/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.\n","validation":"string"}]}]},"request":{"title":"Confirm a PaymentIntent","snippets":{"js":"stripe\n .confirmPaymentIntent('{PAYMENT_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n return_url: 'https://example.com/return_url',\n })\n .then(function(result) {\n // Handle result.error or result.paymentIntent\n });\n","es_next":"const {paymentIntent, error} = await stripe.confirmPaymentIntent(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n return_url: 'https://example.com/return_url'\n }\n);\n"}},"returns":"A Promise which resolves with a `result` object.\n\nThe object will have either:\n\n* `result.paymentIntent`: the successful [PaymentIntent](/docs/api/payment_intents).\n* `result.error`: An error. Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_confirm_payment_intent"},"display_on_load":true},"stripe_handle_card_setup_element":{"title":"Handle card setup with an Element","group_title":"Deprecated","group_anchor":"deprecated","anchor":"stripe_handle_card_setup_element","section_anchor":"stripe_handle_card_setup_element","subsection_anchors":null,"path":"/deprecated/handle_card_setup_element","gate":false,"data":{"deprecated":true,"section_type":"method","title":"Handle card setup with an Element","description":"*`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.*\n\nUse `stripe.handleCardSetup(clientSecret, element, data?)` in the [Setup Intents API flow](/docs/payments/save-and-reuse) when the customer submits your payment form.\nIt will gather payment information from the `element`, which can be a `card` or `cardNumber` element, along with any other data you provide.\nIt will then confirm the `SetupIntent` and carry out 3DS or other `next_action`s if they are required.\n","signature":{"object_name":"stripe","method_name":"handleCardSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"element","documentation":"A `card` or `cardNumber` Element that will be used to create a payment method.\n","validation":"Element","required":true},{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"}]}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"element","documentation":"A `card` or `cardNumber` Element that will be used to create a payment method.\n","validation":"Element","required":true},{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"}]}]}]},"request":{"title":"Handle card setup","snippets":{"js":"stripe.handleCardSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n element,\n {\n payment_method_data: {\n billing_details: {\n name: 'Jenny Rosen'\n }\n }\n }\n).then(function(result) {\n // Handle result.error or result.setupIntent\n});\n","es_next":"const {setupIntent, error} = await stripe.handleCardSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n element,\n {\n payment_method_data: {\n billing_details: {\n name: 'Jenny Rosen'\n }\n }\n }\n);\n"}},"callout":"Note that `stripe.handleCardSetup` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n\nAdditionally, `stripe.handleCardSetup` may trigger a [3D Secure](/docs/payments/3d-secure) authentication challenge.\nThis will be shown in a modal dialog and may be confusing for customers using assistive technologies like screen readers.\nYou should make your form accessible by ensuring that success or error messages are clearly read out after this method completes.\n","returns":"A Promise which resolves with a `result` object.\n\nThe object will have either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: An error. Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_handle_card_setup_element"},"display_on_load":true},"stripe_handle_card_setup":{"title":"Handle card setup","group_title":"Deprecated","group_anchor":"deprecated","anchor":"stripe_handle_card_setup","section_anchor":"stripe_handle_card_setup","subsection_anchors":null,"path":"/deprecated/handle_card_setup","gate":false,"data":{"deprecated":true,"section_type":"method","title":"Handle card setup","description":"*`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.*\n\nUse `stripe.handleCardSetup(clientSecret, data)` to advance the `SetupIntent` towards completion when you are not gathering payment method information from an `Element`.\n\nCall this variation when you have already attached a card to this `SetupIntent` or if you want to attach an existing card to it.\n","signature":{"object_name":"stripe","method_name":"handleCardSetup","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Use `payment_method` to specify an existing [PaymentMethod](/docs/api/payment_methods) to use for this payment.\n\nOnly one of `payment_method_data` and `payment_method` is required.\n","validation":"string"},{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"},{"name":"card[token]","validation":"string","documentation":"Converts the provided token into a `PaymentMethod` to use for the payment.\n"}]}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent`.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method","documentation":"Use `payment_method` to specify an existing [PaymentMethod](/docs/api/payment_methods) to use for this payment.\n\nOnly one of `payment_method_data` and `payment_method` is required.\n","validation":"string"},{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"},{"name":"card[token]","validation":"string","documentation":"Converts the provided token into a `PaymentMethod` to use for the payment.\n"}]}]}]},"request":{"title":"Handle card setup","snippets":{"js":"stripe\n .handleCardSetup('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {setupIntent, error} = await stripe.handleCardSetup(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n },\n);\n"}},"callout":"Note that `stripe.handleCardSetup` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n\nAdditionally, `stripe.handleCardSetup` may trigger a [3D Secure](/docs/payments/3d-secure) authentication challenge.\nThis will be shown in a modal dialog and may be confusing for customers using assistive technologies like screen readers.\nYou should make your form accessible by ensuring that success or error messages are clearly read out after this method completes.\n","returns":"A Promise which resolves with a `result` object.\n\nThe object will have either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: An error. Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_handle_card_setup"},"display_on_load":true},"stripe_confirm_setup_intent_element":{"title":"Confirm a SetupIntent with an Element","group_title":"Deprecated","group_anchor":"deprecated","anchor":"stripe_confirm_setup_intent_element","section_anchor":"stripe_confirm_setup_intent_element","subsection_anchors":null,"path":"/deprecated/confirm_setup_intent_element","gate":false,"data":{"deprecated":true,"section_type":"method","title":"Confirm a Setup Intent with an Element","description":"*`confirmSetupIntent` has been deprecated. Going forward, if you wish to confirm on the client without handling next actions, simply pass `{handleActions: false}` as a third argument to [confirmCardSetup](#stripe_confirm_card_setup). While we have no plans to ever remove support for `confirmSetupIntent`, we think that explicitly opting out of next action handling is easier to understand and will better convey what the method is doing.*\n\nUse `stripe.confirmSetupIntent(clientSecret, element, data)` when the customer submits your save payment method form. It will gather payment information from `element`, along with any other `data` you provide, and confirm the `SetupIntent`.\n\nOnly use this method if you want to [handle next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions). Otherwise, use [stripe.handleCardSetup](#stripe_handle_card_payment).\n","callout":"Note that `stripe.confirmSetupIntent` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","signature":{"object_name":"stripe","method_name":"confirmSetupIntent","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent` to confirm.\n","validation":"string","required":true},{"name":"element","documentation":"An [Element](/docs/js/element) that will be used to create a payment method.\n","validation":"Element","required":true},{"name":"data","documentation":"Data to be sent with the request. It can contain the following parameters\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"}]}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent` to confirm.\n","validation":"string","required":true},{"name":"element","documentation":"An [Element](/docs/js/element) that will be used to create a payment method.\n","validation":"Element","required":true},{"name":"data","documentation":"Data to be sent with the request. It can contain the following parameters\n","validation":"object","expanded":true,"subspec":[{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"}]}]}]},"request":{"title":"Confirm a SetupIntent","snippets":{"js":"stripe.confirmSetupIntent(\n '{SETUP_INTENT_CLIENT_SECRET}',\n element,\n {\n payment_method_data: {\n billing_details: {\n name: 'Jenny Rosen'\n }\n },\n return_url: 'https://example.com/return_url'\n }\n).then(function(result) {\n // Handle result.error or result.setupIntent\n});\n","es_next":"const {setupIntent, error} = await stripe.confirmSetupIntent(\n '{SETUP_INTENT_CLIENT_SECRET}',\n element,\n {\n payment_method_data: {\n billing_details: {\n name: \"Jenny Rosen\"\n }\n },\n return_url: 'https://example.com/return_url'\n }\n);\n"}},"returns":"A Promise which resolves with a `result` object.\n\nThe object will have either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: An error. Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_confirm_setup_intent_element"},"display_on_load":true},"stripe_confirm_setup_intent":{"title":"Confirm a SetupIntent","group_title":"Deprecated","group_anchor":"deprecated","anchor":"stripe_confirm_setup_intent","section_anchor":"stripe_confirm_setup_intent","subsection_anchors":null,"path":"/deprecated/confirm_setup_intent","gate":false,"data":{"deprecated":true,"section_type":"method","title":"Confirm a Setup Intent","description":"*`confirmSetupIntent` has been deprecated.\nGoing forward, if you wish to confirm on the client without handling next actions, simply pass `{handleActions: false}` as a third argument to [confirmCardSetup](#stripe_confirm_card_setup).\nWhile we have no plans to ever remove support for `confirmSetupIntent`, we think that explicitly opting out of next action handling is easier to understand and will better convey what the method is doing.*\n\nUse `stripe.confirmSetupIntent(clientSecret, data)` to confirm the `SetupIntent` when you are not gathering payment information from an `Element`.\nCall this variation when you have already attached a payment method to this `SetupIntent`, or if you want to attach an existing card, token, or `PaymentMethod` to it.\n\nOnly use this method if you want to handle next actions yourself.\nOtherwise, use `stripe.handleCardSetup`.\n","callout":"Note that `stripe.confirmSetupIntent` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","signature":{"object_name":"stripe","method_name":"confirmSetupIntent","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent` to confirm.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request. It can contain the following parameters\n","validation":"object","expanded":true,"subspec":[{"name":"return_url","documentation":"If you are [handling next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), pass in a `return_url`.\nIf the subsequent action is `redirect_to_url`, this URL will be used on the return path for the redirect.\n","validation":"string"},{"name":"payment_method","documentation":"Use `payment_method` to specify an existing [PaymentMethod](/docs/api/payment_methods) to use for this payment.\n\nOnly one of `payment_method_data` and `payment_method` is required.\n","validation":"string"},{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"},{"name":"card[token]","validation":"string","documentation":"Converts the provided token into a `PaymentMethod` to use for the payment.\n"}]}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/setup_intents/object#setup_intent_object-client_secret) of the `SetupIntent` to confirm.\n","validation":"string","required":true},{"name":"data","documentation":"Data to be sent with the request. It can contain the following parameters\n","validation":"object","expanded":true,"subspec":[{"name":"return_url","documentation":"If you are [handling next actions yourself](/docs/payments/payment-intents/verifying-status#next-actions), pass in a `return_url`.\nIf the subsequent action is `redirect_to_url`, this URL will be used on the return path for the redirect.\n","validation":"string"},{"name":"payment_method","documentation":"Use `payment_method` to specify an existing [PaymentMethod](/docs/api/payment_methods) to use for this payment.\n\nOnly one of `payment_method_data` and `payment_method` is required.\n","validation":"string"},{"name":"payment_method_data","documentation":"Use this parameter to supply additional data relevant to the payment method, such as billing details.\n","validation":"object","expanded":true,"subspec":[{"name":"billing_details","documentation":"The [billing details](/docs/api/payment_methods/create#create_payment_method-billing_details) associated with the card.","validation":"object","badge_text":"recommended"},{"name":"card[token]","validation":"string","documentation":"Converts the provided token into a `PaymentMethod` to use for the payment.\n"}]}]}]},"request":{"title":"Confirm a SetupIntent","snippets":{"js":"stripe\n .confirmSetupIntent('{SETUP_INTENT_CLIENT_SECRET}', {\n payment_method: '{PAYMENT_METHOD_ID}',\n return_url: 'https://example.com/return_url',\n })\n .then(function(result) {\n // Handle result.error or result.setupIntent\n });\n","es_next":"const {setupIntent, error} = await stripe.confirmSetupIntent(\n '{SETUP_INTENT_CLIENT_SECRET}',\n {\n payment_method: '{PAYMENT_METHOD_ID}',\n return_url: 'https://example.com/return_url'\n }\n);\n"}},"returns":"A Promise which resolves with a `result` object.\n\nThe object will have either:\n\n* `result.setupIntent`: the successful [SetupIntent](/docs/api/setup_intents).\n* `result.error`: An error. Refer to the [API reference](/docs/api#errors) for all possible errors.\n","section_tag":"stripe_confirm_setup_intent"},"display_on_load":true},"stripe_handle_fpx_payment":{"title":"Handle an FPX payment","group_title":"Deprecated","group_anchor":"deprecated","anchor":"stripe_handle_fpx_payment","section_anchor":"stripe_handle_fpx_payment","subsection_anchors":null,"path":"/deprecated/handle_fpx_payment","gate":false,"data":{"deprecated":true,"section_type":"method","title":"Handle an FPX payment","description":"*`handleFpxPayment` has been renamed to [confirmFpxPayment](#stripe_confirm_fpx_payment). In addition to the rename, we have slightly modified the arguments. These changes do not affect the behavior of the method. While we will continue to support `handleFpxPayment` for the duration of the beta, we think the new name and arguments are easier to understand and better convey what the method is doing.*\n\nUse `stripe.handleFpxPayment` in the [FPX payment method creation](/docs/stripe-js/elements/fpx-bank) flow when the customer selects a bank from the dropdown. It will gather the [bank code](/docs/payments/fpx/accept-a-payment#bank-reference) from the element, along with any other `PaymentIntent` `data` you provide. It will then create an FPX payment method and confirm the `PaymentIntent`.\n","callout":"Note that `stripe.handleFpxPayment` may take several seconds to complete.\nDuring that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.\nIf 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.\n","signature":{"object_name":"stripe","method_name":"handleFpxPayment","args":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"element","documentation":"An `fpxBank` [Element](/docs/payments/elements) that will be used to create a payment method.\n","validation":"Element","required":true},{"name":"data","documentation":"A data object to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication. Be sure to review the [payment confirmation page requirements](/docs/payments/fpx/accept-a-payment#payment-confirmation-page).\n","validation":"string"}]}]},"table_content":{"items":[{"name":"clientSecret","documentation":"The [client secret](/docs/api/payment_intents/object#payment_intent_object-client_secret) of the `PaymentIntent`.\n","validation":"string","required":true},{"name":"element","documentation":"An `fpxBank` [Element](/docs/payments/elements) that will be used to create a payment method.\n","validation":"Element","required":true},{"name":"data","documentation":"A data object to be sent with the request.\n","validation":"object","expanded":true,"subspec":[{"name":"return_url","documentation":"The url your customer will be directed to after they complete authentication. Be sure to review the [payment confirmation page requirements](/docs/payments/fpx/accept-a-payment#payment-confirmation-page).\n","validation":"string"}]}]},"request":{"title":"Handle a FPX payment","snippets":{"js":"stripe.handleFpxPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n element,\n {\n return_url: 'https://example.com/return_url',\n }\n).then(function(result) {\n // Handle result.error or result.paymentIntent\n});\n","es_next":"const {paymentIntent, error} = await stripe.handleFpxPayment(\n '{PAYMENT_INTENT_CLIENT_SECRET}',\n element,\n {\n return_url: 'https://example.com/return_url',\n }\n);\n"}},"returns":"This method returns a `Promise` which resolves with a `result` object.\nThis object has either:\n\n* `result.paymentIntent`: a [PaymentIntent](/docs/api/payment_intents) with the `requires_confirmation` status to confirm server-side.\n* `result.error`: an error.\n Refer to the [API reference](/docs/api#errors) for all possible errors and the [FPX guide](/docs/payments/fpx/accept-a-payment#error-codes) for FPX specific errors.\n","section_tag":"stripe_handle_fpx_payment"},"display_on_load":true}}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment