Trango ComputeContextIQ
x402Policy CheckAgent Commerce GatecheckIdBazaar@x402/fetch

Policy Check checkId Lookup via x402 Wire v2: A Technical Tutorial

Re-fetch a prior Agent Commerce Gate decision by checkId via x402 wire v2, without re-running identity, reputation, or payment checks.

September 14, 2026Trango Compute Inc.

Every Policy Check decision returns a checkId — a UUID identifying that exact decision, at that exact moment. This endpoint re-fetches a prior decision by that ID, without re-running the identity lookup, reputation scan, or payment-challenge scan a second time. This is a tutorial for its x402 wire v2 endpoint.

Why a Separate Endpoint

A Policy Check decision is a snapshot: the counterparty's identity, reputation, and payment challenge as they existed at scannedAt. If you need to hand that decision to another part of your system — an audit log, a second service in your pipeline, a human reviewer — re-running the full check would both cost another $0.02 and potentially return a different result if anything about the counterparty changed in between. The checkId lookup returns the exact original decision, unchanged, for free re-reads by anyone who has the ID.

The Endpoint

GET /api/v1/policy-check/x402-v2/{checkId}
Price: $0.02 per call

Note the path shape: x402-v2 comes before the checkId segment, not after — /api/v1/policy-check/x402-v2/{checkId}, not /api/v1/policy-check/{checkId}/x402-v2. Putting it after would read as "the v2 version of this specific check," which isn't what changes here; only the payment challenge for this lookup call does.

The 402 Challenge

curl -i https://contextiq.trango-compute.com/api/v1/policy-check/x402-v2/8875a324-9577-48f8-b506-877c26500a7e
{
  "x402Version": 2,
  "resource": { "url": "https://contextiq.trango-compute.com/api/v1/policy-check/x402-v2/8875a324-9577-48f8-b506-877c26500a7e" },
  "accepts": [{ "scheme": "exact", "network": "eip155:8453", "amount": "20000", "payTo": "0x4eba5ea3cf0f3fc307099317e17e54390f7a4c58", "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" }],
  "extensions": { "bazaar": { "info": { "input": { "type": "http", "method": "GET" } } } }
}

This is a GET, unlike most of ContextIQ's other v2 routes — there's no request body, the checkId is entirely carried in the URL path.

Option A: API Key

curl https://contextiq.trango-compute.com/api/v1/policy-check/x402-v2/8875a324-9577-48f8-b506-877c26500a7e \
  -H "Authorization: Bearer sk_live_..."

Option B: Pay With x402, No API Key

import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";
import { wrapFetchWithPayment } from "@x402/fetch";

const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);
const client = createWalletClient({ account, transport: http(), chain: base });
const fetchWithPayment = wrapFetchWithPayment(fetch, client);

const res = await fetchWithPayment(
  "https://contextiq.trango-compute.com/api/v1/policy-check/x402-v2/8875a324-9577-48f8-b506-877c26500a7e"
);

console.log(await res.json());

The Response

{
  "checkId": "8875a324-9577-48f8-b506-877c26500a7e",
  "endpoint": "https://contextiq.trango-compute.com/api/v1/token-inspector/pricing/x402-v2",
  "agentId": null,
  "network": "base",
  "createdAt": "2026-09-11T00:00:00.000Z",
  "decision": "allow",
  "score": 45,
  "maxScore": 50
}

This returns the summary fields from the original decision, not the full reasons[]/payment/identity breakdown — if you need the complete original response, keep it when you first receive it; the checkId lookup is for confirming the decision's headline outcome later, not for retrieving the full audit trail. If the checkId doesn't exist (wrong ID, or it's from a different account), you get a 404.

Try It

Combine this with the decision endpoint and receipt verification for the full pre-payment → pay → verify cycle, or open Policy Check directly.

Try ContextIQ free

Free tools for AI engineers.

Follow Trango Compute on LinkedIn

We post updates on new tools, context engineering patterns, and LLM cost research.

Follow on LinkedIn