Skip to content

How To: Distribute Your Protected App

This guide covers the end-to-end distribution workflow — from connecting your payment provider to delivering the protected app to your customers.


Which distribution path should I use?

PyLocket gives you several ways to get your protected app into the hands of paying end-users. All of them bill the $4 License Fee to you (the developer), never to the end-user — but they differ in how you collect the end-user's payment.

Use this decision tree to pick the right path:

  1. Am I selling the app for money (not free/beta)?
  2. No → use Direct Distribution (free downloads up to 10 per app) or Redemption Codes for a closed beta.
  3. Yes → continue.

  4. Do I already have a storefront set up (Gumroad, Paddle, Lemon Squeezy, my own Stripe account, AppSumo, etc.)?

  5. Yes → use Marketplace Distribution (Path 1) — your storefront collects end-user payment and calls PyLocket's API to issue a license. See Marketplace Distribution.
  6. No → continue.

  7. Am I OK with a Stripe-hosted checkout page that shows my business name on the receipt but not my own custom UI?

  8. Yes → use PyLocket Stripe Connect (Path 2) — PyLocket hosts the checkout for you with zero integration work. See Stripe Connect Setup.
  9. No → set up a storefront on Gumroad, Paddle, Lemon Squeezy, or your own Stripe account, then go back to question 2.

Summary table

Method Best For End-user payment goes to Collection of the $4 License Fee
Direct Distribution Free apps, beta testing, individual sharing N/A (no sale) N/A (free tier) or monthly PyLocket invoice
Redemption Codes AppSumo / launch campaigns Your launch partner Monthly PyLocket invoice (only when code is redeemed)
Marketplace Distribution (Path 1) Already have a storefront Your storefront Monthly PyLocket invoice
PyLocket Stripe Connect (Path 2) Just want a checkout page with no integration Your connected Stripe account Extracted from each sale at payment time (no monthly invoice)

In all cases, end-users never see PyLocket branding on their receipt. The PyLocket delivery page (where they get the license key and download) shows your app's branding.


Method 1: Direct Distribution

Direct Distribution lets you share your protected app without setting up a storefront. Generate a unique one-time download link, send it to your end user, and PyLocket handles the rest — license creation, download tracking, and activation.

How It Works

Developer generates link → End user opens link → Fills out form → Downloads app → License auto-activated
  1. Generate a link: In the Developer Portal, go to your App → Direct DistributionGenerate Download Link
  2. Share the link: Send the unique URL to your end user via email, chat, or any channel
  3. End user redeems: They visit get.pylocket.com/<code>, enter their name and email, and download the app
  4. License created: A license is automatically created and appears on your Licenses page
  5. One-time use: The link expires after a single download — it cannot be reused or shared further

Pricing

  • First 10 downloads: Free (per app)
  • After 10 downloads: $4 per download, billed to your account

