payments.mandates_create
Create the spend policy on this identity's wallet
Scope: payments:spend
Create the mandate — the per-call and per-day USDC spend caps — for this identity's wallet. Loomal installs an on-chain session key as part of the call; the first run takes 10–30 seconds while the install lands on Base. If installError is set on the returned mandate, it's unusable and creation should be retried.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
maxPerCallUsdc | string | Yes | Decimal USDC, max per single payments.pay() call. E.g. "0.10". |
dailyCapUsdc | string | Yes | Decimal USDC, cumulative per UTC day. Must be ≥ maxPerCallUsdc. |
validUntil | string | No | ISO 8601 expiry. Defaults to 7 days from now. |
Example
Agent: "Set my spending limits to 10 cents per call and 1 dollar per day."
-> payments.mandates_create({ maxPerCallUsdc: "0.10", dailyCapUsdc: "1.00" })Returns
{
"mandateId": "m_abc123",
"network": "base",
"maxPerCallUsdc": "0.10",
"dailyCapUsdc": "1.00",
"validUntil": "2026-05-19T10:00:00Z",
"sessionKeyAddress": "0x<session-key>",
"onchainInstalled": true,
"installTxHash": "0x<install-tx>",
"installError": null,
"spentTodayUsdc": "0",
"remainingTodayUsdc": "1.00",
"totalSpentUsdc": "0",
"callCount": 0,
"revokedAt": null,
"createdAt": "2026-05-12T10:00:00Z"
}