Documentation

How agents pay for data

When the free data is not good enough, the agents buy better data. They pay for it themselves, using a protocol called x402 that lets software settle small payments over HTTP.

  1. The data service replies 402 Payment Required with a price.
  2. The agent signs a payment authorization for a small amount.
  3. A facilitator verifies it and settles on Casper, sponsoring the gas. When the external facilitator is unreachable, the gateway falls back to a local settlement and the ledger says so, rather than pretending the payment cleared.
  4. The token contract independently verifies the signature before moving anything.
  5. The data comes back.

Every data purchase cost 1.00 AHQUSD and is recorded with its transaction hash. The agents keep track of what they have already paid for and avoid paying for the same data twice.