The CLV1 protocol is now publicRead the spec
Browse the library

Documentation librarySelling

Resellers and credit

The reseller network lets other people sell your licenses with prepaid credit: you price each plan and top up credit, resellers issue keys themselves, and every order is deducted from their balance and recorded in the credit ledger.

9 min read

How it works

  • You invite a reseller by email and choose the plans they may sell, each with a price in credits per key.
  • You top up the reseller's credit. Credit is an internal unit between the two of you: ClavisAUH does not collect money on your behalf; you take payment your own way, then record it.
  • Resellers issue keys at Business › Reseller portal or through the Reseller API. Each order deducts price × number of keys from the balance.
  • The balance is always the sum of the ledger entries, not a separately stored number that could drift.

Keys sold by a reseller are ordinary licenses of the app: they appear in Licensing & releases › Licenses, follow the plan's rules and send the license.created webhook like any other key.

Requirements

  • The workspace is on Premium. On Basic, the Invite reseller button is locked with the line "Resellers are part of the Premium plan", and the API returns plan_limit (HTTP 402). See pricing.
  • You are an Owner or Admin. Members cannot see or manage resellers.
  • The app has at least one license plan at Licensing & releases › Sign-in & license plans. Without one, the invite panel shows "No plans to sell yet".

Inviting a reseller

  1. Open Business › Resellers and click Invite reseller.
  2. Fill in the Invite a reseller panel using the table below.
  3. Click Send invitation. The reseller gets an email with an accept link, and their card shows Invitation pending.
FieldMeaning
Reseller nameDisplay name, up to 80 characters.
EmailOnly a ClavisAUH account with this exact email can accept. Each email can be invited once per workspace.
Plans they sell, and pricesTick the plans the reseller may sell (plans of every app, with the app name) and enter a price in "credits / key". Prices are whole numbers from 0, defaulting to 1 when ticked.
Keys per dayEmpty (∞) means no limit, or 1 to 100,000 keys, counted per UTC day.
The reseller may seeBuyers' devices, Buyers' IPs, Buyer email. All three are off by default.

If the reseller cannot find the email, click their card, then Resend invitation. Each resend creates a new link and the old one stops working. After the invitation, the manage panel lets you change plans, prices and status; the name, daily limit and visibility can only be set when inviting.

Plans and prices

Each reseller can be granted up to 50 plans, at up to 1,000,000 credits per key.

  • Keys a reseller issues take their duration and device count from the plan. Resellers cannot change the duration, device count or prefix; the duration still counts from the first activation.
  • To edit, click the reseller's card, change Plans and prices and click Save plans and prices. The new list replaces the old one entirely. Removing a plan only blocks new orders; keys already sold are unaffected.
  • A price of 0 means the reseller issues that plan for free, held back only by the daily key limit.
  • To let resellers reset devices for buyers through the Reseller API, allow resellers under the plan's device transfer settings when editing the plan. See License plans and entitlements.

Topping up and adjusting credit

  1. Click the reseller's card. The top of the panel shows the Balance.
  2. Under Top up or adjust, enter an amount of credit and a Note, then click Record.
  • A positive number is a top-up, recorded as Top-up.
  • A negative number is an adjustment, recorded as Adjustment, and needs a note of at least 3 characters.
  • Each entry is a non-zero whole number, at most 10,000,000 either way; notes are up to 300 characters.
  • The balance never goes below zero. A deduction larger than the balance is refused with negative_balance.

If you sell credit through your own store, automate the top-up with a Seller API key that has the resellers:write scope, created at Business › Seller API keys. GET /seller/v1/resellers (scope resellers:read) lists resellers with their IDs and balances.

curl -X POST https://api.example.com/seller/v1/resellers/$RESELLER_ID/credit \
  -H "Authorization: Bearer $CLAVIS_API_KEY" \
  -H "Idempotency-Key: payment-1042" \
  -H "content-type: application/json" \
  -d '{"amount": 500, "note": "Payment 1042"}'

It returns { "data": { "balance": … } }. With Idempotency-Key, the same payment sent again within 24 hours is recorded only once.

Credit ledger

The Credit ledger section of the reseller panel shows the 50 most recent entries, newest first, each with its kind, note, amount and time:

  • Top-up: credit you added.
  • Keys sold: one reseller order, with a note like 5 × Plan name and the number of keys.
  • Adjustment: a deduction with its reason.

Click CSV to download the ledger (up to 10,000 entries, oldest first) with the columns date, kind, amount, keys, note. In the Seller API every license has a resellerId field, and GET /seller/v1/apps/app_…/licenses?resellerId=… filters one reseller's keys.

Each order locks the reseller record, checks the daily limit and the balance, creates the keys and writes the deduction in a single transaction. If any step fails, no key is created and no credit is deducted; two orders running at the same time cannot spend more than the balance.

Pausing and revoking

