Bound
SDK

Payments and x402

Direct USDC transfers, and paying for an HTTP resource automatically.

Direct payment

const { txHash } = await bound.executePayment(agentKeypair, amount, recipient);

A plain USDC transfer signed by the agent. The certificate does not gate this call — it is the counterparty's job to read the certificate before accepting the work, which is the point of verify being free.

x402 — pay for an HTTP resource

x402 revives HTTP 402 Payment Required as a real protocol: a server answers 402 with payment details, the client pays, and retries. agentFetch does the whole loop for an agent that holds a wallet.

const res = await bound.agentFetch(url, agentKeypair);
Request the URL.
If the server answers 402, read the payment requirements from the response.
Pay in USDC from the agent's account.
Retry with proof of payment and return the 200.

Any non-402 response is returned untouched, so agentFetch is a drop-in for fetch on endpoints that may or may not charge.

Why this pairs with a certificate

An agent that can pay autonomously is an agent that can lose your money autonomously. The certificate is what makes that bounded: the service on the other end reads verify(agent) before it does the work, and knows the maximum it is exposed to and that the money is already locked.

Selling to agents means both halves — take the payment, and check the bond first.

On this page