Overview

Errors

One error envelope, eighteen typed codes, and which of them are worth retrying.

Every surface maps failures to the same typed codes. Over HTTP the error body is this envelope; over MCP it is the tool result's content with isError: true; over A2A it is the artifact of a failed task.

Error envelopejson
{
  "status": "error",
  "code": "INPUT_INVALID",
  "message": "…",
  "retryable": false,
  "requestId": "…",
  "resourceId": "basic_weather"
}
status"error"required
codeCommerceErrorCoderequired
One of the codes below. Stable — safe to branch on.
messagestringrequired
Human-readable. Stack traces and internal messages never cross the boundary.
retryablebooleanrequired
Whether the same request may reasonably be retried.
requestId / resourceIdstring
Correlation identifiers, when known.
detailsobject
Client-safe extra context. After a settled payment whose delivery failed, it carries the payment summary.

Codes

CodeHTTPRetryMeaning
CONFIG_INVALID500nothe configuration is invalid
RESOURCE_NOT_FOUND404nono such resource, or not exposed on this surface
INPUT_INVALID400noinput failed the resource's schema, or a path parameter was empty, . or ..
PAYMENT_REQUIRED402noa paid resource was called without a proof
PAYMENT_INVALID402nomalformed, wrong amount, recipient, network, asset, expired or underfunded
PAYMENT_REPLAYED409nothis authorisation was already used
PAYMENT_PROVIDER_UNAVAILABLE503yesthe payment rail or RPC is unreachable
PAYMENT_SETTLEMENT_FAILED502nothe settlement transaction failed
AUTHORIZATION_REQUIRED403nothe resource requires an AP2 mandate
AUTHORIZATION_INVALID403nothe mandate failed verification
AUTHORIZATION_REPLAYED409nothe mandate was already spent
AUTHORIZATION_PROVIDER_UNAVAILABLE503yesthe verifier or its store failed
BACKEND_TIMEOUT504yesthe merchant backend did not answer in time
BACKEND_ERROR502nothe backend failed, redirected, or answered too much
PROTOCOL_UNSUPPORTED501nothe operation is not implemented
GATEWAY_BUSY503yesload shedding — back off and retry
STORAGE_ERROR500nothe receipt store failed
INTERNAL_ERROR500noanything else; no internals are disclosed
Why authorization failures are 403, not 402A 402 tells a client “pay and retry”, which cannot fix a missing or rejected mandate — and a client that auto-pays on 402 would be charged for a request that was never going to be delivered.

Payment required is not an error

An unpaid call to a paid resource returns 402 with a status: "payment-required" envelope instead — see Invoke a resource.