{
  "format": "delx/intent-card/v1",
  "id": "x402-payment-payload-size-api",
  "intent": "check whether x402 metadata makes the payment payload too large for a facilitator",
  "title": "Check x402 payment-payload size before settlement",
  "description": "Measure a candidate x402 payment envelope before a buyer sends it, so verbose descriptions, tags or embedded metadata do not silently push the payload beyond a facilitator budget. The result is deterministic and does not settle a payment.",
  "keywords": [
    "x402 payment payload size",
    "facilitator payload limit",
    "402 metadata too large",
    "x402 preflight",
    "agent payment debugging"
  ],
  "updated_at": "2026-08-23",
  "canonical_url": "https://commerce.delx.ai/intents/x402-payment-payload-size-api",
  "machine_url": "https://commerce.delx.ai/intents/x402-payment-payload-size-api.json",
  "recommendation": {
    "tool_name": "util_x402_payment_payload_size",
    "service_name": "X402 Payment Payload Size",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/x402-payment-payload-size",
    "price_usdc": "0.001",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "payload": {
          "type": "object",
          "maxProperties": 128,
          "additionalProperties": true,
          "description": "Payload supplied to X402 Payment Payload Size; used only for this bounded calculation and processed in memory without retention."
        },
        "maximum_bytes": {
          "type": "integer",
          "description": "Maximum Bytes supplied to X402 Payment Payload Size; used only for this bounded calculation and processed in memory without retention."
        }
      },
      "required": [
        "payload",
        "maximum_bytes"
      ],
      "additionalProperties": false
    },
    "example_input": {
      "payload": {
        "x402Version": 2,
        "accepted": {}
      },
      "maximum_bytes": 8192
    },
    "example_output": {
      "schema": "delx/util-x402-payment-payload-size/v1",
      "operation": "delivery_contract:x402_payment_payload_size",
      "status": "pass",
      "result": {
        "bytes": 31,
        "within_budget": true
      },
      "evidence": {
        "input_sha256": "4590ed598201943e731e542786ac6275109501a7a8d678408f346290dd7f31d4",
        "retained": false,
        "external_calls": 0
      }
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/x402-payment-payload-size -m POST -H 'x-delx-source: intent-card-x402-payment-payload-size-api' --max-amount 0.001 -b '{\"payload\":{\"x402Version\":2,\"accepted\":{}},\"maximum_bytes\":8192}'",
      "max_amount_usdc": "0.001"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-x402-payment-payload-size-api"
  },
  "evidence": {
    "paid_openapi": "https://api.delx.ai/openapi.x402.json",
    "governed_portfolio": "https://api.delx.ai/x402-portfolio.json",
    "live_contract": "https://api.delx.ai/api/v1/x402/x402-payment-payload-size"
  }
}
