Skip to main content
Hedera’s contribution to x402 is the exact scheme, which pays a precise amount of HBAR or an HTS fungible token. It is defined in the official spec and ships with a reference TypeScript implementation.

Scheme specification

scheme_exact_hedera.md in the x402 specs — the authoritative definition of the Hedera scheme.

Reference implementation

The @x402/hedera package in the official x402 monorepo.

Key properties

The payment messages

The server advertises PaymentRequirements, including the facilitator’s feePayer in extra:
PaymentRequirements
The client returns a PaymentPayload carrying the Base64-encoded, partially-signed transaction:
PaymentPayload
After submission, the facilitator returns a settlement response:
SettlementResponse
Because the facilitator pays the fee, the spec requires it to verify that the feePayer is never a net sender of value, that net HBAR/token transfers balance to zero, that the amount credited to payTo matches exactly, and that the transaction has not been submitted before (replay protection). These checks protect the facilitator from being drained while sponsoring fees.