{"id":"rf-creditor-reference-validate","version":"1.0.0","description":"Validate an RF Creditor Reference's ISO 11649 shape and MOD 97-10 check digits, and parse its base reference.","supported_operations":["validate an rf creditor reference","check an iso 11649 structured reference","is this rf payment reference correct","verify a structured creditor reference for a sepa invoice","confirm a remittance reference before reconciling a payment","בדיקת תקינות מספר אסמכתא מובנה לתשלום"],"unsupported_operations":["computing a new RF reference from a base reference (use rf-creditor-reference-compute)","Swiss QR-bill references (use swiss-qr-reference-validate)","IBAN or BIC validation"],"semantics":["electronic = reference with every ASCII space removed, then every ASCII a-z upper-cased to A-Z (no other case folding, no locale). print = electronic split into groups of 4 Unicode code points (so a surrogate pair is never split) joined by a single space. Both are always returned.","shape_ok = electronic matches ^RF[0-9]{2}[A-Z0-9]{1,21}$ (literal 'RF', 2 decimal check digits, 1-21 alphanumeric base-reference characters). If not shape_ok, valid:false, reason:'invalid_character', check_digits:null, base_reference:null.","Otherwise check_digits = electronic[2:4] (as found, not recomputed) and base_reference = electronic[4:].","MOD 97-10 check: rearranged = base_reference + 'RF' + check_digits (the literal letters R, F, never a country code). digits = alnum_to_digits(rearranged). If digits mod 97 != 1, valid:false, reason:'check_digits_mismatch'. Otherwise valid:true, reason:null. Pure string parsing and MOD 97 arithmetic; no pinned dataset."],"limits":{"max_reference_bytes":34},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["reference"],"properties":{"reference":{"type":"string","minLength":1,"maxLength":34}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","check_digits","base_reference","electronic","print"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"enum":[null,"invalid_character","check_digits_mismatch"]},"check_digits":{"type":["string","null"],"pattern":"^[0-9]{2}$"},"base_reference":{"type":["string","null"],"minLength":1,"maxLength":21},"electronic":{"type":"string","minLength":1,"maxLength":34},"print":{"type":"string","minLength":1,"maxLength":42}}},"examples":[{"input":{"reference":"RF18 5390 0754 7034"},"output":{"electronic":"RF18539007547034","print":"RF18 5390 0754 7034","valid":true,"reason":null,"check_digits":"18","base_reference":"539007547034"}},{"input":{"reference":"RF712348231"},"output":{"electronic":"RF712348231","print":"RF71 2348 231","valid":true,"reason":null,"check_digits":"71","base_reference":"2348231"}},{"input":{"reference":"RF19539007547034"},"output":{"electronic":"RF19539007547034","print":"RF19 5390 0754 7034","valid":false,"reason":"check_digits_mismatch","check_digits":"19","base_reference":"539007547034"}}],"execute_url":"/v1/tools/rf-creditor-reference-validate/versions/1.0.0/execute"}