KDPika Licensing Sign inStart free
API v1
Show all languages
Browse documentation

Choose a page in the navigation drawer.

KDPika Licensing · API v1 Intermediate

Choose a licensing architecture

Trust boundaries, flows and trade-offs for desktop websites, SaaS backends, plugin marketplaces and CLI tools.

On this page
Updated 2026-10-18 UTCDownload Markdown

Choose where purchase confirmation, license issuance and application authorization live before copying an integration example.

What you will learn

  • Separate buyer-facing clients from backend credentials and payment verification.
  • Choose a practical flow for desktop, SaaS, plugin or CLI software.
  • Understand offline, migration, seat and recovery trade-offs without inventing platform capabilities.

Prerequisites

Shared trust boundaries

BoundaryResponsibilityCredential rule
Store/providerConfirms payment/refund/subscription stateProvider secrets stay on your backend
Your fulfillment backendVerifies incoming store data, maps purchases and issues/delivers licenses durablyProduct/environment-scoped lmp_ key; never distributed
KDPika LicensingManages license/device lifecycle and signed responsesPublic X-App-ID for activation; installation act_ for validation
Your buyer applicationVerifies signed result and restrictively checks validity/featuresPublic App ID and its own protected installation token, not developer/store keys
Your valuable remote serviceAuthenticates caller and authorizes tenant/resource/actionYour application's session/service authorization plus current licensing policy

KDPika Licensing bills developers for their workspace. It does not become the merchant of record or process payments from your software buyers merely because you use a licensing API. Your store and fulfillment backend handle those transactions. Signed webhooks are notifications, not access tokens or payment confirmations from a browser.

Desktop application with your own website

Desktop website flow: authenticate a store payment on your backend, issue once with a scoped key, deliver privately, then activate and verify in the installation.
Desktop website flow: authenticate a store payment on your backend, issue once with a scoped key, deliver privately, then activate and verify in the installation.
  1. The buyer purchases through your chosen store/payment provider.
  2. Your website backend verifies the provider event or confirmed API state.
  3. It maps the purchased item to one product plan and records a stable order-line effect before issuing.
  4. It saves the returned complete key in an encrypted outbox and delivers it privately.
  5. The desktop app activates with the public App ID, key, optional matching email and its stable installation ID.
  6. It verifies the signed response and uses a restrictive validity/feature guard.
  7. Subsequent checks follow the signed validation/offline policy; a transfer releases or resets the prior device deliberately.

Expected result: your client never has the developer API key and your website never relies on a success-page URL as payment proof. The complete Python/Electron/C# sample applications demonstrate client behavior; manual issuance demonstrates the supported backend creation/delivery boundary.

DecisionBenefitTrade-off
Verified local cache with bounded offline policyTemporary network loss need not stop valid accessRevocation/feature changes are not instantaneous in an offline client
Email-matched activationOptional check against the stored recipient emailNot proof of a human identity and not a substitute for verified purchase
Backend-controlled high-value actionsLocal patching cannot directly grant remote accessYou operate authenticated server authorization and availability
Encrypted key outboxAuthorized resend without issuing againYou must protect the encryption key, backups, recipients and retention

SaaS backend

SaaS flow: authenticate the browser to your backend, reconcile verified store events with tenant/license records, and authorize protected server actions without exposing developer credentials.
SaaS flow: authenticate the browser to your backend, reconcile verified store events with tenant/license records, and authorize protected server actions without exposing developer credentials.
  1. Authenticate the buyer using your own application login.
  2. Resolve the caller's authorized tenant; do not accept an arbitrary browser-supplied license ID as ownership.
  3. Process store events on your backend and keep the tenant/order/license relationship durably.
  4. Use the backend developer key only for management operations scoped to that product/environment.
  5. If your backend uses an installation activation/token workflow, define its stable service identity and protect that token like a secret.
  6. Verify signed activation/validation results and enforce the valid feature/tenant decision before a protected action.
  7. Reconcile refused/expired state without substituting a stale notification for authorization.

Expected result: a browser session can call only resources its tenant owns; license metadata never becomes an unauthenticated bearer permission. The PHP backend sample demonstrates a guarded server route. A license GET summary is an authenticated management response, not an Ed25519 activation envelope or the caller's application login.

DecisionBenefitTrade-off
Authorization on your backendCentral enforcement of valuable online operationsYou must implement tenant/caller ownership and audit decisions
Per-tenant service installationClear token/license mappingCounts/identity must match your product's installation policy
Cached licensing resultLower latency and reduced API volumeDefine bounded staleness; never turn an explicit refusal into fallback permission
Separate commercial seat modelCan reflect named people and membershipsPlatform device counts do not implement your SaaS user directory

Plugin or extension sold in a marketplace

Plugin flow: verify marketplace ownership on a trusted fulfillment backend, deliver a license privately, and verify installation-bound results inside the plugin or host process.
Plugin flow: verify marketplace ownership on a trusted fulfillment backend, deliver a license privately, and verify installation-bound results inside the plugin or host process.
  1. Confirm how the marketplace exposes a verifiable completed purchase or ownership result.
  2. Verify its notification/API response on your backend before mapping a product plan.
  3. Store marketplace account, item/order-line and recipient context alongside the license ID.
  4. Deliver the key through an authenticated private channel, not public extension configuration or a webpage source.
  5. Activate the plugin using a stable installation ID appropriate to the host application.
  6. Verify result signature, identity, expiry and feature types before allowing local or remote functionality.
  7. Route transfer/refund/support actions through your own verified ownership workflow.

