When a user wants to enable payments for an AI agent, your backend creates a setup session. This endpoint returns a setupUrl where the user will securely connect their payment method and confirm spending limits.
Your merchant identifier.
Body
The maximum amount the agent can spend in a single transaction, in cents (USD).
The maximum amount the agent can spend per calendar month, in cents (USD).
The preferred settlement rail. Options are "stripe", "base", or "both".
Response
The unique token for this setup session.
The URL to redirect the user to complete the setup process.
curl -X POST https://api.delegare.dev/v1/delegates \
-H "X-Delegare-Merchant-Id: your_merchant_id" \
-H "X-Delegare-Api-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"maxPerTxCents": 1000,
"maxMonthlySpendCents": 5000,
"requestedRail": "both"
}'
{
"sessionToken": "sess_123456789",
"setupUrl": "https://app.delegare.dev/setup/sess_123456789"
}