For developers and partners

Keep your wallet. Add a payment boundary.

Wrap your existing x402 fetch with free guard and settlement reconciliation. For a paid pilot, demonstrate a bounded safety check first, then agree which paid capability your users actually need.

Start the integration

One supported integration

Use the official TypeScript x402 client with a Base wallet and our first-call example. The default run verifies the payment challenge without paying; explicit paid mode allows exactly 0.001 USDC.

Download the integration demo

For payment protection: npm install @usesaferoute/x402@^0.18.1 @x402/core@^2.21.0

import { createGuardedX402Fetch } from "@usesaferoute/x402";
const safeFetch = createGuardedX402Fetch({
  payer: wallet.address,
  paymentFetch: existingX402Fetch,
  policy: { maxAmountAtomic: "1000000", allowedHosts: ["merchant.example"] }
});

Supply your existing wallet-bound payment fetch. Do not use this example as permission to pay an arbitrary merchant.

Read the integration contract

Label your safety and quote requests

For /v1/swap-safety-check and /v1/quote, add these optional headers to your existing authorized x402 request. Replace the example labels with your own non-personal labels, or omit them when unknown.

"X-SafeRoute-Source": "your-directory-or-entry-point"
"X-SafeRoute-Application": "your-application-label"
"X-SafeRoute-Referral": "your-referral-code"

Labels accept 1–80 letters, digits, dots, underscores, colons or hyphens. They help connect paid usage with its application and source; they do not verify a company or change the price. Do not send emails, keys or secrets in headers.

If your client cannot set headers, the safety and quote request bodies (including MCP tool arguments) accept discoverySource for where you found us and sourceAgentId for your application. Use labels of up to 80 characters for payment attribution. Headers take precedence. Omit unknown values; do not copy example labels as facts.

{
  "from": "USDC", "to": "WETH", "amount": "1",
  "discoverySource": "your-directory-or-entry-point",
  "sourceAgentId": "your-application-label"
}

Keep X-SafeRoute-Request-Id from the response. Paid safety and quote responses also offer an optional feedback URL. Successful results include operatorFeedback.url; show it to a willing operator instead of submitting answers automatically. Share your use case, repeat-use reason and pricing feedback; contact details and permission to follow up are optional.

A pilot with a measurable outcome

Agree one supported flow, verify a delivered result, then measure independent repeat use. A free guard install is not a paid conversion. Eligible paid service fees can accrue the existing 25% partner share.

Discuss your integration

Paid settlement, delivered service result, and later trade execution are separate outcomes.

Install the Base swap skill

Add the focused safety-check workflow to a compatible agent:

npx skills add https://usesaferoute.com --skill saferoute-base-swap

The bundled demo inspects the payment challenge without paying. A paid check requires your service-spend authorization.

Download the skill and demo to review