Use Sofort to set up future SEPA Direct Debit payments
Learn how to save bank details from a Sofort payment and charge your customers later with SEPA Direct Debit.
Warning
New businesses can’t accept SOFORT payments and our financial partners are in the process of discontinuing SOFORT. For more information, read our support page.
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.
Sofort is a single use payment method where customers are required to authenticate each payment. With this integration, Stripe charges your customer 1 EUR through Sofort in order to collect their bank details. After your customer authenticates the payment, Stripe refunds the payment and store 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 Sofort to set up SEPA Direct Debit payments, you must activate SEPA Direct Debit in the Dashboard. You must also comply with our Sofort Terms of Service and SEPA Direct Debit Terms of Service.
You can use Checkout in setup mode to collect payment details and set up future SEPA Direct Debit payments using Sofort.
Create or retrieve a CustomerServer-side
To set up future SEPA Direct Debit payments using Sofort, you must attach the SEPA Direct Debit payment method to a Customer.
Create a Customer
object when your customer creates an account with your business. You can retrieve and use a customer’s stored payment method details later, if you associate the ID of the Customer
object with your own internal representation of the customer.
Set up future payments
This guide builds on the foundational set up future payments Checkout integration and describes how to enable Sofort – it shows the differences between setting up future payments for cards and using Sofort.
Enable Sofort as a payment method
When creating a new Checkout Session, you need to add sofort
to the list of payment_
.
Charge the SEPA Direct Debit PaymentMethod laterServer-side
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
When testing your Checkout integration, select Sofort as the payment method and click the Pay button.