Customer accounts that renew with a licence key
Let customers sign in to your program with a username and password, and renew by entering a licence key that adds its time to their account, even after it expired. With sign-up settings, linked apps and C# code
Licence keys are simple, but customers lose them, and every renewal means a new key to type in. Customer accounts fix both: the customer signs in with a username and a password, and renews by redeeming a key that adds its time to the account. You keep selling keys, through your own store or your resellers, and the customer keeps one login
How it works
- The customer signs up inside your program, or you make the account in the panel
- They sign in with their username and password: the same session, the same lock to one PC and the same kill switch as a key
- When their time runs out, they buy a key and redeem it: the key's time goes onto the account, and the key is spent
Step 1: turn on customer accounts
In Applications, edit your app and turn on Customer accounts. Then set what a new account gets on the Users page, under Sign-up settings:
- A number of days (1 to 3650), no time yet, or lifetime
- Sign-up needs a licence key: the account is made only with an unused key, takes its time, and the key is spent. This is how you make sure only buyers can sign up
- Whether a key added later adds on top of the time left or starts over from now
Step 2: sign up and sign in from your program
With the PWFAuth NuGet package (1.3.0 or newer) in C#:
// sign up: with a key when "Sign-up needs a licence key" is on
var made = await client.RegisterAccountWithKeyAsync(username, password, key, email);
// sign in, then start the heartbeat as with a key
var login = await client.AccountLoginAsync(username, password);
if (!login.Success) { MessageBox.Show(login.Message); return; }
client.StartHeartbeat();When sign-up is off, RegisterAccountAsync answers REGISTRATION_DISABLED, and accounts you make in the panel still work
Step 3: renew with a key
The customer types a new key in your program and its time is added to the account:
var added = await client.RedeemKeyAsync(key); // signed in
var back = await client.RedeemKeyAsync(username, password, key); // signed out, works after expiry tooThe second form is the important one: a customer whose account expired can't sign in, but can still renew from your sign-in window
Manage accounts in the panel
The Users page lists every account with its status, its PC, how many copies run at once and when it ends. Open one to see its running copies, the keys it redeemed and its activity. You can pause it, add or remove days, reset its PC, ban it or set a new password, and running programs hear about it within about 30 seconds
One account for several apps
Selling a Basic and a Pro version? Open Sign-up settings on the Users page and put both apps in the same Linked group under Shared accounts. The customer signs up once and signs in to every app of the group with the same username and password, while each app keeps its own time and keys
The same calls exist in the Python and C++ clients. The full guide is in Users


