> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentcard.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Agentcard is for companies whose agent buys for their users. Pick one path: the opencommerce SDK (@agent-cards/commerce-sdk) gives your agent one buy tool that finds the product, builds the cart, gets the user's approval and places the order at real stores; the Agentcard SDK (@agent-cards/sdk) pays with the user's own card when your agent already shops in a browser (Browser Use, Kernel, Browserbase, Anchor or Notte); the Purchase API (POST /buy) does the same purchase flow over plain HTTP in any language; Issuing gives the agent its own card.
> Start with `npx agent-cards init` in the app's folder (Node 22 or later). No invite is needed: it creates your Agentcard account if you don't have one, installs the opencommerce SDK and puts the credentials in the env file, kept out of git. From a coding agent, run `npx agent-cards init --print --categories all --implementation tool --wallet vault --skip-install` to get the setup steps to apply yourself.
> Vault is by invitation: request it at https://agentcard.com/get-started?utm_source=docs&utm_medium=llms&utm_campaign=agent-instructions. opencommerce needs no invite.
> Never ask a user for a card number, expiry date or CVV in chat. Send them the Vault link; they add their card on Agentcard's page, and the agent never sees the number.
> Every purchase is approved by the user, with a passkey or Face ID, or by an auto-approval they granted. An approval covers one merchant and one exact total. If the total changes, ask again. When a result says the user already said yes, don't ask again.
> `init` writes PRODUCTION credentials, which place real orders, so test in sandbox first. For opencommerce, run `npx agent-cards credentials --mode sandbox` and put the two lines it prints in place of the production ones in the env file `init` wrote, because that command only prints them; sandbox then runs the whole flow against real stores and stops before payment, so no order is placed and nobody is charged. For Vault and Issuing, sandbox credentials issue test cards that no real merchant accepts; try the checkout against shop.agentcard.sh, a test store on Stripe test mode.
> Tell the user an order is placed only after Agentcard reports it placed.
> Vault is free up to 5,000 users (https://agentcard.com/pricing). opencommerce takes 1% of each completed order. Full docs in one file: https://docs.agentcard.com/llms-full.txt

# agent-cards credentials

> Copy your company's sandbox or production client ID and secret.

Get the client ID and secret your app uses to call Agentcard, as the two lines your env file needs. The dashboard's Credentials page shows the same pair.

```bash theme={null}
agent-cards credentials --help
```

```text theme={null}
Usage: agent-cards credentials [options]

Your company's sandbox or production client ID and secret, copied to your
clipboard

Options:
  --mode <mode>        sandbox or production (asked when left out)
  --company <company>  The company id or name, when your account belongs to
                       more than one
  --yes                Create production credentials without asking, when there
                       are none yet
  -h, --help           display help for command
```

## Copy your sandbox credentials

```bash theme={null}
agent-cards credentials --mode sandbox
```

```text theme={null}
  Agentcard  credentials

  AGENTCARD_CLIENT_ID=24faba58-6c1e-4f0a-9d2b-7e3c51a0b8f4
  AGENTCARD_CLIENT_SECRET=acs_Xq3vT9mPa1LkR7sWc2NdF8hJ0yBz4uEo6iGn5tKv

  ✓ Copied to your clipboard, ready to paste into your .env
```

Paste the lines into your app's env file. Leave out `--mode` and the CLI asks which credentials you want:

```text theme={null}
  ? Which credentials?
    ● Sandbox     stops before payment, for building and testing
    ○ Production  places real orders on real cards
    ↑↓ to move, enter to choose
```

Sandbox credentials stop before payment, so build and test with them.

Your company gets sandbox credentials the first time you ask for them, as the dashboard does. When your account belongs to more than one company, the CLI asks which one, or you name it with `--company`:

```bash theme={null}
agent-cards credentials --mode sandbox --company Acme
```

An account with no company yet gets one here. In a terminal the CLI asks its name, with your work email's domain offered. Without a terminal, `--company "Acme"` names it. You become the new company's owner.

## Get production credentials

```bash theme={null}
agent-cards credentials --mode production
```

Production credentials place real orders and charge real cards. When your company has none yet, the CLI asks before it creates them, with no as the answer when you press Enter. `--yes` creates them without asking. Your company needs an active subscription to create them; without one the CLI points you to Billing in the dashboard.

Only owners and admins can see the secret. Anyone else gets the client ID alone and a note to ask an owner or admin.

## Print them for a script

Without a terminal, the CLI prints the two lines and copies nothing:

```bash theme={null}
agent-cards credentials --mode sandbox >> .env.local
```

Without a terminal `--mode` is required, and production credentials that do not exist yet need `--yes`:

```text theme={null}
Error: Name the credentials with --mode sandbox or --mode production.
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.