Expected result: a copied public plugin package does not reveal a developer/provider key. A marketplace compatibility requirement is not automatically a KDPika feature: if the marketplace has no authenticated event mechanism, use its supported server API verification or a reviewed manual process rather than inventing an HMAC header.

DecisionBenefitTrade-off
Host installation identityWorks without collecting hardware serial numbersDefine how host reinstall/profile clones affect devices
PHP/Node backend keeps management secretPublic plugin contains only client-safe identity and local tokenServer-side plugin code shipped to a customer is still under that customer's control
Optional own backend for premium contentRemote authorization can protect downloads/servicesYou operate that service and buyer authentication
Domain/site labelsHelpful diagnosticsA site URL or domain string is not a built-in cryptographic domain-binding entitlement

Do not promise WordPress domain-locked licenses, named-site transfer quotas, marketplace payout processing or automatic update-distribution APIs from the present licensing contract. Confirm those separate requirements before offering them commercially.

CLI tool and headless environments

CLI flow: issue through a verified backend, deliver through a private user or CI channel, persist installation identity and check signed validity before executing a protected command.
CLI flow: issue through a verified backend, deliver through a private user or CI channel, persist installation identity and check signed validity before executing a protected command.
  1. Issue the key from a verified purchase using your backend ledger.
  2. Deliver it to the authorized user or a reviewed CI secret store.
  3. Generate one stable random installation ID for the intended installation scope.
  4. Activate without printing keys or tokens to terminal output or CI logs.
  5. Persist tokens using the supported storage approach.
  6. Verify the signed result before running protected commands; return a clear nonzero refusal when access fails.
  7. Release an installation when appropriate; do not assume reset clears lifetime activation limits.

Expected result: the Python/Go/Java CLI examples exercise activation, validation, feature gating, offline behavior, deactivation and error UX. Headless input/output is not a reason to distribute the developer API key.

DecisionBenefitTrade-off
Persistent identity on a workstationPredictable device binding across runsProtect the user's profile and recovery process
Ephemeral CI runnersDisposable build executionA new identity per runner can consume active/lifetime allowances; define a permitted runner policy first
Separate license per CI installationClear accountingMore licenses/support records; do not share one activation token across machines
Offline CLI operationWorks during eligible transport failuresClock/cache integrity is local, not a trusted hardware guarantee

Choose before implementation

QuestionRecord this decision
Who confirms the purchase?Your provider-authenticated backend; never the client success page
Who owns a license?Your verified customer/tenant/order mapping in the intended environment
What counts as a device or seat?Stable installation scope, with explicit distinction from named users/concurrency
When does paid access end?Actual stored expiry and signed policy, reconciled with the store period
What happens after a timeout?Durable held review and reconciliation, not automatic repeated create/renew
How can the customer recover?Authorized portal/device release or saved-key delivery/replacement process
What remains valuable on a patched client?Remote operations protected by your own server authorization

Expected result

Your architecture has a clear purchase-verification boundary, backend-only management secrets, installation-safe credentials and a deliberate authorization/recovery policy. These diagrams describe supported relationships, not evidence of a completed marketplace app, live payment or production availability.

Common mistakes

  • Using a developer API key in an Electron renderer, browser page, distributed plugin or CLI configuration.
  • Confusing a developer workspace subscription with the buyer's product plan.
  • Treating webhook notifications, key masks or an unsigned license summary as signed client authorization.
  • Assuming device counts implement named-user seats or a copied domain string proves domain ownership.

Security notes

TLS, verified signatures and encrypted local state are useful controls, not a promise that local software cannot be patched. Apply the threat model, protect high-value remote actions and record only privacy-justified installation/customer metadata. Keep Sandbox and Live keys, mappings, recipients and endpoints separated. Never collect card/CVC data in the licensing backend to make any architecture work.

Troubleshooting

SymptomDesign boundaryAction
Browser needs a developer keyManagement calls were placed on the wrong side of the trust boundaryMove them to your authenticated backend
New CI job consumes another deviceInstallation identity is ephemeralDefine a supported persistent/separate-runner license policy
Marketplace refund changes another customerOrder/license ownership mapping is incompleteVerify provider/account/environment/order line before mutation
SaaS request supplies another tenant's license IDResource ownership is not authorizedResolve the caller's tenant on your backend and refuse cross-tenant access
Old feature persists offlineValid cached snapshot has bounded stalenessFollow the signed policy; use remote authorization when immediate control is necessary

Next steps

Choose the licensing recipes that your architecture requires, then test manual issuance and uncertain-result handling before adding store automation.

Was this page helpful?

Choose an answer

Do not include personal data, license keys or credentials. Retained for up to 30 days. This is not a support inbox.

Search documentation

Arrow keys to move, Enter to open, Escape to close. Search stays in your browser.

Cookie settings