What Is the KYA Problem?
Know Your Customer (KYC) is a well-understood regulatory requirement: verify that the person initiating a financial transaction is who they claim to be. Know Your Agent is its emerging counterpart: verify that an autonomous software agent is legitimate, authorized, and operating within the scope a human granted it.
The problem is more complex than it first appears, for three reasons.
First, agents are not people. Traditional payment authentication relies on something a human has (a card, a phone), something they know (a PIN, a password), or something they are (a fingerprint, a face). Agents have none of these in any meaningful sense. They have credentials — but credentials can be copied, stolen, or forged without any of the behavioral signals that fraud systems use to detect human account takeovers.
Second, agents act autonomously. A human making a fraudulent purchase creates a real-time moment of consent that can be challenged (3-D Secure, SMS OTP). An agent executing a purchase may do so milliseconds after the triggering condition is met, with no human in the loop to confirm or deny.
Third, the principal chain is long. An agent running on a third-party platform, using a model from one AI provider, orchestrated by another service, acting on behalf of a human consumer, presents a liability question no existing payment network rule set cleanly resolves. Who is responsible when that agent commits fraud, exceeds its mandate, or is compromised mid-session?
KYA is the set of protocols, standards, and contractual frameworks that answer these questions before a transaction clears.
Human Identity vs. Agent Identity: A Structural Difference
To understand why agent authentication requires new infrastructure, it helps to map the structural differences between human and agent identity in payment contexts.
| Dimension | Human Identity | Agent Identity |
|---|---|---|
| Identity anchor | Government ID, biometrics | Cryptographic key, attestation certificate |
| Authentication factor | Password, OTP, biometric | API key, signed JWT, mutual TLS certificate |
| Authorization model | Consent at checkout | Delegated scope, pre-authorized budget |
| Session duration | Minutes (checkout flow) | Hours to weeks (persistent agent loop) |
| Behavioral baseline | Individual, learnable | Programmatic, variable by task |
| Fraud signal | Anomalous behavior vs. baseline | Scope violation, credential misuse |
| Liability holder | Cardholder, issuing bank | Developer, platform, or enterprise deploying agent |
| Revocation mechanism | Block card, reset password | Rotate key, revoke token, kill switch |
The key insight is that agent identity is fundamentally credential-based and scope-bounded, whereas human identity is fundamentally biometric and behavioral. This means the security model for agent authentication must be built around cryptographic proof of origin and strict scope enforcement — not behavioral heuristics.
For a deeper look at the APIs that expose payment capabilities to agents, see our guide to AI agent payment APIs.
OAuth 2.0 and Delegated Authorization for Agents
OAuth 2.0 is currently the closest thing to a consensus framework for AI agent authentication in payments. It was designed for exactly the scenario agents present: a third-party application (the agent) needs to act on behalf of a resource owner (the human) with a limited, revocable set of permissions.
How OAuth 2.0 Delegation Works for Agents
The standard OAuth 2.0 authorization code flow adapted for agents looks like this:
- Human grants authorization. The user consents to an agent acting on their behalf, specifying which resources (payment account, spending limit, merchant categories) the agent can access.
- Authorization server issues tokens. The authorization server — typically operated by the payment platform or bank — issues an access token (short-lived) and a refresh token (longer-lived but rotatable).
- Agent presents token at API. When the agent initiates a payment, it presents the access token as a Bearer credential. The payment API validates the token signature and checks the embedded scopes.
- Token is validated against scope. If the requested action (e.g., "charge $47 to merchant X") falls within the authorized scope (e.g., "grocery purchases under $100"), the transaction proceeds. If not, it is rejected before the network sees it.
- Token rotates. Short-lived access tokens (15 minutes to 1 hour is the emerging norm) limit the blast radius of a compromised credential. Refresh tokens should be rotated on each use.
OAuth 2.0 Scopes Designed for Payments
Generic OAuth scopes like read and write are insufficient for payment authorization. The emerging practice is to define payment-specific scopes that encode the agent's mandate with precision:
payments:execute:grocery:usd:100
payments:execute:subscription:usd:50:monthly
payments:read:transactions
payments:refund:self_initiated This scope-as-policy approach means the payment API can enforce the human's original intent at the network edge, without relying on the agent to self-police.
OpenID Connect for Agent Attestation
OpenID Connect (OIDC), the identity layer built on top of OAuth 2.0, provides the mechanism for agents to prove not just what they are authorized to do but who they are. An OIDC ID token issued to an agent would include:
sub: the agent's unique identifierazp(authorized party): the client that was issued the tokenact(actor claim, RFC 8693): the identity of the agent acting on behalf of the subjectmay_act: claims specifying which agents are authorized to act for this principal
The act claim from RFC 8693 (Token Exchange) is particularly important: it creates a verifiable chain of delegation, recording each principal in the trust hierarchy that vouched for the final acting entity.
Agent Credentials vs. Human Credentials
A persistent mistake in early agent payment integrations is treating agent credentials like human credentials — storing a static API key in the agent's environment and using it for all transactions. This approach fails on multiple security dimensions.
Why Static API Keys Are Insufficient
Static API keys have no expiry, no scope, and no binding to a specific agent instance or session. If an API key is leaked from a compromised agent environment, it grants indefinite, unlimited access. There is no behavioral baseline to detect misuse because the key carries no identity signal beyond "valid client."
The NIST SP 800-63 Digital Identity Guidelines, while written for human identity assurance, provide a useful framework for thinking about assurance levels. Agent credentials should target assurance levels equivalent to IAL2/AAL2: cryptographically verifiable, phishing-resistant, and bound to a specific authenticator (in this case, the agent instance's key pair).
The Right Credential Architecture for Agents
| Credential Type | Use Case | Lifetime | Scope | Revocability |
|---|---|---|---|---|
| Client credential (OAuth 2.0) | Agent-to-platform authentication | Indefinite (but rotatable) | Application-level | Per client ID |
| Access token | Per-session payment authorization | 15 min – 1 hour | Transaction-level | Per token |
| Refresh token | Session renewal | 24 hours – 30 days | Refresh only | Per refresh token |
| mTLS certificate | High-value transaction signing | 90 days | Transport-level | CRL/OCSP |
| Signed JWT (self-contained) | Stateless API calls | 5–15 minutes | Claim-encoded | Short expiry |
The recommended pattern for production agent payment systems combines client credentials for platform authentication with short-lived access tokens for individual transactions, backed by mutual TLS (mTLS) for transport-level assurance. This ensures that even if an access token is intercepted, it cannot be replayed from a different origin.
Short-Lived Tokens and Scoped Authorization: The Core Defense
The single highest-impact security practice for AI agent authentication in payments is the aggressive use of short-lived, narrowly scoped tokens. This is not a new idea — it is the foundation of Zero Trust architecture — but it requires deliberate implementation in agent payment flows.
Why Token Lifetime Matters
A compromised long-lived token is an open door. A compromised 15-minute token is a locked door with a 15-minute window. When you combine short token lifetime with:
- Binding tokens to specific agent instances (via client certificate or DPoP — Demonstrating Proof of Possession)
- Encoding spending limits in token claims
- Logging every token issuance and use
- Requiring re-authorization for anomalous requests
...the attack surface for agent credential compromise shrinks dramatically.
DPoP: Binding Tokens to Agent Instances
Demonstrating Proof of Possession (DPoP, RFC 9449) is an emerging OAuth 2.0 extension that binds an access token to a specific public/private key pair held by the agent. Even if the token is stolen, it cannot be used by an attacker who does not control the private key that generated the DPoP proof.
For payment applications, DPoP provides a critical additional layer: it means the payment API can verify not just that a valid token was presented but that the token was presented by the specific agent instance that originally obtained it.
How Visa and Mastercard Are Approaching Agent Authentication
The card networks have recognized that agentic commerce requires new rules and infrastructure, and both Visa and Mastercard have initiated significant programs to address it.
Visa's Approach: Agent Enrollment and Token Binding
Visa has been developing frameworks for what it calls "agentic payments" — transactions where an autonomous agent acts on a cardholder's behalf. The core elements of Visa's emerging approach include:
- Agent enrollment: Agents must be enrolled with Visa's network before they can initiate transactions, establishing a verifiable identity record.
- Token binding: Payment credentials used by agents are represented as network tokens (Visa Token Service) rather than raw PANs, reducing the value of stolen credentials.
- Spending controls encoded in tokens: The token itself can carry metadata that enforces the human's pre-authorized spending parameters — merchant category restrictions, geographic limits, per-transaction caps.
- Transaction attribution: Every agent-initiated transaction is flagged with agent identifiers that persist through the authorization and settlement chain, enabling dispute resolution.
Mastercard's Approach: Agent Commerce Framework
Mastercard has articulated a similar framework under its agent commerce initiatives, emphasizing:
- Verified agent identity: Agents must present verifiable credentials that link them to a registered developer/enterprise entity in Mastercard's ecosystem.
- Dynamic spending controls: Cardholders can set agent-specific rules (maximum spend per day, approved merchants, requiring human confirmation above a threshold) that Mastercard enforces at the network level.
- Liability rules for agent transactions: Mastercard is developing explicit chargeback rules for agent-initiated transactions that clarify which party bears liability when fraud occurs — the issuer, the acquirer, the merchant, or the platform that deployed the agent.
Both networks are also participating in broader industry working groups on machine-to-machine commerce standards, which will eventually govern agent-to-agent transactions that occur entirely outside the human-facing card flow.
Agent Identity Attestation: Emerging Proposals
Beyond OAuth 2.0 and network tokenization, a newer class of proposals addresses agent identity attestation — the ability for an agent to cryptographically prove not just that it has a credential but that it is what it claims to be: a specific model, running on a specific platform, under a specific set of constraints.
Anthropic's Model Spec and Identity Signals
Anthropic has been developing frameworks for agent identity as part of its broader Constitutional AI and model governance work. Key elements relevant to payment authentication include:
- Operator-level identity: Anthropic distinguishes between the user (human), the operator (the business deploying the agent), and Anthropic itself as layers of the principal hierarchy. Payment platforms interacting with Anthropic-hosted agents can request attestation of which operator deployed the agent and under what constraints.
- System prompt attestation: Proposals under development would allow an agent to provide a cryptographically signed attestation of its system prompt hash — allowing a payment API to verify that the agent is operating under the expected instructions, not a hijacked or jailbroken version.
OpenAI's Agent Identity Work
OpenAI has similarly been developing identity frameworks for agents built on its models:
- API key scoping: OpenAI's platform already supports project-level API keys that limit an agent to specific capabilities, which payment integrations can use as a coarse-grained authorization layer.
- Agent metadata headers: Proposals in active development would allow agents to include signed metadata in API requests identifying the originating model, version, and operator — giving payment APIs a richer signal for trust decisions.
NIST's Emerging Framework for Non-Human Identities
NIST's National Cybersecurity Center of Excellence (NCCoE) has begun work on identity frameworks for non-human entities, including AI agents. The emerging guidance emphasizes:
- Lifecycle management: Non-human identities require the same credential lifecycle management as human identities — provisioning, rotation, and revocation.
- Least privilege: Agents should receive only the permissions required for their specific task.
- Audit trails: Every action taken by a non-human identity must be logged with sufficient detail to reconstruct the authorization chain.
The Liability Chain: Who Vouches for the Agent?
The hardest unsolved problem in AI agent authentication for payments is not technical — it is contractual. When an agent executes a transaction that turns out to be fraudulent, unauthorized, or erroneous, the existing chargeback and dispute framework does not cleanly assign responsibility.
The Four-Layer Principal Hierarchy
For most agentic payment scenarios, the liability chain has four layers:
- The human cardholder — who granted the original authorization to the agent
- The platform operator — who deployed the agent and accepted the terms of service with the payment network
- The AI provider — whose model the agent runs on (Anthropic, OpenAI, etc.)
- The merchant — who accepted the agent-initiated transaction
Under current card network rules, liability typically flows between the issuer and acquirer based on whether the transaction was authenticated (3DS) and whether the merchant complied with card-not-present requirements. Agent-initiated transactions muddy this flow because:
- The "cardholder" did not present their card — an agent did
- The "authentication" was performed by an OAuth flow, not a cardholder challenge
- The "merchant" may not know or be able to verify that an agent (rather than a human) made the purchase
Emerging Liability Models
The direction the industry is moving toward involves explicit agent authorization records that shift liability when:
- The agent presented a valid, platform-issued credential
- The transaction fell within the pre-authorized scope
- The agent's identity was cryptographically verifiable at transaction time
Under this model, if a merchant accepts a properly attested agent transaction that later results in a dispute, the liability for fraud shifts toward the platform operator (who vouched for the agent) rather than the merchant. If the agent exceeded its authorized scope, liability may shift toward the AI provider or the platform that misconfigured the agent's constraints.
This liability model is still being negotiated between the networks, issuers, and platform operators. The autonomous commerce security implications extend well beyond individual transactions to systemic risk management.
Practical Implementation Guide for Merchants
If you are a merchant deciding whether and how to accept agent-initiated payments today, here is the practical framework:
Step 1: Identify Agent Traffic
Implement detection logic to identify agent-initiated requests based on:
- HTTP headers (User-Agent strings, custom
X-Agent-*headers) - OAuth token metadata (agent-specific scopes,
actclaims) - Behavioral signals (request timing, pattern regularity, absence of browser fingerprint)
Do not rely solely on self-declaration. Agents can misrepresent themselves, and your fraud system needs independent signals.
Step 2: Require Verifiable Agent Credentials
Before accepting an agent-initiated payment, require the agent to present:
- A valid OAuth 2.0 access token from a recognized authorization server
- Token scopes that explicitly authorize the requested transaction type and amount
- If available, an agent identity attestation (signed by the platform operator)
Reject transactions from agents presenting only static API keys or bearer tokens without scope claims.
Step 3: Enforce Scope at the API Layer
Your payment API should validate scope claims before processing any agent transaction:
- Parse the access token's scope field
- Verify the requested transaction falls within scope (amount, merchant category, geography)
- Reject out-of-scope requests with a
403 Forbiddenand a scope error code — do not silently downgrade
Step 4: Log Agent Transaction Metadata
Store agent-specific metadata with every transaction for dispute resolution:
- Agent identifier (
subclaim from token) - Operator identifier (
azpclaim) - Token issuance timestamp and expiry
- Scope at time of transaction
- DPoP proof hash (if used)
This metadata is your defense in chargebacks and your evidence in fraud investigations.
Step 5: Set Agent-Specific Risk Thresholds
Apply stricter fraud thresholds to agent transactions until you have sufficient behavioral history:
- Lower velocity limits
- Flag high-value agent transactions for additional review
- Require human confirmation (callback URL or SMS to the cardholder) above a configurable threshold
Practical Guide for Agent Developers
If you are building an agent that needs to initiate payments, here is the security architecture to implement:
Credential Management
- Never store payment credentials in the agent's context window. Use a secrets manager (AWS Secrets Manager, HashiCorp Vault, Azure Key Vault) and retrieve credentials at runtime.
- Use per-agent key pairs. Each agent instance should have its own cryptographic key pair, not a shared key. This enables per-instance revocation.
- Implement token rotation. Build your agent to handle token refresh gracefully. Access tokens will expire; your agent must not fail or fall back to stored credentials when they do.
Scope Declaration
- Request the minimum necessary scope. When your agent requests authorization, specify the narrowest possible set of permissions. A grocery shopping agent should not request
payments:execute:*. - Encode spending limits in scope requests. Use scope parameters to encode the spending limit the human authorized:
payments:execute:grocery:usd:150:daily. - Surface scope to users. When obtaining user authorization, display the requested scopes in plain language. "This agent can charge up to $150/day at grocery stores" is better UX and better security.
Agent Identity Signaling
- Include agent metadata in API requests. Send
X-Agent-ID,X-Agent-Version, andX-Operator-IDheaders in every payment API request. This is voluntary today but will be required under emerging standards. - Sign your requests. Use HTTP message signatures (RFC 9421) to sign payment API requests with your agent's private key. This provides non-repudiation and proves the request came from the authorized agent instance.
- Implement a kill switch. Your agent must support immediate revocation of its payment credentials — a mechanism your operator or the human principal can trigger to stop all agent payment activity instantly.
Human Override Paths
- Build confirmation hooks. For transactions above a threshold, implement a callback that pauses the agent and sends a confirmation request to the human. Resume only on explicit approval.
- Maintain an audit log. Every payment action your agent takes should be logged and surfaced to the human principal through a dashboard or notification stream. Transparency is both a security requirement and a trust-building feature.
The Road Ahead: Toward Universal Agent Identity Infrastructure
The current state of AI agent authentication in payments is best described as "functional but fragile." OAuth 2.0 provides a workable delegation framework; the card networks are building agent-specific token and liability infrastructure; NIST, Anthropic, and OpenAI are developing attestation proposals. But these pieces are not yet connected into a unified, interoperable standard.
The missing piece is a universal agent identity infrastructure — analogous to what X.509 certificates and certificate authorities did for TLS: a way for any merchant, any payment network, and any agent to cryptographically verify each other's identities and trust claims without pre-existing bilateral relationships.
Several proposals are moving toward this goal, including W3C Verifiable Credentials adapted for non-human entities, Decentralized Identifiers (DIDs) for agents, and emerging work at the OpenID Foundation on Non-Human Identities (NHI). The timeline for standards convergence is likely 2026–2028.
Until then, the practical approach for both merchants and agent developers is to implement the layered architecture described in this article — OAuth 2.0 delegation, short-lived scoped tokens, cryptographic request signing, explicit audit trails — and to stay close to the evolving guidance from Visa, Mastercard, Stripe, and the standards bodies as the infrastructure matures.
Frequently Asked Questions
What is the KYA (Know Your Agent) problem in payments?
Know Your Agent (KYA) refers to the challenge merchants, payment networks, and issuers face in verifying that an AI agent initiating a payment is legitimate, properly authorized by a real human, and operating within its granted permissions. Unlike KYC (Know Your Customer), which uses biometrics and government ID to verify humans, KYA requires cryptographic credential verification, scope-based authorization, and a verifiable chain of delegation from agent back to consenting human.
How does OAuth 2.0 apply to AI agent authentication in payments?
OAuth 2.0 provides the delegated authorization framework most suitable for agent payments. A human grants an agent authorization to act on their behalf; an authorization server issues short-lived, scoped access tokens; the agent presents these tokens when initiating payments; and the payment API validates the token's signature and scope before processing the transaction. The key adaptation for agents is using payment-specific scopes that encode spending limits and merchant restrictions directly in the authorization grant.
What is the difference between an API key and a proper agent payment credential?
Static API keys are long-lived, unscoped, and unbound to a specific agent instance — making them a poor choice for payment authorization. Proper agent payment credentials combine OAuth 2.0 access tokens (short-lived, scope-encoded), client certificates for instance binding, and optionally DPoP proofs to tie tokens to a specific key pair. This layered approach limits the blast radius of any single compromised credential.
How are Visa and Mastercard handling agent-initiated transactions?
Both networks are developing agent commerce frameworks that include agent enrollment (registering agents with verifiable operator identities), network tokenization (replacing raw PANs with agent-bound tokens), dynamic spending controls (network-enforced limits on agent transactions), and updated liability rules for agent-initiated chargebacks. These programs are actively being piloted as of 2025–2026 and will likely become mandatory requirements for platforms processing agent payments.
Who is liable when an AI agent makes an unauthorized payment?
Liability is currently being resolved through network rule updates and contractual frameworks between platforms and payment networks. The emerging model shifts liability to the platform operator when the agent presented a valid, in-scope credential — and toward the AI provider or platform when the agent exceeded its authorized scope. Merchants who accept properly attested agent transactions and store the credential metadata are best positioned to defend against chargebacks.
What is agent identity attestation and why does it matter?
Agent identity attestation is the ability for an agent to provide cryptographic proof of its identity — not just its credentials, but its configuration: which model it runs on, which platform deployed it, and what instructions it is operating under. Proposals from Anthropic and OpenAI would allow payment APIs to verify, for example, that an agent is running an unmodified system prompt from a registered operator, reducing the risk of prompt injection attacks that redirect an agent's payment behavior.
What scopes should I request when authorizing an agent to make payments on my behalf?
Request the narrowest possible scope for your use case. Rather than a generic payments:execute scope, specify the merchant category (e.g., grocery), maximum transaction amount, frequency (e.g., daily), and currency. Example: payments:execute:grocery:usd:150:daily. This limits the damage if the agent is compromised and gives you a clear record of what you authorized for dispute resolution.
How should merchants detect and handle agent-initiated payment requests differently from human transactions?
Merchants should identify agent traffic through HTTP headers, OAuth token metadata (agent-specific scopes, act claims), and behavioral signals, then apply agent-specific risk controls: stricter velocity limits, mandatory scope validation, lower thresholds for human confirmation callbacks, and storage of agent credential metadata with every transaction. Until behavioral baselines are established for agent traffic, treating it as a higher-risk channel than authenticated human checkout is a reasonable default.