Card Controls
Card controls let you enforce spending policy at authorization time — before a transaction is approved. Your agents operate autonomously within the boundaries you define.Spending limits
Set per-transaction, daily, and monthly caps in cents. When a transaction would exceed any cap, it is declined immediately.| Control | Example value | Behavior |
|---|---|---|
| Per-transaction limit | $500 (50000 cents) | Declines any single charge above the threshold |
| Daily limit | $2,000 (200000 cents) | Declines once same-day spend reaches the cap |
| Monthly limit | $12,000 (1200000 cents) | Prevents budget drift over long-running agent tasks |
MCC restrictions
Merchant Category Codes (MCCs) identify the type of business a merchant operates. You can restrict a card to an allow-list of approved categories, or block specific high-risk categories outright.| Mode | MCC codes | Use case |
|---|---|---|
| Allow-list | 5045, 5734, 5817 | Approve only software and SaaS purchases |
| Block-list | 7995, 4829 | Block gambling and wire transfers regardless of spend headroom |
5045— Computers and peripherals5734— Computer software stores5817— Computer game stores5411— Grocery stores7995— Gambling4829— Wire transfers
Velocity controls
Velocity rules constrain how many transactions a card can make within a time window. This prevents bursty spend patterns where each individual charge is within the per-transaction limit but aggregate activity crosses policy boundaries. Example: allow a maximum of 5 transactions per 10 minutes and 40 transactions per day.Pre-approval pattern
WhenpreApproval.enabled is true, Anima calls your pre-approval endpoint synchronously during the Stripe authorization window before approving the transaction.
Apply controls
CallPOST /api/identities/:id/cards/:cardId/controls to set or update all controls for a card.
Request body
Maximum single-transaction amount in cents.
Maximum total spend per calendar day in cents.
Maximum total spend per calendar month in cents.
Either
"allow" (only listed MCCs pass) or "block" (listed MCCs are declined).Array of four-digit MCC codes to apply the mode to.
Maximum number of authorizations allowed in any rolling 10-minute window.
Maximum number of authorizations allowed per calendar day.
When
true, each authorization is held for your pre-approval endpoint before being approved or declined.Milliseconds to wait for your pre-approval response. Must be under 2000. Defaults to
1500.Best practices
Store a snapshot of the active controls alongside each authorization event. This makes post-incident review straightforward: you can immediately see which rule triggered a decline without reconstructing historical state.
