# Let the support agent refund up to $50

URL: /agents/let-an-agent-refund · Id: `guide:let-an-agent-refund`

> Give the support agent a standing Mandate to refund small amounts, so only the larger refunds wait for your yes.

Give the [Customer Lead](/agents/customer/customer-lead) a [Mandate](/business/nouns/mandate) to [refund](/business/nouns/order/refund) up to $50 without asking. Anything larger becomes an [Approval](/business/nouns/approval) with the [Conversation](/business/nouns/conversation) attached.

**Before real money moves**

- Who says yes: You. Your agent shows you the run and waits for your [Approval](/business/nouns/approval).
- You leave the chat: Never: it all happens in the chat.

## What you get
- 1 $50 cap on each refund (Limit)
- 1 standing permission for the support agent to refund up to it (Mandate)
- 1 request to you for any refund over $50, with the customer’s conversation attached (Approval)
- 1 line in your books for each refund (Entry)
- 1 money back on the card or account the customer paid with (Order)

## Your agent does
**For agents**

- Guide: `guide:let-an-agent-refund`, status `live`. Page: [/agents/let-an-agent-refund.md](/agents/let-an-agent-refund.md).
- Approval: ask the founder first. Show the run, then wait for their Approval; a refusal ends it.
- Leaves the chat: never.
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Limit.create`](/business/nouns/limit/create) (`verb:Limit.create`) | `amount` money: example `{"amount":50,"currency":"USD"}` | `limit` Limit |
| 2 | [`Mandate.authorize`](/business/nouns/mandate/authorize) (`verb:Mandate.authorize`) | `agent` Agent (an id), required: example `"agent_customer_lead"`; `verb` string, required: example `"Order.refund"`; `limit` Limit (an id), required: the `$id` step 1 returns; `topics` string[]: example `["refund"]` | `mandate` Mandate |

Returns: the last call answers with `mandate` and its `action`, whose `status` is `done`, `pending` (waiting on an Approval or a Worker), `failed`, `canceled` or `refused`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "mandate": {
    "$id": "https://api.sb/leaseline.app/mandates/mandate_1",
    "$type": "Mandate",
    "verb": "Order.refund",
    "limit": "limit_1",
    "topics": [
      "refund"
    ],
    "status": "active"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/action_1",
    "operation": "Mandate.authorize",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/action_1"
  }
}
```

Next: offer “Cap it at $500 of refunds a week”, or “Ask me for any refund on an annual plan”.

Calls: `Limit.create` → `Mandate.authorize`

Ask:

```text
Let the support agent refund up to $50 without asking.
Stop asking me about small refunds.
Refunds under $50 are fine, do them without me.
```

API:

```bash
# 1. Limit.create
LIMIT=$(curl -X POST https://api.sb/leaseline.app/limits \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount":{"amount":50,"currency":"USD"}}' | jq -r '.limit["$id"] | split("/") | last')

# 2. Mandate.authorize
curl -X POST https://api.sb/leaseline.app/mandates/authorize \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent":"agent_customer_lead","verb":"Order.refund","limit":"'"$LIMIT"'","topics":["refund"]}'
```

SDK:

```ts
import { $ } from 'startup-builder'

const limit = await $.Limit.create({ amount: { amount: 50, currency: 'USD' } })
await $.Mandate.authorize({ agent: 'agent_customer_lead', verb: 'Order.refund', limit: limit.$id, topics: ['refund'] })
```

CLI:

```bash
LIMIT=$(npx startup-builder do Limit.create --json '{"amount":{"amount":50,"currency":"USD"}}' | jq -r '.limit["$id"] | split("/") | last')
npx startup-builder do Mandate.authorize --json '{"agent":"agent_customer_lead","verb":"Order.refund","limit":"'"$LIMIT"'","topics":["refund"]}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "const limit = await $.Limit.create({ amount: { amount: 50, currency: 'USD' } })\nreturn await $.Mandate.authorize({ agent: 'agent_customer_lead', verb: 'Order.refund', limit: limit.$id, topics: ['refund'] })"
  }
}
```

## Change it
- Cap it at $500 of refunds a week.
- Ask me for any refund on an annual plan.
- Take the refund Mandate away.

## Under the hood
- Systems: [Support](/systems/support), [Billing](/systems/billing), [Ledger](/systems/ledger)
- Nouns: [Limit](/business/nouns/limit), [Mandate](/business/nouns/mandate), [Order](/business/nouns/order), [Approval](/business/nouns/approval)
- Events: `Limit.created`, [`Mandate.authorized`](/business/events/Mandate.authorized)
- Stripe objects: `Refund`