Supported versions
From the source code (index.ts:109-117), these are all supported versions:Version structure
PAIN versions follow this pattern:pain.XXX.YYY.ZZ
Credit transfer versions
pain.001.001.02
- Overview
- Features
- When to use
Older credit transfer format, still widely supported.
pain.001.003.02
Identical to pain.001.001.02 with a different variant number. From the source code (index.ts:100), both map to the same type.pain.001.001.03 (Recommended)
- Overview
- Features
- When to use
Current SEPA credit transfer standard.
pain.001.003.03
Identical to pain.001.001.03 with a different variant number. From the source code (index.ts:102), both map toCstmrCdtTrfInitn.
Direct debit versions
pain.008.001.01
- Overview
- Features
- When to use
Older direct debit format.
pain.008.003.01
Identical to pain.008.001.01 with a different variant number.pain.008.001.02 (Recommended)
- Overview
- Features
- When to use
Current SEPA direct debit standard.
pain.008.003.02
Identical to pain.008.001.02 with a different variant number. From the source code (index.ts:106), both map toCstmrDrctDbtInitn.
Key differences between versions
Version 02 vs Version 03
BIC requirement
BIC requirement
Version 02: BIC is required for both partiesVersion 03: BIC is optional (from index.ts:225-230, index.ts:293-295, index.ts:381-383)
End-to-end reference
End-to-end reference
Version 02: OptionalVersion 03: Required (from index.ts:337-341)
Batch booking
Batch booking
Version 02: At document level via
SepaData.batchBooking (from index.ts:173-177)Version 03: At position level via CreditorPayments.batchBooking (from index.ts:238-244)Transaction counts
Transaction counts
Version 02: Only at document levelVersion 03: Both document and position level (from index.ts:238-244)Version 03 includes
NbOfTxs and CtrlSum at both levels for better tracking.XML structure
XML structure
Version 02: Uses format-specific root element (
pain.001.001.02)Version 03: Uses standard SEPA element names (CstmrCdtTrfInitn, CstmrDrctDbtInitn)Version detection
From the source code (index.ts:142-146), the library automatically detects the version number:- Version 2 (02) → Legacy features
- Version 3 (03) → Modern SEPA features
Default version
From the source code (index.ts:126), the default is:painVersion, credit transfer version 03 is used.
Choosing the right version
Check bank requirements
Contact your bank to see which versions they accept. Most modern banks support version 03.
Use version 03 for new projects
Unless you have specific requirements, use:
pain.001.001.03for credit transferspain.008.001.02for direct debits
Consider BIC availability
If you don’t have BIC codes, you must use version 03:
- Version 02: BIC required
- Version 03: BIC optional
Migration guide
From version 02 to 03
Version comparison table
| Feature | pain.001.001.02/03.02 | pain.001.001.03/03.03 | pain.008.001.01/03.01 | pain.008.001.02/03.02 |
|---|---|---|---|---|
| Type | Credit Transfer | Credit Transfer | Direct Debit | Direct Debit |
| BIC Required | Yes | No | No (creditor) | No (creditor) |
| End-to-end Ref | Optional | Required | N/A | N/A |
| Batch Booking | Document level | Position level | Document level | Position level |
| Root Element | pain.001.001.02 | CstmrCdtTrfInitn | pain.008.001.01 | CstmrDrctDbtInitn |
| Status | Older | Current | Older | Current |
Next steps
Credit transfers
Learn how to create credit transfers
Direct debits
Learn how to create direct debits
Validation
Understand validation for each version
Examples
See examples using different versions