x402: account configuration
Everything a seller needs to issue 402 responses for this account: payTo, accepted assets, paid resources and prices, fees and limits. cryptonlyPaymentMiddleware builds its routes from it.
Required scope: x402.verify.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”object
object
Internal ledger name, for log lines.
The listing name: resource.serviceName in every 402. Null until set.
resource.iconUrl in every 402: the checkout logo, when Bazaar accepts it.
Base network; see networks for every network.
payTo on Base.
object
object
object
object
CAIP-2 network of the asset.
payTo on the asset’s network; null until set up there.
EVM: EIP-712 domain; goes into extra of the payment requirements.
object
Solana: fee payer; goes into extra.feePayer.
object
Path of the resource URL, the route key.
One per currency, in the order the 402 offers them; never empty.
object
Atomic units.
resource.tags in the 402.
object
object
object
False in sandbox: settlements there are free.
Tenant-wide, this UTC month.
Flat fee per confirmed settlement after the free tier: from x402 credits (own wallet) or deducted at credit (Base balance mode).
The x402 credits own-wallet fees are paid from.
object
object
When credits fall below this, USDC atomic units…
…move this much USDC from the balance into credits.
USDC balance of the account, which top-ups draw from.
Free settlements are used up and credits (with auto top-up) do not cover one fee: /settle refuses with fee_balance_insufficient.
object
Gas Cryptonly pays for this tenant per UTC day.
Example
{ "account": { "name": "Main", "serviceName": "Weather API", "status": "active" }, "environment": "production", "network": "eip155:84532", "payTo": { "mode": "wallet", "address": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC" }, "networks": [ { "network": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", "payTo": { "mode": "wallet", "address": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC" } } ], "assets": [ { "symbol": "USDC", "currencyCode": "USDC_BASE", "address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", "decimals": 6, "methods": [ "eip3009" ], "minAmount": "1000", "network": "eip155:84532", "payTo": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", "eip712": { "name": "USDC", "version": "2" }, "feePayer": "7P6XktW1QSA9g7VN2pr77LPP5DVGf9qkwad41cxP81Tk" } ], "resources": [ { "method": "GET", "path": "/weather/:city", "prices": [ { "amount": "1000", "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", "currencyCode": "USDC_BASE", "network": "eip155:84532" } ], "scheme": "exact", "maxTimeoutSeconds": 300, "tags": [ "weather", "forecast" ] } ], "fees": { "freeSettlementsPerMonth": 100, "usedThisMonth": 12, "freeRemainingThisMonth": 88, "settlementFeeUsd": "0.0025", "credits": { "balance": "4200000", "autoTopUp": { "threshold": "1000000", "amount": "5000000" }, "usdcAvailable": "120000000" } }, "limits": { "dailyGasUsd": 1 }}Request validation failed (e.g. missing or malformed body / query).
object
Stable machine-readable error code, namespaced under exceptions.. Always prefer branching on this value over message. See the per-route descriptions for the codes that route emits.
Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.
Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.
object
Example
{ "code": "exceptions.auth.invalidApiKey", "message": "Invalid or missing API key"}Missing or invalid x-tenant-api-key header. Code: exceptions.auth.invalidApiKey.
object
Stable machine-readable error code, namespaced under exceptions.. Always prefer branching on this value over message. See the per-route descriptions for the codes that route emits.
Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.
Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.
object
Example
{ "code": "exceptions.auth.invalidApiKey", "message": "Invalid or missing API key"}Request origin IP is not on the tenant API allowlist (exceptions.auth.ipNotAllowed), or the API key is missing the scope required by this operation (exceptions.auth.insufficientScope), or the organization has been blocked; contact support@cryptonly.net (exceptions.tenant.blocked).
object
Stable machine-readable error code, namespaced under exceptions.. Always prefer branching on this value over message. See the per-route descriptions for the codes that route emits.
Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.
Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.
object
Example
{ "code": "exceptions.auth.invalidApiKey", "message": "Invalid or missing API key"}Rate limit exceeded for this endpoint. Retry after the window resets. Code: exceptions.rateLimit.exceeded. The extension.msBeforeNext field tells you how long to wait.
object
Stable machine-readable error code, namespaced under exceptions.. Always prefer branching on this value over message. See the per-route descriptions for the codes that route emits.
Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.
Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.
object
Example
{ "code": "exceptions.auth.invalidApiKey", "message": "Invalid or missing API key"}Unexpected server error. Safe to retry idempotent operations after a backoff.
object
Stable machine-readable error code, namespaced under exceptions.. Always prefer branching on this value over message. See the per-route descriptions for the codes that route emits.
Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.
Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.
object
Example
{ "code": "exceptions.auth.invalidApiKey", "message": "Invalid or missing API key"}