---
title: "Sell your app with a year of updates · Clavem"
description: "Sell the app forever with updates for a set time. The license keeps working; only new releases stop. Buyers renew through Stripe, Polar, Dodo Payments or Creem."
url: "https://clavem.io/docs/update-period"
---

Documentation

# Update period

Sell the app forever with updates for a set time, such as a year. The license keeps working after that; only newer releases stop.

## How it works

1. **You give the product an update period.** For example 12 months. Without one, every license gets every release, as before.
2. **Each new license gets an end date for updates.** `updates_until` is the day it was issued plus the period.
3. **The license keeps working forever.** Validation, activation and offline tokens do not change. Only releases published after `updates_until` are held back.
4. **Buyers renew from their order page.** They pay your renewal price through your Stripe, Polar, Dodo Payments or Creem, and the date moves forward by one period.

## Turn it on

In the dashboard, open the product, go to **License rules** and switch on **Limit updates** under **Updates**. Enter the months, 1 to 120. Through the API:

One year of updates

```
curl -X PATCH https://clavem.io/v1/admin/products/75 \
  -H "Authorization: Bearer sk_clavem_…" \
  -H "Content-Type: application/json" \
  -d '{ "updates_months": 12 }'
```

Or ask Claude through MCP

```
Sell Inkwell with one year of updates. Use the Stripe price price_1Q… as the renewal price.
```

The period applies to licenses issued from then on: Stripe, Polar, Dodo Payments and Creem sales, licenses you issue by hand or through the API, and imports. Changing it later does not change licenses that already exist. A license sold through a Stripe, Polar, Dodo Payments or Creem subscription gets no end date, whatever the product's validity: the subscription pays for updates while it runs. Trial licenses get none either; a tester who buys gets the date of the license they bought.

An import may send `updates_until` for each license. Left out, it is the license's `created_at` (or today) plus the period, so a license bought two years ago with one year of updates has already ended. Send `null` for updates forever.

## Which release a license gets

A license gets the newest release published on or before its `updates_until`. With no date, it gets the newest release. This applies everywhere a release is handed out:

