All plugins
Commerce

Keygen

A Keygen license key for every digital item you sell

What it does

When a sale completes, this plugin asks Keygen to create one license for each digital line item in the order. Keygen generates the key itself, and the plugin saves it on the order so the buyer finds it under License Keys on their order status page. Which Keygen policy a license uses depends on the product: you can point individual products at their own policy and let the rest use a default one. Each license is named after the order ID and the buyer's email, which makes it easy to find in Keygen later. If the order is refunded or disputed, the plugin asks Keygen to suspend the keys it issued for that order, so they stop working without any manual cleanup on your side.

Who it's for

Developers and small studios who sell desktop apps, plugins, games or other downloadable software through their VeloCMS shop and already manage licensing in a Keygen account. You will need your Keygen account ID, a product or admin token, and at least one policy. It suits sellers who want a key in the buyer's hands right after payment instead of sending keys by hand from a spreadsheet.

How it works

  1. Enter your Keygen account ID, an API token and a default policy ID, and optionally a JSON map that ties specific products to other policies. Save, then run Test connection.

  2. A customer completes a purchase. After payment is confirmed, the plugin reads the order's line items and picks out the ones whose product type is digital or license.

  3. For each of those items it looks up the policy (product mapping first, then the default) and creates a license at Keygen. Items with no policy at all are skipped with a warning.

  4. The keys Keygen returns are written to the order. The buyer sees them, labelled with the product title, in the License Keys box on their order status page.

  5. If the order is later refunded or charged back, the plugin sends a suspend request to Keygen for every key stored on that order.

Settings you configure

Issue license keys on purchase
On by default. Switch it off to stop new licenses from being created and refunded ones from being suspended, while keeping your other values saved.
Account ID
Your Keygen account slug or ID, shown under Account Settings in Keygen. It forms part of every request address.
API Token
A product or admin token created under Tokens in Keygen. It is encrypted when saved and the field shows a placeholder afterwards, never the real value.
Default policy ID
The Keygen policy used for any digital product that is not listed in the mapping. Test connection also needs it.
Product → policy mapping
Optional. A JSON object whose keys are VeloCMS product IDs and whose values are Keygen policy IDs. Saving fails if the text is not a valid JSON object.
Test connection
Creates a real license named VeloCMS Connection Test against your default policy. If it succeeds, revoke that test license in your Keygen dashboard.

What it can access

Once a purchase is paid, the plugin reads the order ID, the buyer's email and the order's line items with their product IDs and types. It only ever sends POST requests, and only to api.keygen.sh, to create or suspend licenses. Your Keygen token is kept encrypted in your site settings and is never returned to the browser. Issued keys are stored on the order record.

Permissions

  • Read order total, customer email, and line items after purchase
  • Issue software license keys for digital/license products
  • Make network calls to api.keygen.sh
  • Store your Keygen API token encrypted

External network access

This plugin makes requests to the following domains:

  • api.keygen.sh

Capabilities

  • commerce:read
  • network:fetch
  • ui:settings
  • order:afterCreate

Screenshots

Keygen admin settings form with API token field and a per-product license policy mapping editor
Set your Keygen API token and map each product to its license policy.

Honest limits

  • Only line items whose product type is digital or license get a key. Physical and mixed items are passed over, even in the same cart.

  • With a default policy set, every digital or license product receives a license, ebooks and other non-software downloads included. Leave the default empty and use the mapping alone if only some products should be licensed.

  • Keys are shown on the buyer's order status page. They are not added to the order confirmation email.

  • Each Keygen request times out after 10 seconds. A failed request is logged and recorded on the Sync activity page but is not retried, and the purchase itself is never blocked.

  • Licenses are created only for purchases made after the plugin is set up. Older orders do not receive keys retroactively.

  • The plugin issues and suspends licenses. It does not handle machine activation, renewals or license validation, which stay in Keygen and your own software.

Frequently asked questions

Will a repeated payment notification create a second key?

No. An item that already carries a key is skipped, so the same order cannot produce duplicate licenses for one line item.

What happens to keys when I refund an order?

Refunds and chargebacks trigger a suspend request at Keygen for every key saved on that order. If Keygen reports the license as already suspended or deleted, that counts as done.

Can different products use different Keygen policies?

Yes. List each product ID with its policy ID in the mapping. Products not listed fall back to the default policy, and if neither exists the item is skipped rather than given a wrong license.

Why does Test connection create a license?

Keygen has no simple ping endpoint, so the test makes a real license against your default policy. That is the most honest proof the token, account and policy all work together.

Specifications

Category
Commerce
Price
Included
Version
1.0.0
Source
First-party

Browse more integrations

58 free first-party integrations available.

View all integrations