Request
research brief
Agent proposes a paid POST to the hosted demo merchant with a topic, audience, and format.
Control before money moves
Let agents call paid APIs without losing control. 402flow puts policy, approvals, receipts, and spend controls in the path before execution.
Problem
Agents can already discover tools and call APIs. The hard part starts when the endpoint requires payment, approval, and durable evidence afterward.
Without a control plane, each agent host starts owning protocol branching, idempotency, retries, and merchant-specific request behavior.
Requests that should stop for human review either fail late or spend automatically because there is no dedicated approval path before execution.
Operators need more than a success signal. They need durable receipts, denial reasons, merchant visibility, and audit context after the request completes.
Before / After
The difference is not whether money moves. The difference is whether policy, approvals, and receipts are first-class before and after execution.
Direct paid request
The application detects a paid endpoint, decides whether to proceed, and owns the protocol-specific payment path inline.
402flow-mediated request
The agent prepares the request once, and 402flow evaluates policy, routes review when needed, executes through the payment adapter, and stores the result.
Default org posture
Allow paid requests by default, discover merchants from live traffic, and use reporting, monitoring, and follow-up controls to refine governance over time.
Block paid requests unless org, agent, or merchant policies explicitly allow them, using review and policy updates to widen access deliberately.
For operators
Operators need more than a payment success signal. They need an org posture, merchant discovery, approval routing, and a record of what happened after execution.
Start with an organization-wide default. Teams that want adoption fast can allow paid requests and tighten policy from live traffic. Teams that need strict control can block by default and widen access through org, agent, merchant policy, and review.
How it works
Keep the developer surface small. Move payment orchestration and decision-making into the control plane.
The agent issues a paid request through a small SDK surface instead of embedding protocol mechanics directly in the application.
402flow evaluates the request against organization posture, policy, merchant constraints, and spend limits before execution is allowed.
Requests that fall outside policy stop for operator review and possible policy adjustment instead of failing silently or spending automatically.
Requests that satisfy current policy move through the supported payment rail with protocol-specific handling kept behind adapters.
402flow stores the normalized receipt, decision history, and audit context so operators can understand what happened after the request completes.
For agent developers
When the model needs to decide what to send, give it the inspect-then-execute loop so it can shape the right request instead of hardcoding parameters in the host.
The agent-driven path matters when the model has to achieve a specific outcome: merchant-published hints and validation issues help it choose the right parameters for the result it is trying to get, and the authoritative next action tells the host when execution is allowed.
import {
AgentHarness,
AgentPayClient,
defaultHarnessInstructions,
defaultHarnessToolSpecs,
} from '@402flow/sdk';
const client = new AgentPayClient({
controlPlaneBaseUrl: 'https://api.402flow.ai',
organization: 'acme-labs',
agent: 'research-worker',
auth: {
type: 'bootstrapKey',
bootstrapKey: process.env.X402FLOW_BOOTSTRAP_KEY ?? '',
},
});
const harness = new AgentHarness({ client });
console.log(defaultHarnessInstructions);
console.log(defaultHarnessToolSpecs.map((spec) => spec.name));
// [ 'prepare_paid_request', 'execute_prepared_request', 'get_execution_result' ]Proof
402flow is not a slideware abstraction. It is a working control plane and SDK for governed paid API execution.
A separate first-party merchant surface for exercising real paid-request flows without turning the marketing site into the demo environment.
Try demoThe public SDK gives developers a small integration surface. Start from the public package, examples, and harness flows instead of building payment handling into every host.
View SDKx402 support is live across Base Sepolia, Base mainnet, Solana devnet, and Solana mainnet. L402 and MPP remain on the roadmap.