Decodificar cabecera de pago x402
x402-payment-decodeDecodifica un valor X-PAYMENT / PAYMENT-SIGNATURE de x402 (JSON en base64, v1 o v2) y revisa su estructura: esquema, red, campos EIP-3009 y formato de firma; opcionalmente lo compara con los PaymentRequirements. Firma no verificada. Cuándo: hay que leer y revisar una cabecera de pago x402 recibida por un vendedor, o armada por un cliente, antes de enviarla a un facilitador. No para: revisar los PaymentRequirements de una respuesta 402 de x402 (x402-requirements-lint). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Decodes an x402 X-PAYMENT / PAYMENT-SIGNATURE value (base64 JSON, v1 or v2) and checks its structure: scheme, network, EIP-3009 authorization fields and signature format; optionally compares it with the PaymentRequirements. Signature not verified. [EN completo / full EN: inputSchema.description]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| header | Yes | X-PAYMENT (v1) or PAYMENT-SIGNATURE (v2) header value: base64 JSON string, or the decoded object (string or object; required; up to 16448 chars). | |
| requirements | No | Optional PaymentRequirements to compare against: one accepts[] entry, the accepts array or the whole 402 body (object or array; optional; up to 100 items). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shape | No | ||
| valid | No | ||
| errors | No | ||
| scheme | No | ||
| decoded | No | ||
| network | No | ||
| warnings | No | ||
| signature | No | ||
| x402_version | No | ||
| authorization | No | ||
| network_caip2 | No | ||
| requirement_checks | No |