- [Auto-update feeds](https://clavem.io/docs/updates) for Sparkle, electron-updater and Tauri serve that release, so the updater sees no newer update.
- [`GET /v1/releases/:productId/latest`](https://clavem.io/docs/files#updates) with a valid key returns that release and two more fields.
- The buyer's order page offers that release for download and says which version a renewal brings.
- [Update emails](https://clavem.io/docs/updates#email) go only to buyers whose updates cover the release.

GET /v1/releases/75/latest, updates ended

```
{
  "version": "1.4.2",
  "notes": "Faster export.",
  "published_at": "2026-10-02T08:00:00.000Z",
  "updates_until": "2026-11-15T09:14:02.000Z",
  "newer_version_available": "2.0.0",
  "files": [ … ]
}
```

`newer_version_available` is the newest version when the license does not get it, else `null`. When nothing was published while the license had updates, `files` is empty. Without a valid key the answer is unchanged.

## In your app

Activate and validate return `updates_until` in `license_key`, as an ISO date or `null`. The signed token carries it as `uu`, in seconds since 1970, only when it is set. See [offline verification](https://clavem.io/docs/offline#fields). Apps that do not know the field ignore it.

validate, with an update period

```
{
  "valid": true,
  "license_key": {
    "id": 512,
    "status": "active",
    "expires_at": null,
    "updates_until": "2027-11-28T09:14:02.000Z",
    …
  },
  …
}
```

Swift

```
// After validate: show "Updates ended" in your About window.
if let until = license.updatesUntil, until < Date() {
    statusLabel.stringValue = "Updates ended on \(until.formatted(date: .long, time: .omitted)). Renew to get new versions."
}
```

## One license

Open the license in the dashboard and choose **Change limits**. Set **Updates until**, or leave it empty for updates forever. A date in the past is allowed. Through the API or `set_license_updates_until` in MCP:

Extend one license by hand

```
curl -X PATCH https://clavem.io/v1/admin/licenses/512 \
  -H "Authorization: Bearer sk_clavem_…" \
  -H "Content-Type: application/json" \
  -d '{ "updates_until": "2027-12-31T23:59:59Z" }'
```

## Paid renewal

Link a one-time Stripe price as the product's **renewal price**: on the product's **Payments** tab, in the Stripe section, choose **Link a Stripe product** and switch on **Renewal price**. Through the API:

Link the renewal price

```
curl https://clavem.io/v1/admin/stripe/mappings \
  -H "Authorization: Bearer sk_clavem_…" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": 75,
    "stripe_product_id": "prod_Q…",
    "stripe_price_id": "price_1Q…",
    "role": "renewal"
  }'
```

The order page and the license page then show **Renew updates for 12 months — $19.00** on each license whose updates end. A license of a Stripe, Polar, Dodo Payments or Creem subscription is never offered one: the subscription includes updates while it runs. After the payment, `updates_until` moves to the later of today and the current date, plus the period. Renewing early adds a full period; renewing late does not pay for months that already passed. The buyer gets a short email, and the activity feed shows `license.updates_renewed`.

There are two ways the payment is taken. The Stripe section of the product's Payments tab shows which one is on.

- **Payment Link.** Create a Payment Link for the renewal price in Stripe and paste it on the product's Payments tab (or send `renewal_payment_link`). The button sends the buyer there with a signed `client_reference_id` and their email filled in. This works with every connection, including the Clavem Stripe App. To bring buyers back to their order page after paying, open the link in Stripe, choose **After payment → Don't show confirmation page** and paste `https://clavem.io/api/public/checkout/return?session_id={CHECKOUT_SESSION_ID}` (the Payments tab shows it with a copy button, and the Admin API and MCP return it as `payment_link_return_url`). Clavem looks up the renewal and sends the buyer on, for up to a day after paying.
- **Checkout Session.** Without a Payment Link, Clavem creates a Checkout Session on your Stripe account and sends the buyer back to their order page afterwards. That needs **Checkout Sessions: Write** on your restricted key, which the key Clavem asks for does not have. Add it to the key in Stripe, or use a Payment Link. The Stripe App can only read, so it always needs a Payment Link.

Why both: Clavem asks for read access only, so a Payment Link is the way that works with every seller's Stripe as it is today.

### Renewing through Polar

A product that sells through Polar can renew there instead. Create a one-time product with a fixed price in Polar, then on the product's **Payments** tab link it in the Polar section with **Renewal** switched on (through the API, `"role": "renewal"` on `POST /v1/admin/payment-links`). The button then opens a Polar checkout that Clavem creates for that product, with the buyer's email filled in and a signed reference in its metadata, and Polar sends the buyer back to their order page after paying. Creating the checkout needs the `checkouts:write` scope, which Connect with Polar asks for. There is no Payment Link option for Polar. See [connecting Polar](https://clavem.io/docs/polar#renewal).

### Renewing through Dodo Payments

A product that sells through Dodo Payments renews the same way. Create a one-time product with one fixed price in Dodo, not pay what you want, then link it in the Dodo Payments section of the product's **Payments** tab with **Renewal** switched on (or `"role": "renewal"` on `POST /v1/admin/payment-links`). The button then opens a Dodo checkout that Clavem creates for that product, with the buyer's email filled in and a signed reference in its metadata, and Dodo sends the buyer back to their order page after paying. Creating the checkout needs the **Checkout sessions (write)** permission on the API key. There is no Payment Link option for Dodo. See [connecting Dodo Payments](https://clavem.io/docs/dodo#renewal).

### Renewing through Creem

A product that sells through Creem renews the same way. Create a one-time product with a fixed price in Creem, not pay what you want, then link it in the Creem section of the product's **Payments** tab with **Renewal** switched on (or `"role": "renewal"` on `POST /v1/admin/payment-links`). The button then opens a Creem checkout that Clavem creates for that product, with the buyer's email filled in and a signed reference in its metadata, and Creem sends the buyer back to their order page after paying. Creating the checkout needs the **Checkouts (write)** permission on the API key. There is no Payment Link option for Creem. See [connecting Creem](https://clavem.io/docs/creem#renewal).

A product has one renewal, through Stripe, Polar, Dodo Payments or Creem, because the button needs exactly one. A product that has a Stripe renewal price cannot get a Polar, Dodo or Creem one until you unlink the Stripe one.

- A renewal never issues a new license, never creates an order, and is **not charged** on Pay As You Go. It is the same license.
- Each Checkout Session, Polar order, Dodo payment or Creem payment counts once, however often Stripe, Polar, Dodo or Creem sends the event.
- The signed reference only counts on a checkout that contains the renewal price. Added to another checkout, it is an ordinary sale.
- A purchase of the renewal price or product without a reference issues no license; the activity feed shows it as unmapped.
- Test mode works like a test sale: use a test Payment Link, a test key, a Polar sandbox organization, a Dodo test-mode business or a Creem test store, and a test card.

## Dashboard, API and MCP

| What | Admin API | MCP |
| --- | --- | --- |
| Update period | `updates_months` on `POST` and `PATCH /v1/admin/products` | `create_product`, `update_product` |
| One license | `updates_until` on `POST /v1/admin/licenses`, `PATCH /v1/admin/licenses/:id` and the import | `issue_license`, `set_license_updates_until`, `import_licenses` |
| Renewal price | `"role": "renewal"` on `POST /v1/admin/stripe/mappings` | `link_stripe_price` with `role` |
| Polar, Dodo or Creem renewal product | `"role": "renewal"` on `POST /v1/admin/payment-links` | `link_payment_product` with `role` |
| Payment Link | `renewal_payment_link` on `PATCH /v1/admin/products/:id` | `update_product` |
| Renewal status | `renewal` in `GET /v1/admin/products/:id/stripe`, `GET /v1/admin/products/:id/payments` and `GET /v1/admin/licenses/:id` | `get_product_stripe`, `get_product_payments`, `get_license` |

Read-only API keys can read all of this and change none of it.

## Limits

- 1 to 120 months per product. One period for the whole product; plans do not have their own.
- No automatic yearly renewal, no early-renewal discount, no grace period and no upgrade pricing between major versions.
- A refund of a renewal in Stripe, Polar, Dodo Payments or Creem does not move the date back. Change it on the license if you need to.
- The renewal price is read from Stripe, Polar, Dodo Payments or Creem when you link it. Link it again after changing its amount there.

[Auto-updates](https://clavem.io/docs/updates) · [API reference](https://clavem.io/docs/api) · [MCP server](https://clavem.io/docs/mcp) · [Selling updates for a year](https://clavem.io/blog/sell-updates-for-a-year)
