Intents
Intents are pre-transaction declarations that create an audit trail and enable transaction matching. They answer the question: “What did the agent claim it was going to do?”Intents are only available for multi-use cards. Single-use cards capture intent at creation time via the
purpose field.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
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.) |
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