Skip to main content
Visa Intelligent Commerce

Card enrollment

Available for use by:
Merchants Independent developers

(VTS) PAN Enrollment API

When prompting a consumer to add a card to their previously created account, the agent must provide some mechanism to collect card details. Clients can use the PAN Enrollment API to register a PAN for token provisioning in Visa Intelligent Commerce (VIC).

The PAN Enrollment API replaces sensitive card details with a secure reference that can be used to provision payment tokens. This process ensures that cardholder data is never exposed during transactions. The client can refer to the Visa Digital Solutions API Reference Guide for more information.

Instances in which the client may use the PAN Enrollment API include during consumer onboarding, after verifying the consumer's identity, or when adding a new Visa card to VIC for tokenized transactions.

Endpoint: POST /vts/panEnrollments

Required fields

  • encryptedPaymentInstrument.accountNumber, the PAN
  • panSource, the capture method
  • Billing address and Card Verification Value 2 (CVV2) (required in VIC specs, to confirm; for VTS, CVV2 is not required for e-commerce card-on-file tokens, but the agent TR must still capture CVV2 for this flow)

Persist from response

  • vPanEnrollmentID, for token provisioning
  • Information necessary to present card details to the consumer

(VTS) Provision Token API

The client can then use the VTS Provision Token API to request to provision a token using the PAN and other card information stored in the PAN Enrollment API. The client can refer to the Visa Digital Solutions API Reference Guide for more information.

Instances in which the client may need to use the Provision Token API include immediately after enrolling a PAN using the PAN Enrollment API, or when adding a new tokenized payment credential to a consumer's VIC account for future transactions.

Endpoint: POST /vts/panEnrollments/{vPanEnrollmentID}/provisionedTokens

Request includes

  • vPanEnrollmentID from the PAN Enrollment API
  • Authentication context, if the issuer requires it

Persist from response

vProvisionedTokenID, for VIC card enrollment and credential retrieval. The client does not need to store the 16-digit token.

(VTS, VPP) Register Passkey

VIC uses Visa Payment Passkey APIs to enable AI agents to verify device and cardholder identities and to facilitate consumer consent to a purchase instruction. These APIs provide endpoints for securely registering consumer devices, validating their authenticity, and performing user authentication during the commerce workflow. These APIs support both attestation (confirming that a device is trusted) and assertion (verifying that the user is authorized to act on a transaction).

By using these APIs, AI agents ensure that only trusted devices and authenticated consumers can authorize transactions within VIC, supporting secure, passkey-based commerce experiences.

Prerequisites

  • Consumer account and card enrollment are complete, and the token is provisioned (vProvisionedTokenID is the stored provisioned token identifier provided in the response to the Provision Token API).
  • VTS FIDO SDK is integrated in your web or mobile application environment, and you initialize it as early as possible on any page that runs passkey flows to reduce UI latency during registration or authentication.
  • X-Pay-Token or mTLS is configured as the authentication method for your account.
  • You have determined whether, in your implementation, the VTS FIDO SDK can be presented within an iframe, or whether popup-based authentication is required based on browser preferences.
  • Correlation and idempotency headers are used on server calls that follow the SDK flow to de-risk retries.

(VTS, VPP) Get Device Attestation Options API

Endpoint: POST /vts/provisionedTokens/{vProvisionedTokenID}/attestation/options

Request includes

  • clientReferenceId, a unique identifier for each device
  • type = AUTHENTICATE
  • reasonCode = PAYMENT
  • requestedVisaManagedAuthenticationForRegister = true, which launches a Visa-managed enrollment experience for device binding, issuer ID&V, and passkey creation
  • authenticationPreferencesRequested fields (selectedPopupForAuthenticate, selectedPopupForRegister), set to true for a popup or false (the default) for an iframe

Interpret response

  • If action = REGISTER, no passkey is present. This indicates that either device binding, issuer ID&V, or passkey creation has failed. A retry is needed.
  • If action = AUTHENTICATE, passkey successfully created and issuer ID&V challenge successfully passed.
  • An AUTH_COMPLETE response indicates success. Other response events include AUTH_FAILED and AUTH_CANCELLED. In the case of AUTH_CANCELLED, the user has closed the VPP screen, and the session needs to be restarted.

Persist from AUTH_COMPLETE response

  • assuranceData.identifier
  • assuranceData.fidoBlob
  • dfpSessionId

You need these values to provide authentication evidence in the assuranceData array of the Credentials for Instruction API request. If passkey setup fails, the Credentials for Instruction request will be denied. Each purchase instruction in VIC requires valid proof of consumer authentication.

High-level process

  1. Consumer adds their card into the agent profile/platform.
  2. Agent enrolls the consumer's PAN with VTS.
  3. Agent provisions an agent token for the credential with VTS.
  4. Agent sets up a listener to listen to the post message response from the Visa iframe domain control using *.auth.vts.com.
  5. Agent opens the Visa iframe to create an Auth Session.
  6. Agent waits for the auth ready event.
  7. Once the iframe returns the auth ready event, the agent creates an authentication session with the iframe INIT and CREATE_AUTH_SESSION commands.
  8. Agent initiates the passkey registration flow with the VTS Get Device Attestation Options API. The API response returns endpoint, identifier, and payload.
  9. Agent opens the iframe using the AUTHENTICATE command, sending the endpoint, identifier, and payload received in the previous step.
  10. As part of the backend device binding and issuer ID&V flows, the consumer is prompted to complete a step-up option (for example, one-time password (OTP) with SMS).
  11. The user is prompted to create a passkey. Once the user agrees, a passkey is registered for that consumer, returning the assurance data required for VIC APIs.
  12. When passkey registration (including successful device binding and issuer ID&V) is complete, the agent returns confirmation to the user that the passkey has been created.

iframe commands

  • INIT
  • CREATE_AUTH_SESSION
  • AUTHENTICATE
  • CLOSE_AUTH_SESSION

iframe event responses

Success messages

  • AUTH_READY
  • AUTH_SESSION_CREATED
  • AUTH_COMPLETE
  • AUTH_SESSION_CLOSED

Failure messages

  • AUTH_NOT_SUPPORTED
  • AUTH_NOT_PERFORMED
  • AUTH_CANCELLED
  • AUTH_FAILED

How to test

  1. Run the full sequence once per test consumer/card combination, in the Sandbox environment, before attempting any purchase-instruction or credential-retrieval call.
  2. Confirm you receive a vProvisionedTokenID from Visa Token Service.
  3. Confirm that Visa Payment Passkey device binding completes, or that your use case has been approved to skip it.

Persist these fields

  • vProvisionedTokenID (required as tokenId on every later credential-retrieval call for this card)
  • Device-bound Visa Payment Passkey state for the consumer (required for authentication on later calls)