PaymentRequiredResponse
x402 V2 402 Payment Required Response The official V2 format with top-level resource info and extensions support.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
accepts |
Array<PaymentRequirements> | Yes | List of acceptable payment methods |
error |
string,null | No | Error message explaining why payment is required |
extensions |
any | No | Optional extensions (V2 feature for protocol extensibility) |
resource |
ResourceInfo | Yes | Resource information (V2 - moved to top level) |
x402Version |
integer | Yes | x402 protocol version (2 for V2) |
View JSON Schema
{
"type": "object",
"description": "x402 V2 402 Payment Required Response\n\nThe official V2 format with top-level resource info and extensions support.",
"required": [
"x402Version",
"resource",
"accepts"
],
"properties": {
"accepts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PaymentRequirements"
},
"description": "List of acceptable payment methods"
},
"error": {
"type": [
"string",
"null"
],
"description": "Error message explaining why payment is required"
},
"extensions": {
"description": "Optional extensions (V2 feature for protocol extensibility)"
},
"resource": {
"$ref": "#/components/schemas/ResourceInfo",
"description": "Resource information (V2 - moved to top level)"
},
"x402Version": {
"type": "integer",
"format": "int32",
"description": "x402 protocol version (2 for V2)",
"minimum": 0
}
}
}