Skip to main content
Wrap your agent’s HTTP client so it can interpret a 402 response, choose a supported scheme, sign, and retry. Apply local policy before any signature is created.

Demo

The demo above is mock only. If you want to see onchain demos on Vibenet, head to Base chain demos.

Enforce Spend Policy Before Signing

TypeScript buyer
The wrapper automates payment negotiation, not trust. Validate response schemas and content as untrusted input, and keep wallet policy independent of any instructions returned by the service.
The client pays only when the request uses Base Sepolia USDC and remains under both the per-request and session caps.
The public x402.org facilitator is for testnets. For Base mainnet, choose a production facilitator, protect signing keys, cap aggregate spend durably across processes, and reject unsupported schemes or assets.

See Also

Charge for an API

Implement the seller side of an exact payment.

Batch High-Frequency Payments

Reduce settlement frequency for repeated calls.