文档目录▾

本页暂无中文版本,以下是英文原文。

Floating licenses

Share a fixed number of concurrent seats across any number of machines. Check out, heartbeat and check in, sold per seat, with team member keys.

A floating license, also called a concurrent license, lets a group of people share a fixed number of seats. Ten seats can serve forty employees, as long as no more than ten use the app at the same moment. Nobody has to register machines in advance or free them by hand: a seat is taken when the app opens and returned when it closes.

On this page a seat means one running session of your app. On a plan sold per seat, the seats a customer buys are a different thing: each one adds a number of sessions, as described in floating licenses sold per seat.

When to use floating licenses

  • Teams where people use the software at different times or on shared machines.
  • Labs, classrooms and render farms where machines change often.
  • A one device rule without device management: one seat means one running copy, and if a laptop is lost the seat comes back on its own.

If each customer uses the software on their own machines, the ordinary device limit described in Activating licenses in your app is simpler. Node locked vs floating licenses compares the two.

Set up a floating plan

In the plan settings, set License Model to Floating (concurrent). It is offered for desktop and hybrid products, the types that activate devices. Two other settings then take a new meaning:

SettingFor a floating plan
Max ActivationsHow many seats can be in use at the same time. On a plan sold per seat the field is called Concurrent sessions per seat, and the license holds that many for each seat bought.
Floating Timeout (minutes)How long a seat stays taken without a heartbeat. The default is 30 minutes, and the most is 1,440, one day.

A license on a floating plan takes seats only through checkout. Calling /license/activate on it answers 409 FLOATING_LICENSE, so the same seats cannot be used twice, once as sessions and once as activated devices. That includes a device activated before the plan became floating: activate and verify both answer 409 FLOATING_LICENSE for it, and only deactivate still works. The other way round, checkout on a license whose plan is not floating answers 404 LICENSE_NOT_FOUND.

Floating licenses sold per seat

A floating subscription plan can also be sold per seat. The buyer chooses how many seats to pay for, and the license can run Concurrent sessions per seat times that many sessions at once. With 2 sessions per seat, a customer who buys 10 seats can have 20 machines running the app at the same time. The max_sessions in each checkout answer is that total.

  • The sessions are one pool for the whole license, not a number per person. Whoever checks out first gets the seat.
  • Once more seats are paid for, the limit goes up and the next checkout can use it.
  • Lowering the seats in the customer portal or the dashboard is refused with 409 DEVICES_IN_USE while more sessions are running than the new number allows. The answer's details.kind is sessions: sessions end on their own, so try again once enough have been checked in or timed out.
  • If the seats are lowered in Stripe itself, running sessions are not ended. Checkout answers 409 FLOATING_LIMIT until enough of them have ended to fit the new number.

How a floating session works

  1. The app starts and checks out a seat. If one is free, it gets a session that lasts for the timeout.
  2. While the app runs, it sends a heartbeat every few minutes to extend the session.
  3. When the app closes, it checks the seat back in.
  4. If the app crashes or the machine goes offline, the heartbeats stop and the seat frees itself when the timeout passes.

Check out a seat

bash
curl -X POST https://licenses.example.com/api/v1/license/floating/checkout \
  -H "Content-Type: application/json" \
  -d '{"license_key":"KG-ABCD2345-EFGH6789-JKLM2345-NPQR6789",
       "identifier":"workstation-014","label":"Workstation 14"}'
json
{
  "success": true,
  "data": {
    "session_id": "a1f3c9d2-6b7e-4c1a-8f2d-3e5b9c0a7d46",
    "expires_at": "2026-10-04T10:30:00Z",
    "active_sessions": 7,
    "max_sessions": 10
  }
}

The identifier names the machine, as it does for activation, and can be up to 256 bytes. Spaces around it are trimmed. When every seat is taken, the answer is 409 FLOATING_LIMIT, with the seats in use and the maximum in details. Tell the user the license is fully in use and offer to try again. Checking out again with the same identifier refreshes the existing session instead of taking a second seat.

Checkout answers 404 LICENSE_NOT_FOUND for every key it cannot serve: an unknown key, a license that cannot be used right now, such as a suspended or expired one, a SaaS product, a plan that is not floating, or the key of a paused team member. The answer is the same in each case, so it cannot be used to find out which keys are real.

