Skip to content

x402 ​

x402 is payment-gated prompting for public agents. MCP access may be open, but prompt_agent can still require a payment signature.

When it applies ​

On agent-scoped MCP (/mcp/agents/{agentUuid}), a prompt_agent call may return:

json
{
  "error": "payment_required",
  "payment_info": {
    "recipient": "…",
    "chain": "…",
    "currency": "…",
    "amount": "…"
  }
}

Retry with header:

http
payment-signature: <base64(JSON)>

Payload before base64:

json
{
  "amount": "string",
  "currency": "string",
  "chain": "string",
  "recipient": "string",
  "transactionHash": "optional string",
  "timestamp": 1700000000000
}

Validation: recipient must match the agent wallet; amount/currency must match the gate; timestamp ~5 minutes fresh. Success may include payment-response.

Discover agents ​

http
GET https://api.joai.ai/.well-known/agents.json

Entries include uuid, mcp_endpoint, a2a_card, and x402 pricing.

Product UI ​

Configure public paid prompting under Agent settings → Monetization (store.pricing).