Save bank details during an iDEAL payment
Learn how to save your customer's IBAN bank details from an iDEAL payment.
Caution
We recommend that you follow the Save payment details during payment guide. If you’ve already integrated with Elements, see the Payment Element migration guide.
iDEAL is a popular single use payment method in the Netherlands where customers are required to authenticate their payment. Customers pay with iDEAL by redirecting to a webview, authorizing the payment, then returning to your app where you get immediate notification on whether the payment succeeded or failed.
You can also use iDEAL to save your customer’s IBAN bank details into a SEPA Direct Debit PaymentMethod. You can then use the SEPA Direct Debit PaymentMethod to accept payments or set up a subscription. This reduces friction for your customer as they don’t have to enter their IBAN again. You also receive their verified name and validated IBAN.
Caution
To use iDEAL to set up SEPA Direct Debit payments, you must activate SEPA Direct Debit in the Dashboard. You must also comply with the iDEAL Terms of Service and SEPA Direct Debit Terms of Service.
Accepting iDEAL payments consists of creating a PaymentIntent object to track a payment, collecting payment method details and mandate acknowledgement, and submitting the payment to Stripe for processing. Stripe uses the PaymentIntent to track and handle all the states of the payment until the payment completes. Use the ID of the SEPA Direct Debit PaymentMethod collected from your initial iDEAL PaymentIntent to create future payments.
Set up StripeServer-sideClient-side
Server-side 
This integration requires endpoints on your server that talk to the Stripe API. Use our official libraries for access to the Stripe API from your server:
Client-side 
The React Native SDK is open source and fully documented. Internally, it uses the native iOS and Android SDKs. To install Stripe’s React Native SDK, run one of the following commands in your project’s directory (depending on which package manager you use):
Next, install some other necessary dependencies:
- For iOS, navigate to the ios directory and run
pod install
to ensure that you also install the required native dependencies. - For Android, there are no more dependencies to install.
Note
We recommend following the official TypeScript guide to add TypeScript support.
Stripe initialization
To initialize Stripe in your React Native app, either wrap your payment screen with the StripeProvider
component, or use the initStripe
initialization method. Only the API publishable key in publishableKey
is required. The following example shows how to initialize Stripe using the StripeProvider
component.
import { useState, useEffect } from 'react'; import { StripeProvider } from '@stripe/stripe-react-native'; function App() { const [publishableKey, setPublishableKey] = useState(''); const fetchPublishableKey = async () => { const key = await fetchKey(); // fetch key from your server here setPublishableKey(key); }; useEffect(() => { fetchPublishableKey(); }, []); return ( <StripeProvider publishableKey={publishableKey} merchantIdentifier="merchant.identifier" // required for Apple Pay urlScheme="your-url-scheme" // required for 3D Secure and bank redirects > {/* Your app code here */} </StripeProvider> ); }
Create a CustomerServer-side
Create a Customer when they create an account with your business and associate it with your internal representation of their account. This enables you to retrieve and use their saved payment method details later.
Create a PaymentIntentServer-side
Create a PaymentIntent
on your server and specify the amount
to collect, the eur
currency, the customer ID, and off_
as an argument for setup future usage. There is no minimum charge amount and iDEAL doesn’t support other currencies. If you have an existing Payment Intents API integration, add ideal
to the list of payment method types.
The PaymentIntent includes the payment method ID and a client secret, which is used on the client side to securely complete the payment process instead of passing the entire PaymentIntent object.
Collect payment method details and mandate acknowledgementClient-side
In your app, collect your customer’s full name and email address.
export default function IdealPaymentScreen() { const [name, setName] = useState(); const [email, setEmai] = useState(); const handlePayPress = async () => { // ... }; return ( <Screen> <TextInput placeholder="Email" onChange={(value) => setEmail(value.nativeEvent.text)} /> <TextInput placeholder="Name" onChange={(value) => setName(value.nativeEvent.text)} /> </Screen> ); }
To process SEPA Direct Debit payments, you must collect a mandate agreement from your customer. Display the following standard authorization text for your customer to implicitly sign the mandate.
Replace Rocket Rides with your company name.
Setting up a payment method or confirming a PaymentIntent creates the accepted mandate. As the customer has implicitly signed the mandate, you must communicate these terms in your form or through email.
Submit the payment to StripeClient-side
Retrieve the client secret from the PaymentIntent you created and call confirmPayment
. This presents a webview where the customer can complete the payment on their bank’s website or app. Afterwards, the promise resolves with the result of the payment.
export default function IdealPaymentScreen() { const [name, setName] = useState(); const [email, setEmai] = useState(); const handlePayPress = async () => { const billingDetails: PaymentMethodCreateParams.BillingDetails = { name: 'Jenny Rosen', email: 'jenny.rosen@example.com', }; }; const { error, paymentIntent } = await confirmPayment(clientSecret, { paymentMethodType: 'Ideal', paymentMethodData: { billingDetails, } }); if (error) { Alert.alert(`Error code: ${error.code}`, error.message); } else if (paymentIntent) { Alert.alert( 'Success', `The payment was confirmed successfully! currency: ${paymentIntent.currency}` ); } return <Screen>{/* ... */}</Screen>; }
Charge the SEPA Direct Debit PaymentMethod later
When you need to charge your customer again, create a new PaymentIntent. Find the ID of the SEPA Direct Debit payment method by retrieving the previous PaymentIntent and expanding the latest_
field where you will find the generated_
ID inside of payment_
.
The SEPA Direct Debit payment method ID is the generated_
ID under payment_method_details in the response.
{ "latest_charge": { "payment_method_details": { "ideal": { "bank": "ing", "bic": "INGBNL2A", "iban_last4": "****", "generated_sepa_debit": "pm_1GrddXGf98efjktuBIi3ag7aJQ", "verified_name": "JENNY ROSEN" }, "type": "ideal" }, }, "payment_method_options": { "ideal": {}
Create a PaymentIntent with the SEPA Direct Debit and Customer IDs.
Test your integration
Use your test API keys to confirm the PaymentIntent. After confirming, you’re redirected to a test page with options to authorize or fail the payment.
- Click Authorize test payment to test the case when the payment is successful. The PaymentIntent transitions from
requires_
toaction succeeded
. - Click Fail test payment to test the case when the customer fails to authenticate. The PaymentIntent transitions from
requires_
toaction requires_
.payment_ method