Skip to main content
POST
/
v1
/
delegates
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"
}
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.

Headers

X-Delegare-Merchant-Id
string
required
Your merchant identifier.
X-Delegare-Api-Key
string
required
Your merchant API key.

Body

maxPerTxCents
integer
required
The maximum amount the agent can spend in a single transaction, in cents (USD).
maxMonthlySpendCents
integer
required
The maximum amount the agent can spend per calendar month, in cents (USD).
requestedRail
string
default:"both"
The preferred settlement rail. Options are "stripe", "base", or "both".

Response

sessionToken
string
The unique token for this setup session.
setupUrl
string
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"
}