Store and retrieve messages with x402 payments. Pay with USDC, get a UUID handle, retrieve anytime.
POST a JSON body to the API endpoint. The server responds with HTTP 402 and payment details.
Your x402-compatible client signs a USDC payment on Base and retries the request with the payment header.
The server verifies payment, processes your request, and returns the result.
# Using awal CLI (x402 client)
npx awal@latest x402 pay \
/api/echo \
-X POST \
-H "Content-Type: application/json" \
-d '{"message": "Hello, world!"}' \
--json
# Returns: {"id": "uuid-handle"}npx awal@latest x402 pay \
/api/echo/{id} \
--json
# Returns: {"message": "Hello, world!", "timestamp": "..."}Accept: text/markdown for a machine-readable version.