Hermes Plant logo

Hermes Plant

Pay-per-call finance APIs for AI agents

Open navigation

Evidence Verification API

$0.05/call

Verify the evidence bundle before trusting a paid agent result.

POST /api/agent-services/evidence/verify
x402evidenceverificationagent-commerceaudit

What it does

Verify an agent-commerce evidence bundle before trusting a paid result. Evaluates shared evidence artifacts for x402 challenge presence, optional receipt, policy decision, final service response, endpoint and method binding, network, payTo, price, artifact source, freshness, hashes, and synthetic-proof leakage. Returns verified / needs_review / rejected / insufficient_evidence with per-rule evidence and the exact record an agent should persist with its run log.

  • Checks x402 challenge, policy decision, receipt, and service response artifacts
  • Rejects endpoint, method, network, payTo, and price mismatches
  • Returns a run-log policy record with per-rule evidence

Example request

POST /api/agent-services/evidence/verify

{
  "subject": {
    "kind": "agent_service_call",
    "serviceId": "payment-policy-decide",
    "endpoint": "/api/agent-services/payment-policy/decide",
    "method": "POST",
    "runId": "agent-run-2026-06-24-001"
  },
  "artifacts": [
    {
      "type": "x402_challenge",
      "source": "https://hermesplant.com/.well-known/x402",
      "collectedAt": "2026-06-24T12:00:00.000Z",
      "serviceId": "payment-policy-decide",
      "endpoint": "/api/agent-services/payment-policy/decide",
      "method": "POST",
      "network": "eip155:8453",
      "payTo": "0x6d6E695b09861467c7d462f5AAF31cF3540B9192",
      "priceCents": 5,
      "hash": {
        "algorithm": "sha256",
        "value": "<challenge-sha256>"
      }
    },
    {
      "type": "payment_policy_decision",
      "source": "hermes-policy",
      "serviceId": "payment-policy-decide",
      "endpoint": "/api/agent-services/payment-policy/decide",
      "method": "POST",
      "decision": "allow",
      "hash": {
        "algorithm": "sha256",
        "value": "<policy-sha256>"
      }
    },
    {
      "type": "service_response",
      "source": "agent-run-log",
      "serviceId": "payment-policy-decide",
      "endpoint": "/api/agent-services/payment-policy/decide",
      "method": "POST",
      "status": 200,
      "hash": {
        "algorithm": "sha256",
        "value": "<response-sha256>"
      }
    }
  ],
  "policy": {
    "expectedServiceId": "payment-policy-decide",
    "expectedEndpoint": "/api/agent-services/payment-policy/decide",
    "expectedMethod": "POST",
    "expectedNetwork": "eip155:8453",
    "expectedPriceCents": 5,
    "requireX402Challenge": true,
    "requirePolicyDecision": true,
    "requireServiceResponse": true,
    "requireArtifactHashes": true
  }
}

Example response (HTTP 200)

Deterministic — the same inputs always return the same audited output.

{
  "status": "verified",
  "service": "evidence-verify",
  "requestId": "ev_<uuid>",
  "evidenceVersion": "evidence-contract-v1",
  "decision": "verified",
  "confidence": 0.94,
  "verified": true,
  "artifactSummary": {
    "total": 3,
    "byType": {
      "x402_challenge": 1,
      "payment_policy_decision": 1,
      "service_response": 1
    },
    "sources": [
      "agent-run-log",
      "hermes-policy",
      "https://hermesplant.com/.well-known/x402"
    ],
    "hashed": 3,
    "synthetic": 0
  },
  "requiredArtifacts": [
    "x402_challenge",
    "payment_policy_decision",
    "service_response"
  ],
  "missingArtifacts": [],
  "reasonCodes": [
    "evidence.verified"
  ],
  "findings": [
    {
      "rule": "evidence.verified",
      "severity": "info",
      "disposition": "verified",
      "why": "Required evidence artifacts are present and match policy.",
      "evidence": "artifacts=3",
      "fix": null
    }
  ],
  "recommendedAction": "persist_evidence_and_use_result"
}

Input schema

Top-level request fields. Nested shapes are shown in the example above and the OpenAPI spec.

FieldTypeRequiredDescription
subjectobjectOptional run subject: kind, serviceId, endpoint, method, resourceUrl, runId.
artifactsarrayYesEvidence artifacts using the shared Hermes contract. Supported types include x402_challenge, x402_receipt, payment_policy_decision, service_response, openapi_operation, api_catalog_entry, mcp_tool_manifest, agent_run_log, human_approval, merchant_identity, entitlement, checkout_session, and other.
policyobjectVerification policy: expectedServiceId, expectedEndpoint, expectedMethod, expectedNetwork, expectedPayTo, expectedPriceCents, allowedSources, minArtifacts, maxArtifactAgeSeconds, allowSyntheticEvidence, requireX402Challenge, requireX402Receipt, requirePolicyDecision, requireServiceResponse, and requireArtifactHashes.

