x402 Protocol
HYRE uses the x402 protocol for payment — an extension of HTTP that turns the402 Payment Required status code into a machine-readable payment flow. Agents pay per request with no API keys, no OAuth, and no subscriptions.
How x402 Works
1
Agent sends request without payment
2
Server returns 402 with payment details
3
Agent signs payment and retries
The agent constructs a payment payload, signs it with its wallet, base64-encodes it, and attaches it as the
X-PAYMENT header.4
Facilitator verifies and settles
The HYRE server forwards the payment to a facilitator that verifies the signature and settles the USDC transfer on-chain. If valid, the server processes the request and returns data.
Facilitators
HYRE uses two facilitators depending on the payment chain:
The facilitator acts as a neutral third party:
- Verify — Checks the payment signature is valid and the amount is sufficient.
- Settle — Executes the USDC transfer on-chain after the server delivers data.
Payment Header Format
TheX-PAYMENT header contains a base64-encoded JSON object: