Intents
An Intent is a pre-transaction declaration of what an agent plans to purchase. Intents enable policy enforcement before card details are accessed.Why Intents?
Intents serve several purposes:- Approval workflows - Require human approval for large purchases
- Merchant restrictions - Validate purchases against allowed merchants
- Spending controls - Enforce limits before transactions occur
- Audit trail - Document the purpose of every transaction
Creating an Intent
Intent Fields
| Field | Type | Description |
|---|---|---|
purpose | string | Human-readable description |
expectedAmount | number | Expected transaction amount (cents) |
expectedMerchant | string | Expected merchant name |
Intent Lifecycle
| Status | Description |
|---|---|
pending_approval | Awaiting human approval |
pending | Approved, awaiting transaction |
matched | Transaction matched the intent |
mismatched | Transaction didn’t match expectations |
expired | Intent expired before use |
Matching Rules
When a transaction occurs, Proxy matches it against pending intents:- Amount tolerance: ±10% of expected amount
- Merchant matching: Fuzzy match on merchant name
- Time window: Intent must not be expired
Approval Workflows
IfrequireApproval is enabled in the policy, intents start in pending_approval status: