Basic direct debit
Here’s a simple example of creating a direct debit:Required fields
Document level
The PAIN format version. Use
pain.008.001.01, pain.008.003.01, pain.008.001.02, or pain.008.003.02 for direct debits.The SEPA direct debit scheme type.
The sequence type of the direct debit.
Unique message identifier. Maximum length: 35 characters.
When the payment file was created.
Name of the creditor initiating the collection. Maximum length: 70 characters.
Position level (creditor)
Unique payment information identifier. Maximum length: 35 characters.
Creditor name (your company). Maximum length: 70 characters.
Creditor IBAN (your account).
Creditor BIC.
When you want to collect the payment from customer accounts.
Payment level (debtor)
Unique transaction identifier. Maximum length: 35 characters.
Debtor name (customer). Maximum length: 70 characters.
Debtor IBAN (customer account).
Debtor BIC.
Amount to collect in the specified currency.
Payment description or reference information.
Unique mandate reference identifier.
Date when the customer signed the mandate.
Local instrumentation
ThelocalInstrumentation field specifies the SEPA direct debit scheme (from index.ts:119):
- CORE
- COR1
- B2B
SEPA Core Direct Debit
- For consumer and business payments
- Most common scheme type
- 5 business days lead time for first collection
- 2 business days for recurring collections
From the source code (index.ts:249-251), the local instrumentation is added to the payment type information structure in the XML output.
Sequence types
ThesequenceType field indicates the position of the collection in a series (from index.ts:120):
FRST - First
FRST - First
Use for the first direct debit in a series of recurring payments:
- Requires 5 business days lead time (CORE)
- Requires valid mandate
- Longer processing time than recurring
RCUR - Recurring
RCUR - Recurring
Use for subsequent direct debits in a series:
- Requires 2 business days lead time (CORE)
- Must have had at least one FRST collection
- Most efficient for subscriptions
OOFF - One-off
OOFF - One-off
Use for single direct debits:
- Requires 5 business days lead time (CORE)
- No follow-up collections expected
- Good for one-time payments
FNAL - Final
FNAL - Final
Use for the last direct debit in a series:
- Requires 2 business days lead time (CORE)
- Closes the mandate sequence
- Use when ending a subscription
From the source code (index.ts:252), the sequence type is added to the payment information structure in the XML output.
Collection dates
ThecollectionDate determines when money is collected from customer accounts:
Mandate information
Every direct debit requires mandate information from the customer:What is a mandate?
What is a mandate?
A mandate is a written authorization from the customer allowing you to collect payments from their account.Required information:
- Unique mandate identifier
- Customer signature
- Date of signature
- Creditor identifier
- Can cancel mandate at any time
- Can request refund within 8 weeks (CORE)
- No refund rights for B2B
From the source code (index.ts:349-355), mandate information is included in the DirectDebitTransaction structure in the XML output.
Multiple collections
Collect from multiple customers in a single file:Creditor scheme ID
From the source code (index.ts:266-277), the creditor scheme ID is automatically generated from the position ID:You must obtain a valid creditor identifier from your national bank association before using direct debits. In Germany, apply through the Bundesbank.
Recurring subscriptions example
Here’s a complete example for monthly recurring subscriptions:Next steps
Credit transfers
Learn about sending payments with credit transfers
PAIN versions
Compare all PAIN format versions
Validation
Understand validation and error handling
Examples
View more real-world examples