Agent Spend Authorization for HTTP 402 Payment Flows
The x402 protocol enables AI agents to pay for APIs with USDC on Base L2. Grantex adds the missing layer: proving the agent was authorized to spend. No compromised agents draining wallets. No unauthorized payments.
x402 solves payments. Grantex solves authorization.
x402 proves a payment was made, but not that the paying agent was authorized. A compromised agent can drain a wallet by invoking x402-gated APIs with no scope, no limit, no audit trail, and no kill switch.
Every x402 payment carries a Grantex Delegation Token (GDT) — a W3C Verifiable Credential that encodes who authorized the spend, what scope it covers, the maximum spend limit, the expiry, and the full delegation chain.
Four steps from delegation to data.
Principal issues a scoped delegation token: weather:read, $10/day, 24h expiry.
Agent sends the request with X-Grantex-GDT header containing the signed JWT.
API returns 402, agent pays with USDC, API verifies both payment and GDT.
Every authorization event is logged: who, what, when, how much.
Three APIs cover the entire flow.
W3C Verifiable Credential 2.0 encoded as a JWT, signed with Ed25519.
What APIs the agent can access: weather:read, news:*, etc.
Maximum spend per period: $10 USDC per 24 hours.
Full chain from organization to principal to agent.
Target blockchain for payments: Base L2.
Standards-compliant Verifiable Credentials for interoperability.
Fast, secure EdDSA cryptographic signatures. Offline verification.
Per-period caps prevent wallet drain. $10/day, $100/week, etc.
Revoke a compromised agent's token immediately. Sub-second enforcement.
Every issuance, verification, and rejection is logged. Exportable for compliance.
Built for USDC on Base L2. Pluggable payment handlers for any chain.