From the Developer Portal

  1. Navigate to Apps → select your app
  2. Scroll to the Direct Distribution section
  3. Click Generate Download Link
  4. Copy the generated URL (e.g., https://get.pylocket.com/a1b2c3)
  5. Share the URL with your end user

From the CLI

pylocket distribute --app <APP_ID>
# Returns: https://get.pylocket.com/a1b2c3

From the API

curl -X POST https://api.pylocket.com/v1/apps/<APP_ID>/distribute \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json"

# Response:
# {
#   "download_url": "https://get.pylocket.com/a1b2c3",
#   "code": "a1b2c3",
#   "expires_at": "2026-04-18T00:00:00Z"
# }

What the End User Sees

When an end user opens the download link:

  1. Landing page at get.pylocket.com/<code> with your app name and icon
  2. Registration form — they enter their name and email address
  3. Download button — appears after form submission
  4. Automatic license — a license key is created and associated with their email
  5. Confirmation — they receive the license key on-screen (and optionally via email)

View all generated links and their status in AppsDirect Distribution:

Status Meaning
Active Link is available and waiting for download
Redeemed End user has downloaded the app
Expired Link expired before being used (30-day default)

Use Cases

  • Beta testing: Generate links for a handful of testers
  • Free distribution: Share your app without charging
  • Individual sharing: Send a download link directly to a specific person
  • Demo/evaluation: Let prospects try your app before purchasing

Using Direct Distribution for Free Trials

Direct Distribution is the simplest way to offer a free trial of your protected application. Here's how the trial flow works:

  1. Generate a download link from the Developer Portal, CLI, or API
  2. Share the link with a prospect via email or chat
  3. Prospect downloads — a license is automatically created on download
  4. License auto-expires — free-tier licenses expire after 60 days, giving prospects a built-in evaluation window

Key details:

  • The first 10 downloads per app are free — no credit card required
  • Each download link is single-use and expires after 30 days if not redeemed
  • Free-tier licenses automatically expire after 60 days, making them ideal for time-limited trials
  • After the free tier, each additional download costs $4

For custom trial periods, create licenses manually with a specific expiration date:

# Create a 14-day trial license
pylocket licenses create \
  --app <APP_ID> \
  --email prospect@example.com \
  --type demo \
  --expires 2026-04-08

# Create a 30-day trial license
pylocket licenses create \
  --app <APP_ID> \
  --email prospect@example.com \
  --type demo \
  --expires 2026-04-25

Your application can check the license type at runtime and enable/disable features based on whether the license is demo or standard. See Configure Licensing for full expiration and device limit options.


Method 2: Storefront Distribution

For commercial distribution, connect your own payment provider. PyLocket handles license creation and delivery after payment.

Distribution Architecture

Customer → Your Storefront → Payment → PyLocket Delivery Page → License Key + Download

PyLocket provides: - License generation: Automatic license key creation on purchase - Delivery page: Hosted page showing the license key and download button - Signed downloads: Time-limited, tamper-proof download URLs (7-day expiry) - Email confirmation: Automated email to the buyer with license key and download link

You provide: - Payment processing: Through your own storefront (Stripe, Gumroad, Paddle, etc.) - Product page: Your website or marketplace listing


Step 1: Protect Your Application

Before distributing, ensure you have a protected build in READY status:

pylocket protect \
  --app <APP_ID> \
  --artifact dist/myapp.exe \
  --platform win-x64 \
  --python 3.12

# Wait for completion
pylocket status --build <BUILD_ID>

Step 2: Configure Your Storefront

Stripe Checkout

import stripe

session = stripe.checkout.Session.create(
    mode="payment",
    line_items=[{"price": "price_xxx", "quantity": 1}],
    success_url=(
        "https://api.pylocket.com/download"
        "?session_id={CHECKOUT_SESSION_ID}"
        "&app_id=<APP_ID>"
    ),
    metadata={"pylocket_app_id": "<APP_ID>"},
)

Gumroad

In your Gumroad product settings:

  1. Go to AdvancedPost-Purchase Redirect
  2. Set the URL to:
    https://api.pylocket.com/download?app_id=<APP_ID>&email={email}
    

Paddle

In your Paddle checkout:

Paddle.Checkout.open({
  product: 12345,
  successCallback: function(data) {
    window.location.href =
      `https://api.pylocket.com/download?app_id=<APP_ID>&email=${data.user.email}`;
  }
});

Lemon Squeezy

Set the Thank You Page URL in your product settings:

https://api.pylocket.com/download?app_id=<APP_ID>&email={email}

Custom Storefront

For any payment provider, redirect the buyer to:

https://api.pylocket.com/download?app_id=<APP_ID>&email=<BUYER_EMAIL>

Tip: The exact redirect URL for your app is pre-filled in the Developer Portal under Post-Purchase Delivery.


Step 3: What the Customer Sees

After payment, the customer lands on the PyLocket delivery page:

  1. License key displayed prominently with a one-click copy button
  2. Download button for the protected application
  3. Getting started instructions:
  4. Install the application
  5. Run it and enter the license key when prompted
  6. The app activates and is ready to use
  7. Confirmation email sent to the buyer's address

The delivery page is idempotent — bookmarking or refreshing shows the same information.


Step 4: Multi-Platform Distribution

If you offer your app on multiple platforms, upload a separate protected build for each platform. The delivery page automatically shows labeled download buttons for each available platform:

[Windows]  [macOS]  [Linux]

Build and protect each platform's artifact separately:

# Windows — upload the PyInstaller .exe
pylocket protect --app <APP_ID> --artifact dist/myapp.exe --platform win-x64 --python 3.12

# Linux — upload the PyInstaller binary
pylocket protect --app <APP_ID> --artifact dist/myapp --platform linux-x64 --python 3.12

# macOS — upload the PyInstaller binary (NOT the .dmg/.pkg installer)
pylocket protect --app <APP_ID> --artifact dist/myapp --platform mac-arm64 --python 3.12

Important: Upload the raw build output from your build tool (PyInstaller binary, cx_Freeze directory, etc.), not installer packages like .dmg, .msi, or .deb. You can optionally wrap the protected output in an installer for distribution afterward.

For a complete walkthrough, see the Multi-OS Publishing Tutorial.


Step 5: Customer Support

Common Customer Issues

Issue Resolution
Lost license key Look up the license in the Developer Portal by customer email
Activation fails Check device limit; reset devices if needed
New device Reset device activations: pylocket licenses reset-devices --license <KEY>
Refund request Revoke the license: pylocket licenses revoke --license <KEY>
Download link expired The customer can revisit the delivery page — the download link regenerates

Providing End-User Documentation

Consider including a brief guide with your application:

  1. System requirements (OS, any dependencies)
  2. How to enter the license key
  3. Offline use expectations (72-hour grace period by default)
  4. How to contact you for support

Free Tier

Every app gets 10 free build downloads — no credit card required. This lets you test the full distribution flow before committing to a paid plan.

After the 10th download, PyLocket activates billing. See Billing & Pricing for details.


Third-Party Marketplaces

If you sell through AppSumo, Gumroad, Paddle, LemonSqueezy, or other third-party marketplaces where the marketplace (not your own Stripe) processes payments, see the Marketplace Distribution Guide. That guide covers:

  • Redemption codes — Generate batches of codes, upload to the marketplace, customers redeem for a license
  • API provisioning — Your backend receives marketplace webhooks and calls the PyLocket API to create licenses in real time

See Also