stripe.confirmIdealSetup(clientSecret,data?,options?)
with payment data from an Element
Create and attach a new SEPA Direct Debit PaymentMethod with stripe.confirmIdealSetup by passing an idealBank Element to payment_method[ideal]. The new PaymentMethod will be created with the data collected by the Element and will be used to confirm the SetupIntent. Additionally, to create a SEPA Direct Debit PaymentMethod, you are required to collect and include the customer’s name and email address.
Data argument properties
-
payment_
method required object Pass an object to confirm using data collected by an
idealBankElement.Hide payment_method properties
-
ideal required Element
An
idealBankElement. -
billing_
details required object The customer's billing_details.
nameandemailare required.
-
-
return_
url recommended string The url your customer will be directed to after they complete authentication.
stripe .confirmIdealSetup('{SETUP_INTENT_CLIENT_SECRET}', { payment_method: { ideal: idealBankElement, billing_details: { name: 'Jenny Rosen', email: 'jenny@example.com', }, }, }) .then(function(result) { // Handle result.error or result.setupIntent }); with an existing payment method
If you have already created a PaymentMethod, you can pass its id to payment_method when calling stripe.confirmIdealSetup and it will be used to confirm the SetupIntent.
stripe .confirmIdealSetup('{SETUP_INTENT_CLIENT_SECRET}', { payment_method: '{PAYMENT_METHOD_ID}', }) .then(function(result) { // Handle result.error or result.setupIntent }); with self collected data
If you already know the customer’s bank or want to collect it yourself, then you do not need to use the idealBank Element. You can pass in the customer’s bank code directly to create a new PaymentMethod and confirm the SetupIntent.
Data argument properties
-
payment_
method required object Pass an object to confirm using data collected by an
idealBankElement.Hide payment_method properties
-
ideal required object
An object detailing the customer's iDEAL bank.
Hide ideal properties
-
bank required string
The customer's bank.
-
-
billing_
details required object The customer's billing_details.
nameandemailare required.
-
-
return_
url recommended string The url your customer will be directed to after they complete authentication.
stripe .confirmIdealSetup('{SETUP_INTENT_CLIENT_SECRET}', { payment_method: { ideal: { bank: 'abn_amro', }, billing_details: { name: 'Jenny Rosen', email: 'jenny@example.com', }, }, // Return URL where the customer should be redirected after the authorization. return_url: window.location.href, }) .then(function(result) { if (result.error) { // Inform the customer that there was an error. } });