Skip to main content
x402 proves a payment happened with a transaction hash, but it carries no receipt format, so verifying a settlement later means going back to the chain. algovoi-x402-receipt-adapter closes that gap. It turns an x402 payment into a settlement attestation: a small JSON object canonicalised under RFC 8785 (JCS) and content addressed with SHA-256, that any party recomputes and verifies offline with a JSON parser, JCS, and SHA-256 alone. No issuer call, no account, no service.

What it produces

  • x402_payment_ref binds the settlement transaction to the requested amount and currency plus a timestamp, so a transaction hash can no longer be re-bound to a different amount.
  • settlement_ref is "sha256:" + SHA-256(JCS(attestation)), the content address of the whole receipt. Recompute it in any language and it matches byte for byte.

Three ways to capture

Every option produces the same settlement_ref for the same underlying payment. Settlement fields follow the x402 Foundation SettleResponse model (transaction, network, payer); the legacy names txHash and networkId are accepted as aliases.

Bind it into the Keystone

The settlement binds into the Keystone accountability chain with the published algovoi-substrate binding primitive, introducing no new hashing. One call ties a payment to the verified agent action that authorised it, so an x402 payment becomes part of an offline-verifiable record that runs from identity through to settlement.
A worked example, the Keystone carried all the way through real settlements, is on the proven on-chain page.

Install

Apache License 2.0. manylinux wheels for Python 3.11 to 3.13, from the AlgoVoi index:

Verify offline

The check is pure and deterministic: "sha256:" + SHA-256(JCS(attestation)). Recompute it with any RFC 8785 canonicaliser and a SHA-256 and the reference matches. No trust in AlgoVoi is required.

See also