Skip to content

Understanding Download Links

Learn how download links work, where customers access them, and how the system ensures secure file delivery.

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)

When customer purchases:

  1. Customer completes checkout → Shopify processes payment
  2. Payment confirmed → Shopify sends webhook to app
  3. App receives webhook → Creates purchase record
  4. Fraud check (if enabled) → Order approved/flagged
  5. Download link generated → Secure token created
  6. Email sent (if enabled) → Customer receives link
  7. Link active → Customer can download files

Timeline: Seconds from purchase to link generation


Typical download URL:

https://yourstore.myshopify.com/apps/alvadigitaldownloads/download?key=abc123xyz789def456ghi789

Components:

Domain:

https://yourstore.myshopify.com
Your Shopify store domain

App Path:

/apps/alvadigitaldownloads
App proxy route (public-facing)

Download Endpoint:

/download
Handles download requests

Security Token:

?key=abc123xyz789def456ghi789
32+ character unique identifier
Links to specific purchase record

Token properties:

Random Generation:

Generated using cryptographically secure random
Not based on order ID or predictable pattern
Cannot be guessed or enumerated

Example tokens (not related):

Order #1001: key=a7f3k9m2p5q8r1t4w6y9z2b5
Order #1002: key=x4n8j2h6g9f3d7c1b5a9k2m6
Order #1003: key=q9w2e5r8t1y4u7i0p3a6s9d2

No pattern: Impossible to predict next token


When customer clicks link:

  1. Token extractedabc123xyz789... from URL
  2. Database lookup → Find matching purchase record
  3. Validation checks:
    • ✅ Purchase exists
    • ✅ Token matches
    • ✅ Link not expired
    • ✅ Download limit not reached
    • ✅ IP allowed (if restricted)
    • ✅ Order approved (not rejected/flagged)
  4. All checks pass → Download starts
  5. Any check fails → Error message displayed

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 Shop

Email sent if:

  • Email notifications enabled in settings
  • Order not held for fraud review
  • OR order approved after fraud review

Immediate access after purchase:

  1. Customer completes checkout
  2. Redirected to Thank You page
  3. Extension shows download button

Shows:

  • Order confirmation
  • Download button
  • Expiry information
  • Support contact

Benefit: Instant access without waiting for email


For logged-in customers:

  1. Customer logs into Shopify account
  2. Goes to “My Account” → “Orders”
  3. Clicks on order
  4. See digital downloads section

Shows:

  • All purchased digital products
  • Download buttons
  • Expiry status
  • Download history

Benefit: Access anytime, even if email lost


From order confirmation email:

  1. Shopify sends order confirmation
  2. Email contains “View Order” link
  3. Customer clicks link → Order status page
  4. Digital download section appears (if app extension enabled)

Benefit: Alternative access method if download email not received


When customer contacts support:

Merchant can:

  1. Find order in app
  2. Copy download link
  3. 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

Status: Active Customer sees: Download button works System state: All validation checks pass

Example:

Purchase date: January 1
Current date: January 15
Expiry: 60 days
Status: Active (45 days remaining)

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!

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 with
your order number: #1045

What customer should do:

  • Contact support
  • Request link renewal

What merchant can do:

  • Verify legitimate purchase
  • Generate new link manually
  • Send to customer

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.com
with order number: #1045

What merchant can do:

  • Verify reason (legitimate vs. abuse)
  • Reset download counter if appropriate
  • Explain policy

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.com
Order: #1045

Single file orders:

Customer clicks download button
→ File downloads directly to device

Multiple files orders:

Customer clicks download button
→ Options:
A) Download all as ZIP (automatic)
B) Download individual files (if enabled)

Automatic ZIP creation:

When order contains multiple files:

  1. Customer clicks “Download All”
  2. System checks for cached ZIP
  3. If cached → Download immediately
  4. If not cached → Generate ZIP (background)
  5. Customer sees progress indicator
  6. ZIP ready → Download starts

ZIP naming:

Format: order-{order_number}-files.zip
Example: order-1045-files.zip

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


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)

Streaming delivery:

Customer clicks download
→ App validates request
→ Generates presigned URL (from Cloudflare R2)
→ Redirects to CDN
→ CDN streams file to customer

Benefits:

  • Fast delivery (global CDN)
  • Scalable (handles traffic spikes)
  • Secure (time-limited CDN URLs)
  • Resumable downloads (if browser supports)

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)

How it works:

  1. Customer clicks download link
  2. App generates presigned URL:
    https://cdn.r2.cloudflarestorage.com/file.pdf?signature=xyz&expires=timestamp
  3. URL valid for 60 seconds
  4. Customer redirected to presigned URL
  5. CDN validates signature & expiry
  6. File streams to customer

Security:

  • URL expires after 60 seconds
  • Cannot be reused after expiry
  • Signature prevents tampering
  • No direct bucket access

For merchants:

  1. Go to Orders → Select order
  2. View download link details:
    • Link URL
    • Creation date
    • Expiry date
    • Download count
    • Last download date
    • Customer IP history

To send to customer:

  1. Find order in app
  2. Click Copy Download Link button
  3. Link copied to clipboard
  4. Paste in email/chat to customer

When customer needs new link:

  1. Find order
  2. Click Generate New Link button
  3. Confirmation dialog
  4. New link created (old link deactivated)
  5. Send new link to customer

Note: Old link stops working when new link generated


When customer hits limit:

  1. Find order
  2. Click Reset Download Count button
  3. Counter resets to 0
  4. Customer can download again
  5. Document reason in order notes

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:

  1. Ask customer to check spam/junk folder
  2. Verify customer email correct
  3. Check Email Logs in app
  4. Manually send link via support

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

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

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)

Monthly testing:

  • Create test order
  • Receive download email
  • Click link
  • Verify file downloads
  • Test on different devices/browsers

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

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.

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