Zum Inhalt
HALOWERK

X402werk

policy / check

A stateless rule check for agents that pay for x402 endpoints. You supply the proposed payment, your policy and the amounts already spent this hour and this day; this endpoint keeps no ledger of its own and returns your counters unchanged.

POST https://x402.halowerk.com/policy/check

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
proposed_paymentobjectJa
policyobjectJa
spent_so_farobjectNein
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "proposed_payment",
    "policy"
  ],
  "additionalProperties": false,
  "properties": {
    "proposed_payment": {
      "type": "object",
      "required": [
        "amount_units"
      ],
      "additionalProperties": false,
      "properties": {
        "amount_units": {
          "type": "string",
          "pattern": "^[0-9]{1,78}$",
          "description": "Amount of the proposed payment as an integer in the smallest unit of the token."
        },
        "asset": {
          "type": "string",
          "description": "Token contract address, or \"native\" for the chain coin."
        },
        "chain": {
          "type": "string",
          "description": "Chain as CAIP-2 (\"eip155:8453\"), short name (\"base\") or chain id."
        },
        "pay_to": {
          "type": "string",
          "description": "Recipient address of the proposed payment."
        },
        "resource": {
          "type": "string",
          "maxLength": 2048,
          "description": "URL of the resource being bought. Nothing is fetched; it is only checked for shape."
        },
        "input_schema_present": {
          "type": "boolean",
          "description": "Whether the offer declares an inputSchema. Use Nr. 83 to find out if you do not know."
        }
      }
    },
    "policy": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "max_per_call": {
          "type": "string",
          "pattern": "^[0-9]+(\\.[0-9]+)?$",
          "description": "Largest allowed single payment, in whole tokens of the proposed asset, for example \"0.05\"."
        },
        "max_per_hour": {
          "type": "string",
          "pattern": "^[0-9]+(\\.[0-9]+)?$",
          "description": "Largest allowed sum per hour, in whole tokens."
        },
        "max_per_day": {
          "type": "string",
          "pattern": "^[0-9]+(\\.[0-9]+)?$",
          "description": "Largest allowed sum per day, in whole tokens."
        },
        "allowed_chains": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Chains you accept, as CAIP-2 or short names. Omit to allow any."
        },
        "allowed_assets": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Token addresses you accept. Omit to allow any."
        },
        "allowed_recipients": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Recipient addresses you accept. Omit to allow any; the recipient is then flagged as unverified."
        },
        "blocked_recipients": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Recipient addresses you refuse. Beats allowed_recipients on conflict."
        },
        "require_schema": {
          "type": "boolean",
          "description": "Whether the offer must declare an inputSchema."
        }
      }
    },
    "spent_so_far": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "hour": {
          "type": "string",
          "pattern": "^[0-9]+(\\.[0-9]+)?$",
          "description": "Already spent in the current hour, in whole tokens."
        },
        "day": {
          "type": "string",
          "pattern": "^[0-9]+(\\.[0-9]+)?$",
          "description": "Already spent in the current day, in whole tokens."
        }
      }
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "proposed_payment": {
    "amount_units": "0"
  },
  "policy": {}
}

Ergebnis & Dokumentation

Veröffentlichtes Ergebnisschema anzeigen
{
  "$ref": "https://x402.halowerk.com/policy/check/schema#/outputSchema"
}

Veröffentlichtes Ergebnisbeispiel öffnen

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →