
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@countersign/x402
Advanced tools
Govern x402 (HTTP-402 machine payments) with Countersign — guard an agent's payment against policy before it pays.
Govern x402 (HTTP-402 machine payments) with Countersign — guard an agent's payment against policy before it pays.
When an agent hits a 402 Payment Required challenge, route it through Countersign's pre-flight spend
guard first: parse the challenge → evaluate against one unified policy (per-call caps + payee allowlist
import { parseX402, withX402Guard } from "@countersign/x402";
import { CountersignClient } from "@countersign/sdk";
const cs = new CountersignClient({ baseUrl, apiKey });
// `challenge` is the 402 response body ({ accepts: [...] }).
const charge = parseX402(challenge); // cheapest acceptable option, normalized
if (charge) {
// Only pays if Countersign allows — a rogue or over-budget agent never pays.
await withX402Guard(cs, agentId, charge, (c) => payWithYourX402Client(c));
}
parseX402(body) — normalize a 402 challenge to a single charge (cheapest option, base units).guardX402(api, agentId, charge) — ask Countersign: allow / deny / needs_approval.withX402Guard(api, agentId, charge, pay) — evaluate, then run pay only on allow; throws X402Denied otherwise.Apache-2.0. Pairs with @countersign/sdk and @countersign/mcp.
FAQs
Govern x402 (HTTP-402 machine payments) with Countersign — guard an agent's payment against policy before it pays.
We found that @countersign/x402 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.