Identity Linking
3.1 Capability Identifier
The identity linking namespace isdev.ucp.common.identity_linking. It is a cross-domain common capability (common rather than shopping) because identity linking is not limited to shopping scenarios.
3.2 Why Identity Linking Is Needed
Consumers may already have accounts with merchants (membership tiers, loyalty points, saved addresses, order history, payment methods). Identity linking allows AI agents to securely represent consumers and leverage this existing information to deliver a personalized shopping experience — without requiring consumers to re-enter any information or share passwords. Checkout without identity linking: The AI agent can only create a guest checkout. The consumer must manually provide all information. Checkout with identity linking: The AI agent can directly access the consumer’s saved addresses, payment methods, and membership benefits, completing the checkout in a single step.3.3 Authorization Server Discovery
UCP requires merchants to publish authorization server metadata at the standard/.well-known/oauth-authorization-server endpoint (per RFC 8414):
3.4 OAuth 2.0 Authorization Code Flow
UCP uses the standard OAuth 2.0 Authorization Code flow and mandates PKCE (Proof Key for Code Exchange) for enhanced security:Step 1: Generate PKCE Parameters
Step 2: Initiate Authorization Request
| Parameter | Description |
|---|---|
scope | The standard UCP scope is ucp:scopes:checkout_session, authorizing the AI agent to manage checkout sessions |
state | CSRF protection token; must be an unpredictable random value |
code_challenge | PKCE challenge value, preventing authorization code interception attacks |
code_challenge_method | Fixed as S256 (SHA-256 hash) |
Step 3: User Authorization
The merchant presents an authorization page that clearly informs the user:- Which AI agent is requesting authorization
- What permissions are being requested
- The user can revoke access at any time
redirect_uri with an authorization code:
Step 4: Token Exchange
Step 5: Receive Tokens
3.5 UCP Scope Specification
UCP defines standardized scope naming with theucp:scopes: prefix:
| Scope | Permitted Operations |
|---|---|
ucp:scopes:checkout_session | Create and manage checkout sessions (core scope) |
3.6 Token Revocation (RFC 7009)
UCP requires merchants to implement a token revocation endpoint in compliance with the RFC 7009 OAuth 2.0 Token Revocation standard:- User-initiated revocation: The user revokes AI agent authorization in the merchant’s account settings
- Agent-initiated revocation: The AI agent proactively revokes the token when access is no longer needed
- Security incident: Emergency revocation of all tokens upon detecting anomalous activity
3.7 Token Refresh
After an access_token expires, use the refresh_token to obtain a new access_token:3.8 Security Requirements
| Requirement | Description |
|---|---|
| PKCE required | All Authorization Code flows must use PKCE (S256) |
| HTTPS required | All OAuth endpoints must be served over HTTPS |
| state parameter | Must use unpredictable random values to prevent CSRF |
| Least privilege | AI agents should only request scopes they actually need |
| Secure token storage | access_token and refresh_token must be stored securely; never logged in plaintext |
| Strict redirect URI matching | redirect_uri must exactly match the registered value |
Next chapter: Order Management — Line item status, fulfillment events, adjustments, and webhook signatures