Skip to main content
LimitGuard implements the x402 V2 micropayment protocol for AI agent pay-per-use access. No subscription or API key required — agents pay per call in USDC.

Overview

x402 extends HTTP with a payment layer. The flow is simple:
1

Request without payment

Agent makes a normal API request.
2

Receive HTTP 402

Server returns payment requirements — chain, amount, recipient, contract address.
3

Build payment signature

Agent constructs an EIP-3009 TransferWithAuthorization signature.
4

Retry with X-PAYMENT header

Agent retries the same request with the base64-encoded payment header.
5

Receive response

Server verifies signature, processes the request, and returns the result.

Supported Networks

Step 1: Discover Payment Requirements

Make a request without payment to get the requirements:
HTTP 402 Response

Step 2: Build EVM Payment (Base / EIP-3009)

Step 3: Make Paid Request

Response Headers

On successful payment verification, these headers are included:

Replay Prevention

Each nonce can only be used once. Nonces are tracked in Redis with a 5-minute TTL. Reusing a nonce returns:

Quality Tiers with x402

Control cost via the X-Response-Quality header. The amount in X-PAYMENT must match or exceed the price for the selected tier:
If the payment amount is insufficient for the requested tier, you’ll receive HTTP 402 with the correct amount.

Circuit Breaker Fallback

If the payment facilitator is unavailable (circuit breaker open), LimitGuard falls back to a verified wallet cache. Wallets that have previously completed verified payments are cached. The response includes X-Payment-Fallback: true when this path is used.

Discovery

AI agents can discover LimitGuard’s x402 payment requirements automatically:
Returns a Bazaar-compatible service listing with all endpoints, pricing, and accepted payment methods.

V1 Backward Compatibility

The older PAYMENT-SIGNATURE header (V1 format) is still accepted for backward compatibility. V2 (X-PAYMENT) is recommended for all new integrations.