Sign in

    mooniso_lite

    MoonBit ISO 20022 pain.001 validator.

    moonbit
    iso20022
    pain001
    validator
    finance
    Download zip
    Author
    Version
    0.1.0
    License
    Apache-2.0
    Last updated
    22 hours ago
    Downloads
    1

    Dependencies

    CI

    #MoonISO Lite

    MoonBit command-line validator for ISO 20022 pain.001 payment messages.

    #Status

    Current support: pain.001.001.03 core fields and rules.

    #Run

    scripts/check.sh # Or run the commands directly: moon check moon test moon run cmd/main -- fixtures/valid_pain001.xml moon run cmd/main -- --format json fixtures/valid_pain001.xml moon run cmd/main -- --format markdown fixtures/invalid_pain001.xml

    #Rules

    • Message ID is required.
    • Creation date time is required.
    • At least one payment instruction is required.
    • Payment instruction ID is required.
    • Requested execution date is required.
    • End-to-end ID is required and must be unique.
    • Instructed amount and currency are required.
    • NbOfTxs must be an unsigned integer and match the parsed transaction count.
    • Date, datetime, currency and amount formats are checked.
    • CtrlSum must match the sum of instructed amounts when present.

    #License

    Apache-2.0

    #Project description

    Diagnostic

    pub struct Diagnostic {
    code : String
    path : String
    message : String
    }

    Validation result for one pain.001 document.

    Pain001Summary

    pub struct Pain001Summary {
    message_id : String?
    creation_datetime : String?
    payment_instruction_count : Int
    transaction_count : Int
    }

    Basic information extracted from an ISO 20022 pain.001 message.

    Pain001Summary::to_text

    fn Pain001Summary::to_text(self : Pain001Summary) -> String

    ValidationReport

    pub struct ValidationReport {
    summary : Pain001Summary
    diagnostics : Array[Diagnostic]
    }

    ValidationReport::is_valid

    fn ValidationReport::is_valid(self : ValidationReport) -> Bool

    ValidationReport::to_json

    fn ValidationReport::to_json(self : ValidationReport) -> String

    ValidationReport::to_markdown

    fn ValidationReport::to_markdown(self : ValidationReport) -> String

    ValidationReport::to_text

    fn ValidationReport::to_text(self : ValidationReport) -> String

    summarize_pain001

    fn summarize_pain001(xml_text : String) -> Pain001Summary raise
    XmlError

    validate_pain001

    fn validate_pain001(xml_text : String) -> ValidationReport raise
    XmlError

    version

    fn version() -> String

    Public version marker used by the CLI and tests.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io