# Monetize a VS Code Extension: Free Install, Paid Pro Plan

> The VS Code Marketplace has no buy button. Keep the extension free, sell a Pro plan on your site, unlock it after sign-in. Options, steps, checklist.

Source: https://agentaos.ai/answers/monetize-vscode-extension (canonical HTML page). Publisher: AgentaOS.

# How do I monetize a VS Code extension?

**To monetize a VS Code extension, keep the extension free on the Marketplace, let users sign in, sell the Pro plan on your own website and unlock paid features when your backend sees the plan.** The Marketplace has no buy button: it only shows a pricing label, and Microsoft's docs say "Allowed values are: `Free` and `Trial` (case-sensitive)". Microsoft's publisher agreement adds that you must ensure "all fees and charges payable for use of your Offering are billed and collected outside of the Marketplace" ([Publisher Agreement, Section 7(a)](https://aka.ms/vsmarketplace-agreement)). So the payment happens on your site, and the extension only asks your backend: is this user on Pro?

The rules

## What does the Marketplace allow for *paid extensions*?

Two Microsoft documents set the rules. The VS Code publishing docs describe one pricing field: "You can opt-in to show a pricing label on your extension's Marketplace page to indicate that it is `Free` or `Free Trial`." You set it with the `pricing` property in `package.json`, and "When the `pricing` property is not specified, the default value is `Free`" ([Extension pricing label](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#extension-pricing-label)).

The Visual Studio Marketplace Publisher Agreement (effective October 2026) puts billing on you. Section 7(a): "You are solely responsible for providing Customers with pricing information and for charging or invoicing Customers, as applicable, for Customers' use of your Offering." So you need your own checkout, and you must tell users what costs money.

The same section puts the after-sale work on you too. Section 7(b): "You are solely responsible for all taxes, costs and expenses for returns, and chargebacks of your Offering, including the full refund and chargeback amounts paid or credited to Customers." And on tax: "You are solely responsible for determining whether you have any tax obligations in any country."

That is where a [merchant of record](https://agentaos.ai/answers/what-is-a-merchant-of-record) helps. With AgentaOS, AgentaOS is the legal seller for every sale and handles the buyer's sales tax or VAT, invoices, refunds and chargebacks ([facts](https://agentaos.ai/facts)). Tax on your own income stays yours.

Your options

## Which way to *monetize a VS Code extension* fits you?

|  | Free + sponsor link | Trial label + paid unlock | Sign-in + plan check (AgentaOS) | License keys from a licensing tool | Sidebar ads |
|---|---|---|---|---|---|
| What the Marketplace shows | Free, plus a sponsor link | Free Trial | Free or Free Trial | Free or Free Trial | Free |
| Who takes the money | The sponsor platform you link | Your own checkout | AgentaOS checkout on your site | The licensing tool's checkout | An ad network |
| How the extension knows who paid | It does not; nothing is locked | Your own check after the trial | Your backend, set by the AgentaOS webhook | The extension checks a key | Not needed |
| You run a backend | No | Usually | Yes, a small one | Depends on the tool | No |
| Works offline | Yes | Depends on your check | Needs a connection to check the plan | Can, if the tool supports it | Depends on the ad network |
| Who handles buyer VAT, refunds, chargebacks | The sponsor platform's terms | You, unless your checkout is a merchant of record | AgentaOS, as the official seller | Check whether the tool is a merchant of record | Not a sale |

**Free + sponsor link.** Microsoft supports it directly: "You can opt-in to sponsorship to give your users a way to support your work", using the `sponsor` property in `package.json` ([Extension Sponsor](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#extension-sponsor)). Good for goodwill, not a plan anyone must buy. AgentaOS cannot run this one: our [Terms](https://agentaos.ai/terms) exclude sponsorships and donations.

**Trial label + paid unlock.** Set `"pricing": "Trial"` so the listing says Free Trial. The label only informs users; the payment and the unlock are still yours to build.

**Sign-in + plan check.** The route this page walks through. No keys to copy or leak: the user signs in, and your backend knows the plan.

**License keys.** The user pastes a key and the extension validates it. AgentaOS does not issue license keys; if you need them, use a licensing tool.

**Sidebar ads.** An ad network pays you for space inside your extension. Payouts and rules depend on the network (unverified here), and your users may not welcome ads in their editor.

Step by step

## How do I sell a VS Code extension, step *by step*?

1. **Keep the extension free on the Marketplace.** Publish as usual. If Pro has a free trial, set `"pricing": "Trial"`; otherwise leave the default `Free`. Say in the listing which features are paid, since the agreement makes pricing information your job.

2. **Put a pricing page on your website.** Pick the model: monthly, yearly, one-time, or a subscription with a free trial. In AgentaOS, a trial can be 1 to 730 days and the buyer pays nothing until it ends ([subscriptions docs](https://docs.agentaos.ai/payments/subscriptions.md)).

3. **Let users sign in.** Paid status needs an identity: an email or social sign-in that your backend handles, which gives the extension a session token. Store the token securely on the user's machine, never in your published code.

4. **Run a small backend.** A serverless function plus a database table with `user_id` and `plan` is enough. It needs three routes: `/me` (which plan is this user on?), `/upgrade` (create a checkout) and `/webhooks` (receive payment events).

5. **Create the plan in AgentaOS.** Make a free account, create the Pro plan, copy the API key, add your `/webhooks` URL and copy the signing secret from Settings, Developers, Webhooks ([webhooks docs](https://docs.agentaos.ai/payments/webhooks.md)).

6. **Create one checkout per signed-in user.** The Upgrade command in your extension calls `/upgrade`. Your backend creates a checkout with the user's ID in `metadata` and returns the checkout URL; the extension opens it in the user's browser. Do not hand signed-in users the plan's shared payment link: it carries no `metadata`, so your webhook cannot tell who paid.

7. **Let the webhook set the plan, then test.** When the webhook arrives, your backend verifies the signature and sets the plan to Pro. After sign-in and on startup, the extension calls `/me` and unlocks Pro features. Handle cancellations so the user drops back to Free. Pay once with a test key, then switch to the live key.

The code

## What does the code *look like*?

The Marketplace side is one line in `package.json`, straight from Microsoft's docs:

```
{
  "pricing": "Trial"
}
```

The backend is a generic sketch. The AgentaOS calls (`checkouts.create`, `webhooks.verify`, `metadata`) follow the documented [paywall demo](https://docs.agentaos.ai/sdk/paywall-for-logged-in-users.md) and [Express webhook guide](https://docs.agentaos.ai/sdk/handle-webhooks.md); `/me`, `/upgrade`, sign-in and your database are yours.

```
// backend: server.js (Node + Express)
import express from 'express';
import { AgentaOS, WebhookVerificationError } from '@agentaos/pay';

const agentaos = new AgentaOS(process.env.AGENTAOS_API_KEY);
const app = express();

// Webhook first, with the raw body: verification fails on parsed JSON.
app.post('/webhooks', express.raw({ type: 'application/json' }), async (req, res) => {
  let event;
  try {
    event = agentaos.webhooks.verify(
      req.body,
      req.headers['x-agentaos-signature'],
      process.env.AGENTAOS_WEBHOOK_SECRET,
    );
  } catch (err) {
    if (err instanceof WebhookVerificationError) return res.sendStatus(400);
    throw err;
  }
  if (event.type === 'checkout.session.completed') {
    const userId = event.data.metadata.customerId;
    if (userId) await db.users.update(userId, { plan: 'pro' });
  }
  // also handle subscription.updated / subscription.canceled to move users back to free
  res.sendStatus(200);
});

app.use(express.json());

app.post('/upgrade', requireUser, async (req, res) => {
  const checkout = await agentaos.checkouts.create({
    linkId: process.env.PRO_PLAN_LINK_ID,
    buyerEmail: req.user.email,
    metadata: { customerId: req.user.id },
    successUrl: 'https://your-extension.com/thanks',
    cancelUrl: 'https://your-extension.com/pricing',
  });
  res.json({ url: checkout.checkoutUrl });
});

app.get('/me', requireUser, async (req, res) => {
  res.json({ plan: (await db.users.get(req.user.id)).plan });
});
```

Webhooks are signed with HMAC-SHA256 in the `X-AgentaOS-Signature` header, and failed deliveries are retried up to 3 attempts in total ([webhooks docs](https://docs.agentaos.ai/payments/webhooks.md)).

Before you launch

## Is your paid VS Code extension ready? A *checklist*

- Extension published free, with the `pricing` label set to `Free` or `Trial`
- Listing says which features are paid
- Pricing page live on your website
- Model chosen: monthly, yearly, one-time or trial
- Users sign in, so you know who paid
- Session token stored securely, not in your published code
- Backend with `/me`, `/upgrade` and `/webhooks`
- Webhook signature verified on the raw body
- User ID sent in checkout `metadata`, not a shared link
- Cancellations move the user back to Free
- A EUR or USD account at your bank
- One test payment before going live

What AgentaOS cannot do

## When is AgentaOS the *wrong choice*?

- **You need offline license keys.** AgentaOS does not issue license keys. It sends a webhook, and your backend stores who paid. If the extension must validate a key with no connection, use a licensing tool.
- **You build an extension for one client.** Our [acceptable use policy](https://agentaos.ai/acceptable-use) rules out "custom or project-based work whose scope or deliverable is agreed separately with each client". Sell the same extension to every buyer.
- **You expect the Marketplace to take payment.** It will not: the agreement says fees are "billed and collected outside of the Marketplace". You need a pricing page and a small backend, whichever checkout you use.
- **You sell a paid fork of someone else's extension.** Check the original license first. Our acceptable use policy excludes anything "that infringes third-party rights".
- **You want sponsorships or tips.** Use the Marketplace `sponsor` link. Our Terms exclude sponsorships and donations.

Where AgentaOS fits

## Where does *AgentaOS* fit?

Extensions are on our allowed list: the [acceptable use policy](https://agentaos.ai/acceptable-use) covers "software, SaaS, libraries, AI agents, code, and API access" and "templates, tools, plugins". AgentaOS is the official seller of each Pro plan you sell, so it charges the buyer's VAT or sales tax, issues the invoice and handles refunds and chargebacks, the jobs Section 7 of the publisher agreement leaves with you. It charges 4.5% + 50 cents per sale, with no monthly subscription ([facts](https://agentaos.ai/facts)). You can sign up as an individual or a company, and AgentaOS pays you to your own bank in EUR or USD in [86 countries](https://agentaos.ai/countries), including countries Stripe does not serve. You keep the plan check in your own backend.

Questions

## Related *questions*

### Can you sell a VS Code extension on the Marketplace?

Not through it. The Marketplace only labels extensions `Free` or `Trial`, and Microsoft's publisher agreement says fees must be "billed and collected outside of the Marketplace". Publish free, then sell the Pro plan on your own website.

### What does the Trial pricing label do?

It shows "Free Trial" on your Marketplace page. Nothing more: you still build the checkout and the unlock. Allowed values are `Free` and `Trial`, case-sensitive, and the default is `Free`.

### Who handles VAT and refunds on a VS Code extension subscription?

Under Microsoft's agreement, you do: refunds, chargebacks and your tax obligations are the publisher's. If you sell through a merchant of record such as AgentaOS, it is the legal seller and handles the buyer's VAT, invoices, refunds and chargebacks.

### Do I need a backend for a paid VS Code extension?

For the sign-in route, yes: something must store who paid. A serverless function and one database table are enough. The payment webhook sets the plan, and the extension asks your backend for it.

### Does AgentaOS give license keys for VS Code extensions?

No. AgentaOS sends a signed webhook when someone pays, renews or cancels, and your backend stores the plan. If your extension must check a key on its own, use a licensing tool.

Keep reading

## Related

[Monetize a Chrome extension without Stripe](https://agentaos.ai/answers/monetize-chrome-extension-without-stripe)[Sell access to a private GitHub repo](https://agentaos.ai/answers/sell-access-to-private-github-repo)[Sell subscriptions without Stripe](https://agentaos.ai/answers/sell-subscriptions-without-stripe)[Sell Claude Code plugins and skills](https://agentaos.ai/answers/sell-claude-code-plugins-and-skills)[What is a merchant of record?](https://agentaos.ai/answers/what-is-a-merchant-of-record)

Sources (read 13 November 2026): [VS Code docs, Publishing Extensions: pricing label and sponsor](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#extension-pricing-label) · [Visual Studio Marketplace Publisher Agreement, effective October 2026, Section 7](https://aka.ms/vsmarketplace-agreement) · [AgentaOS paywall demo](https://docs.agentaos.ai/sdk/paywall-for-logged-in-users.md) · [AgentaOS webhook guide](https://docs.agentaos.ai/sdk/handle-webhooks.md) · [AgentaOS webhooks](https://docs.agentaos.ai/payments/webhooks.md) · [AgentaOS subscriptions](https://docs.agentaos.ai/payments/subscriptions.md) · [AgentaOS facts](https://agentaos.ai/facts) · [AgentaOS acceptable use](https://agentaos.ai/acceptable-use) · [AgentaOS Terms](https://agentaos.ai/terms)
