# How to Sell VS Code Extensions Outside the Marketplace

> Guide to monetizing VS Code extensions with license keys. Sell premium features, deliver licenses automatically, and validate activations using Dodo Payments.
- **Author**: Ayush Agarwal
- **Published**: 2026-03-27
- **Category**: Payments, License Keys, How-To
- **URL**: https://dodopayments.com/blogs/sell-vscode-extensions

---

The VS Code Marketplace has millions of active users but zero built-in monetization options. There are no paid extensions, no native subscription prompts, and no tip jars. If you want to earn a living from the tools you build for other developers, you have to build the payment infrastructure yourself.

Most developers assume that because the marketplace is free, their extensions must be free too. This is a common misconception that keeps many high-quality tools from ever being built. You can distribute your extension for free on the marketplace while keeping premium features locked behind a license key.

This guide explains how to bridge the monetization gap. We will cover how to use Dodo Payments to handle global sales, generate license keys, and validate them directly within your VS Code extension. By the end, you will have a clear roadmap for turning your side project into a revenue-generating product.

## The VS Code Monetization Gap

Microsoft has built an incredible ecosystem for developers, but they have not yet added a way for creators to charge for their work. Unlike the Apple App Store or even the Chrome Web Store in its early days, the VS Code Marketplace is strictly for free distribution. There is no "Buy" button and no API for checking if a user has paid for a specific extension ID.

> License key management looks simple until you need activation limits, device tracking, and expiration logic across thousands of customers. Building this yourself is a distraction from your core product.
>
> \- Ayush Agarwal, Co-founder & CPTO at Dodo Payments

This lack of infrastructure creates a significant hurdle for independent developers. If you want to monetize, you are responsible for handling global tax compliance, payment processing, and license management. For a solo developer, these administrative tasks can take more time than building the extension itself.

The good news is that the marketplace does not prohibit you from selling licenses elsewhere. You can use the marketplace as your primary distribution and discovery channel while using a third-party platform to handle the commercial side. This "Free-to-Pro" model is the most effective way to build a sustainable business in the VS Code ecosystem.

## The Monetization Strategy: Free Distribution + Premium Keys

The most successful paid extensions follow a hybrid model. You publish a free version of your extension on the marketplace to maximize your reach and SEO. This version provides enough value to be useful on its own, which helps you gain users and positive reviews.

Within the extension, you identify "Pro" features that solve more complex problems or save significant time. These features are visible but locked. When a user wants to access them, they are directed to your website to purchase a license key. Once they enter the key in their VS Code settings, the extension validates it and unlocks the premium functionality.

This strategy works because it leverages the marketplace for what it does best: distribution. You don't have to worry about hosting your own extension gallery or managing updates. You focus on building great features and let a dedicated payment platform handle the revenue.

## Why Dodo Payments for VS Code Extensions

When you sell software globally, you aren't just taking a payment. You are entering a complex world of sales tax, VAT, and financial compliance. Dodo Payments acts as a [merchant of record for SaaS](https://dodopayments.com/blogs/merchant-of-record-for-saas), meaning we handle all the tax collection and remittance for you.

For VS Code extension developers, Dodo provides a complete toolkit for monetization:

- **Automatic License Generation**: Dodo can automatically generate a unique license key for every purchase and email it to the customer.
- **Validation API**: A simple endpoint that your extension can call to verify if a license key is valid and active.
- **Global Payments**: Accept payments from 220+ countries and regions with localized payment methods like UPI, Pix, and credit cards.
- **Payment Links**: Create a checkout page in seconds without writing any frontend code.

