Set up a subscription with iDEAL and SEPA Direct Debit
Learn how to create and charge a subscription with iDEAL and SEPA Direct Debit.
iDEAL is a single use payment method that requires customers to authenticate each payment. After your customer authenticates the payment, Stripe saves your customer’s IBAN in a SEPA Direct Debit payment method. You can then use the SEPA Direct Debit payment method to accept future payments.
With this integration, Stripe charges the first Subscription payment through iDEAL to collect your customer’s bank details. If you’re offering a free trial, Stripe charges your customer 0.01 EUR through iDEAL to collect their bank details and immediately refunds it.
A Checkout Session represents the details of your customer’s intent to purchase. You create a Session when your customer wants to start a subscription. After redirecting your customer to a Checkout Session, Stripe presents a payment form where your customer can complete their purchase. After your customer completes a purchase, they’re redirected back to your site.
Set up StripeServer-side
Install the Stripe client of your choice:
Install the Stripe CLI (optional). The CLI provides webhook testing, and you can run it to create your products and prices.
From the command-line, use an install script or download and extract a versioned archive file for your operating system to install the CLI.
To run the Stripe CLI, you must also pair it with your Stripe account. Run stripe login
and follow the prompts. For more information, see the Stripe CLI documentation page.
Create the pricing modelDashboardStripe CLI
Create your products and their prices in the Dashboard or with the Stripe CLI.
This example uses a fixed-price service with two different service-level options: Basic and Premium. For each service-level option, you need to create a product and a recurring price. (If you want to add a one-off charge for something like a setup fee, create a third product with a one-off price. To keep things simple, this example doesn’t include a one-off charge.)
In this example, each product bills at monthly intervals. The price for the Basic product is 5 EUR. The price for the Premium product is 15 EUR.
For other pricing models, see Billing examples.
Create a Checkout SessionClient-sideServer-side
Add a checkout button to your website that calls a server-side endpoint to create a Checkout Session.
<html> <head> <title>Checkout</title> </head> <body> <form action="/create-checkout-session" method="POST"> <button type="submit">Checkout</button> </form> </body> </html>
Create a Session with the ID of an existing Price. Make sure that the mode is set to subscription
and that you pass at least one recurring price. You can add one-off prices in addition to recurring prices. After creating the Checkout Session, redirect your customer to the URL returned in the response.
When creating a Session, you can specify payment_
or have Stripe automatically pick payment methods based on your Dashboard settings. If you don’t specify payment_
, you must turn on iDEAL recurring payments in the Dashboard. This enables SEPA Direct Debit for recurring iDEAL payments only, but doesn’t turn on SEPA Direct Debit payments as a stand alone payment method.
When your customer successfully completes their payment, they’re redirected to the success_
, a page on your website that informs the customer that their payment was successful. Make the Session ID available on your success page by including the {CHECKOUT_
template variable in the success_
as in the above example.
When your customer clicks on your logo in a Checkout Session without completing a payment, Checkout redirects them back to your website by navigating to the cancel_
. Typically, this is the page on your website that the customer viewed prior to redirecting to Checkout.
Checkout Sessions expire 24 hours after creation by default.
Caution
Don’t rely on the redirect to the success_
alone for detecting payment initiation, as:
- Malicious users could directly access the
success_
without paying and gain access to your goods or services.url - Customers may not always reach the
success_
after a successful payment—they might close their browser tab before the redirect occurs.url
Confirm the payment is successful
When your customer completes a payment, they’re redirected to the URL that you specified as the success_
. This is typically a page on your website that informs your customer that their payment was successful.
Use the Dashboard, a custom webhook, or a third-party plugin to handle post-payment events like sending an order confirmation email to your customer, logging the sale in a database, or starting a shipping workflow.
You can use plugins like Zapier to automate updating your purchase fulfillment systems with information from Stripe payments.
Some examples of automation supported by plugins include:
- Updating spreadsheets used for order tracking in response to successful payments
- Updating inventory management systems in response to successful payments
- Triggering notifications to internal customer service teams using email or chat applications
Test the integration
Using your test API keys, select any bank from the list. After confirming, you’re redirected to a test page with options to authorise or fail the payment.
- Click Authorise test payment to test the case when the setup is successful.
- Click Fail test payment to test the case when the customer fails to authenticate.