Crates.io | open-payments-fednow |
lib.rs | open-payments-fednow |
version | 1.0.7 |
source | src |
created_at | 2024-10-08 10:39:11.352284 |
updated_at | 2024-11-09 07:08:32.929992 |
description | Open Payments - Message Parsing Library - FedNow |
homepage | https://github.com/Open-Payments/messages |
repository | https://github.com/Open-Payments/messages |
max_upload_size | |
id | 1401005 |
size | 827,345 |
The library provides tools for parsing, validating, and transforming financial messages, with support for ISO 20022 and FedNow message formats. The library is designed to help developers integrate financial message handling into their Rust applications, using serde for (de)serialization.
You’ll need the following installed to build and use this library:
Add the following to your Cargo.toml
to start using the library in your Rust project:
[dependencies]
# This dependency includes support for the entire ISO 20022 message formats.
# The "payments" feature enables various ISO 20022 message categories, such as pacs, pain, camt, etc.
# If you only need specific message types, you can enable just those features (e.g., "pacs", "pain").
open-payments-iso20022 = { version = "1.0.1", features = ["payments"] }
# This dependency provides support for the FedNow message formats.
# You get full support for parsing and serializing FedNow messages out of the box.
open-payments-fednow = "1.0.1"
The ISO20022 message library open-payments-iso20022
provides several features to allow you to include only the message types relevant to your use case. Here’s a breakdown of the available features:
[features]
default = ["head"] # Default feature, includes the basic header message.
iso20022 = ["payments"] # Enables all payment-related ISO 20022 messages.
payments = ["acmt", "admi", "auth", "camt", "head", "pacs", "pain", "reda", "remt"] # Includes all payments-related ISO 20022 message types.
# Individual ISO 20022 message modules:
acmt = ["open-payments-iso20022-acmt"] # Account Management messages
admi = ["open-payments-iso20022-admi"] # Administrative messages
auth = ["open-payments-iso20022-auth"] # Authorization messages
camt = ["open-payments-iso20022-camt"] # Cash Management messages
head = ["open-payments-iso20022-head"] # Basic Header messages (default)
pacs = ["open-payments-iso20022-pacs"] # Payment Clearing and Settlement messages
pain = ["open-payments-iso20022-pain"] # Payment Initiation messages
reda = ["open-payments-iso20022-reda"] # Reference Data messages
remt = ["open-payments-iso20022-remt"] # Remittance Advice messages
By configuring the features, you can optimize the library for your specific message requirements, minimizing unnecessary dependencies.
Example: Creating an ISO 20022 Message Object
use open_payments_iso20022::document::Document;
use open_payments_iso20022_admi::admi_002_001_01::Admi00200101;
fn main() {
let doc = Document::Admi00200101(Box::new(Admi00200101::default()));
println!("{:?}", doc)
}
Example: Creating a FedNow Message Object
Similarly, here’s an example of how to create a FedNow message object:
use open_payments_fednow::document::Document;
use open_payments_fednow::iso::pacs_008_001_08::FIToFICustomerCreditTransferV08;
fn main() {
let doc = Document::FIToFICustomerCreditTransferV08(Box::new(FIToFICustomerCreditTransferV08::default()));
println!("{:?}", doc)
}
The library supports a variety of financial message formats from both ISO 20022 and FedNow, covering key areas of the payment lifecycle.
This extensive support for ISO 20022 messages enables comprehensive coverage of the payment message lifecycle, including administrative processes, investigations, status reports, and transaction instructions.
We welcome contributions from developers to help improve the library. Whether you’re fixing a bug, improving documentation, or adding new message types, your help is appreciated!
git checkout -b feature-branch-name
.git commit -m 'Add some feature'
.git push origin feature-branch-name
.Make sure to review our contributing guidelines before you start.
Here’s what’s coming up:
You can view the complete roadmap here.
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
For any questions or discussions, please reach out via GitHub Issues on our GitHub Issues page.