Developers

TypeScript SDK

Drop the trust layer into any Node or TypeScript agent. Probe a tool, evaluate its output, and get a clear ALLOW / WARN / BLOCK decision before a single cent is spent.

Onboarding

Get started

Pick your path, then drop the SDK into your agent.

  1. 1

    Read the 60-second overview

    Clearance402 checks a paid tool before your agent pays for it — protocol, price, output, and permissions.

    Open docs
  2. 2

    Browse verified tools

    See live Trust Cards with a simple ALLOW / WARN / BLOCK decision. No wallet needed to look around.

    Browse tools
  3. 3

    Try a guided run

    Watch an end-to-end clearance happen step by step in the agent demo — nothing to install.

    Open agent demo
01

Install

Workspace package — point at your running Clearance402 API.

bash
# from monorepo root after npm run build:sdk
npm run build:sdk
# in your agent project:
npm install file:../clearance402/packages/clearance402-sdk

export CLEARANCE402_API_URL=http://localhost:8080
02

Clear a payment before paying

Check clearance, then record payment after browser x402 settle.

ts
import { createClearance402Client } from "@clearance402/sdk";

const c402 = createClearance402Client();

const { decision, toolName } = await c402.checkBeforePayment({
  agentId: "buyer-agent",
  toolId: "venice-vision",
  amountUsd: 0.01,
});

if (decision.state === "ALLOW" || decision.state === "WARN") {
  // browser: payX402Endpoint() then:
  await c402.recordPayment({
    agentId: "buyer-agent",
    toolId: "venice-vision",
    paymentProof: proofFromHeaders,
    httpStatus: 200,
  });
} else {
  console.warn(toolName, decision.state, decision.reasons);
}
03

Onboard your own tool

Register an endpoint — runs live probe + Venice and returns a trust card.

ts
const { tool, probe, veniceEval } = await c402.onboardTool({
  name: "Venice Vision API",
  endpoint: "https://api.venice.ai/x402/vision",
  price: "$0.010 USDC / call",
  description: "Image understanding x402 endpoint",
});

console.log(tool.trust, tool.state, probe?.paymentValid);
402Clearance402

The trust layer for agent payments,
built on x402 & MCP.

Stay in touch!
C
Feeling lucky?

© 2026 Clearance402. All rights reserved.

x402 · MCP · MetaMask · Venice · 1Shot.
clearance402.app

Clearance402 docs
Clearance402