WooCommerce Payments – SEPA Direct Debit
**SEPA Direct Debit for WooCommerce** adds a SEPA *Lastschrift* (direct debit) payment gateway to WooCommerce. Customers pay by entering their account owner, IBAN and BIC at checkout; the data is validated, stored on the order and the customer profile, and the shop owner can later generate a single SEPA XML file containing all open direct debits to upload to their bank.
It uses the maintained **digitick/sepa-xml** and **php-iban** libraries, is fully **HPOS** (High-Performance Order Storage) compatible and works in both the classic and the **block based checkout**.
Features
- **SEPA direct debit gateway** — a native WooCommerce payment method for SEPA *Lastschrift*.
- **IBAN & BIC validation** — checksum and length validation via the `php-iban` library, SEPA-country checks and IBAN/BIC country matching.
- **Validated creditor data** — Account Owner, IBAN and Creditor Identifier are required; the SEPA Creditor Identifier (Gläubiger-ID) is checked for the correct format and ISO 7064 MOD-97-10 check digits, so an invalid configuration is caught before the export instead of failing hard.
- **Stable mandate reference** — the mandate reference is generated once at checkout and stored on the order, so it stays unchanged even if the reference prefix is edited later (validated against the SEPA character set and length).
- **Smart BIC handling** — 8-character BICs are padded to 11; the BIC is optional for national debits (debtor and creditor IBAN in the same country).
- **SEPA XML export (`pain.008`)** — generate a bank-ready ISO 20022 direct debit file for all open orders with one click (nonce protected).
- **Selectable XML format** — choose the `pain.008` version (default `pain.008.001.02`, plus the EPC 2023 `.08`/`.09` and the legacy German `.003.02`).
- **First vs. recurring debits** — automatically uses `FRST` for the first debit of an account and `RCUR` afterwards.
- **HPOS ready** — all order data is read and written through the WooCommerce order CRUD; no direct `postmeta` access.
- **Block checkout support** — the IBAN/BIC fields are rendered in the modern WooCommerce block checkout as well as the classic checkout.
- **Subscriptions support** — works with WooCommerce Subscriptions (payment data is copied to renewals).
- **Customer convenience** — bank details are stored on the user account and pre-filled on the next checkout, editable in *My Account* and the WordPress profile.
- **Order list column** — shows the SEPA collection status / date directly in the order list.
- **Transaction log** — every generated SEPA file is recorded with date, amount and record count.
- **Protected files** — generated XML files (containing bank data) are stored in a directory protected against direct download.
- **Internationalised** — full text-domain support; German and English documentation included.
