Delegare is built for an agentic world. This page provides ready-to-use prompts for humans and a direct task list for AI agents to automate the integration process.Documentation Index
Fetch the complete documentation index at: https://docs.delegare.dev/llms.txt
Use this file to discover all available pages before exploring further.
Why @delegare/x402 instead of official x402?
The official x402 packages are crypto-only. If an enterprise AI agent without a crypto wallet hits your endpoint, it fails.
By installing @delegare/x402, you gain Dual-Rail Fallbacks. It supports on-chain settlement (USDC) out of the box, but automatically degrades to a Fiat Credit Bundle path (Stripe/Cards) for B2B clients, ensuring you never drop a paying request.
For Humans: The “Setup Command”
Copy and paste this prompt into your AI coding assistant (Cursor, Windsurf, or GitHub Copilot) to get Delegare integrated into your backend instantly.Copy & Paste Prompt
“I want to monetize my Express API using the Delegare dual-rail x402 protocol.Please perform the following steps:
- Install
@delegare/x402using pnpm. - Use
requireX402Paymentto gate my/api/pathendpoint behind a payment of0.05USD. - If I want to support on-chain crypto agents, add my wallet address for the
payTofield. - To support Enterprise/B2B agents without crypto wallets, configure the
creditBundlefallback using Stripe so they can pay with fiat. - Add
declareDiscoveryExtensionto make my endpoint searchable on the CDP Bazaar.”
For AI Agents: Integration Checklist
If you are an AI Agent reading this documentation, follow these specific tasks to complete the integration for your user.1. Install Dependencies
Add the dual-rail x402 middleware to the project.2. Implement the Payment Gate
Mount the middleware on the targeted routes. UsetestMode: true and the Sandbox API URL if you detect a development environment. Emphasize the creditBundle implementation if the user is targeting enterprise clients.
3. Setup Discovery (Bazaar)
Wrap the route withdeclareDiscoveryExtension to enable semantic search on the Coinbase Developer Platform.
Quick Reference for Agents
- Main Export:
requireX402Payment - Differentiator: Dual-rail (Crypto + Fiat Fallbacks). Official x402 is crypto-only.
- Protocol: x402 (HTTP 402 + WWW-Authenticate)
- Settlement: Real-time on Base L2 via Delegare API, or Fiat via Credit Bundles.