How to call it over x402

  1. 1. Send the request. The first unpaid call returns HTTP 402 with an x402 payment challenge — $0.05, USDC on Base, and the recipient.
  2. 2. Pay per call. Your x402 client signs the USDC payment and retries automatically — no API key, no account, no subscription. New to x402?
  3. 3. Read the result. HTTP 200 returns the computed values plus evidence-backed findings.

With the x402 fetch client (Node / TypeScript)

import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.AGENT_WALLET_KEY);
const pay = wrapFetchWithPayment(fetch, account); // USDC on Base

const res = await pay("https://hermesplant.com/api/agent-services/evidence/verify", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
  "subject": {
    "kind": "agent_service_call",
    "serviceId": "payment-policy-decide",
    "endpoint": "/api/agent-services/payment-policy/decide",
    "method": "POST",
    "runId": "agent-run-2026-06-24-001"
  },
  "artifacts": [
    {
      "type": "x402_challenge",
      "source": "https://hermesplant.com/.well-known/x402",
      "collectedAt": "2026-06-24T12:00:00.000Z",
      "serviceId": "payment-policy-decide",
      "endpoint": "/api/agent-services/payment-policy/decide",
      "method": "POST",
      "network": "eip155:8453",
      "payTo": "0x6d6E695b09861467c7d462f5AAF31cF3540B9192",
      "priceCents": 5,
      "hash": {
        "algorithm": "sha256",
        "value": "<challenge-sha256>"
      }
    },
    {
      "type": "payment_policy_decision",
      "source": "hermes-policy",
      "serviceId": "payment-policy-decide",
      "endpoint": "/api/agent-services/payment-policy/decide",
      "method": "POST",
      "decision": "allow",
      "hash": {
        "algorithm": "sha256",
        "value": "<policy-sha256>"
      }
    },
    {
      "type": "service_response",
      "source": "agent-run-log",
      "serviceId": "payment-policy-decide",
      "endpoint": "/api/agent-services/payment-policy/decide",
      "method": "POST",
      "status": 200,
      "hash": {
        "algorithm": "sha256",
        "value": "<response-sha256>"
      }
    }
  ],
  "policy": {
    "expectedServiceId": "payment-policy-decide",
    "expectedEndpoint": "/api/agent-services/payment-policy/decide",
    "expectedMethod": "POST",
    "expectedNetwork": "eip155:8453",
    "expectedPriceCents": 5,
    "requireX402Challenge": true,
    "requirePolicyDecision": true,
    "requireServiceResponse": true,
    "requireArtifactHashes": true
  }
}),
});

const result = await res.json();

Inspect the 402 with curl

curl -i -X POST https://hermesplant.com/api/agent-services/evidence/verify \
  -H "content-type: application/json" \
  -d '{"subject":{"kind":"agent_service_call","serviceId":"payment-policy-decide","endpoint":"/api/agent-services/payment-policy/decide","method":"POST","runId":"agent-run-2026-06-24-001"},"artifacts":[{"type":"x402_challenge","source":"https://hermesplant.com/.well-known/x402","collectedAt":"2026-06-24T12:00:00.000Z","serviceId":"payment-policy-decide","endpoint":"/api/agent-services/payment-policy/decide","method":"POST","network":"eip155:8453","payTo":"0x6d6E695b09861467c7d462f5AAF31cF3540B9192","priceCents":5,"hash":{"algorithm":"sha256","value":"<challenge-sha256>"}},{"type":"payment_policy_decision","source":"hermes-policy","serviceId":"payment-policy-decide","endpoint":"/api/agent-services/payment-policy/decide","method":"POST","decision":"allow","hash":{"algorithm":"sha256","value":"<policy-sha256>"}},{"type":"service_response","source":"agent-run-log","serviceId":"payment-policy-decide","endpoint":"/api/agent-services/payment-policy/decide","method":"POST","status":200,"hash":{"algorithm":"sha256","value":"<response-sha256>"}}],"policy":{"expectedServiceId":"payment-policy-decide","expectedEndpoint":"/api/agent-services/payment-policy/decide","expectedMethod":"POST","expectedNetwork":"eip155:8453","expectedPriceCents":5,"requireX402Challenge":true,"requirePolicyDecision":true,"requireServiceResponse":true,"requireArtifactHashes":true}}'
# → HTTP/1.1 402 Payment Required  (x402 challenge: price, USDC asset, Base network, recipient)
# → sign the USDC-on-Base payment and retry to receive HTTP 200

Prefer zero code? This endpoint is also exposed as a tool on the Hermes Plant MCP server, so an MCP-capable agent can call it with its own x402 wallet.

Other agent services

← All agent servicesAPI docsOpenAPI spec

Need a calculator that isn’t here yet? contact@hermesplant.com