The fastest way to understand Delegare is to run our end-to-end example. You will act as both the Merchant (setting up a server) and the User (authorizing a spending mandate).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.
Prerequisites: You need Node >=22 and pnpm >=9 installed on your machine.
1. Get Sandbox Credentials
- Go to the Delegare Sandbox Dashboard.
- Register a new test merchant account.
- Copy your
merchantIdandtestApiKey.
2. Clone the Example App
We have provided an Express server that acts as a mock merchant (e.g., a pizza shop or API service).3. Configure the Environment
Create an environment file:.env and paste your sandbox credentials:
4. Run the Merchant Server
Start your mock merchant backend:5. Generate a Buyer Mandate
Open a new terminal tab in the same directory. We will now run a script that simulates a user approving a budget for an AI agent.- The script will generate a Setup URL. Click the link to open it in your browser.
- In the Sandbox UI, authorize a $50/month limit for this agent. You can use Stripe test cards.
- Once approved, return to your terminal. The script will print out a long string starting with
eyJhbGci...- this is your Intent Mandate.
6. Execute an Agent Charge
Now, pretend you are the AI agent who holds this mandate and wants to buy something from the merchant. Run thiscurl command, replacing the intentMandate with your token:
7. View the Result
Look at your first terminal (the merchant server). You should see logs indicating that the Delegare SDK successfully executed the charge against the agent’s limit. Congratulations! You just processed an agent-authorized payment without sharing any credit card details.Next Steps
- Learn how to integrate the Typescript SDK into your own backend.
- Read about our Security Model to see how limits are enforced.
- Add payment capabilities to Claude Desktop with our MCP Tools.