sepa
Pure SEPA payment utilities for Rust.
Zero I/O. No async. No domain assumptions. Nof64in monetary arithmetic.
Features
| Module | What it provides |
|---|---|
iban |
IBAN validation — ISO 13616 mod-97 algorithm |
bic |
BIC validation — ISO 9362 format rules |
pain008 |
pain.008.003.02 XML builder — SEPA Core Direct Debit (Lastschrift) |
pain001 |
pain.001.003.03 XML builder — SEPA Credit Transfer (Überweisung) |
camt054 |
Typed CAMT.054 entry — Bank-to-Customer Notification (ISO 20022) |
creditor_id |
SEPA Creditor Identifier validation — EPC AT-02 (mod-97) |
ct_to_eur_str |
Integer-safe i64 ct → "1234.56" formatter, no f64 |
Quick start
[]
= "0.2"
use ;
use ;
use SequenceType;
let iban = validate_iban.unwrap;
assert_eq!;
// pain.008 — Direct Debit (Lastschrift)
let dd_xml = new
.msg_id
.sequence_type
.add_entry
.build_xml;
// pain.001 — Credit Transfer (Überweisung)
let ct_xml = new
.msg_id
.add_entry
.build_xml;
CAMT.054 (json feature)
= { = "0.2", = ["json"] }
use parse_simple_json;
let raw = json!;
let entry = parse_simple_json.unwrap;
assert_eq!;
assert_eq!; // credit → negative in open-items
Standards
| Standard | Module |
|---|---|
| ISO 13616-1 | iban |
| ISO 9362 | bic |
| ISO 20022 pain.001.003.03 | pain001 |
| ISO 20022 pain.008.003.02 | pain008 |
| ISO 20022 camt.054 | camt054 |
| EPC SEPA Core Rulebook | all |
License
Licensed under either of MIT or Apache-2.0, at your option.