A Fiscal402 receipt is larger than the Fiscal402 API. Anyone can implement a verifier from the public spec and the frozen fixtures.
Algorithm
- Reject unless
specisfiscal402.receiptandspec_versionis1.0.0. - Drop
hashesandsignature. Recursively sort object keys. Serialize compact UTF-8 JSON (fiscal402.sorted-json/1, not RFC 8785). - SHA-256 that UTF-8 string. Compare to
hashes.canonical_payload_sha256. - Resolve
signature.key_idin JWKS. Ed25519-verify the hex digest string. - If UBL is provided, SHA-256 the exact UTF-8 bytes (no XML C14N).
- Require settlement
networkandtx_hash.
Conformance fixtures
TypeScript and Python verifiers in this repository must return the same VERIFIED/INVALID result on those bytes. Tampering the determination must fail canonical match. Unknown kid must fail. v2 documents are unsupported on the v1 verifier.