Payment Intents Accept global payments online with the Payment Intents APIs. For step-by-step instructions on using the Payment Intents APIs, see the accept a payment guide. The following Stripe.js methods are available to use as part of your integration. ## Confirm a payment stripe.confirmPayment(options: object) Use stripe.confirmPayment to confirm a PaymentIntent using data collected by the Payment Element, or with manually provided data via confirmParams. When called, stripe.confirmPayment will attempt to complete any required actions, such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page. Your user will be redirected to the return_url you pass once the confirmation is complete. > The stripe.confirmPayment might take several seconds to complete. > During that time, disable your form from being resubmitted and show a waiting indicator, such as a spinner. If you receive an error result, show this error to the user, re-enable the form, and hide the waiting indicator. - options - elements The Elements instance used to create the Payment Element. Required if you collect payment details before creating an Intent. It's always required if you don't provide a clientSecret. - clientSecret The PaymentIntent's client secret. Required if you collect payment details before creating an Intent. It's always required if you don't provide an elements instance containing a client secret. - confirmParams Parameters that will be passed on to the Stripe API. You can also use the parameters from the Payment Intents API, except for setup_future_usage. - return_url The URL that Stripe redirects your customer to after they complete the payment. You can use the following query parameters, payment_intent (the PaymentIntent's ID) or payment_intent_client_secret (the PaymentIntent's client secret), to retrieve the PaymentIntent's status. When Stripe redirects your customer, the resulting URL has these query parameters appended. You can also append your own query parameters to the return_url, which persist through the redirect process. If you don't want to redirect for card payments after payment completion, set redirect to if_required. - shipping The shipping details for the payment, if collected. Note: When the Address Element in shipping mode is being used, shipping address details are collected from the Address Element and passed to the PaymentIntents confirm endpoint as the shipping parameter. You can also include additional shipping fields, which will be merged with the data collected from the Element. Values passed here will override details collected by Elements. - confirmation_token If collected previously, the ID of the ConfirmationToken to use to confirm this PaymentIntent. This is mutually exclusive with the elements parameter. - payment_method If collected previously, the ID of the payment method to attach to this PaymentIntent. This is mutually exclusive with the elements parameter. - payment_method_data When you call stripe.confirmPayment, payment details are collected from the Element and passed to the PaymentIntents confirm endpoint as the payment_method_data parameter. You can also include additional payment_method_data fields, which will be merged with the data collected from the Element. - billing_details The customer's billing_details. Details collected by Elements will override values passed here. Billing fields that are omitted in the Payment Element via the fields option required. Note: When the Address Element in billing mode is being used, billing address details are collected from the Address Element and passed to the PaymentIntents confirm endpoint as the billing_details parameter. The values collected from the Address Element will take precedence. - allow_redisplay Indicates whether the payment method can be displayed to the customer in subsequent checkout flows. The value passed here will override the [allow_redisplay](the relevant part of the product#payment_method_object-allow_redisplay) determined by the provided elements parameter. - expand An array of pass through PaymentIntent expansion parameters (learn more). - redirect By default, stripe.confirmPayment will always redirect to your return_url after a successful confirmation. If you set redirect: "if_required", then stripe.confirmPayment will only redirect if your user chooses a redirect-based payment method. Note: Setting if_required requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately. When a non-redirect based payment method is successfully confirmed, stripe.confirmPayment will resolve with a {paymentIntent} object. ### Example title Confirm a payment intent ## Confirm a PaymentIntent by payment method Below are a number of methods used to confirm a PaymentIntent for a specific payment method type. ## Confirm a card payment stripe.confirmCardPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmCardPayment when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide and carry out 3DS or other next actions if they are required. If you are using Dynamic 3D Secure, stripe.confirmCardPayment will trigger your Radar rules to execute and may open a dialog for your customer to authenticate their payment. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. It 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. These use cases are detailed in the sections that follow. > Note that stripe.confirmCardPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. > > Additionally, stripe.confirmCardPayment may trigger a 3D Secure authentication challenge. > This will be shown in a modal dialog and may be confusing for customers using assistive technologies like screen readers. > You should make your form accessible by ensuring that success or error messages are clearly read out after this method completes. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - shipping The shipping details for the payment, if collected. - return_url If you are handling next actions yourself, pass in a return_url. If the subsequent action is redirect_to_url, this URL will be used on the return path for the redirect. - receipt_email Email address that the receipt for the resulting payment will be sent to. - setup_future_usage Indicates that you intend to make future payments with this PaymentIntent's payment method. If present, the payment method used with this PaymentIntent can be attached to a Customer, even after the transaction completes. Use on_session if you intend to only reuse the payment method when your customer is present in your checkout flow. Use off_session if your customer may or may not be in your checkout flow. See saving card details during payment to learn more. Stripe uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by SCA, using off_session will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect off-session payments for this customer. - payment_method_options An object containing payment-method-specific configuration to confirm the PaymentIntent with. - card Configuration for this card payment. - cvc Use the provided cardCvcElement when confirming the PaymentIntent with an existing PaymentMethod. - network Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can only be set at confirm-time. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to handle next actions yourself, or if you want to defer next action handling until later (e.g. for use in the PaymentRequest API). Default is true. ### with payment data from an Element ### Data argument properties - payment_method Pass an object to confirm using data collected by a card or cardNumberElement. - card Uses the provided card or cardNumberElement for confirmation. - billing_details The billing_details associated with the card. ### Example title Confirm with an Element ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with existing payment method ### with an existing token ### Data argument properties - payment_method Pass an object to confirm using an existing token. - card An object of card data. - token Converts the provided token into a PaymentMethod to use for confirmation. - billing_details The billing_details associated with the card. ### Example title Confirm with existing token ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a card payment ## Confirm an ACH Direct Debit payment stripe.confirmUsBankAccountPayment(clientSecret: string, data?: object) Use stripe.confirmUsBankAccountPayment in the Accept a payment flow for the ACH Direct Debit payment method to record the customer’s authorization for payment. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. We 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. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method The id of an existing PaymentMethod or an object of collected data. See use cases below for details. ### with an existing PaymentMethod ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with an existing PaymentMethod ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### with self collected bank account information ### Data argument properties - payment_method Pass an object to confirm using data collected. - billing_details The customer's billing_details. name is required. Providing email allows your customer to receive ACH Direct Debit mandate and microdeposit emails. - name The customer's name. The first and last name must be at minimum 2 characters each. - email The customer's email. - us_bank_account The customer's bank account information. - account_number The customer’s bank account number. - routing_number The routing number of the customer’s bank. - account_holder_type Account holder type: individual or company. - account_type Account type: checkings or savings. Defaults to checking if omitted. ### Example title Confirm with bank account information ### Example title Confirm an ACH Direct Debit payment ## Confirm a Canadian pre-authorized debit payment stripe.confirmAcssDebitPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmAcssDebitPayment in the Accept a payment flow for the Canadian pre-authorized debit payment method when the customer submits your payment form. When 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 when the user submits the form. Note that there are some additional requirements to this flow that are not covered in this reference. Refer to our integration guide for more details. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. stripe.confirmAcssDebitPayment automatically creates a new PaymentMethod for you when your customer completes the modal UI. It can also be called with an existing PaymentMethod, which will load the modal UI to collect a new mandate agreement. These use cases are detailed in the sections that follow. > Note that stripe.confirmAcssDebitPayment may take several seconds to complete. > During that time, disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, show it to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method The id of an existing PaymentMethod or an object of collected data. See use cases below for details. - options An options object to control the behavior of this method. - skipMandate Set this to true if you want to skip displaying the mandate confirmation. ### with a new PaymentMethod ### Data argument properties - payment_method Pass an object to confirm using data collected. - billing_details The customer's billing_details. name and email are required. - name The customer's name. The first and last name must be at minimum 2 characters each. - email The customer's email. ### Example title Confirm with a new PaymentMethod ### with an existing PaymentMethod ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with an existing PaymentMethod ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### with self collected bank account information ### Data argument properties - payment_method Pass an object to confirm using data collected. - billing_details The customer's billing_details. name and email are required. - name The customer's name. The first and last name must be at minimum 2 characters each. - email The customer's email. - acss_debit The customer's bank account information. - account_number The customer’s bank account number. - institution_number The institution number of the customer’s bank. - transit_number The transit number of the customer’s bank. ### Example title Confirm with bank account information ### with an existing PaymentMethod but skip mandate display ### Data and options argument paramters - data Data to be sent with the request. - payment_method The id of an existing PaymentMethod. - options An options object to control the behavior of this method. - skipMandate Set to true to skip the on-page modal UI. ### Example title Confirm with an existing PaymentMethod but skip mandate display ### Example title Confirm Canadian pre-authorized debit payment ## Confirm an Affirm payment stripe.confirmAffirmPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmAffirmPayment in the Affirm payment method creation flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmAffirmPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - shipping The shipping details for the payment. - name - address - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### without an existing payment method ### Data argument properties - payment_method Pass payment method billing details. - billing_details The billing_details associated with the payment. - email - name - address - shipping The shipping details for the payment. - name - address - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm without existing payment method ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - shipping The shipping details for the payment. - name - address - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm an Affirm payment ## Confirm an Afterpay Clearpay payment stripe.confirmAfterpayClearpayPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmAfterpayClearpayPayment in the Afterpay Clearpay payment method creation flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmAfterpayClearpayPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### without an existing payment method ### Data argument properties - payment_method Pass payment method billing details. - billing_details The billing_details associated with the payment. - email - name - address - shipping The shipping details for the payment. - name - address - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm without existing payment method ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm an Afterpay Clearpay payment ## Confirm an Alipay payment stripe.confirmAlipayPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmAlipayPayment in the Alipay payment method creation flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmAlipayPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method The id of an existing PaymentMethod. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### Without an existing payment method ### Data argument properties - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm without existing payment method ### With an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### With an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm an Alipay payment ## Confirm a the related setting Debit payment stripe.confirmAuBecsDebitPayment(clientSecret: string, data?: object) Use stripe.confirmAuBecsDebitPayment in the the related setting Direct Debit Payments with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide. Note that there are some additional requirements to this flow that are not covered in this reference. Refer to our integration guide for more details. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmAuBecsDebitPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method The id of an existing PaymentMethod or an object of collected data. See use cases below for details. - setup_future_usage To set up the the related setting Direct Debit account for reuse, set this parameter to off_session. the related setting Direct Debit only accepts an off_session value for this parameter. If a customer is provided on this PaymentIntent, the PaymentMethod will be attached to the customer when the PaymentIntent transitions to processing. ### with payment data from an Element ### Data argument properties - payment_method Pass an object to confirm the payment using data collected by an auBankAccountElement. - au_becs_debit An auBankAccount Element. - billing_details The customer's billing_details. name and email are required. - name The account holder's name. - email The customer's email. ### Example title Confirm with an Element ### with self collected data ### Data argument properties - payment_method Pass an object to confirm using data collected without an Element. - au_becs_debit - bsb_number A Bank State Branch (BSB) number. - account_number A bank account number. - billing_details The customer's billing_details. name and email are required. - name The account holder's name. - email The customer's email. ### Example title Confirm with self collected data ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a the related setting Debit payment ## Confirm a Bancontact payment stripe.confirmBancontactPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmBancontactPayment in the Bancontact Payments with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmBancontactPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### with collected data ### Data argument properties - payment_method Pass an object to confirm with the customer's name. - billing_details An object detailing billing information. - name The customer's name. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with self collected data ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a Bancontact payment ## Confirm a the related setting payment stripe.confirmBlikPayment(clientSecret: string, data: object, options?: object) Use stripe.confirmBlikPayment in the the related setting Payments with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically prompt the customer to authorize the transaction. > Note that stripe.confirmBlikPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method_options An object that contains transaction specific data. - code Your customer's 6-digit the related setting code. - payment_method Use this parameter to supply additional data relevant to the transaction, such as billing details. - billing_details The billing details associated with the transaction. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually determine if the confirmation has succeeded or failed. ### Example title Confirm a the related setting payment ## Confirm a Boleto payment stripe.confirmBoletoPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmBoletoPayment in the Boleto Payment with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide. Note that there are some additional requirements to this flow that are not covered in this reference. Refer to our integration guide for more details. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmBoletoPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method The id of an existing PaymentMethod or an object of collected data. See use cases below for details. - options An options object to control the behavior of this method. - handleActions Set to false. The 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 for more info. ### with collected data ### Data argument properties - payment_method Pass an object to confirm using data collected. - boleto - tax_id The customer's Brazilian tax id (CPF/the related setting). - billing_details The customer's billing_details. name, email and address. - name The customer's name. The first and last name must be at minimum 2 characters each. - email The customer's email. - address The customer's address: street name, city, state and postal code - line1 The customer's address line 1 (e.g. street or company name). - line2 The customer's address line 2 (e.g. apartment, suite, unit, or building). - city The customer's address city (e.g. Sao Paulo). - state The customer's address state (e.g. SP). - postal_code The customer's CEP (i.e. Brazilian postal code). Must be 8 digits long. - country Must be BR. ### Example title Confirm with collected data ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a Boleto payment ## Confirm a Customer Balance payment stripe.confirmCustomerBalancePayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmCustomerBalancePayment in the Customer Balance payment flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide. Refer to our integration guide for more details. Since the Customer Balance payment method draws from a balance, the attempt will succeed or fail depending on the current balance amount. To collect more funds from the customer when the cash balance is insufficient, use the customer balance with bank transfer funding parameters. The confirmation attempt will finish in one of the following result states: 1. 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. 2. 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. 3. 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. > Note that stripe.confirmCustomerBalancePayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method An object specifying the customer_balance type. - customer_balance Set to {}. - payment_method_options Additional payment specific configuration options. See the with collected data use case below. - options An options object to control the behavior of this method. - handleActions Set to false. The 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 for more info. ### with collected data ### Data argument properties - payment_method Pass an object to confirm using data collected. - customer_balance Set to {}. - payment_method_options Additional payment-specific configuration options. - funding_type The funding method type to be used when there are not enough funds in the Customer Balance. Permitted values include: bank_transfer. - bank_transfer The customer's chosen bank transfer method. - type 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. - eu_bank_account Details for the customer's EU bank account transfer. Required if the type is eu_bank_account. - country The desired country code of the bank account information. Permitted values include: DE, ES, FR, IE, NL. - id_bank_account Details for the customer's Indonesian bank account transfer. Required if the type is id_bank_account. - bank Bank where the account is held. One of bca, bni. - requested_address_types 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. ### Example title Confirm with collected data ### Example title Confirm a Customer Balance payment ## Confirm a Cash App Pay payment stripe.confirmCashappPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmCashappPayment in the Cash App Pay payment method creation flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide and handle the NextAction for the customer to authorize the payment. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmCashappPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you would like to handle displaying the Cash App Pay QR code or handle the authorization redirect yourself. ### Without an existing payment method ### Data argument properties - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm without existing payment method ### With an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### With an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a Cash App Pay payment ## Confirm an EPS payment stripe.confirmEpsPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmEpsPayment in the EPS Payments with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmEpsPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### with collected data ### Data argument properties - payment_method Pass an object to confirm with the customer's name. - billing_details An object detailing billing information. - name The customer's name. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with self collected data ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm an EPS payment ## Confirm an FPX payment stripe.confirmFpxPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmFpxPayment in the FPX payment method creation flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmFpxPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### with payment data from an Element ### Data argument properties - payment_method Pass an object to confirm using data collected by an fpxBankElement. - fpx An fpxBankElement. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with an Element ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### with self collected data ### Data argument properties - payment_method Pass an object to confirm using data collected by an fpxBankElement. - fpx An object detailing the customer's FPX bank. - bank The customer's bank. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with self collected data ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm an FPX payment ## Confirm a giropay payment stripe.confirmGiropayPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmGiropayPayment in the giropay Payments with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmGiropayPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### with collected data ### Data argument properties - payment_method Pass an object to confirm with the customer's name. - billing_details An object detailing billing information. - name The customer's name. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with self collected data ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a giropay payment ## Confirm a GrabPay payment stripe.confirmGrabPayPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmGrabPayPayment in the GrabPay payments with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent, and automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. > Note that stripe.confirmGrabPayPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting > indicator like a spinner. If you receive an error result, you should be sure to show that > error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The URL your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### with a new PaymentMethod ### Data argument properties - return_url The URL your customer will be directed to after they complete authentication. ### Example title Confirm with a new PaymentMethod ### with an existing PaymentMethod ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The URL your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Data argument properties - return_url The URL your customer will be directed to after they complete authentication. ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a GrabPay payment ## Confirm an iDEAL payment stripe.confirmIdealPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmIdealPayment in the iDEAL Payments with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmIdealPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - setup_future_usage To set up a the related setting Direct Debit payment method using the bank details from this iDEAL payment, set this parameter to off_session. When using this parameter, a customer will need to be set on the PaymentIntent. The newly created the related setting Direct Debit PaymentMethod will be attached to this customer. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### with payment data from an Element ### Data argument properties - payment_method Pass an object to confirm using data collected by an idealBankElement. - ideal An idealBankElement. - billing_details The customer's billing_details. Required when setup_future_usage is set to off_session. - name The customer's name. - email The customer's email. - return_url The url your customer will be directed to after they complete authentication. - setup_future_usage To set up a the related setting Direct Debit payment method using the bank details from this iDEAL payment, set this parameter to off_session. When using this parameter, a customer will need to be set on the PaymentIntent. The newly created the related setting Direct Debit PaymentMethod will be attached to this customer. ### Example title Confirm with an Element ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. - setup_future_usage To set up a the related setting Direct Debit payment method using the bank details from this iDEAL payment, set this parameter to off_session. When using this parameter, a customer will need to be set on the PaymentIntent. The newly created the related setting Direct Debit PaymentMethod will be attached to this customer. ### Example title Confirm with existing payment method ### with self collected data ### Data argument properties - payment_method Pass an object to confirm using data collected by an idealBankElement. - ideal An object detailing the customer's iDEAL bank. - bank The customer's bank. - billing_details The customer's billing_details. Required when setup_future_usage is set to off_session. - name The customer's name. - email The customer's email. - return_url The url your customer will be directed to after they complete authentication. - setup_future_usage To set up a the related setting Direct Debit payment method using the bank details from this iDEAL payment, set this parameter to off_session. When using this parameter, a customer will need to be set on the PaymentIntent. The newly created the related setting Direct Debit PaymentMethod will be attached to this customer. ### Example title Confirm with self collected data ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm an iDEAL payment ## Confirm a Klarna payment stripe.confirmKlarnaPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmKlarnaPayment in the Klarna payment method creation flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmKlarnaPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### Without an existing payment method ### Data argument properties - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm without existing payment method ### With an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### With an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a Klarna payment ## Confirm a Konbini payment stripe.confirmKonbiniPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmKonbiniPayment in the Konbini payment flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide. Note that there are some additional requirements to this flow that are not covered in this reference. Refer to our integration guide for more details. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmKonbiniPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - payment_method_options An object containing payment-method-specific configuration to confirm the PaymentIntent with. - konbini Configuration for this Konbini payment. - confirmation_number An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. May not be all 0 and could be rejected in case of insufficient uniqueness. We recommend to use the customer’s phone number. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to handle next actions yourself. Please refer to our integration guide for more info. Default is true. ### with collected data ### Data argument properties - payment_method Pass an object to confirm using data collected. - billing_details The customer's billing_details. - name The customer's full name. - email The customer's email address. - payment_method_options An object containing payment-method-specific configuration to confirm the PaymentIntent with. - konbini Configuration for this Konbini payment. - confirmation_number An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. May not be all 0 and could be rejected in case of insufficient uniqueness. We recommend to use the customer’s phone number. ### Example title Confirm with collected data ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - payment_method_options An object containing payment-method-specific configuration to confirm the PaymentIntent with. - konbini Configuration for this Konbini payment. - confirmation_number An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. May not be all 0 and could be rejected in case of insufficient uniqueness. We recommend to use the customer’s phone number. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Data argument properties - payment_method_options An object containing payment-method-specific configuration to confirm the PaymentIntent with. - konbini Configuration for this Konbini payment. - confirmation_number An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. May not be all 0 and could be rejected in case of insufficient uniqueness. We recommend to use the customer’s phone number. ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a Konbini payment ## Confirm a MB WAY payment stripe.confirmMbWayPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmMbWayPayment in the MB WAY payment method creation flow when the customer submits your payment form. When you call the method, it confirms the PaymentIntent with the data you provide, and sends a request to the customer to authorize the transaction. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you've already attached a PaymentMethod, you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmMbWayPayment might take some time to complete while waiting for customers to authorize the payment. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle polling for PaymentIntent updates. Default is true. ### without an existing payment method ### Data argument properties - payment_method Pass payment method billing details. - billing_details The billing_details associated with the payment. A phone number is required for all MB WAY payments. - phone ### Example title Confirm without existing payment method ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a MB WAY payment ## Confirm a MobilePay payment stripe.confirmMobilepayPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmMobilepayPayment in the MobilePay Payments with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmMobilepayPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a MobilePay payment ## Confirm a Multibanco payment stripe.confirmMultibancoPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmMultibancoPayment in the Multibanco Payment with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide. Note that there are some additional requirements to this flow that are not covered in this reference. Refer to our integration guide for more details. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > stripe.confirmMultibancoPayment might take several seconds to complete. During that time, disable your form from being resubmitted and show a > waiting indicator, such as a spinner. If you receive an error, display it to the customer, re-enable the form, and hide the waiting indicator. > > Additionally, stripe.confirmMultibancoPayment will pop up a modal with the voucher. This modal contains all the information required > to pay the voucher through online banking or from an ATM, such as the Multibanco entity and reference numbers, and amount. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method The id of an existing PaymentMethod or an object of collected data. See use cases below for details. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to handle next actions yourself. Please refer to our Stripe Multibanco integration guide for more info. Default is true. ### with collected data ### Data argument properties - payment_method Pass an object to confirm using data collected. - billing_details The customer's billing_details. email is required. - email The customer's email. ### Example title Confirm with collected data ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a Multibanco payment ## Confirm an Oxxo payment stripe.confirmOxxoPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmOxxoPayment in the the related setting Payment with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide. Note that there are some additional requirements to this flow that are not covered in this reference. Refer to our integration guide for more details. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmOxxoPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. > > Additionally, stripe.confirmOxxoPayment will pop up a modal with the voucher. This modal contains all the information required > to pay the voucher at the related setting stores, such as the amount, a reference number and corresponding barcode. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method The id of an existing PaymentMethod or an object of collected data. See use cases below for details. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to handle next actions yourself. Please refer to our Stripe the related setting integration guide for more info. Default is true. ### with collected data ### Data argument properties - payment_method Pass an object to confirm using data collected. - billing_details The customer's billing_details. name and email are required. - name The customer's name. The first and last name must be at minimum 2 characters each. - email The customer's email. ### Example title Confirm with collected data ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm an Oxxo payment ## Confirm a Przelewy24 payment stripe.confirmP24Payment(clientSecret: string, data?: object, options?: object) Use stripe.confirmP24Payment in the Przelewy24 Payments with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmP24Payment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### with collected data ### Data argument properties - payment_method Pass an object to confirm with the customer's email address. - billing_details An object detailing billing information. - email The customer's email address. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with self collected data ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a P24 payment ## Confirm a Pay by Bank payment stripe.confirmPayByBankPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmPayByBankPayment in the Pay by Bank Payments with Payment Methods flow when the customer submits your payment form. When called, it confirms the PaymentIntent with data you provide. It then automatically redirects the customer to authorize the transaction. After authorization is complete, the customer is redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without providing any additional data. These use cases are detailed in the sections that follow. > Be aware that stripe.confirmPayByBankPayment might take several seconds to complete. > During that time, disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### with an existing PaymentMethod ### Example title Confirm with an existing PaymentMethod ### Example title Confirm a Pay by Bank payment ## Confirm a PayNow payment stripe.confirmPayNowPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmPayNowPayment in the PayNow payment method creation flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide and handle the NextAction for the customer to authorize the payment. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmPayNowPayment may take several seconds to complete and display the QR code. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - options An options object to control the behavior of this method. - handleActions Default is true. Set this to false if you would like to handle displaying the PayNow QR code yourself. ### Without an existing payment method ### Data argument properties - payment_method Pass payment method billing details. - billing_details The billing_details associated with the payment method. ### Example title Confirm without existing payment method ### With an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with existing payment method ### With an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a PayNow payment ## Confirm a PayPal payment stripe.confirmPayPalPayment(clientSecret: string, data?: object) Use stripe.confirmPayPalPayment in the PayPal Payments with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. > Note that stripe.confirmPayPalPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method The id of an existing PaymentMethod. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. Required for new PayPal payment methods, but not required when using a previously set up PayPal payment method (via SetupIntent or a PaymentIntent with setup_future_usage). ### with a new PaymentMethod ### Data argument properties - return_url The url your customer will be directed to after they complete authentication. Required for new PayPal payment methods, but not required when using a previously set up PayPal payment method (via SetupIntent or a PaymentIntent with setup_future_usage). ### Example title Confirm with a new PaymentMethod ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. Required for new PayPal payment methods, but not required when using a previously set up PayPal payment method (via SetupIntent or a PaymentIntent with setup_future_usage). ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a PayPal payment ## Confirm a PayTo payment stripe.confirmPayToPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmPayToPayment in the PayTo payment method creation flow when the customer submits your payment form. When you call the method, it confirms the PaymentIntent with the data you provide, and sends a request to the customer to authorize the transaction. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you've already attached a PaymentMethod, you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmPayToPayment might take some time to complete while waiting for customers to authorize the PayTo agreement, and while waiting for funds to transfer. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle polling for PaymentIntent updates. Default is true. ### without an existing payment method ### Data argument properties - payment_method Pass payment method billing details. - billing_details The billing_details associated with the payment. The email is required if the customer is paying with PayID. - email - name - payto The PayTo payment method details associated with the customer's bank account. Either pay_id or account_number and bsb_number must be provided. - pay_id - account_number - bsb_number ### Example title Confirm without existing payment method ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a PayTo payment ## Confirm a Pix payment stripe.confirmPixPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmPixPayment in the Pix Payment with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide. Note that there are some additional requirements to this flow that are not covered in this reference. Refer to our integration guide for more details. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmPixPayment may take several seconds to complete and display the QR code. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - options An options object to control the behavior of this method. - handleActions Default to be true. Set this to false if you would like to handle displaying the Pix QR code yourself. ### without an existing payment method ### Data argument properties - payment_method Pass payment method paramters or and empty payment method object. ### Example title Confirm without existing payment method ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a Pix payment ## Confirm a PromptPay payment stripe.confirmPromptPayPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmPromptPayPayment in the PromptPay payment method creation flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide and handle the NextAction for the customer to authorize the payment. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmPromptPayPayment may take several seconds to complete and display the QR code. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - options An options object to control the behavior of this method. - handleActions Default to be true. Set this to false if you would like to handle displaying the PromptPay QR code yourself. ### Without an existing payment method ### Data argument properties - payment_method Pass payment method billing details. - billing_details The billing_details associated with the payment method. ### Example title Confirm without existing payment method ### With an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with existing payment method ### With an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a PromptPay payment ## Confirm a the related setting Debit payment stripe.confirmSepaDebitPayment(clientSecret: string, data?: object) Use stripe.confirmSepaDebitPayment in the the related setting Direct Debit Payments with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide. Note that there are some additional requirements to this flow that are not covered in this reference. Refer to our integration guide for more details. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmSepaDebitPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method The id of an existing PaymentMethod or an object of collected data. See use cases below for details. - setup_future_usage To set up the the related setting Direct Debit account for reuse, set this parameter to off_session. the related setting Direct Debit only accepts an off_session value for this parameter. If a customer is provided on this PaymentIntent, the PaymentMethod will be attached to the customer when the PaymentIntent transitions to processing. ### with payment data from an Element ### Data argument properties - payment_method Pass an object to confirm the payment using data collected by an ibanElement. - sepa_debit An iban Element. - billing_details The customer's billing_details. name and email are required. - name The customer's name. - email The customer's email. ### Example title Confirm with an Element ### with self collected data ### Data argument properties - payment_method Pass an object to confirm using data collected without an Element. - sepa_debit - iban An the related setting account number. - billing_details The customer's billing_details. name and email are required. - name The customer's name. - email The customer's email. ### Example title Confirm with self collected data ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a the related setting Debit payment ## Confirm a Sofort payment stripe.confirmSofortPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmSofortPayment in the Sofort Payments with Payment Methods flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide. It will then automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmSofortPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - setup_future_usage To set up a the related setting Direct Debit payment method using the bank details from this the related setting payment, set this parameter to off_session. When using this parameter, a customer will need to be set on the PaymentIntent. The newly created the related setting Direct Debit PaymentMethod will be attached to this customer. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. - setup_future_usage To set up a the related setting Direct Debit payment method using the bank details from this the related setting payment, set this parameter to off_session. When using this parameter, a customer will need to be set on the PaymentIntent. The newly created the related setting Direct Debit PaymentMethod will be attached to this customer. ### Example title Confirm with existing payment method ### with collected data ### Data argument properties - payment_method Pass an object to confirm with the customer's name. - sofort An object detailing the related setting specific parameters. - country The country code where customer's bank is located. - billing_details The customer's billing_details. Required when setup_future_usage is set to off_session. - name The customer's name. - email The customer's email. - return_url The url your customer will be directed to after they complete authentication. - setup_future_usage To set up a the related setting Direct Debit payment method using the bank details from this the related setting payment, set this parameter to off_session. When using this parameter, a customer will need to be set on the PaymentIntent. The newly created the related setting Direct Debit PaymentMethod will be attached to this customer. ### Example title Confirm with self collected data ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a Sofort payment ## Confirm a Sunbit payment stripe.confirmSunbitPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmSunbitPayment in the Sunbit Payments flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmSunbitPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### without an existing payment method ### Data argument properties - payment_method Pass payment method billing details. - billing_details The billing_details associated with the payment. - name - email - address - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm without existing payment method ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a Sunbit payment ## Confirm a the related setting payment stripe.confirmTwintPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmTwintPayment in the the related setting payment method creation flow when the customer submits your payment form. When you call the method, it confirms the PaymentIntent with the data you provide, and automatically redirects the customer to authorize the transaction. Once authorization is complete, the customer is redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you've already attached a return_url and a PaymentMethod, you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmTwintPayment might take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### without an existing payment method ### Data argument properties - payment_method Pass payment method billing details. - billing_details The billing_details associated with the payment. - email - name - address - shipping The shipping details for the payment. - name - address - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm without existing payment method ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm an the related setting payment ## Confirm a UPI payment stripe.confirmUpiPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmUpiPayment when customer submits your payment form. When called, it will confirm the PaymentIntent, and return a Promise which resolves with the PaymentIntent having its final payment status. Since the authentication for UPI payments happen on customer's mobile device, and the timeout for such authentication is 5 minutes, the Promise returned by stripe.confirmUpiPayment can take upto 5 minutes to resolve. We recommend showing an appropriate message to the customer indicating their payment is being processed. > Note that stripe.confirmUpiPayment may take several minutes to complete. > During that time, you should disable your form from being resubmitted and show a waiting > indicator like a spinner. If you receive an error result, you should be sure to show that > error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually poll for the PaymentIntent status. Default is true. ### with an existing PaymentMethod ### Example title Confirm with an existing PaymentMethod ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a UPI payment ## Confirm a WeChat Pay payment stripe.confirmWechatPayPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmWechatPayPayment in the WeChat Pay payment method creation flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide and handle the NextAction for the customer to authorize the payment. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmWechatPayPayment may take several seconds to complete and display the QR code. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - options An options object to control the behavior of this method. - handleActions Set this to false if you would like to handle displaying the WeChat Pay QR code yourself. ### Without an existing payment method ### Data argument properties - payment_method Pass payment method billing details. - billing_details The billing_details associated with the payment method. ### Example title Confirm without existing payment method ### With an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. ### Example title Confirm with existing payment method ### With an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm a WeChat Pay payment ## Confirm an Zip payment stripe.confirmZipPayment(clientSecret: string, data?: object, options?: object) Use stripe.confirmZipPayment in the Zip payment method creation flow when the customer submits your payment form. When called, it will confirm the PaymentIntent with data you provide, and it will automatically redirect the customer to authorize the transaction. Once authorization is complete, the customer will be redirected back to your specified return_url. When you confirm a PaymentIntent, it needs to have an attached PaymentMethod. In addition to confirming the PaymentIntent, this method can automatically create and attach a new PaymentMethod for you. If you have already attached a return_url and a PaymentMethod you can call this method without needing to provide any additional data. These use cases are detailed in the sections that follow. > Note that stripe.confirmZipPayment may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. Refer to the Payment Intents API for a full list of parameters. - payment_method Either the id of an existing PaymentMethod, or an object containing data to create a PaymentMethod with. See the use case sections below for details. - return_url The url your customer will be directed to after they complete authentication. - options An options object to control the behavior of this method. - handleActions Set this to false if you want to manually handle the authorization redirect. Default is true. ### without an existing payment method ### Data argument properties - payment_method Pass payment method billing details. - billing_details The billing_details associated with the payment. - email - name - address - shipping The shipping details for the payment. - name - address - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm without existing payment method ### with an existing payment method ### Data argument properties - payment_method The id of an existing PaymentMethod. - return_url The url your customer will be directed to after they complete authentication. ### Example title Confirm with existing payment method ### with an attached PaymentMethod ### Example title Confirm with an attached PaymentMethod ### Example title Confirm an Zip payment ## Retrieve a PaymentIntent stripe.retrievePaymentIntent(clientSecret: string) Retrieve a PaymentIntent using its client secret. - clientSecret The client secret of the PaymentIntent to retrieve. ### Example title Retrieve a PaymentIntent ## Verify with micro-deposits for payment stripe.verifyMicrodepositsForPayment(clientSecret: string, data?: object) Use stripe.verifyMicrodepositsForPayment in the Accept a Canadian pre-authorized debit payment or Accept an ACH Direct Debit payment flow to verify a customer's bank account with micro-deposits. It should be only called when PaymentIntent is in the requires_action state, and contains a next_action field that has a type equal to verify_with_microdeposits. Refer to our integration guide for more details. > 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. > Refer to our integration guide for more details. - clientSecret The client secret of the PaymentIntent. - data Data to be sent with the request. - amounts An array of two positive integers, in cents, equal to the values of the micro-deposits sent to the bank account. - descriptor_code A six-character code starting with SM present in the microdeposit sent to the bank account. ### Example title Verify with micro-deposits for payment ## Create a Radar session stripe.createRadarSession() 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 to associate client browser information with those charges and improve Radar's ability to identify fraud. We've prefilled the example with a sample test API key. Don’t submit any personally identifiable information in requests made with this key. To create a Stripe object using your account, replace the sample API key with your actual API key or sign in. > 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. ### Example title Create a Radar Session ## Handle a next action stripe.handleNextAction(options: object) Use stripe.handleNextAction in the finalizing payments on the server flow to finish confirmation of a PaymentIntent with the requires_action status. It will throw an error if the PaymentIntent has a different status. Depending on the payment method and required action, the customer may be temporarily redirected from your site and brought back to the return_urlparameter provided when the PaymentIntent is confirmed. > Note that stripe.handleNextAction may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. > > Additionally, stripe.handleNextAction may trigger a 3D Secure authentication challenge. > The authentication challenge requires a context switch that can be hard to follow on a screen-reader. > Ensure that your form is accessible by ensuring that success or error messages are clearly read out. - options - clientSecret The client secret of the PaymentIntent. ### Example title Handle a next action ## Handle a card action stripe.handleCardAction(clientSecret: string) Use stripe.handleCardAction in the Payment Intents API manual confirmation flow to handle a PaymentIntent with the requires_action status. It will throw an error if the PaymentIntent has a different status. > Note that stripe.handleCardAction may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. > > Additionally, stripe.handleCardAction may trigger a 3D Secure authentication challenge. > The authentication challenge requires a context switch that can be hard to follow on a screen-reader. > Ensure that your form is accessible by ensuring that success or error messages are clearly read out. - clientSecret The client secret of the PaymentIntent to handle. ### Example title Handle a card action ## Collect bank account details for payment stripe.collectBankAccountForPayment(options: object) Use stripe.collectBankAccountForPayment in the Accept a payment flow for the ACH Direct Debit payment method to collect the customer’s bank account in your payment form. When called, it will automatically load an on-page modal UI to collect bank account details and verification, and attach the PaymentMethod to the PaymentIntent. - options Data to be sent with the request. - clientSecret The client secret of the PaymentIntent. - params - payment_method_type The payment method type for the bank account details (e.g. us_bank_account) - payment_method_data Payment method specific data to be sent with the request - billing_details The customer's billing_details. name is required. Providing email allows your customer to receive ACH Direct Debit mandate and microdeposit emails. - name The customer's name. The first and last name must be at minimum 2 characters each. - email The customer's email. - address The customer's billing address. - city City, district, suburb, town, or village. - country Two-letter country code (ISO 3166-1 alpha-2). - line1 Address line 1 (e.g., street, PO Box, or company name). - line2 Address line 2 (e.g., apartment, suite, unit, or building). - postal_code ZIP or postal code. - state State, county, province, or region. ### Example title Collect bank account details for payment