CLI docs

Trusted Agent ProtocolRegister an agent

Trusted Agent ProtocolTAP specification

Register an agent

Create an agent in the Visa Agent Directory, add its key and keep it current.

Markdownllms.txt
On this page

If you work through an enabler, such as Basis Theory, you don't need this page: your enabler registers your agents in the Visa Agent Directory, and you never call VARS or need Visa credentials. To test before your enabler onboards you, register agents from your enabler's test tenant, as Rehearse it in sandbox shows.

This page is for you if you hold your own agent's signing key and want to register it directly with the Visa Agent Registry Service (VARS). You don't need it for a Visa CLI agent: connecting through Visa CLI does all of this for you, and starts with the card step, which direct registration doesn't include. An agent registered this way isn't in Visa CLI's registry, so nothing here lets anyone say a card was verified.

  1. Prepare a stable identity

  2. Create the agent, optionally with its key

  3. Confirm the agent is active

  4. Add, activate and read back the key

  5. Treat only confirmed state as live

  6. Sign your requests

Every call authenticates as described on Authentication, and field-level detail is on each linked page.

  1. Prepare a stable identity

    Decide these before you make any call, because they have to stay the same if you retry:

    • A unique domain host for each agent, and a routable contactEmail that's unique on your TRID. A second agent with the same contact email is refused with 409, which Basis Theory reports as AGENT_CONTACT_EMAIL_CONFLICT, and a plus-address, such as agent-team+one@example.com, counts as a different email. One TRID covers many agents, so the same tokenRequestorId on several agents isn't a duplicate.
    • The tokenRequestorId for your Visa integration. Visa CLI sends a label of its own for each agent as this value, not the agent's ID. For your integration, use the TRID your Visa integration is given.
    • The agent's public signing key, with algorithm: "ed25519", as the base64 of its full SPKI PEM. Request a 365-day expirationDate.
  2. Create the agent

    Send Register Agent, POST /vars/v1/agentsAPI, with those values and optionally the key. For many agents at once, there's Agents bulk onboarding.

    Save the returned id straight away. If you lose the result of a create, don't send it again. Look the identity up first with Get agents by TRID, since another create can collide or leave a duplicate.

  3. Confirm the agent is active

    Agents created through the API are active by default, so there's no activation step to wait for. Read Get Agent to confirm isActive: true. To change its details, use Update Agent.

  4. Add, activate and read back the key

    1. Read List Keys, all pages, and compare the complete public key. Search keys is also available, but it comes from earlier sandbox evidence rather than Visa's catalog.
    2. If your key is missing, add it with Add Key.
    3. If the key reads back inactive, activate it with Activate Key. The agent itself is active on creation; whether a new key still needs this call is being confirmed with Visa, so read it back either way.
    4. If the expiry is too near, extend it with Update Key.
    5. Read it back with Get Key. On a VARS key record, the key's status wins, and the key's older isActive only applies when status is absent. The agent record has an isActive of its own, which is about the agent, not the key.
  5. Treat only confirmed state as live

    Sign with a key, or tell anyone it's listed, only after you've read it back as active. Renew within 30 days of its expiry. When you retire one, send Deactivate Key and read again to confirm it's no longer active; VARS treats DELETE as deactivation.

  6. Sign your requests

    Sign to the rules in Verify requests as a merchant, which describes what a merchant checks under Visa's published TAP. Visa CLI's signing routes don't sign for keys you hold.

    If you work through an enabler, you don't register agents yourself: the enabler registers them in the Visa Agent Directory under your TRID. See Build with an enabler.

Updated 18 Nov 2026