Keep the seat with a heartbeat

bash
curl -X POST https://licenses.example.com/api/v1/license/floating/heartbeat \
  -H "Content-Type: application/json" \
  -d '{"license_key":"KG-ABCD2345-EFGH6789-JKLM2345-NPQR6789","identifier":"workstation-014"}'

Send it at about a third of the timeout, every ten minutes with the default, so one missed heartbeat does not cost the seat. The answer has the new expires_at and remaining_seconds. If the session has already expired, the heartbeat answers 404 SESSION_NOT_FOUND; check out again to get a new one. A heartbeat cannot bring a lapsed session back, because its seat may already belong to another machine.

Check the seat back in

bash
curl -X POST https://licenses.example.com/api/v1/license/floating/checkin \
  -H "Content-Type: application/json" \
  -d '{"license_key":"KG-ABCD2345-EFGH6789-JKLM2345-NPQR6789","identifier":"workstation-014"}'

Call it when the app quits. It is not a disaster if this never arrives, since the timeout catches it, but the seat is free for someone else straight away when it does. Check-in answers 200 whether or not there was a session to end, so the app can call it without checking first.

Team members and their own keys

On a hybrid product, a floating license can be shared by a team. Every member who accepts an invitation has a license key of their own, and your app checks out with it exactly as with the owner's key. All sessions, whichever key took them, count toward the license's one limit.

Each session belongs to the key that checked it out:

  • A member's key checks out, renews and checks in only its own sessions. Checkout on a machine whose running session was taken with another key on the license answers 409 SESSION_HELD. A heartbeat for another key's session answers 404 SESSION_NOT_FOUND, and a check-in leaves that session running.
  • The license's own key, which the owner keeps, renews and checks in every session on the license, members' included. Use it to free a machine a member left checked out.
  • A session never moves to another key. Once it lapses or is checked in, the machine goes to whichever key checks it out next.

Paused and removed members

  • A paused member, one beyond the license's seat limit, cannot check out: checkout, heartbeat and check-in with their key answer 404 LICENSE_NOT_FOUND, like any key that cannot be used. A session they already had stops being renewed and ends when the timeout passes, or sooner if the owner checks it in with the license's key. Their key works again as soon as a seat is free.
  • Removing a member stops their key at once and ends their running sessions in the same step, so those seats are free straight away. Reissuing a member's key in the dashboard does the same for that member's sessions.
  • Reissuing the license's own key ends the sessions taken with it. Members' sessions keep running.

Things to know

  • Floating licenses need a network connection while the app runs, because the heartbeat holds the seat. For apps that spend long stretches offline, a device limit with offline tokens fits better.
  • Checkout is atomic. Ten machines asking for the last seat at the same moment get exactly one yes, and each checkout counts against the license's limit as it is at that moment, even if the seats changed a second before.
  • Floating combines with any license type, including a perpetual license with an update period. The seat is about who is using the app right now; the update period is about which versions the license covers. They do not affect each other.
  • The license list in the dashboard shows how many sessions are running against the limit, and GET /admin/licenses/:id/floating lists them.

Frequently asked questions

How many people can use a floating license at the same time?

As many as the plan's Max Activations. On a plan sold per seat it is Concurrent sessions per seat times the seats bought, so 10 seats at 2 sessions per seat allow 20 machines at once. Everyone on the license shares that one number, team members included.

What happens to a floating seat when the app crashes?

The heartbeats stop and the session ends on its own once the plan's Floating Timeout passes, 30 minutes by default. The seat is then free for the next checkout. If the same machine checks out again before that, it gets its own session back instead of taking a second seat.

Do floating licenses work offline?

No. The heartbeat holds the seat, so the app needs a connection while it runs. A machine that is offline for longer than the timeout loses its seat and has to check out again. For apps used offline, a device limit with offline tokens fits better.

Why does checkout answer 409 SESSION_HELD?

The machine already has a running session that another key on the same license checked out, for example another team member's. A member's key renews and checks in only its own sessions. Check the session in with the key that took it, or with the license's own key, which manages every session, or wait for it to time out.

最后更新 2026年10月26日