These flows are actively being refined. Crossmint’s customer success engineers (CSE) will work with you to review your architecture. Contact Crossmint to get started.
Overview
Virtual cards let your agent make credit card purchases without ever seeing the user’s real card number. Crossmint derives a scoped virtual card number from the user’s saved card, with configurable spend limits and issuer verification.Key Properties
These are not new cards. Virtual cards are tokenized representations of the user’s existing card. This means:- Charges appear on the user’s regular bank statement
- The user keeps their rewards points and cashback
- Standard dispute resolution and fraud protection apply
- No separate account or card to manage
How It Works
The system has three layers:| Concept | API name | What it is | Lifetime |
|---|---|---|---|
| Saved card | Payment Method (paymentMethodId) | The user’s tokenized credit card | Persistent, save once |
| Agentic enrollment | Enrollment (enrollmentId) | Registers the card for agent use; requires cardholder verification | Persistent, one-time setup per card |
| Virtual card | Order Intent (orderIntentId) | A scoped spending authorization with mandates | One per purchase |
Prerequisites
- A Crossmint developer account
- A client-side API key
- Save Cards on File guide completed
- JWT authentication configured. Crossmint uses a JWT to identify the user. See JWT Authentication for setup.
- HTTPS required, even in local development. Visa’s Click to Pay verification uses the Web Authentication API (passkeys), which requires a secure context.
Integration Steps
Save a Card and Enroll for Agentic Use
The Crossmint React SDK handles card tokenization, agentic enrollment, and passkey verification in a secure iframe. Mount the Store
CrossmintPaymentMethodManagement component and listen for callbacks:verificationConfig in state. You will pass it to the OrderIntentVerification component in Step 3 to authorize spending.When a user saves a Visa card, the SDK automatically enrolls it for agentic use and fires onAgenticEnrollmentCreated alongside onPaymentMethodSelected.Create an Agent
An agent represents your application acting on behalf of the user. Create one agent per logical use case. You only need to do this once; reuse the same Response:Store the returned
agentId for subsequent order intents.agentId; you will need it to create virtual cards.Create a Virtual Card and Authorize Spending
Before creating an order intent, check the enrollment status via This can happen if the user navigated away during card save before passkey verification completed.An order intent defines the spending rules for a virtual card. Think of it as a “permission slip” with limits. It ties together an agent, a payment method, and a set of mandates (spending constraints).3a. Create the order intentUse the Get the After verification, the order intent phase changes to
GET /api/unstable/payment-methods/<payment_method_id>/agentic-enrollment. If the status is not active (e.g. pending_verification or pending), mount PaymentMethodAgenticEnrollmentVerification to complete it:paymentMethodId from Step 1 (returned in the onPaymentMethodSelected callback) and the agentId from Step 2:orderIntentId, phase, and payment.btAgentId / payment.btInstructionId from the response.3b. Authorize the expenditureWhen the response phase is "requires-verification", mount the OrderIntentVerification component to prompt the user for passkey authorization:Pass verificationConfig (from Step 1’s onAgenticEnrollmentCreated callback) and the order intent response — including btAgentId and btInstructionId from the payment object — to the component:active.There are two passkey prompts in the full flow: enrollment verification (Step 1, handled automatically by the SDK during card save) and spending authorization (this step, which authorizes the specific spending scope defined by the mandates).
Useful Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/unstable/agents | List existing agents (check before creating a new one) |
| GET | /api/unstable/order-intents | List all order intents for the user |
| GET | /api/unstable/order-intents/{id} | Get a single order intent’s current status |
Next Steps
Save Cards on File
Set up the card tokenization component that serves as the foundation for virtual cards.
Fund a Stablecoin Wallet
An alternative payment path: fund your agent’s wallet with stablecoins via onramp.

