Skip to main content

x402 Protocol

HYRE uses the x402 protocol for payment — an extension of HTTP that turns the 402 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

The server returns HTTP 402 with payment requirements in the response body.
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:
ChainFacilitatorURLGas
SolanaDexterhttps://x402.dexter.cashSponsored by HYRE
BasePayAIhttps://facilitator.payai.networkCaller pays (~$0.01)
SKALEPayAIhttps://facilitator.payai.networkFree (sFUEL)
The facilitator acts as a neutral third party:
  1. Verify — Checks the payment signature is valid and the amount is sufficient.
  2. Settle — Executes the USDC transfer on-chain after the server delivers data.

Payment Header Format

The X-PAYMENT header contains a base64-encoded JSON object:
For EVM chains (Base, SKALE), the payload contains an EIP-712 signed authorization instead of a Solana transaction.

Discovery

Agents can discover HYRE’s payment requirements programmatically:

Pay-To Addresses

ChainAddress
Solana7G73PLhKvAPBGTzG5ESAE4coE7QrVeTTKfhTxQZbyGgC
Base (EVM)0xb5998e11E666Fd1e7f3B8e8d9122A755eec1E9b7
SKALE (EVM)0xb5998e11E666Fd1e7f3B8e8d9122A755eec1E9b7
Root paths (/) only accept Solana payments. Use /base/* for Base and /skale/* for SKALE. Sending an EVM payment to a root path returns a 402 redirect hint.