The Selling switch appears in the panel once the reseller has accepted:

  • Off: the reseller becomes Paused. All their Reseller API keys are revoked at once; they can no longer issue, suspend or reinstate keys (code reseller_inactive). Keys already sold keep working.
  • On again: the reseller can sell right away, but must create a new Reseller API key.
  • A reseller who has not accepted cannot be switched on; the panel shows Resend invitation instead of the switch.

There is no way to delete a reseller yet; turning Selling off is how you stop for good.

To revoke every key a reseller sold, go to Revoke everything, click Revoke all keys (locked while the reseller has sold nothing), enter a Reason for revoking of 3 to 300 characters and confirm. Every key of that reseller that is not already revoked becomes Revoked, and every session on those keys ends at once. The reason and the number of keys are written to the audit log.

The reseller's side

Accepting the invitation

  1. Open the Accept invitation link in the email. It leads to Business › Reseller portal; if you are not signed in, you go through the sign-in page and come back to this page.
  2. Sign in with the invited email, or create an account with that email if you do not have one.
  3. Click Accept in the Reseller invitation panel.

Signing in with another account returns wrong_account. A link that was used, replaced by a resend or is invalid returns invite_expired; ask the seller to click Resend invitation.

Reseller portal only appears in the sidebar once you resell for at least one workspace. If you sell for several workspaces, switch between them with the buttons named after each workspace at the top of the page.

The Reseller portal

  • Balance (credits), status and the daily limit if any ("up to N keys a day").
  • Issue keys: the plans you may sell, with app and price.
  • Keys you issued: preview, status, expiry, creation time, and Suspend or Reinstate for each key.
  • Credit ledger: the 12 most recent entries.
  • Reseller API: create a key for your bot or shop.

While paused, you can still view the page but cannot issue keys or act on them.

Issuing keys with credit

  1. Pick a plan in Issue keys.
  2. Enter the number of Keys (1 to 500). Buyer email and Order note (up to 500 characters) are optional.
  3. Check the N credits in total line (it turns red when it is over your balance), then click Issue.
  4. Click Copy all and send the keys to your buyer right away.

The buyer email is attached to the license and opens the customer portal for the buyer. Each order also counts toward the seller workspace's keys per batch and keys per day limits; see Basic, Premium and limits.

The reseller's Reseller API

In the Reseller API card, click Create key and store the key at once, since it is shown only once.

  • The key only has the licenses:read and licenses:write scopes: it only sees and sells your own keys and draws on the same balance.
  • It may call GET /seller/v1/me (with the balance), GET /seller/v1/apps, read and look up your keys, create keys, and the suspend, reinstate and note actions, plus reset_devices if the plan lets resellers transfer devices. It cannot delete, revoke or extend keys (forbidden_scope).
  • Up to 5 active keys per reseller. The portal only has a create button for now, with no list to revoke from; if a key leaks, ask the seller to pause your reseller account, which revokes every key at once.
curl -X POST https://api.example.com/seller/v1/apps/app_…/licenses \
  -H "Authorization: Bearer $CLAVIS_RESELLER_KEY" \
  -H "Idempotency-Key: order-1042" \
  -H "content-type: application/json" \
  -d '{"policyId": "pol_…", "count": 1, "email": "buyer@example.com", "note": "Order 1042"}'

policyId is required for reseller keys; ask the seller for the IDs of the plans you may sell. The API takes count, email and note; duration, device count and prefix always follow the plan. The result looks like { "data": { "keys": [...], "ids": [...], "balance": … } }, where balance is the balance after the order.

Not enough credit and other errors

Errors look like { "error": { "code": "…", "message": "…", "requestId": "…" } }. For the issuing errors below, the whole order is cancelled: no key is created and no credit is deducted.

CodeWhenWhat to do
insufficient_credit (402)Price × number of keys is more than the balance. The message gives the order price and the current balance.Issue fewer keys or ask the seller to top up.
daily_limit (429)Over Keys per day. The message says how many keys are left today.Wait for the next UTC day.
policy_not_granted (403)The plan is not on your list.Ask the seller.
reseller_inactive (403)The reseller account is paused.Contact the seller.
plan_limitThe order is over the seller workspace's batch or daily limit.Split the order or try again tomorrow.
transfer_not_allowed (403)Resetting devices on a plan that does not let resellers transfer devices.Ask the seller to do it.

How can we help?

Frequently asked

What is ClavisAUH?

A licensing and authentication service for desktop software: license keys, device binding, end-user sign-in and signed responses. All run from one dashboard

Why can't a cracker fake your server?

The SDK only trusts answers signed with your app's private key. That key never leaves our servers, so a fake server can't sign and gets rejected

What ends up in my binary?

Your app id and public key. Nothing secret, because each device makes its own key pair on first run

Does it work offline?

Yes. Every plan gets a signed offline token for 7 days, and your app checks it locally. Premium lets you choose how long. A revoked license can keep working offline for that time, unless Online-Only Mode is on

Which languages are supported?

JavaScript and TypeScript today. C++, C# and Python are next, on the same open protocol

Is Basic really free?

Yes. No time limit, no card. Move to Premium when you need more

Get in touch