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.


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