·4 min read

How to Use AgentCard with GitHub Copilot for Developer Purchases

Use AgentCard with GitHub Copilot's agent mode to buy domains, API credits, and developer tools with a virtual card.

Most people know GitHub Copilot as an autocomplete tool. But agent mode is a different beast. In agent mode, Copilot runs terminal commands, edits files, and chains multi-step tasks together — which means it can run the AgentCard CLI, grab card credentials, and make purchases. All without leaving VS Code.

We use Copilot internally on the team, so this was one of the first integrations we tested. Here's the setup.

What you need

  • VS Code with the GitHub Copilot extension (requires a Copilot subscription)
  • Agent mode enabled in Copilot Chat (available in VS Code Insiders or the latest stable release)
  • Node.js 18+ for the AgentCard CLI
  • A payment method (credit card, debit card, or USDC)

How Copilot agent mode makes purchases

Open Copilot Chat in agent mode and it gets access to your VS Code terminal. It reads command output, reasons about what to do next, and chains commands together. For purchases, the flow is straightforward:

  1. Run the AgentCard CLI to create a card
  2. Retrieve card credentials (number, CVV, expiry)
  3. Use those credentials in API calls, CLI tools, or scripts to complete a purchase

Copilot works best for code-based purchases — API calls, CLI tools, scripts. No browser access, so web checkout forms are off the table.

Step 1: Install the AgentCard CLI

Open the VS Code terminal or ask Copilot to do it:

npm install -g agentcard

In agent mode, Copilot runs this for you when asked. Nothing fancy.

Step 2: Sign up

Authenticate with AgentCard:

agentcard signup --email you@example.com

Magic link shows up in your email. Click it. You only do this once — your session gets saved to ~/.agentcard/config.json.

Step 3: Ask Copilot to create a card and make a purchase

Now just tell Copilot what you want to buy:

"Create a $15 AgentCard virtual card and use it to register the domain myproject.dev through the Cloudflare API."

Copilot will:

  1. Run agentcard create --amount 15 in the terminal
  2. Wait for you to complete Stripe Checkout (credit card or USDC)
  3. Run agentcard details <card-id> to get the card number, CVV, and expiry
  4. Write a script or curl command to call the Cloudflare Registrar API with the card details
  5. Execute the script and confirm the result

What Copilot agent mode is good at

Copilot lives in VS Code, so it naturally fits developer-oriented purchases. If the merchant has an API or CLI, Copilot can handle it.

API credits

"Create a $25 AgentCard and buy API credits on OpenAI using their billing API."

Copilot writes the API call, fills in the card details from agentcard details, and runs it.

npm package funding

"Create a $10 AgentCard and sponsor this repo's maintainer on GitHub Sponsors via the API."

Copilot retrieves the card credentials and makes the GitHub API call.

SaaS upgrades

"Create a $30 AgentCard and upgrade my Supabase project to the Pro plan using their API."

Copilot reads the docs, writes the request, and runs it. We've tested this with Supabase specifically and it worked first try.

Security tips

Here's how we think about agent spending: every card is a sandbox. A financial sandbox.

  • Size cards tight — $15 card for a $12 domain. Not $100. The leftover balance just sits there.
  • One card per task — don't reuse cards across purchases
  • Actually read the commands — Copilot asks before executing terminal commands. Use that approval step.
  • Check the balance — after the purchase, have Copilot run agentcard balance <card-id> to verify what got charged
  • Don't store card details in files — let Copilot read them from CLI output and use them inline

Your real payment method never touches the merchant. The card is the boundary.

Limitations

No browser access. Copilot can't navigate websites, fill checkout forms, or click buttons on a page. Practically, this means:

  • Web-only checkout will not work — if a merchant only accepts payment through a browser form, you need to enter the card details yourself or use a desktop agent like Claude Cowork
  • Stripe Checkout during card creation still requires you to complete payment in your browser — Copilot will give you the link, but you click through it manually

For anything with an API or CLI though? Copilot handles the full workflow, start to finish.

Get started

npm install -g agentcard
agentcard signup --email you@example.com

Then in VS Code Copilot Chat (agent mode):

"Create a $25 AgentCard and buy me [whatever you need]."

Copilot takes care of the rest.

Ready to try AgentCard?

Give your AI agent a virtual card in under 60 seconds.

npm install -g agentcard