By using Dodo, you avoid the "pricing cliff" where you have to spend thousands on compliance software just to sell your first $10 license. You can [how to accept online payments](https://dodopayments.com/blogs/how-to-accept-online-payments) immediately and scale as your user base grows.

## The User Flow

Understanding the journey from a free user to a paid customer is essential for a smooth experience. The following diagram illustrates the typical flow for a monetized VS Code extension.

```mermaid
flowchart TD
    A[User installs free extension] --> B[User explores features]
    B --> C{Wants Pro feature?}
    C -->|No| B
    C -->|Yes| D[Clicks Upgrade to Pro]
    D --> E[Opens pricing page in browser]
    E --> F[Buys license via Dodo Payments]
    F --> G[License key emailed to user]
    G --> H[User enters key in VS Code settings]
    H --> I[Extension validates key via Dodo API]
    I --> J[Pro features unlocked]
```

## Step-by-Step Guide to Monetization

### 1. Publish the Free Version

Start by publishing your extension to the VS Code Marketplace. Focus on a specific niche or problem. Your goal here is to build a user base and gather feedback. Ensure your extension follows the standard [software license management](https://dodopayments.com/blogs/software-license-management) principles by including a clear README that mentions the availability of a Pro version.

### 2. Create Your Product in Dodo

Log in to your Dodo Payments dashboard and create a new product. You can choose between a one-time purchase or a subscription model. If you are unsure which to pick, read our guide on the [subscription vs license model](https://dodopayments.com/blogs/subscription-vs-license-model).

In the product settings, enable license key generation. You can specify the format of the keys and how many activations are allowed per key. This is crucial for preventing a single license from being shared across an entire organization without your permission.

### 3. Build Your Pricing Page

You need a place where users can go to buy their license. This doesn't have to be a complex website. A simple landing page with a "Buy Now" button is enough. Link this button to your Dodo payment link.

Dodo handles the entire checkout experience, including tax calculation and payment method selection. This is the [best platform to sell digital products](https://dodopayments.com/blogs/best-platform-sell-digital-products) because it removes the friction of setting up a custom checkout flow.

### 4. Add a License Key Setting

In your extension's `package.json`, add a configuration setting where users can input their license key. This makes it easy for users to manage their license through the standard VS Code Settings UI.

```json
"configuration": {
  "title": "My Extension Pro",
  "properties": {
    "myExtension.licenseKey": {
      "type": "string",
      "default": "",
      "description": "Enter your Pro license key to unlock premium features."
    }
  }
}
```

### 5. Validate the License Key

When your extension activates, or when the license key setting changes, you need to validate the key. You will use the Dodo Payments API to check the status of the license.

It is a good practice to cache the validation result locally for a short period to avoid making an API call every time the user opens a file. However, you should re-validate periodically to ensure the license hasn't been canceled or expired.

### 6. Unlock Premium Features

Use a global state or a context variable in your extension to track the "Pro" status. Wrap your premium logic in conditional checks. For example, if you are building a code completion extension, you might only enable advanced AI models if the license is valid.

### 7. Add an Upgrade Prompt

Don't wait for users to find your pricing page on their own. Add a "Upgrade to Pro" button in your extension's sidebar or a status bar item. When clicked, it should open the pricing page in the user's default browser. This is a key part of [how to sell software online](https://dodopayments.com/blogs/how-to-sell-software-online) effectively.

## Implementation: Validating Licenses in TypeScript

Here is a practical example of how to handle license validation within a VS Code extension context. This code uses the Dodo Payments API to verify a key entered in the settings.

```typescript
import * as vscode from "vscode";
import axios from "axios";

export async function activate(context: vscode.ExtensionContext) {
  const config = vscode.workspace.getConfiguration("myExtension");
  let licenseKey = config.get<string>("licenseKey");

  // Check license on startup
  let isPro = await validateLicense(licenseKey);

  // Update status when configuration changes
  vscode.workspace.onDidChangeConfiguration(async (e) => {
    if (e.affectsConfiguration("myExtension.licenseKey")) {
      licenseKey = vscode.workspace
        .getConfiguration("myExtension")
        .get<string>("licenseKey");
      isPro = await validateLicense(licenseKey);
      if (isPro) {
        vscode.window.showInformationMessage("Pro features unlocked!");
      }
    }
  });

  // Register a command that only works for Pro users
  let disposable = vscode.commands.registerCommand(
    "myExtension.premiumFeature",
    () => {
      if (isPro) {
        vscode.window.showInformationMessage("Running premium feature...");
      } else {
        vscode.window
          .showErrorMessage("This is a Pro feature. Please upgrade.", "Upgrade")
          .then((selection) => {
            if (selection === "Upgrade") {
              vscode.env.openExternal(
                vscode.Uri.parse("https://dodopayments.com/pricing"),
              );
            }
          });
      }
    },
  );

  context.subscriptions.push(disposable);
}

async function validateLicense(key: string | undefined): Promise<boolean> {
  if (!key) return false;

  try {
    // Replace with your actual Dodo Payments validation endpoint
    const response = await axios.post(
      "https://test.dodopayments.com/licenses/activate",
      {
        license_key: key,
        product_id: "pdt_your_product_id",
      },
      {
        headers: { Authorization: `Bearer ${process.env.DODO_PAYMENTS_API_KEY}` },
      },
    );

    return response.data.status === "active";
  } catch (error) {
    console.error("License validation failed", error);
    return false;
  }
}
```

This snippet demonstrates the core logic. You should also refer to the [API reference](https://docs.dodopayments.com/api-reference/introduction) for detailed information on request parameters and response formats.

## What to Put Behind the Paywall

Deciding what to charge for is the hardest part of [how to sell digital products online](https://dodopayments.com/blogs/how-to-sell-digital-products-online). If you lock too much, nobody will use the extension. If you lock too little, nobody will pay.

Good candidates for Pro features include:

- **Advanced Customization**: Themes, custom icons, or complex configuration options.
- **Cloud Sync**: Syncing settings or snippets across multiple machines.
- **AI Features**: Access to more powerful models or higher usage limits.
- **Priority Support**: A dedicated channel for bug reports and feature requests.
- **Enterprise Features**: Security audits, SSO integration, or team management.

The goal is to make the free version "good enough" to be popular, and the Pro version "too good to pass up" for power users.

## Marketing Within the Extension

Your extension is your best marketing tool. Use it to gently remind users of the value they could get from the Pro version.

- **Status Bar**: A small "Pro" or "Upgrade" icon in the status bar.
- **Welcome Page**: A one-time welcome page that highlights Pro features.
- **Command Palette**: Include Pro commands in the command palette, but show a prompt to upgrade when they are selected.
- **Output Channel**: A subtle message in the output channel after a successful operation.

Avoid being intrusive. Developers are sensitive to "nagware." If your extension interrupts their workflow with popups, they will uninstall it and leave a negative review.

## Handling Updates and Security

When you sell licenses outside the marketplace, you need to ensure your validation logic is secure. While it is impossible to prevent 100% of piracy in a client-side environment like VS Code, you can make it difficult enough to discourage most users from trying.

- **Obfuscation**: Use a bundler like Webpack or Esbuild to obfuscate your extension code.
- **Server-Side Checks**: If your extension relies on a backend service, always validate the license key on the server before processing requests.
- **Webhooks**: Use [webhooks](https://docs.dodopayments.com/developer-resources/webhooks) to listen for subscription cancellations or payment failures. When a payment fails, you can immediately deactivate the license key in your database.

For more details on securing your integration, check our [integration guide](https://docs.dodopayments.com/integration-guide).

## FAQ

### Can I sell VS Code extensions directly on the marketplace?

No, the VS Code Marketplace does not currently support paid extensions or built-in payment processing. You must handle payments and license management through an external platform like Dodo Payments.

### Is it against Microsoft's terms to sell licenses elsewhere?

Microsoft's terms of service for the marketplace do not prohibit selling licenses or subscriptions for your extension through third-party services. Many popular extensions use this model to fund their development.

### How do I deliver the license key to the user?

When a user completes a purchase through Dodo Payments, a license key is automatically generated and sent to their email address. You can also display the key on the "Thank You" page after checkout.

### Can I use a subscription model for my extension?

Yes, Dodo Payments supports both one-time purchases and recurring subscriptions. Subscriptions are often better for extensions that provide ongoing value, such as AI-powered tools or cloud-synced services.

### How do I handle sales tax for global customers?

Dodo Payments acts as a merchant of record, which means we calculate, collect, and remit sales tax and VAT for every transaction globally. You don't have to worry about tax compliance in different countries.

## Final Take

Monetizing a VS Code extension is a viable path for developers who want to build sustainable tools. By using the marketplace for distribution and Dodo Payments for revenue, you can focus on what you do best: writing code.

Start by identifying the core value of your extension and what features your power users would be willing to pay for. Set up your product in Dodo, integrate the [license keys](https://docs.dodopayments.com/features/license-keys) validation logic, and start turning your users into customers.

If you are ready to start, check out our [SDKs](https://docs.dodopayments.com/developer-resources/dodo-payments-sdks) to see how easy it is to integrate Dodo into your development workflow. For more information on pricing and features, visit [dodopayments.com](https://dodopayments.com) or view our [pricing](https://dodopayments.com/pricing) page.
---
- [More Payments articles](https://dodopayments.com/blogs/category/payments)
- [All articles](https://dodopayments.com/blogs)