Use iDEAL to set up future SEPA Direct Debit payments
Learn how to save bank details from an iDEAL payment and charge your customers later with SEPA Direct Debit.
Caution
We recommend that you follow the Set up future payments guide. If you’ve already integrated with Elements, see the Payment Element migration guide.
iDEAL is a single use payment method where customers are required to authenticate each payment. With this integration, Stripe charges your customer 0.01 EUR through iDEAL to collect their bank details. After your customer authenticates the payment, Stripe refunds the payment and stores your customer’s IBAN in a SEPA Direct Debit payment method. You can then use the SEPA Direct Debit PaymentMethod to accept payments or set up a subscription.
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.
Setting up future SEPA Direct Debit payments using iDEAL in your app consists of creating a SetupIntent to track the process, collecting mandate acknowledgement, and redirecting your customer to iDEAL. Stripe uses the SetupIntent to track and handle all the states of the setup until the setup completes.
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.
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 { 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 SetupIntentServer-side
Create a SetupIntent
with the Customer’s ID and set payment_method_types to ideal
. The SetupIntent
tracks the steps of the set-up process. For iDEAL, this includes collecting a SEPA Direct Debit mandate from the customer and tracking its validity.
Collect payment method details and mandate acknowledgementClient-side
In your app, collect your customer’s full name, email address, and the name of their bank (for example, abn_
).
export default function IdealPaymentScreen() { const [name, setName] = useState(); const [bankName, setBankName] = 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)} /> <TextInput placeholder="Bank name" onChange={(value) => setBankName(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 creates the accepted mandate. As the customer has implicitly signed the mandate when accepting these terms, you must communicate these terms in your form or through email.
Submit the payment method details to StripeClient-side
Retrieve the client secret from the SetupIntent you created and call confirmSetupIntent
. This presents a webview where the customer can complete the setup on their bank’s website or app. Afterwards, the promise resolves with the result of the SetupIntent.
export default function IdealPaymentScreen() { const [name, setName] = useState(); const [bankName, setBankName] = useState(); const [email, setEmai] = useState(); const handlePayPress = async () => { const billingDetails: PaymentMethodCreateParams.BillingDetails = { name: 'Jenny Rosen', email: 'jenny.rosen@example.com', }; }; const { error, setupIntent } = await confirmSetupIntent(clientSecret, { paymentMethodType: 'Ideal', paymentMethodData: { billingDetails, bankName, } }); if (error) { Alert.alert(`Error code: ${error.code}`, error.message); } else if (setupIntent) { Alert.alert( 'Success', `Setup intent created. Intent status: ${setupIntent.status}` ); } 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 SetupIntent and expanding the latest_
field where you will find the generated_
ID inside of payment_
.
Create a PaymentIntent with the SEPA Direct Debit and Customer IDs.
Test your integration
Using your test API keys to confirm the SetupIntent. After confirming, you’re redirected to a test page with options to authorize or fail the payment method setup.
- Click Authorize test payment to test the case when the setup is successful. The SetupIntent transitions from
requires_
toaction succeeded
. - Click Fail test payment to test the case when the customer fails to authenticate. The SetupIntent transitions from
requires_
toaction requires_
.payment_ method