Skip to content

x402: account configuration

GET
/x402/config

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.

Media typeapplication/json
object
account
required
object
id
required
string format: uuid
name
required

Internal ledger name, for log lines.

string
serviceName
required

The listing name: resource.serviceName in every 402. Null until set.

string
nullable
iconUrl
required

resource.iconUrl in every 402: the checkout logo, when Bazaar accepts it.

string
nullable
status
required
string
Allowed values: active tenant_blocked suspended tenant_not_verified
environment
required
string
Allowed values: production sandbox
network
required

Base network; see networks for every network.

string
payTo
required

payTo on Base.

object
mode
required
string
Allowed values: wallet balance
address
required
string
nullable
networks
required
Array<object>
object
network
required
string
payTo
required
object
mode
required
string
Allowed values: wallet balance
address
required
string
nullable
assets
required
Array<object>
object
symbol
required
string
currencyCode
required
string
address
required
string
decimals
required
number
methods
required
Array<string>
minAmount
required
string
network
required

CAIP-2 network of the asset.

string
payTo
required

payTo on the asset’s network; null until set up there.

string
nullable
eip712

EVM: EIP-712 domain; goes into extra of the payment requirements.

object
feePayer

Solana: fee payer; goes into extra.feePayer.

string
resources
required
Array<object>
object
id
required
string format: uuid
method
required
string
path
required

Path of the resource URL, the route key.

string
prices
required

One per currency, in the order the 402 offers them; never empty.

Array<object>
object
amount
required

Atomic units.

string
asset
required
string
currencyCode
required
string
network
required
string
scheme
required
string
maxTimeoutSeconds
required
number
description
required
string
nullable
mimeType
required
string
nullable
tags
required

resource.tags in the 402.

Array<string>
discoverable
required
boolean
inputSchema
required
object
key
additional properties
any
outputSchema
required
object
key
additional properties
any
fees
required
object
charged
required

False in sandbox: settlements there are free.

boolean
freeSettlementsPerMonth
required
number
usedThisMonth
required

Tenant-wide, this UTC month.

number
freeRemainingThisMonth
required
number
settlementFeeUsd
required

Flat fee per confirmed settlement after the free tier: from x402 credits (own wallet) or deducted at credit (Base balance mode).

string
credits
required

The x402 credits own-wallet fees are paid from.

object
balance
required
string
autoTopUp
required
object
threshold
required

When credits fall below this, USDC atomic units…

string
amount
required

…move this much USDC from the balance into credits.

string
usdcAvailable
required

USDC balance of the account, which top-ups draw from.

string
blocked
required

Free settlements are used up and credits (with auto top-up) do not cover one fee: /settle refuses with fee_balance_insufficient.

boolean
limits
required
object
dailyGasUsd
required

Gas Cryptonly pays for this tenant per UTC day.

number

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).

Media typeapplication/json
object
code
required

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.

string
message
required

Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.

string
extension

Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.

object
key
additional properties
any

Example

{
"code": "exceptions.auth.invalidApiKey",
"message": "Invalid or missing API key"
}

Missing or invalid x-tenant-api-key header. Code: exceptions.auth.invalidApiKey.

Media typeapplication/json
object
code
required

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.

string
message
required

Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.

string
extension

Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.

object
key
additional properties
any

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).

Media typeapplication/json
object
code
required

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.

string
message
required

Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.

string
extension

Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.

object
key
additional properties
any

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.

Media typeapplication/json
object
code
required

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.

string
message
required

Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.

string
extension

Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.

object
key
additional properties
any

Example

{
"code": "exceptions.auth.invalidApiKey",
"message": "Invalid or missing API key"
}

Unexpected server error. Safe to retry idempotent operations after a backoff.

Media typeapplication/json
object
code
required

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.

string
message
required

Human-readable explanation. Subject to wording changes; for programmatic checks use code instead.

string
extension

Optional structured payload accompanying the error. For exceptions.rateLimit.exceeded includes msBeforeNext; for validation errors includes the offending field info.

object
key
additional properties
any

Example

{
"code": "exceptions.auth.invalidApiKey",
"message": "Invalid or missing API key"
}