Back to agents docs
x402 quickstart
Run the first paid API call
A 402 challenge is only a quote. Orrery records paid usage only after the same request is replayed with an API-credit key or a valid x402 payment proof.
operator checklist
The success condition
You are done when the paid endpoint returns 200 with meta.payment_status equal to settled. A missing-payment 402 response is expected before that.
Path A: API-credit key
best for customersORRERY_API_KEY="orrery_live_..."
curl -s https://orrery.me/api/x402/v1/brief/today \
-H "X-Orrery-API-Key: $ORRERY_API_KEY" \
| jq '{status: .meta.payment_status, headline: .data.headline}'API keys spend monthly plan credits first. This is easier for Team, Terminal Pro, and Agent credit-pack users than signing a wallet payment on every call.
Path B: x402 payment proof
account-less# 1. Ask for the resource.
curl -i https://orrery.me/api/x402/v1/brief/today | head -30
# HTTP/1.1 402 Payment Required
# PAYMENT-REQUIRED: {"scheme":"exact","network":"eip155:8453",...}
# 2. Settle the quoted challenge with an x402-compatible payer.
PAYMENT="<x402-payment-proof>"
# 3. Replay the same request.
curl -s https://orrery.me/api/x402/v1/brief/today \
-H "X-PAYMENT: $PAYMENT" \
| jq '.meta.payment_status'Orrery is wallet-agnostic. The server only sees the replayed proof and verifies it before returning paid data.
Verify the money loop
- 1. Confirm the paid call returned
200. - 2. Confirm the response says
settled. - 3. Open the private API usage dashboard as an Orrery admin and verify settled or API-credit usage increased.
- 4. Keep the request id, endpoint, and timestamp as the first production payment receipt.
Related docs