- Embedded flow (Embedded on): you collect the IBAN and account holder name in your checkout, and Payrails creates the mandate and the first debit in one call. The customer stays on your checkout, with no redirect. This flow also supports zero-amount mandate setup and merchant-initiated transactions (MIT).
- Hosted flow (Embedded off): Payrails returns a redirect to a Stripe Checkout page, where the customer enters their bank details and accepts the mandate.
Supported workflows
Before you begin
Complete these steps before you send your first SEPA Direct Debit payment through Stripe:- Set up a Stripe integration in your workspace. Follow the Stripe integration setup guide if you don’t have one yet.
- Turn on SEPA Direct Debit in your Stripe Dashboard payment method settings.
- In the Payrails Portal, go to Settings → Integrations, open your Stripe integration, and select SEPA Direct Debit under Payment methods.
- To use the embedded flow, turn on Embedded under SEPA Direct Debit. The setting appears after you select the payment method. Leave it off to use the hosted flow. Save the integration.
- Add these events to the webhook endpoint of your Stripe account. SEPA Direct Debit payments complete only when Stripe sends the result.
- Embedded flow:
payment_intent.processing,payment_intent.succeeded,payment_intent.payment_failed,setup_intent.succeededandsetup_intent.setup_failed. - Hosted flow:
checkout.session.completed,checkout.session.async_payment_succeeded,checkout.session.async_payment_failedandcheckout.session.expired. - Both flows:
charge.refunded, which completes refunds.
- Embedded flow:
- Add SEPA Direct Debit as a payment option in your workflow.
Request fields for Stripe
The fields you send depend on the flow your Stripe integration uses.Embedded flow
Send these fields in the authorize request, in addition to the standard authorize fields. Required fields must be present for the payment to succeed. Payrails sends Optional fields to the PSP when you include them.Hosted flow
Send these fields in the authorize request, in addition to the standard authorize fields. Required fields must be present for the payment to succeed. Payrails sends Optional fields to the PSP when you include them.
The customer enters their IBAN, name and email on the Stripe Checkout page, so you don’t send bank details in the hosted flow.
Authorize a SEPA Direct Debit payment
Call authorize a payment withsepaDirectDebit as the paymentMethodCode.
Embedded flow
Send the IBAN and account holder name as payer fields, and the customer’s IP address and user agent for the mandate. SetstoreInstrument to true to charge later payments against the same mandate.
Authorize request
paymentInstrumentId saved by the first payment and set meta.order.processingType. Leave out the payer fields and meta.clientContext, because the payment reuses the existing mandate.
MIT authorize request
Hosted flow
Send the order lines and asuccess URL. The response includes the redirect to the Stripe Checkout page.
Authorize request
success URL and the payment stays pending until the debit settles.
In both flows, confirm the result through webhook notifications or the execution status before you fulfill the order.
How Stripe handles SEPA Direct Debit
- Stripe accepts SEPA Direct Debit only in EUR. Payrails rejects other currencies before calling Stripe.
- Stripe captures SEPA Direct Debit payments automatically. When the debit settles, Payrails marks the payment as captured.
- In the embedded flow, Payrails sends the mandate acceptance to Stripe with the customer’s IP address and user agent, and sets the mandate up for reuse. MIT payments charge the saved Stripe payment method against that mandate.
- A zero-amount payment in the embedded flow sets up the mandate without debiting the account, and completes in the authorize response. Send it as a customer-initiated payment with
storeInstrumentset totrue. - Payrails doesn’t store the IBAN. Stripe returns only the last four digits, which Payrails keeps with the payment instrument.
- If the bank rejects the debit, Payrails marks the payment as failed with the reason Stripe reports.
- Refunds work after the debit settles. Refund the full amount or part of it. The refund completes when Stripe sends the
charge.refundedevent.