Building Agentic Commerce #7: Card Network Adapters for Visa VIC & Mastercard Agent Pay
How the Trusteed adapters for Visa Intelligent Commerce (VIC) and Mastercard Agent Pay (MCAP) are designed so AI agents never see card data. VIC is blocked by external access to Visa's pilot and MCAP has no settlement.
Felix Pumeda Seoane13 min read
Executive summary
A technical walkthrough of the Trusteed adapters for Visa and Mastercard's tokenized payment rails: VIC's 4-layer cryptography stack (complete adapter, no registered route, blocked by external access to Visa's pilot), MCAP's agent-identity and consent model (no settlement), and the unified AgentPaymentIntent model they both feed.
In this article
AI agents can search products, compare prices, and build carts across protocols like MCP, ACP, and A2A. But when it's time to pay, the agent needs access to card rails such as Visa and Mastercard. This post covers how the Trusteed adapters for both card networks are designed to give agents tokenized payment access without ever exposing card data. Neither is available to merchants today: the VIC adapter is complete but has no registered route and is blocked by external access to Visa's pilot, and MCAP has no settlement.
The Problem: Agents Need Card Rails
Stablecoin payments (x402) and protocol-native checkout (ACP, UCP) work well for crypto-native and platform-native flows. But most consumers still pay with Visa and Mastercard. For agentic commerce to reach mainstream adoption, agents need to interact with card networks: securely, with consumer consent, and without handling raw card numbers. Visa's Intelligent Commerce (VIC) and Mastercard's Agent Pay (MCAP) are the two card network protocols designed specifically for this use case.
Visa Intelligent Commerce (VIC)
VIC is Visa's direct API integration for agentic payments. The agent creates a purchase instruction with amount, currency, and merchant details. Visa's backend tokenizes the card via VTS (Visa Tokenization Service), binds it to the consumer's FIDO-enrolled device, and returns payment credentials: never exposing card data to the agent or merchant backend.
VIC Architecture: 4-Layer Cryptography
VIC's security model uses four cryptographic layers: (1) JWE token authentication: RS256 signing + RSA-OAEP-256 encryption with stale-while-revalidate caching (3600s TTL, auto-refresh 60s before expiry). (2) X-Pay HMAC: request-level integrity verification. (3) Message-Level Encryption (MLE): RSA-OAEP-256 key wrapping + A128GCM content encryption for payload confidentiality. (4) HTTPS: transport-level encryption. This means every VIC API call is signed, encrypted at message level, and transmitted over TLS: defense in depth against man-in-the-middle, replay, and data exfiltration attacks.
VIC Settlement Flow
The settlement service exposes three operations: createInstruction(): creates a VIC purchase instruction with amount, currency, merchant category code (MCC), frequency (SINGLE or recurring WEEKLY/MONTHLY), and shipping address. retrieveAndConfirm(): obtains payment credentials from VIC without exposing card data, then confirms the transaction event. cancelInstruction(): cancels an active purchase instruction. All operations use exponential backoff retry (max 3 attempts: 2s, 4s, 8s delays) and circuit breaker protection for resilience.
VIC Mandate Types
- 1Single mandates: one-time purchase instruction with transaction limit enforcement
- 2Recurring mandates: WEEKLY or MONTHLY frequency with state reconciliation and webhook-driven updates, in the adapter only
Mastercard Agent Pay (MCAP)
MCAP takes the opposite approach to VIC. Instead of a direct API integration with multi-layer cryptography, the design centres on agent identity verification and consumer consent management, with the Agentic Token (a 16-digit network token) as the payment credential. Correction 2026-10-11: an earlier version of this article described an automatic settlement path through Stripe for any merchant with Stripe enabled. That path does not exist: there is no Mastercard settlement integration, so Mastercard Agent Pay is not available and no payment is attempted through it. The inbound HTTP Message Signatures adapter only runs where an operator has set MCAP_ENABLED=true; settlement is not offered.
MCAP: HTTP Message Signatures (RFC 9421)
MCAP verifies agent identity using HTTP Message Signatures per RFC 9421 with Ed25519 keys. Every payment request includes Signature-Input and Signature headers with tag='agent-payer-auth'. The signature service parses the input header, extracts keyid/created/expires/nonce/alg, validates the Ed25519 signature against the agent's public key, enforces clock skew tolerance (plus or minus 30 seconds), and prevents replay attacks via a nonce cache with 5-minute TTL. Key rotation is supported with a 24-hour grace period for smooth transitions.
MCAP: Consent Scope Management
MCAP's consent service validates every transaction against the consumer's consent scope: maximum amount per period, allowed merchant category codes (MCCs), specific merchant IDs, and time windows. Accumulated usage tracking uses optimistic locking (WHERE updatedAt condition) for concurrent safety. Consent periods (DAILY, WEEKLY, MONTHLY) auto-reset when expired. Consumers can revoke consent at any time with immediate effect, ensuring the consumer always maintains control over their agent's spending authority.
VIC vs MCAP: Architecture Comparison
- 1Integration model: VIC uses 6 direct API endpoints; MCAP has no settlement integration (not available)
- 2Cryptography: VIC has 4 layers (JWE + X-Pay + MLE + HTTPS); MCAP has 1 layer (Ed25519 HTTP signatures)
- 3Merchant activation: VIC requires API key + MLE certificates; MCAP is not available: it is not switched on by enabling Stripe
- 4Enrollment: VIC uses FIDO multi-step device binding per card; MCAP uses pre-enrolled Mastercard Agent Sign-Up
- 5Settlement: VIC returns its own credential-based payment token; MCAP has no settlement path today (not available)
- 6Recurring: VIC has native WEEKLY/MONTHLY mandates with state sync; MCAP has no recurring support today (not available)
- 7Complexity: VIC is crypto-heavy (7/10); MCAP is signature-focused (4/10)
- 8Consumer auth: VIC binds to FIDO device; MCAP delegates to Mastercard app/biometrics
Unified Integration: The AgentPaymentIntent Model
Both VIC and MCAP feed into the same AgentPaymentIntent model, the platform's universal payment abstraction. The Protocol Router detects the incoming protocol via headers (X-Protocol: VIC or Signature-Input with agent-payer-auth tag), normalizes the request through the respective inbound adapter, and routes it to the settlement service. VIC is bidirectional (inbound + outbound adapters); MCAP is inbound-only because it has no settlement integration. Both adapters implement the IProtocolAdapter interface (detect, normalize, translate, healthCheck) and register in the PluginRegistry at server startup.
Protocol Detection Priority
VIC is never auto-selected as a fallback: it requires active consumer enrollment and an explicit X-Protocol: VIC header. If the header is detected but the consumer is not enrolled, the request fails with a clear error. MCAP is not selected by merchant configuration: having Stripe configured does not switch it on. Both protocols pass through the unified KYAI policy engine for spending limits, merchant verification, and agent trust scoring before settlement.
Plans
- 1Public pricing offers only the Free beta for one store and free guided accompaniment for Control and Evidence.
- 2Neither adapter is available to merchants yet, so there is nothing to subscribe to.
Reach of the Two Card Networks
Visa and Mastercard are the two networks these adapters target. We make no claim about how many cards or what share of payments they reach, because neither adapter can process a payment today. The Protocol Router is designed to detect and route each protocol through one integration point, alongside x402 (sandbox, testnet only), ACP (sandbox, Stripe in test mode) and UCP.
Production Status and Testing
The VIC adapter (spec 014) is complete, with 200+ tests across 14 test files covering adapter detection, API client, settlement flow, MLE/JWE crypto, token manager, circuit breaker, analytics, enrollment, recurring mandates, schemas, and config validation. It has no registered route and is blocked by external access to Visa's pilot. The MCAP adapter (spec 017) has 78 tests across 6 files covering adapter detection, RFC 9421 signature verification, consent validation, nonce cache, schemas, and integration. The inbound signature adapter only runs where an operator has set MCAP_ENABLED=true, and MCAP has no settlement, so it cannot take a payment. Passing tests show the code behaves as designed; they do not mean either rail is available.
Card network adapters are two of the protocol adapters Trusteed builds. For the status of each, see /en/protocol-coverage; for the rest of the stack, see the Building Agentic Commerce series at /en/blog.
Frequently asked questions
Does the AI agent ever see the consumer's actual card number?
Never. Both VIC and MCAP use tokenized payment flows. VIC creates tokenized credentials via Visa Tokenization Service (VTS) with FIDO device binding. The agent only receives a purchase instruction ID. MCAP is designed around 16-digit Agentic Tokens, which are network tokens. No raw card data touches the agent or merchant backend. All card data stays within the card network's secure infrastructure.
Can a merchant accept both Visa VIC and Mastercard MCAP simultaneously?
In the design, yes. Both protocols register as separate adapters in the PluginRegistry and implement the same IProtocolAdapter interface. The Protocol Router detects which protocol the incoming request uses (via headers) and routes to the correct adapter. The design lets one MCP endpoint serve several protocols, but today only the rails marked production or sandbox at /en/protocol-coverage are usable, and VIC and MCAP are not.
What happens if a consumer revokes their MCAP consent mid-transaction?
Consent revocation takes immediate effect. If a consumer revokes consent via the Mastercard app while an agent is attempting a purchase, the McapConsentService.validateAndConsume() call will reject the transaction. The agent receives a clear error indicating consent was revoked, and can inform the user accordingly. No payment is attempted: Mastercard Agent Pay is not available for payment (there is no Mastercard settlement integration).
Why does VIC require 4 cryptographic layers while MCAP only needs 1?
Architecture difference. VIC is a direct API integration. The merchant backend communicates directly with Visa's servers, requiring end-to-end cryptographic verification at every layer (authentication, integrity, confidentiality, transport). MCAP is built around agent identity: the merchant verifies the agent via HTTP Message Signatures and the consumer's consent scope. Correction 2026-10-11: this answer used to say Stripe acts as an intermediary that handles the cryptography with Mastercard; there is no such integration, and Mastercard Agent Pay is not available for payment. The complexity is distributed differently.
Is Visa TAP the same as VIC?
No. Visa TAP (Token and Permissions) is a separate initiative that Visa is developing for broader agentic use cases. When TAP's public specification is released, Trusteed plans to extend the existing VIC adapter rather than creating a new protocol adapter. The architecture is designed for incremental extension. TAP is currently being monitored for spec publication.
Sources and references
- Visa Intelligent Commerce (VIC) Developer Documentation
Visa Developer Center
- Mastercard Agent Pay: Agentic Commerce Specification
Mastercard Developers
- RFC 9421: HTTP Message Signatures
IETF
Published
2026-05-15
Updated: 2026-10-29
Author
Felix Pumeda Seoane
Founder · Published by Trusteed
Felix Pumeda Seoane is the founder of Trusteed, as recorded in the site's legal notice. Technical claims in these articles are backed by the surfaces linked from each piece and by the signed capability registry at /.well-known/trusteed-capabilities.json, which is the arbiter when an article and a status surface disagree.
About TrusteedCategory
Developer Guides
Related articles
Developer Guides
Building Agentic Commerce #1: Multi-Protocol Checkout with MCP + x402 + ACP in One Flow
One agent, three protocols, one checkout. Here's how MCP, x402 stablecoin payments, and ACP work together to let AI agents buy products, with code examples you can run today.
Developer Guides
Building Agentic Commerce #4: x402 Stablecoin Payments, When Agents Pay in USDC
How AI agents make on-chain USDC payments using the x402 protocol: EIP-712 signatures and stablecoin checkout. x402 is in sandbox: settlement runs only on Base Sepolia testnet with no real value, and although the schema accepts five networks, none has settleable commerce today.
Developer Guides
Building Agentic Commerce #3: Reading Trust Score v4.1
Trust Score v4.1: three weighted dimensions, an optional bonus and confidence caps. Read each response's engine; v2 is only a fallback if the v4.1 calculation fails.