Skip to content

Showcase: x402 implemented on Algorand, VOI, Hedera, and Stellar — 76/76 tests, CAIP-2 conventions documented #2022

@chopmob-cloud

Description

@chopmob-cloud

AlgoVoi x402 Implementation — Showcase

We've implemented x402 spec on four non-EVM chains as part of AlgoVoi — a multi-tenant payment infrastructure layer for Algorand, VOI, Hedera, and Stellar.

What we built

A drop-in Python adapter (x402_agents_algovoi.py) that:

  • Emits spec v1 compliant X-PAYMENT-REQUIRED headers (x402Version: 1, accepts array, CAIP-2 network IDs, string microunit amounts)
  • Verifies payload.signature proof format with payload.tx_id fallback
  • Covers all four chains with a single adapter — zero pip dependencies, stdlib only
  • Works as Flask/Django/FastAPI middleware or manual WSGI check

Test results

76/76 unit tests passing — spec format, CAIP-2 mappings, microunit conversion, proof formats, all four networks.

End-to-end smoke tested on 13 April 2026 — real 0.01 USDC payments on each chain, x402/verify returning verified: true:

Chain Network ID Asset
Algorand mainnet algorand:mainnet USDC ASA 31566704
VOI mainnet voi:mainnet aUSDC ARC200 302190
Hedera mainnet hedera:mainnet USDC HTS 0.0.456858
Stellar pubnet stellar:pubnet USDC Circle

CAIP-2 conventions for non-EVM chains

Working out the CAIP-2 identifiers for these chains required some research — we've published our findings as a reference document since there's no canonical source for Algorand/VOI/Hedera/Stellar CAIP-2 conventions:

caip2-algorand.md

Covers identifier format, asset notation, address formats, and implementation notes (e.g. Hedera TX ID normalisation, Stellar decimal-to-microunit conversion).

Links

Why this matters for x402

Most x402 implementations target EVM chains. Algorand and Stellar together process a significant volume of Circle USDC — opening x402 to these networks means AI agents can pay for services using USDC that was never on an EVM chain to begin with. VOI extends this to AVM-native DeFi. Hedera adds HTS token support.

The CAIP-2 conventions document is intended as a contribution to anyone else building x402 on these networks — if there's a better place for it (the namespaces registry, a spec PR, etc.) we're happy to move it there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions