x402station.io API reference
Bulk prepaid preflight credits
Buy a bearer creditId that lets high-volume agents call /api/v1/preflight without per-call x402 settlement.
This HTML page is served by GET /api/v1/credits. The paid API operation remains POST /api/v1/credits.
x402 challenge example
HTTP/1.1 402 Payment Required
payment-required: <base64 PaymentRequiredResponse>
www-authenticate: x402
content-type: application/json; charset=utf-8
{
"x402Version": 2,
"error": "Payment required",
"resource": {
"url": "https://x402station.io/api/v1/credits",
"description": "Bulk prepaid preflight credits"
},
"accepts": [
{
"scheme": "exact",
"network": "eip155:8453",
"asset": "USDC",
"amount": "500000",
"payTo": "0x4053338C7cB38624C0bc23c900F78Cf8470b4E38",
"maxTimeoutSeconds": 300
}
]
}
Request body
{}
Success response
{
"creditId": "0a44f6b8-3b7d-4f2a-9e3a-2c5fd1b0aa11",
"balance": 1000,
"expiresAt": "2026-09-10T00:00:00.000Z"
}
Error codes
| status | meaning |
|---|---|
400 | Malformed JSON body, invalid URL, or missing required field. |
402 | Payment required. Decode payment-required, sign x402, retry. |
503 | Query/probe pipeline timeout. Treat as failed preflight; do not pay target blindly. |
409 | Payment transaction already minted a credit bundle; existing credit returned when available. |
Notes
- Use X-Credit-Id on /api/v1/preflight. On exhaustion, Preflight falls through to per-call x402.