Spending Intents
What You’ll LearnThis page covers:
- Why intents matter for AI agent accountability
- Intent lifecycle (pending → matched/mismatched/expired)
- Human-in-the-loop approval for high-value or sensitive purchases
- How to create and manage intents
- Automatic transaction matching
- Best practices for intent tolerance and TTL
Terminology note: In Proxy, “Intent” refers to a spending intent — a declaration of what your agent plans to purchase. This is different from “intent” in LLM/NLU contexts (user intent classification) or Stripe’s PaymentIntent (a payment lifecycle object).Think of it as: “Before spending, declare your intent.”
Intents work with all card types. When a transaction arrives, it’s automatically matched against pending intents for that card.
Why Intents?
| Without Intents | With Intents |
|---|---|
| Transaction happens, no context | Agent declares intent before spending |
| Hard to audit what agent intended | Clear audit trail of claimed purpose |
| Can’t detect unexpected purchases | Transactions matched against expectations |
Intent Lifecycle
| Status | Description |
|---|---|
pending_approval | Awaiting human approval before agent can proceed |
pending | Approved and awaiting transaction |
rejected | Human rejected the intent |
matched | Transaction arrived within tolerance |
mismatched | Transaction arrived outside tolerance |
expired | TTL reached without transaction |
canceled | Manually canceled |
Create an Intent
Before making a purchase, declare what you’re about to do:Intent Fields
| Field | Required | Description |
|---|---|---|
intentId | Yes | Your unique ID (for idempotency) |
summary | Yes | Human-readable description |
expectedAmount | No | Expected amount in cents |
expectedMerchant | No | Expected merchant name |
tolerance | No | Allowed variance in cents (e.g., 500 = ±$5) |
ttlMinutes | No | Time to live (default 30, max 1440) |
metadata | No | Additional context (taskId, orderId, etc.) |
Human-in-the-Loop Approval
When to use HITL ApprovalEnable approval when you want human oversight before an AI agent can access card credentials. Common use cases:
- High-value purchases above a threshold
- Sensitive categories requiring human judgment
- Compliance requirements for transaction authorization
requireApproval is enabled on a card, agent, or policy, intents start in pending_approval status instead of pending. The agent cannot access card credentials until a human approves the intent.
Flow
Enable Approval
SetrequireApproval at the card level:
| Field | Description |
|---|---|
requireApproval | When true, intents require human approval |
autoApproveBelow | Auto-approve intents below this amount (cents) |
Inheritance Chain
Approval settings follow this priority: Card > Agent > PolicyAuto-Approval Threshold
UseautoApproveBelow to skip human review for low-value intents:
- Intent for $30 → auto-approved (status:
pending) - Intent for $75 → requires approval (status:
pending_approval)
Approve an Intent
When you receive anintent.pending_approval webhook, review and approve:
Reject an Intent
To reject with an optional reason:Intent Response with Approval Status
When an intent requires approval, the response includes thepending_approval status:
Agent Cannot Access Credentials Until Approved
If an agent tries to get card details before approval:Automatic Matching
When a transaction webhook arrives from the payment network, the system automatically:- Finds any pending intent for the card
- Compares the transaction amount against
expectedAmount(withintolerance) - Compares the merchant name against
expectedMerchant(case-insensitive partial match) - Updates the intent status to
matchedormismatched - Emits a webhook event (
intent.matchedorintent.mismatched)
Transaction Matching
When a transaction arrives, it’s matched against pending intents: Matched - Transaction is within tolerance:List Intents
Best Practices
Always create intent before spending
Always create intent before spending
The intent creates an audit trail. Even if you don’t use matching, it documents what the agent claimed.
Use tolerance for variable amounts
Use tolerance for variable amounts
Tips, taxes, and fees can vary. Set tolerance to account for this:
Include metadata for debugging
Include metadata for debugging
Add context that helps with debugging:
Set appropriate TTL
Set appropriate TTL
Default is 30 minutes. Adjust based on your use case:
- Quick purchases: 10-15 minutes
- Complex checkouts: 30-60 minutes
- Async workflows: up to 1440 (24 hours)
Intent vs Credential Access
Both create audit trails, but serve different purposes:| Intent | Credential Access |
|---|---|
| Declared before any action | Required to get PAN/CVV |
| Optional (but recommended) | Required for card use |
| Matches against transactions | Correlates with transactions |
| Has tolerance for variance | No tolerance, just audit |
- Create intent (declare what you’re about to do)
- Request credentials (get PAN/CVV with attestation)
- Make purchase
- Transaction matched to intent