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
First, you need a Stripe account. Register now.
Server-side 
This integration requires endpoints on your server that talk to the Stripe API. Use the official libraries for access to the Stripe API from your server:
Client-side 
The Stripe Android SDK is open source and fully documented.
To install the SDK, add stripe-android
to the dependencies
block of your app/build.gradle file:
Note
For details on the latest SDK release and past versions, see the Releases page on GitHub. To receive notifications when a new release is published, watch releases for the repository.
Configure the SDK with your Stripe publishable key so that it can make requests to the Stripe API, such as in your Application
subclass:
Note
Stripe samples also use OkHttp and GSON to make HTTP requests to a server.
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 and email address. Create a PaymentMethodCreateParams object with these details.
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 PaymentLauncher confirm. This presents a webview where the customer can complete the setup on their bank’s website or app. Afterwards, onPaymentResult
is called with the result of the payment.
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