Skip to content

feat: add pain.001.001.09/13 and pain.008.001.08/12 support#1

Merged
PhilMeyr merged 1 commit into
masterfrom
feat/pain-001-001-09
Apr 3, 2026
Merged

feat: add pain.001.001.09/13 and pain.008.001.08/12 support#1
PhilMeyr merged 1 commit into
masterfrom
feat/pain-001-001-09

Conversation

@PhilMeyr

@PhilMeyr PhilMeyr commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add support for 4 new ISO 20022 schema versions: pain.001.001.09, pain.001.001.13, pain.008.001.08, pain.008.001.12
  • Based on salesking/sepa_king PR #117 by @tobischo, with critical fixes:
    • Bug fix: restored group[:account].bic in direct_debit.rb CdtrAgt block (PR #117 introduced a regression using account.bic, emitting wrong BIC for per-transaction creditor accounts)
    • XSD replacement: swapped German DK Technical Validation Subsets with official ISO 20022 XSDs from iso20022.org
    • Extended scope: added latest versions (.13/.12) in addition to .09/.08

Key changes

  • BICBICFI element for newer schemas (ISO 20022 renaming)
  • Nested ReqdExctnDt/Dt structure for pain.001.001.09+ (DateAndDateTime2Choice)
  • 24 new XSD validation tests (228 total, 0 failures, 100% line coverage)
  • Comprehensive AUDIT.md with remaining improvement items

Context

Older pain.001.001.03 / pain.008.001.02 versions become obsolete in November 2026. CFONB (France) recommends .09/.08 for new implementations since 2023.

Test plan

  • All 228 rspec tests pass (including 24 new ones)
  • XML validated against official ISO 20022 XSDs for all 4 new schemas
  • Credit transfer: with/without BIC, with creditor address, IBAN-only
  • Direct debit: with/without BIC, with debtor address, with alternate creditor account
  • Existing schemas unaffected (204 original tests still pass)

….001.12 support

- Add support for ISO 20022 newer schema versions (.09/.13 for credit
  transfers, .08/.12 for direct debits) using official ISO XSDs
- Use BICFI element instead of BIC for newer schemas (ISO renaming)
- Use nested ReqdExctnDt/Dt structure for pain.001.001.09+
- Fix PR #117 bug: use group[:account].bic (not account.bic) in
  direct_debit.rb CdtrAgt block to preserve per-group creditor BIC
- Add 24 new XSD validation tests (228 total, 0 failures, 100% coverage)
- Include AUDIT.md with comprehensive gem audit findings
@PhilMeyr PhilMeyr merged commit 745dff1 into master Apr 3, 2026
@PhilMeyr PhilMeyr deleted the feat/pain-001-001-09 branch April 3, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant