·4 min read

How to Use AgentCard with Windsurf for AI-Powered Purchases

Give Windsurf a virtual card to buy developer tools, API credits, and services. Step-by-step AgentCard setup for Windsurf's AI coding agent.

Windsurf is an AI code editor built by Codeium. The standout feature is Cascade — an agentic mode that reasons through multi-step tasks, runs terminal commands, edits files, and keeps context across your whole project. Full terminal access means it can run the AgentCard CLI directly. Create a card, grab the credentials, buy something. All from the editor.

We tested this integration pretty early on, and it just works. Here's the setup.

What you need

  • Windsurf editor installed (free or Pro plan)
  • Cascade mode enabled (the agentic chat panel)
  • Node.js 18+ for the AgentCard CLI
  • A payment method (credit card, debit card, or USDC)

How Windsurf makes purchases

Cascade executes shell commands right from the chat panel. You tell it to buy something, and it runs the AgentCard CLI in the integrated terminal — creates a card, pulls the credentials, and fires off the purchase through whatever API or CLI the merchant provides.

One thing to know: Windsurf doesn't have browser automation. So it can't fill out visual checkout forms. Stick to merchants with an API, CLI, or URL-based checkout and you're golden.

Step 1: Install the AgentCard CLI

Open Windsurf's terminal or ask Cascade to do it for you:

npm install -g agentcard

Cascade runs this for you if you ask. Takes a few seconds.

Step 2: Sign up

Run this yourself or let Cascade handle it:

agentcard signup --email you@example.com

You'll get a magic link in your email. Click it, done. One-time thing.

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

Here's where it gets fun. Give Cascade a plain-English instruction:

"Create a $10 AgentCard virtual card and use it to buy API credits on Resend."

Cascade will:

  1. Run agentcard create --amount 10 in the terminal
  2. Open the Stripe Checkout link for you to complete payment (credit card or USDC)
  3. Run agentcard details <card-id> to retrieve the card number, CVV, and expiry
  4. Use the Resend API or CLI to apply the card as a payment method and purchase credits

What Windsurf is good at

Look, Windsurf is a terminal-first agent. It's best at purchases that happen through APIs, CLIs, or code. Here are some real patterns we've seen work well:

Domain registration via API

"Create a $15 AgentCard and register the domain myproject.dev using the Namecheap API."

Cascade writes the API call, plugs in the card details, executes it. Three steps, maybe 30 seconds.

npm package sponsorship

"Create a $5 AgentCard and sponsor the open-source project on GitHub using the API."

Cascade retrieves the card credentials and makes the appropriate API call.

Cloud service credits

"Create a $50 AgentCard and add credits to my Vercel account."

Cascade figures out the billing API or generates the right CLI commands. We've seen this work with Vercel, Railway, and a bunch of other platforms.

Security tips

This is the part that matters. We built AgentCard around the idea that every card is a spending limit, not just a payment method.

  • Match the card to the purchase — create a $15 card for a $12 purchase, not a $100 card. Tighter is better.
  • One card per purchase — don't reuse cards across transactions
  • Check the balance after — ask Cascade to run agentcard balance <card-id> to verify the charge went through correctly
  • Review before executing — Cascade shows you commands before running them, so read what it's about to do

Even if something goes sideways, your exposure is capped at whatever you loaded onto the card. That's the whole point.

Limitations

Windsurf can't open a browser or interact with visual checkout pages. If a merchant only does web-form checkout with no API, you'll need to enter the card details yourself or use an agent with browser access like Claude Cowork.

Get started

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

Then in Windsurf's Cascade panel:

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

Cascade takes it from there.

Ready to try AgentCard?

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

npm install -g agentcard