Skip to main content
ZeroClick returns errors on four surfaces: the REST API at https://api.zeroclick.io, the usage endpoints under /v1/usage, your own API (which returns three fixed bodies to ZeroClick), and the agent-facing pay URL (https://acme.pay.zeroclick.io). This page lists every machine code per surface.

The error envelope

Every error body is JSON with a machine code in error:
Some errors carry additional fields: pay URL errors may add a reason (and settlementReason), and amount_below_minimum adds minimumPurchaseUsd. Two cases fall outside the machine-code convention:
  • Request validation failures return 400 with a human-readable message in error describing the invalid field.
  • Server errors return 500 { "error": "Internal server error" }. The body never carries internals.

REST API errors

Management endpoints (sellers, services, meters, plans, prices, signing secrets, API keys, analytics) authenticate with Authorization: Bearer zc_… and share these codes:
404 is the default for anything that does not resolve. A resource that exists but belongs to another organization is also a 404, never a 403.

Usage endpoint errors

Both usage endpoints live at https://api.zeroclick.io and require an API key: POST /v1/usage/check needs scope usage:read, POST /v1/usage needs usage:write. A wrong scope is 403 insufficient_scope; a non-API-key credential is 403 auth_type_not_allowed.

Allowance denials (POST /v1/usage/check)

A denial is not an HTTP error. The check returns 200 with the decision, and checking records nothing and burns no credit:
reason is null when allowed is true, and exactly one of these seven codes otherwise: See check allowances for the request shape and usage and allowances for how ZeroClick decides coverage.

Report errors (POST /v1/usage)

A replayed idempotencyKey is a success (200 with duplicate: true), not an error. Failures map to:

Errors your API returns to ZeroClick

Your API answers ZeroClick with exactly three non-2xx bodies. The seller SDKs build all of them; if you integrate over REST, return them byte-for-byte. An invalid, missing, or stale zc-signature, before any other work:
401
A business denial (no allowance, unpaid probe). ZeroClick reads the usage list, prices it, and issues the buyer a payment challenge. The buyer never sees this body. planSlug is optional; usage: [] means an identity challenge for a free identity-scoped endpoint:
402
The allowance API unreachable under a fail-closed outage policy:
503

Errors agents see at your pay URL

Buyers transact at your pay URL (https://acme.pay.zeroclick.io). Once ZeroClick forwards a paid request, agents receive your API’s own status codes and bodies unchanged. The codes below are ZeroClick’s own, issued before or instead of the forward: The seven 400 JWE codes apply only to requests sent with Content-Type: application/jose (end-to-end encrypted bodies). ZeroClick returns them before it asks for any payment.
A billing failure detected after your API already delivered a 2xx does not become an error status. ZeroClick returns the delivered response and surfaces the failure in the zc-usage-error response header. See headers.

402 payment_required reasons

A priced challenge looks like this (the same challenge also rides in the payment-required and www-authenticate response headers):
402
The body also carries the standard x402 document fields (x402Version, resource, accepts) at the top level for body-reading clients. ZeroClick omits rail and network on anonymous challenges, where the agent picks a protocol by paying. The full lifecycle around this challenge is on how ZeroClick works; the protocols themselves are on payment protocols.