Watch an AI Agent Complete a Payment Challenge
Explore how an autonomous agent encounters an HTTP 402 response, verifies spending limits against a Model Context Protocol (MCP) server, and authorizes transaction settlement under human-defined biometric passkey guardrails.
Protocol Handshake Lifecycle
How the HTTP 402 challenge interacts between client, server, and authorization enclave.
402 Challenge Issued
When an unauthenticated or unpaid request hits a protected resource, the API server responds with status code 402 Payment Required alongside custom headers detailing currency, network, price, and payment recipient.
MCP Budget Validation
The agent queries its local Model Context Protocol (MCP) wallet server. The server verifies that the requested transaction price is within the human-authorized per-request ceiling and daily spending budget.
Enclave Settlement & Delivery
With policy approved, the transaction is cryptographically signed inside an isolated policy enclave without exposing raw private keys to LLM context. The server verifies settlement and delivers 200 OK.
import { FurlPayAgentClient } from "@furlpay/sdk";
// Initialize client with human-defined spending policies
const agent = new FurlPayAgentClient({
mcpServerUrl: "http://localhost:3001/mcp",
policy: {
maxPerRequestUsdc: 0.05,
dailyLimitUsdc: 2.00,
},
});
// The client intercepts HTTP 402, queries MCP, signs, and retries automatically
async function fetchMarketData() {
const response = await agent.fetch("https://api.merchant.com/v1/data");
const payload = await response.json();
console.log("Delivered payload:", payload);
}
fetchMarketData();