Skip to content

Issue a card with a limit

Say "give my ads agent a card with a $500 limit" and get a spending rule, a virtual card, approval over the limit and every charge in your books.

Give an Agent or a Human a Card that spends only on what you allow, up to a Limit. The rule it spends under is a Mandate.

Needs Open a bank account · Agent

What you get

  • 1spending rule naming who may spend and on whatMandate
  • 1limit per month, per charge and per merchantLimit
  • 1virtual card with those spending controlsCard
  • 1cardholder record for your companyCompany
  • 1approval request to you for any charge over the limitApproval
  • 2lines in your books per charge: the cost and the cash outEntry

Your agent does

Mandate.authorize → Card.issue
You, to your agent

Give my ads agent a card with a $500 monthly limit.

Get me a virtual card for software, $200 a month at most.

Let the growth agent spend up to $500 a month on ads.

# 1. Mandate.authorize
MANDATE=$(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_ads","verb":"Mandate.spend","limit":"limit_ads_500_monthly"}' | jq -r '.mandate["$id"] | split("/") | last')

# 2. Card.issue
curl -X POST https://api.sb/leaseline.app/cards/issue \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mandate":"'"$MANDATE"'","form":"merchant","merchant":"Google Ads"}'
import { $ } from 'startup-builder'

const mandate = await $.Mandate.authorize({ agent: 'agent_ads', verb: 'Mandate.spend', limit: 'limit_ads_500_monthly' })
await $.Card.issue({ mandate: mandate.$id, form: 'merchant', merchant: 'Google Ads' })
MANDATE=$(npx startup-builder do Mandate.authorize --json '{"agent":"agent_ads","verb":"Mandate.spend","limit":"limit_ads_500_monthly"}' | jq -r '.mandate["$id"] | split("/") | last')
npx startup-builder do Card.issue --json '{"mandate":"'"$MANDATE"'","form":"merchant","merchant":"Google Ads"}'
{
  "name": "do",
  "arguments": {
    "code": "const mandate = await $.Mandate.authorize({ agent: 'agent_ads', verb: 'Mandate.spend', limit: 'limit_ads_500_monthly' })\nreturn await $.Card.issue({ mandate: mandate.$id, form: 'merchant', merchant: 'Google Ads' })"
  }
}

Change it

  • Raise the limit to $800 for March.
  • Freeze the card.
  • Add a second card for Meta ads.

Under the hood

Systems
Spend management, Treasury, Ledger, Work queue
Nouns
Mandate, Limit, Card, Approval, Entry
Events
Mandate.authorized, Card.issued
Stripe objects
Issuing Cardholder, Issuing Card, Issuing Authorization, Issuing Transaction

A Card spends only from the card balance. Stripe asks the platform to authorize each charge, and a charge outside the Mandate is declined at the terminal. A charge over the Limit waits for an Approval from the Role that holds the Mandate.