Rf creditor reference validate
rf-creditor-reference-validate · version 1.0.0 · Identifiers & check digits · free, no key needed
Validate an RF Creditor Reference's ISO 11649 shape and MOD 97-10 check digits, and parse its base reference.
Use when you need to: validate an rf creditor reference · check an iso 11649 structured reference · is this rf payment reference correct.
Decide before calling
Read the versioned contract and the supported scope below. Reuse rf-creditor-reference-validate@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use rf-creditor-reference-validate@1.0.0 for validate an rf creditor reference. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- 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
- בדיקת תקינות מספר אסמכתא מובנה לתשלום
Not supported
- 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
Behavior
- 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.
Input
reference(string, required): min length 1; max length 34
Output
valid(boolean, required)reason(one of null, "invalid_character", "check_digits_mismatch", required)check_digits(string or null, required): pattern^[0-9]{2}$base_reference(string or null, required): min length 1; max length 21electronic(string, required): min length 1; max length 34print(string, required): min length 1; max length 42
Limits
- max reference bytes: 34
Example
Request input:
{
"reference": "RF18 5390 0754 7034"
}
Response:
{
"result": {
"electronic": "RF18539007547034",
"print": "RF18 5390 0754 7034",
"valid": true,
"reason": null,
"check_digits": "18",
"base_reference": "539007547034"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "rf-creditor-reference-validate",
"version": "1.0.0",
"input": {
"reference": "RF18 5390 0754 7034"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/rf-creditor-reference-validate/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"reference":"RF18 5390 0754 7034"}'
The machine-readable contract is at /v1/tools/rf-creditor-reference-validate/versions/1.0.0.
CLI
node cli.mjs run rf-creditor-reference-validate 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Rf creditor reference compute: Compute the MOD 97-10 check digits and full ISO 11649 RF Creditor Reference for a base reference (invoice number).
- Swiss qr reference validate: Validate a 27-digit Swiss QR-bill QR reference's modulo-10-recursive check digit and reject all-zero references.
- Checkdigit validate: Validate a full value's trailing check digit(s) against a named algorithm (Luhn, Verhoeff, Damm, ISO 7064, GS1, mod 10).
- Iso6346 container validate: Validate an 11-character ISO 6346 container number's mod-11 check digit and split the owner code, category and serial.
- Iban validate: Validate an IBAN's country, registry length, BBAN structure and MOD 97-10 check digits, and parse its bank/branch code.
- Imo number validate: Validate a 7-digit IMO ship identification number's weighted mod-10 check digit, with or without the 'IMO ' prefix.