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¶
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:
- Go to Advanced → Post-Purchase Redirect
- Set the URL to:
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:
Custom Storefront¶
For any payment provider, redirect the buyer to:
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:
- License key displayed prominently with a one-click copy button
- Download button for the protected application
- Getting started instructions:
- Install the application
- Run it and enter the license key when prompted
- The app activates and is ready to use
- 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:
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:
- System requirements (OS, any dependencies)
- How to enter the license key
- Offline use expectations (72-hour grace period by default)
- 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¶
- Licensing Tutorial — Full licensing walkthrough
- Configure Licensing — Device limits, expiration, offline grace
- Marketplace Distribution — AppSumo, Gumroad, Paddle, and more
- Billing & Pricing — How PyLocket charges work