
Digital Products
- 119 installs
- 41 repo stars
- Updated March 13, 2026
- finsilabs/awesome-ecommerce-skills
Sell downloads like ebooks and software with secure delivery, license keys, download limits, and expiring signed URLs.
About
Uses each platform's native digital-product support or apps for secure file delivery, then covers S3 presigned-URL delivery for custom stores. A developer uses it to add downloadable products, license-key delivery, or gated content libraries.
- Per-platform tool table (Sky Pilot, WooCommerce native, Fileflare)
- Custom secure delivery via S3 presigned expiring URLs
Digital Products by the numbers
- 119 all-time installs (skills.sh)
- Ranked #2,847 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill digital-productsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 119 |
|---|---|
| repo stars | ★ 41 |
| Last updated | March 13, 2026 |
| Repository | finsilabs/awesome-ecommerce-skills ↗ |
What it does
Sell downloads like ebooks and software with secure delivery, license keys, download limits, and expiring signed URLs.
Files
Digital Products
Overview
Selling digital products — ebooks, software licenses, templates, music, courses — requires secure delivery after payment, download limits to prevent unauthorized sharing, and expiring access links. Every major platform either has this built in (WooCommerce) or has a mature app that handles it (Shopify, BigCommerce). Use the platform's native solution first; only build custom delivery infrastructure if your use case (complex license key management, subscription-gated content libraries) exceeds what apps offer.
When to Use This Skill
- When adding downloadable products (PDFs, software, audio, templates) to an existing store
- When implementing a license key delivery system for software products
- When building a subscription that gates access to a digital content library
- When replacing publicly accessible download URLs with secure, expiring signed URLs
Core Instructions
Step 1: Determine platform and choose the right tool
| Platform | Recommended Tool | Why |
|---|---|---|
| Shopify | Sky Pilot or Fileflare | Sky Pilot handles files, license keys, streaming video, and download limits; Fileflare is simpler for basic file downloads |
| WooCommerce | WooCommerce Downloadable Products (built-in) | WooCommerce has native digital product support including download limits, expiry, and secure token URLs |
| BigCommerce | Downloadable Digital Products (built-in) or Fileflare | BigCommerce handles file attachment and download delivery natively |
| Custom / Headless | Build delivery with S3 presigned URLs | Required when the platform has no native digital product support |
---
Step 2: Platform-specific setup
---
Shopify
Shopify does not have native digital product support — you need an app. Sky Pilot is the most feature-complete option.
Setting up Sky Pilot:
1. Install Sky Pilot from the Shopify App Store 2. Go to Sky Pilot → Files → Upload your digital file (PDF, ZIP, etc.) 3. Go to Sky Pilot → Products and link the uploaded file to a specific product or variant 4. Configure delivery settings:
- Download limit: set to 3–5 for standard products, unlimited for subscriptions
- Link expiry: 48–72 hours is standard; customers can request a new link from their account
- Automatic delivery: enabled by default — customers receive a download email immediately after payment
5. Customize the delivery email under Sky Pilot → Settings → Email template
For license key products: 1. In Sky Pilot, go to License Keys → Import and upload a CSV of your license keys 2. Link the license key pool to the product 3. Sky Pilot automatically assigns one key per purchase and includes it in the delivery email
For subscription-gated content (Sky Pilot + Recharge):
- Sky Pilot integrates with Recharge — customers with an active subscription automatically gain access; access is revoked when the subscription cancels
---
WooCommerce
WooCommerce has digital product delivery built in — no extra plugin required for basic use.
Setting up a downloadable product:
1. Go to WooCommerce → Products → Add Product 2. Check Downloadable (and optionally Virtual to skip shipping) 3. Under Product Data → Downloadable Files:
- Click Add File and upload the file or enter a URL
- File name: the name shown to customers in their account
4. Configure access settings:
- Download limit: enter a number (e.g.,
5) or leave blank for unlimited - Download expiry: number of days after purchase (e.g.,
365), or leave blank for no expiry
5. WooCommerce generates a secure, token-based download URL for each purchase automatically
Forcing customer account for downloads:
- Go to WooCommerce → Settings → Accounts & Privacy
- Enable Grant access to downloadable products after payment and Require login to download
For license key products:
- Install License Manager for WooCommerce (free plugin)
- Go to License Manager → Add License Keys and bulk import your keys
- Link the license key pool to a product
- The plugin delivers keys in the order confirmation email and the customer's account page
---
BigCommerce
Setting up digital delivery (built-in):
1. Go to Products → Add Product 2. Under Files, upload your digital file (BigCommerce supports files up to 512 MB) 3. Set Max downloads to limit how many times the file can be downloaded per order 4. BigCommerce sends an automatic download email after payment with a secure link
For more advanced delivery:
- Install SendOwl or Fileflare from the BigCommerce App Marketplace
- These apps add license key management, download analytics, and streaming video delivery
---
Custom / Headless
For headless storefronts, implement secure file delivery using S3 presigned URLs — never expose the raw S3 key:
import { S3Client, GetObjectCommand } from '@aws-sdk/client-s3';
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
const s3 = new S3Client({ region: process.env.AWS_REGION });
// Generate a short-lived presigned URL for each download attempt
export async function generateDownloadUrl(orderId: string, digitalProductId: string) {
const access = await db.orderDigitalAccess.findUnique({
where: { orderId_digitalProductId: { orderId, digitalProductId } },
include: { digitalProduct: true },
});
if (!access) throw new Error('No access record found');
if (access.expiresAt && access.expiresAt < new Date()) throw new Error('Download access has expired');
if (access.maxDownloads && access.downloadCount >= access.maxDownloads) throw new Error('Download limit reached');
// Atomically increment download count
await db.orderDigitalAccess.update({ where: { id: access.id }, data: { downloadCount: { increment: 1 } } });
// 60-second presigned URL — short enough to prevent sharing, long enough for the redirect
const command = new GetObjectCommand({
Bucket: process.env.DIGITAL_PRODUCTS_BUCKET,
Key: access.digitalProduct.fileStorageKey,
ResponseContentDisposition: `attachment; filename="${access.digitalProduct.fileName}"`,
});
return getSignedUrl(s3, command, { expiresIn: 60 });
}
// Provision access after payment — call this from your payment webhook
export async function provisionDigitalAccess(orderId: string) {
const order = await db.orders.findUnique({
where: { id: orderId },
include: { items: { include: { variant: { include: { digitalProduct: true } } } } },
});
for (const item of order.items.filter(i => i.variant.digitalProduct)) {
const dp = item.variant.digitalProduct;
await db.orderDigitalAccess.upsert({
where: { orderId_digitalProductId: { orderId, digitalProductId: dp.id } },
create: {
orderId, digitalProductId: dp.id, downloadCount: 0,
maxDownloads: dp.downloadLimit,
expiresAt: dp.accessDurationDays ? new Date(Date.now() + dp.accessDurationDays * 86400000) : null,
},
update: {}, // Idempotent — webhooks can fire multiple times
});
}
}
// License key pool management
export async function assignLicenseKey(orderId: string, productId: string) {
return db.$transaction(async tx => {
const license = await tx.digitalProductLicenses.findFirst({
where: { productId, status: 'available' },
});
if (!license) throw new Error(`No available license keys for product ${productId}`);
await tx.digitalProductLicenses.update({
where: { id: license.id },
data: { status: 'sold', orderId, soldAt: new Date() },
});
return license.licenseKey;
});
}---
Step 3: Configure post-purchase delivery email
All platforms send an automatic delivery email — customize it to be clear and professional:
Content to include:
- Order confirmation number
- Product name and description
- Download link (or license key, displayed prominently)
- Download limit and expiry date if applicable
- Instructions for how to access/install the product
- Support contact if they have trouble
Shopify (Sky Pilot): Customize under Sky Pilot → Settings → Email Template
WooCommerce: Customize under WooCommerce → Settings → Emails → Customer Processing Order (includes download links automatically)
BigCommerce: Customize under Marketing → Transactional Emails → Order Status Notification
---
Step 4: Monitor license key inventory
For license key products, set up alerts before keys run out:
- Sky Pilot: Go to License Keys → [Product] — shows remaining key count; Sky Pilot sends email alerts when stock drops below a threshold you configure
- License Manager for WooCommerce: Dashboard shows keys remaining per product with color-coded warnings
- Custom: Run a daily check and alert when available keys drop below 10
Best Practices
- Never deliver digital products until payment is confirmed — trigger delivery from the payment confirmed webhook, not the order created event; card declines happen after order creation
- Use short-lived download links (60 seconds) for headless implementations — generate the URL fresh on each download page load, not when the page renders
- Set download limits for most products — 3–5 downloads is standard; unlimited for subscription access; limits prevent casual file sharing
- Store files in private buckets — never make your S3/GCS bucket public; all access must go through signed URL generation
- Monitor license key inventory — running out of keys causes support tickets and chargebacks; set up alerts when below 20% of original inventory
- Send a separate, dedicated delivery email — don't bundle license keys into the generic order confirmation; a focused delivery email is easier for customers to find and reference
Common Pitfalls
| Problem | Solution |
|---|---|
| Download link expires before customer clicks it | For headless builds, generate a fresh presigned URL on each page load, not at email send time |
| Digital product delivered after a failed payment | Trigger delivery only from the payment success webhook (payment_intent.succeeded in Stripe), never from order creation |
| License keys double-assigned | Use a database transaction for key assignment with an atomic status check — never select and then update in two steps |
| Customer loses access after account deletion | Store download access against order_id + email, not only the user account ID; allow access recovery via order number |
| Large file download times out | Use S3 presigned URLs to deliver files directly from S3 to the customer's browser — never proxy through your server |
Related Skills
- @inventory-tracking
- @low-stock-alerts
- @product-data-modeling
{
"context": "Tests whether the agent correctly implements duplicate-safe license key import, uses a database transaction to prevent concurrent double-assignment of keys, properly updates all fields on assignment, and implements inventory monitoring with the correct low-stock threshold and groupBy pattern.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Duplicate key check on import",
"max_score": 10,
"description": "importLicenseKeys queries the database for existing keys matching those in the incoming batch before inserting"
},
{
"name": "Duplicate rejection response",
"max_score": 10,
"description": "importLicenseKeys returns an HTTP 400 response with an error field and a 'duplicates' array listing the conflicting keys when duplicates are found"
},
{
"name": "Transaction for assignment",
"max_score": 14,
"description": "assignLicenseKey wraps the findFirst + update in a single database transaction (e.g., db.$transaction or equivalent)"
},
{
"name": "Status filter on findFirst",
"max_score": 10,
"description": "assignLicenseKey queries for a license with status: 'available' (not all licenses for the product)"
},
{
"name": "Status updated to 'sold'",
"max_score": 8,
"description": "The update inside assignLicenseKey sets status to 'sold'"
},
{
"name": "orderId set on assignment",
"max_score": 8,
"description": "The update inside assignLicenseKey sets orderId to the provided orderId"
},
{
"name": "soldAt set on assignment",
"max_score": 8,
"description": "The update inside assignLicenseKey sets soldAt to the current timestamp (new Date() or equivalent)"
},
{
"name": "Low stock threshold of 10",
"max_score": 10,
"description": "checkLicenseKeyStockLevels uses a threshold of exactly 10 remaining keys to determine low stock"
},
{
"name": "groupBy with having clause",
"max_score": 12,
"description": "checkLicenseKeyStockLevels uses a groupBy query on productId with a having/_count condition to find low-stock products, rather than loading all keys and filtering in application code"
},
{
"name": "Admin notification sent",
"max_score": 10,
"description": "checkLicenseKeyStockLevels calls notifyAdmin (or equivalent) for each low-stock product found"
}
]
}
License Key Inventory System
Problem Description
A software marketplace sells third-party applications where each sale requires issuing a unique license key to the customer. The keys are pre-purchased in bulk from vendors and need to be stored and dispensed one-by-one as orders come in. The ops team currently tracks these keys in spreadsheets and manually emails them — a process that takes hours and frequently causes customer complaints when they don't receive their key promptly.
The engineering team needs to automate this. The backend is Node.js with a Prisma-like db client. The digitalProductLicenses table already exists with columns: id, productId, licenseKey, status (one of 'available', 'sold', 'revoked'), orderId, soldAt.
A vendor has just delivered a CSV of 500 new keys for a popular product. The ops manager wants an admin API endpoint to import those keys and is worried about accidentally uploading the same batch twice.
Additionally, the ops team has been caught off-guard twice when a product ran out of keys mid-sale, causing failed orders and angry customers. They need a scheduled job that warns them early enough to re-order from the vendor before stock runs out.
Output Specification
Implement the following in a file api/admin/license-keys.js:
- An async function
importLicenseKeys(req, res)that handles POST requests with{ productId, keys: string[] }in the body. - An async function
assignLicenseKey(orderId, productId)that picks an available key and assigns it to an order.
Implement the inventory monitoring logic in jobs/licenseKeyStockCheck.js, exporting an async function checkLicenseKeyStockLevels(). Assume a notifyAdmin({ subject, message }) function is available.
Add comments in assignLicenseKey explaining the concurrency concern it addresses.
Input Files
The following files are provided as inputs. Extract them before beginning.
=============== FILE: inputs/sample-keys.csv =============== product_id,license_key prod_antivirus_pro,AAAA-BBBB-CCCC-1111 prod_antivirus_pro,DDDD-EEEE-FFFF-2222 prod_antivirus_pro,GGGG-HHHH-IIII-3333 prod_antivirus_pro,JJJJ-KKKK-LLLL-4444 prod_antivirus_pro,MMMM-NNNN-OOOO-5555
{
"context": "Tests whether the agent correctly wires post-purchase digital access provisioning to the payment webhook (not client-side), provisions access idempotently, snapshots entitlement fields at purchase time, and sends a dedicated delivery email separate from order confirmation.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Webhook trigger",
"max_score": 12,
"description": "provisionDigitalAccess is called inside a handler for 'payment_intent.succeeded' (or equivalent confirmed-payment event), NOT only triggered by a checkout-complete client redirect or order-creation event"
},
{
"name": "Upsert for idempotency",
"max_score": 12,
"description": "Uses an upsert (or insert-on-conflict-do-nothing) operation when creating the orderDigitalAccess record, rather than a plain create/insert that would fail or duplicate on re-delivery"
},
{
"name": "Empty update on conflict",
"max_score": 10,
"description": "The upsert's update clause is empty (no fields updated on conflict) — existing access records are never overwritten by a duplicate webhook"
},
{
"name": "maxDownloads copied at purchase",
"max_score": 10,
"description": "The orderDigitalAccess record is created with maxDownloads set to dp.downloadLimit (copied from the product at purchase time, not looked up dynamically later)"
},
{
"name": "expiresAt calculated at purchase",
"max_score": 10,
"description": "The orderDigitalAccess record is created with expiresAt calculated at provisioning time (Date.now() + accessDurationDays * ms), not deferred to download time"
},
{
"name": "Separate delivery email",
"max_score": 10,
"description": "Sends a digital delivery email using a template other than the standard order confirmation (e.g., 'digital-delivery' or similar dedicated template name)"
},
{
"name": "Delivery email template name",
"max_score": 8,
"description": "The email is sent with template: 'digital-delivery' (exact template identifier)"
},
{
"name": "Download links in email",
"max_score": 8,
"description": "The delivery email data includes download URLs or paths for file-type products (not just order ID)"
},
{
"name": "License key in email",
"max_score": 8,
"description": "For license_key type products, the delivery email data includes the license key itself"
},
{
"name": "Only digital items processed",
"max_score": 12,
"description": "Provisioning logic filters order items to only those with an associated digitalProduct — physical items are skipped"
}
]
}
Wire Up Post-Payment Digital Goods Delivery
Problem Description
A growing online marketplace has recently added digital products (e-books, software bundles) alongside their existing physical goods catalogue. The engineering team has wired up Stripe for payments, but the post-payment delivery of digital goods hasn't been implemented yet. Customers complete checkout and their payment goes through, but they never receive their download links or license keys — leading to a wave of support tickets.
The backend is Node.js with a Prisma ORM (db). The Stripe webhook infrastructure is already in place: the webhookRouter receives Stripe events and dispatches them to handler functions. The existing order structure looks like this:
// order → items → variant → digitalProduct (may be null for physical items)
// digitalProduct fields: id, downloadLimit (int|null), accessDurationDays (int|null), type ('file'|'license_key')The orderDigitalAccess table stores per-order entitlements. The digitalProductLicenses table holds license keys. An emailService.send({ to, template, data }) function is available for sending emails.
There is a known problem: the payment provider occasionally fires the same webhook event more than once. The team was burned by a previous bug where duplicate processing sent customers two copies of an order confirmation, so they are particularly sensitive to any double-processing issues.
A second concern from the product team: customers have previously complained about license keys appearing in the standard order confirmation email, which they then accidentally forwarded to colleagues. The team wants digital delivery handled through a different communication channel.
Output Specification
Implement the provisioning logic in lib/provisionDigitalAccess.js, exporting an async function provisionDigitalAccess(orderId).
Implement (or update) the Stripe webhook handler file webhooks/stripe.js to call provisionDigitalAccess at the correct point in the payment lifecycle. The file should export a handleStripeWebhook(event) function.
Implement the delivery email helper in lib/digitalDeliveryEmail.js, exporting sendDigitalDeliveryEmail(order, digitalItems).
Add comments in provisionDigitalAccess.js explaining how re-entrancy / duplicate events are handled.
{
"context": "Tests whether the agent correctly implements secure digital file delivery using the AWS SDK with short-lived presigned URLs, enforces access controls (expiry and download limits), atomically tracks downloads, and avoids exposing storage keys or proxying files through the server.",
"type": "weighted_checklist",
"checklist": [
{
"name": "AWS SDK client package",
"max_score": 8,
"description": "Imports S3Client and GetObjectCommand from '@aws-sdk/client-s3' (not from the older 'aws-sdk' package)"
},
{
"name": "Presigner package",
"max_score": 8,
"description": "Imports getSignedUrl from '@aws-sdk/s3-request-presigner'"
},
{
"name": "60-second TTL",
"max_score": 10,
"description": "Calls getSignedUrl with expiresIn: 60 (exactly 60 seconds, not a larger value)"
},
{
"name": "Content-Disposition header",
"max_score": 8,
"description": "Sets ResponseContentDisposition to 'attachment; filename=...' using the product's file name on the GetObjectCommand"
},
{
"name": "Content-Type header",
"max_score": 8,
"description": "Sets ResponseContentType using the product's mimeType on the GetObjectCommand"
},
{
"name": "Expiration check",
"max_score": 10,
"description": "Checks whether expiresAt has passed before proceeding; throws or returns an error specific to expired access (not a generic error)"
},
{
"name": "Download limit check",
"max_score": 10,
"description": "Checks whether downloadCount >= maxDownloads (when maxDownloads is not null) before proceeding; throws or returns an error specific to limit exceeded"
},
{
"name": "Atomic count increment",
"max_score": 12,
"description": "Uses an atomic increment operation (e.g., { increment: 1 } or SQL increment) rather than reading the count, adding 1, and writing it back"
},
{
"name": "No raw S3 key in response",
"max_score": 10,
"description": "Does NOT return or expose the fileStorageKey (S3 object key) in any API response body"
},
{
"name": "No server-side file proxy",
"max_score": 8,
"description": "Does NOT pipe, stream, or buffer the S3 file contents through the application server — returns only a URL to the client"
},
{
"name": "Dependencies listed",
"max_score": 8,
"description": "package.json includes '@aws-sdk/client-s3' and '@aws-sdk/s3-request-presigner' as dependencies"
}
]
}
Implement the Digital Download API Endpoint
Problem Description
An e-commerce platform sells digital goods (PDFs, software binaries, audio files). The product files are stored in a private cloud storage bucket. Currently there is no way for customers to actually retrieve their purchased files — the platform has a basic database schema and a stub API route, but the actual file delivery logic is missing.
The platform backend is Node.js. Files are stored in S3. The existing database (db) uses a Prisma-like API. The relevant tables are already set up:
orderDigitalAccess: tracks per-order download entitlements with fieldsorderId,digitalProductId,downloadCount,maxDownloads(null = unlimited),expiresAt(null = perpetual), and a composite unique keyorderId_digitalProductId.digitalProducts: metadata for each product with fieldsfileStorageKey,fileName,mimeType,downloadLimit,accessDurationDays.
The product manager has flagged several requirements: 1. Customers should not be able to share or reuse download links — links must expire quickly. 2. Some products have download limits (e.g., max 5 downloads per order). The system must enforce these. 3. Some products are only accessible for a limited time window (e.g., 1 year after purchase). The system must enforce these too. 4. Files must never be served directly through the application server.
Output Specification
Implement the file delivery logic in a file called lib/digitalDelivery.js. This file should export an async function generateDownloadUrl(orderId, digitalProductId) that enforces all access rules and returns a download URL.
Also implement the API route handler in api/orders/[orderId]/downloads/[digitalProductId].js that calls generateDownloadUrl and returns { downloadUrl } on success, or an appropriate error response.
Write a package.json listing the npm dependencies your implementation requires.
Include brief inline comments explaining the access-check sequence in digitalDelivery.js.
{
"name": "finsi/digital-products",
"version": "0.1.0",
"summary": "Manage downloadable goods — license keys, download limits, expiration, delivery",
"skills": {
"digital-products": {
"path": "SKILL.md"
}
}
}