Clavem

Move Gumroad license keys to your own Stripe setup without breaking customers

Gumroad's sales CSV has a License Key column, so you can carry every key across by reshaping that file. The harder parts are your app, which calls Gumroad's verify API with different fields, and memberships, whose cards Gumroad holds.

What Gumroad stores and what it does not

Gumroad creates one key per sale, for example 85DB562A-C11D4B06-A2335A6B-8C079166 in its own documentation, and shows it in the receipt and on the download page. As of November 2026 its help page also says it does not let you import your own keys, so Gumroad is a one-way door for keys: they live there until you copy them out.

Gumroad tracks a uses number per key. Your app raises it by calling the verify API, unless it sends increment_uses_count=false. That is a count of calls, not of devices, so Gumroad knows nothing about which machines activated. Nothing in the export can become a Clavem device, and this page does not try to.

Step 1: export the sales CSV

Open the sales dashboard and use “Export a sales CSV”. Choose the full date range, and either every product or one at a time. Gumroad’s help says filters you applied on the page do not apply to the export, and that the file is emailed if it is not ready at once.

Gumroad’s help page does not list the columns. They are defined in the open-source export service, linked under sources, and include these:

Gumroad column Becomes in Clavem Notes
License Key key One row per sale. Renewal rows repeat the key.
Purchase Email email Use Buyer Email when this is empty.
Buyer Name name Optional.
Purchase Date created_at Written as 2025-03-04, which Clavem reads as UTC.
Subscription End Date expires_at Empty for a live membership. See below.
License Key Enabled? status 0 becomes disabled.
Fully Refunded?, Disputed? status Your call. Gumroad leaves the key enabled unless you disable it.
Recurring Charge? (skip) 1 marks a renewal row, not a new sale.
License Key Activation Count (skip) Verify calls, not devices.
Quantity activation_limit Only for multi-seat products.

Step 2: reshape the file

This script keeps one row per key, skips rows without a key, and writes the columns Clavem reads. It takes the date part of Subscription End Date. Run it with node gumroad-to-clavem.mjs sales.csv > licenses.csv.

import { readFileSync } from 'node:fs';

