Understanding Download Links
Learn how download links work, where customers access them, and how the system ensures secure file delivery.
Download Link Overview
Section titled “Download Link Overview”Download links are secure, unique URLs that grant customers access to their purchased digital files.
Key characteristics:
- ✅ Unique per order
- ✅ Secure (unpredictable token)
- ✅ Time-limited (configurable expiry)
- ✅ Trackable (activity logging)
- ✅ Protected (download limits)
How Download Links Are Generated
Section titled “How Download Links Are Generated”Automatic Generation
Section titled “Automatic Generation”When customer purchases:
- Customer completes checkout → Shopify processes payment
- Payment confirmed → Shopify sends webhook to app
- App receives webhook → Creates purchase record
- Fraud check (if enabled) → Order approved/flagged
- Download link generated → Secure token created
- Email sent (if enabled) → Customer receives link
- Link active → Customer can download files
Timeline: Seconds from purchase to link generation
Link Structure
Section titled “Link Structure”Typical download URL:
https://yourstore.myshopify.com/apps/alvadigitaldownloads/download?key=abc123xyz789def456ghi789Components:
Domain:
https://yourstore.myshopify.comYour Shopify store domainApp Path:
/apps/alvadigitaldownloadsApp proxy route (public-facing)Download Endpoint:
/downloadHandles download requestsSecurity Token:
?key=abc123xyz789def456ghi78932+ character unique identifierLinks to specific purchase recordToken Security
Section titled “Token Security”Token properties:
Random Generation:
Generated using cryptographically secure randomNot based on order ID or predictable patternCannot be guessed or enumeratedExample tokens (not related):
Order #1001: key=a7f3k9m2p5q8r1t4w6y9z2b5Order #1002: key=x4n8j2h6g9f3d7c1b5a9k2m6Order #1003: key=q9w2e5r8t1y4u7i0p3a6s9d2No pattern: Impossible to predict next token
Security Validation
Section titled “Security Validation”When customer clicks link:
- Token extracted →
abc123xyz789...from URL - Database lookup → Find matching purchase record
- Validation checks:
- ✅ Purchase exists
- ✅ Token matches
- ✅ Link not expired
- ✅ Download limit not reached
- ✅ IP allowed (if restricted)
- ✅ Order approved (not rejected/flagged)
- All checks pass → Download starts
- Any check fails → Error message displayed
Where Customers Access Links
Section titled “Where Customers Access Links”1. Download Email
Section titled “1. Download Email”Primary method:
After purchase (and fraud approval if applicable), customer receives email:
Subject: Your Files Are Ready!
Hi John,
Thank you for your purchase!
[Download Files] ← Button links to download page
This link expires in 60 days.
Best,Your ShopEmail sent if:
- Email notifications enabled in settings
- Order not held for fraud review
- OR order approved after fraud review
2. Thank You Page (Checkout Extension)
Section titled “2. Thank You Page (Checkout Extension)”Immediate access after purchase:
- Customer completes checkout
- Redirected to Thank You page
- Extension shows download button
Shows:
- Order confirmation
- Download button
- Expiry information
- Support contact
Benefit: Instant access without waiting for email
3. Customer Account Page
Section titled “3. Customer Account Page”For logged-in customers:
- Customer logs into Shopify account
- Goes to “My Account” → “Orders”
- Clicks on order
- See digital downloads section
Shows:
- All purchased digital products
- Download buttons
- Expiry status
- Download history
Benefit: Access anytime, even if email lost
4. Order Status Page
Section titled “4. Order Status Page”From order confirmation email:
- Shopify sends order confirmation
- Email contains “View Order” link
- Customer clicks link → Order status page
- Digital download section appears (if app extension enabled)
Benefit: Alternative access method if download email not received
5. Manual Link Sharing (Support)
Section titled “5. Manual Link Sharing (Support)”When customer contacts support:
Merchant can:
- Find order in app
- Copy download link
- Send directly to customer via email/chat
Use for:
- Customer didn’t receive email
- Email in spam
- Download link expired (generate new)
- Support ticket resolution
Download Link Lifecycle
Section titled “Download Link Lifecycle”Active Link
Section titled “Active Link”Status: Active Customer sees: Download button works System state: All validation checks pass
Example:
Purchase date: January 1Current date: January 15Expiry: 60 daysStatus: Active (45 days remaining)Expiring Soon Link
Section titled “Expiring Soon Link”Status: Active but expiring soon Customer sees: Warning message + working link System state: < 7 days until expiry
Warning message:
⚠️ Notice: This download link expires in 3 days.Please download your files soon!Expired Link
Section titled “Expired Link”Status: Expired Customer sees: Error message System state: Expiry date passed
Error message:
❌ Download Link Expired
This download link expired on March 1, 2024.
Need access? Contact support@yourshop.com withyour order number: #1045What customer should do:
- Contact support
- Request link renewal
What merchant can do:
- Verify legitimate purchase
- Generate new link manually
- Send to customer
Limit Reached Link
Section titled “Limit Reached Link”Status: Active but limit reached Customer sees: Limit error message System state: Download count exceeded
Error message:
❌ Download Limit Reached
You've reached the maximum downloads (5) for this order.
Need another download? Contact support@yourshop.comwith order number: #1045What merchant can do:
- Verify reason (legitimate vs. abuse)
- Reset download counter if appropriate
- Explain policy
Rejected Order Link
Section titled “Rejected Order Link”Status: Inactive Customer sees: Order rejected message System state: Order rejected due to fraud
Error message:
❌ Order Not Approved
This order could not be approved for security reasons.
Questions? Contact support@yourshop.comOrder: #1045Link Behavior & Features
Section titled “Link Behavior & Features”Single vs. Multiple Files
Section titled “Single vs. Multiple Files”Single file orders:
Customer clicks download button→ File downloads directly to deviceMultiple files orders:
Customer clicks download button→ Options: A) Download all as ZIP (automatic) B) Download individual files (if enabled)ZIP Download
Section titled “ZIP Download”Automatic ZIP creation:
When order contains multiple files:
- Customer clicks “Download All”
- System checks for cached ZIP
- If cached → Download immediately
- If not cached → Generate ZIP (background)
- Customer sees progress indicator
- ZIP ready → Download starts
ZIP naming:
Format: order-{order_number}-files.zipExample: order-1045-files.zipIndividual File Downloads
Section titled “Individual File Downloads”If enabled:
Customer can download files individually:
Your Files:□ ebook-chapter-1.pdf [Download]□ ebook-chapter-2.pdf [Download]□ ebook-chapter-3.pdf [Download]□ bonus-template.zip [Download]
[Download All as ZIP]Benefit: Customer can selectively download only needed files
Download counter: Each file download counts toward limit
Download Progress
Section titled “Download Progress”During download:
Browser shows:
- File name
- File size
- Download progress bar
- Speed
- Time remaining
Large files:
- May take minutes to download
- Progress tracked
- Can be paused/resumed (browser dependent)
Technical Details
Section titled “Technical Details”File Delivery Method
Section titled “File Delivery Method”Streaming delivery:
Customer clicks download→ App validates request→ Generates presigned URL (from Cloudflare R2)→ Redirects to CDN→ CDN streams file to customerBenefits:
- Fast delivery (global CDN)
- Scalable (handles traffic spikes)
- Secure (time-limited CDN URLs)
- Resumable downloads (if browser supports)
CDN Integration
Section titled “CDN Integration”File serving:
Files stored: Cloudflare R2 (cloud storage)Files delivered: Cloudflare CDN (300+ global locations)Security: Presigned URLs (60-second validity)Customer experience:
- Fast download from nearest CDN location
- High reliability (99.9%+ uptime)
- No direct storage access (security)
Presigned URL
Section titled “Presigned URL”How it works:
- Customer clicks download link
- App generates presigned URL:
https://cdn.r2.cloudflarestorage.com/file.pdf?signature=xyz&expires=timestamp
- URL valid for 60 seconds
- Customer redirected to presigned URL
- CDN validates signature & expiry
- File streams to customer
Security:
- URL expires after 60 seconds
- Cannot be reused after expiry
- Signature prevents tampering
- No direct bucket access
Download Link Management
Section titled “Download Link Management”Viewing Active Links
Section titled “Viewing Active Links”For merchants:
- Go to Orders → Select order
- View download link details:
- Link URL
- Creation date
- Expiry date
- Download count
- Last download date
- Customer IP history
Copying Download Links
Section titled “Copying Download Links”To send to customer:
- Find order in app
- Click Copy Download Link button
- Link copied to clipboard
- Paste in email/chat to customer
Regenerating Expired Links
Section titled “Regenerating Expired Links”When customer needs new link:
- Find order
- Click Generate New Link button
- Confirmation dialog
- New link created (old link deactivated)
- Send new link to customer
Note: Old link stops working when new link generated
Resetting Download Counter
Section titled “Resetting Download Counter”When customer hits limit:
- Find order
- Click Reset Download Count button
- Counter resets to 0
- Customer can download again
- Document reason in order notes
Troubleshooting Download Links
Section titled “Troubleshooting Download Links”Issue: Customer Can’t Find Download Link
Section titled “Issue: Customer Can’t Find Download Link”Common causes:
- Email in spam folder
- Incorrect email address
- Email not sent (fraud hold or email disabled)
Solution:
- Ask customer to check spam/junk folder
- Verify customer email correct
- Check Email Logs in app
- Manually send link via support
Issue: Link Not Working
Section titled “Issue: Link Not Working”Error types:
“Link Expired”:
- Link past expiry date
- Generate new link
“Download Limit Reached”:
- Customer exceeded limit
- Verify reason, reset counter if legitimate
“Invalid Link”:
- Typo in URL
- Link corrupted in email
- Send fresh link
“Order Under Review”:
- Fraud check pending
- Approve order in Flagged Orders page
Issue: Slow Download Speed
Section titled “Issue: Slow Download Speed”Causes:
- Customer’s internet connection
- CDN routing issue (rare)
- Large file size
- Server congestion (very rare with CDN)
Solutions:
- Confirm customer internet speed adequate
- Try different network/device
- Download during off-peak hours
- Break large files into smaller parts
Issue: Download Starts Then Fails
Section titled “Issue: Download Starts Then Fails”Causes:
- Connection interrupted
- Insufficient disk space
- Browser issue
- File corruption (rare)
Solutions:
- Retry download
- Use different browser
- Clear browser cache
- Ensure sufficient disk space
- Try download manager (for very large files)
Best Practices
Section titled “Best Practices”1. Test Download Links Regularly
Section titled “1. Test Download Links Regularly”Monthly testing:
- Create test order
- Receive download email
- Click link
- Verify file downloads
- Test on different devices/browsers
2. Monitor Link Health
Section titled “2. Monitor Link Health”Weekly checks:
- Review download success rate
- Check error logs
- Identify common issues
- Address problems proactively
Metrics to track:
- Successful downloads vs. failed attempts
- Most common error messages
- Average download speed
- Link expiry complaints
3. Educate Customers
Section titled “3. Educate Customers”In email/FAQ:
- How to find download link
- Link expiry information
- Download instructions
- Troubleshooting common issues
- Support contact
Example FAQ:
Q: Where is my download link?A: Check your email inbox (and spam folder) for an email from us with subject "Your Files Are Ready!"
Q: How long is my link valid?A: Download links are valid for 60 days from purchase.
Q: What if my link expired?A: Contact support@shop.com with your order number for a new link.4. Document Support Procedures
Section titled “4. Document Support Procedures”For support team:
- How to find customer’s order
- How to copy/regenerate links
- When to reset download counter
- How to verify legitimate requests
- Response templates
Next Steps
Section titled “Next Steps”- Download Security Settings - Configure security
- Tracking Downloads - Monitor activity
- Customer Download Experience - Optimize UX
- Troubleshooting Download Issues - Solve problems