How it works
1
Agent sends a request
The agent calls the x402 sign-up or top-up endpoint.
2
Server responds with 402 challenge
If payment is required, the server returns HTTP 402 with payment negotiation headers describing what to pay, where, and how much.
3
Agent constructs payment
The agent (or x402 client library) constructs a payment authorization using the payer’s wallet (Polygon or Base) and resends the request with payment headers.
4
Payment settles, request completes
The server validates the payment via the x402 facilitator, settles the USDC transfer, and returns a JWT token and workspace details.
The x402 protocol handles payment negotiation automatically. If you’re using an x402-compatible client library, the challenge-response flow is transparent — the client handles it for you.
Sign up via x402
Creates a new workspace (or returns an existing one) by paying with USDC on Polygon or Base.
Initial credits on sign-up: $6.00
Top up credits via x402
Add credits to an existing workspace using USDC on Polygon or Base.The x402 protocol flow
facilitator.payai.network) is a trusted intermediary that validates and settles x402 payments on Polygon and Base.
Claim links
When x402 creates a new workspace for an external wallet, a claim link lets the user connect their email and access the Locus dashboard.Redeem a claim
Git push deploys with x402
x402 users can deploy via git push using their JWT token instead of aclaw_ API key:
claw_ prefix means API key, anything else is treated as a JWT token.
MPP vs x402
Both protocols create the same type of workspace and JWT token. Choose based on which chain your wallet is on. The x402 endpoints accept both Polygon and Base — the client picks which chain to pay on.