function parse(text) { // minimal CSV reader: quoted cells, doubled quotes, line breaks in quotes
  const rows = []; let row = [], cell = '', q = false;
  for (let i = 0; i < text.length; i++) {
    const c = text[i];
    if (q) { if (c === '"') { if (text[i + 1] === '"') { cell += '"'; i++; } else q = false; } else cell += c; }
    else if (c === '"') q = true;
    else if (c === ',') { row.push(cell); cell = ''; }
    else if (c === '\n' || c === '\r') { if (c === '\r' && text[i + 1] === '\n') i++; row.push(cell); cell = ''; if (row.some(Boolean)) rows.push(row); row = []; }
    else cell += c;
  }
  if (cell || row.length) { row.push(cell); rows.push(row); }
  return rows;
}
const out = (v) => (/[",\n]/.test(v) ? `"${v.replaceAll('"', '""')}"` : v);

const [head, ...body] = parse(readFileSync(process.argv[2], 'utf8').replace(/^/, ''));
const col = Object.fromEntries(head.map((h, i) => [h, i]));
const seen = new Set();
const lines = ['key,email,name,created_at,expires_at,status'];
for (const r of body) {
  const get = (name) => (r[col[name]] ?? '').trim();
  const key = get('License Key');
  if (!key || seen.has(key.toLowerCase())) continue;
  seen.add(key.toLowerCase());
  const end = get('Subscription End Date').match(/^\d{4}-\d{2}-\d{2}/)?.[0] ?? '';
  const disabled = get('License Key Enabled?') === '0' || get('Fully Refunded?') === '1' || get('Disputed?') === '1';
  lines.push([key, get('Purchase Email') || get('Buyer Email'), get('Buyer Name'), get('Purchase Date'), end, disabled ? 'disabled' : ''].map(out).join(','));
}
console.log(lines.join('\n'));

The header names come from Gumroad’s source, not from a real account. A test file built from those headers, with a quoted name, a repeated renewal row and a refunded sale, produced four rows that Clavem’s file parser accepted. Check your own export before relying on it.

Step 3: import

In the dashboard open Import, choose CSV or JSON file and pick a Clavem product. The screen shows how each column was read and the first five rows before anything is sent. The header activation_limit is optional: leave it out and the product’s device limit applies, so set that limit to what you want each buyer to get. Rows are sent in batches of 500, a bad row is listed and the rest still import, and running the file again is safe. See Import existing licenses.

Because there are no devices in the file, the dashboard shows each key as valid with 0 devices. That is expected. Each buyer’s app activates again on its next launch and takes a seat.

Step 4: replace the verify call in your app

Gumroad’s verify endpoint needs product_id and license_key and answers 404 on failure. Clavem’s License API has three calls, and takes the device into account:

// Before: Gumroad
const res = await fetch('https://api.gumroad.com/v2/licenses/verify', {
  method: 'POST',
  body: new URLSearchParams({ product_id, license_key, increment_uses_count: 'false' }),
});
const { success, purchase } = await res.json();
if (!success || purchase.refunded || purchase.chargebacked) lock();

// After: Clavem
const post = (path, fields) =>
  fetch(`https://clavem.io${path}`, { method: 'POST', headers: { Accept: 'application/json' }, body: new URLSearchParams(fields) }).then((r) => r.json());

// once per device
const a = await post('/v1/licenses/activate', { license_key, instance_name: deviceName, fingerprint });
if (a.activated) save(a.instance.id);
// every launch
const v = await post('/v1/licenses/validate', { license_key, instance_id });
if (!v.valid) lock(v.error);

Refunds and disputes are not read from the response any more. Mark those keys disabled in the import, and from now on a full refund of a one-time Stripe payment disables the license by itself. The Electron guide shows the whole flow with an offline fallback.

Memberships

Gumroad’s help says its Licenses API keeps returning a key as enabled until you disable it, and exposes subscription_ended_at, subscription_cancelled_at and subscription_failed_at so your app can act. That means an active membership has an empty Subscription End Date in the CSV, and an empty expires_at in Clavem means the key never expires. Before importing membership products, set an expires_at of your choosing, such as the next renewal date, and move it with PATCH /v1/admin/licenses/:id as people renew. Imported keys are not linked to a Stripe subscription, so Stripe events do not change them.

Gumroad acts as the merchant of record for all sales as of November 2026, so the saved payment methods are Gumroad’s. Its help pages do not describe a transfer of subscribers’ cards to another processor; ask Gumroad support if you want one. The usual route is a new Stripe subscription for each member, with a fresh key. Leaving a merchant of record also moves sales tax onto you. That is general information, so ask an accountant first.

Rollback

Importing reads a file, so Gumroad is untouched. Keep the Gumroad product live and your old app build available until the new one has run for a few weeks. Make the API host a setting in the app so one release can flip it back, and keep the Gumroad sales CSV as your archive. In Clavem, the Licenses screen exports every key as CSV at any time.

Questions

Does the Gumroad sales CSV include license keys?

Yes. Gumroad's export code writes License Key, License Key Activation Count and License Key Enabled columns, among many others. Gumroad's help page does not list the columns, so open your own file to confirm.

Can Clavem import Gumroad's uses count as devices?

No. Gumroad counts calls to its verify API per license, not devices, so there are no device ids to carry over. Import the keys without devices and let each app activate again.

Do Gumroad keys expire when a membership ends?

Not by themselves. Gumroad's help says its Licenses API keeps returning the key as enabled until you disable it, and gives timestamps such as subscription_cancelled_at so you can decide.

Sources

  1. Gumroad help, license keys (checked November 2026)
  2. Gumroad help, the sales dashboard and CSV export (checked November 2026)
  3. Gumroad help, sales tax and merchant of record (checked November 2026)
  4. Gumroad source code, the sales export service that defines the CSV columns (checked November 2026)