Skip to main content
Geneva, Switzerland Call our support
English

Digital downloads and orders

Digital delivery, customer access, admin orders, and refunds.

Digital product fields

Field keyTypePurpose
digital_filenumber (media ID)Secure file download after purchase
digital_urlurlExternal URL redirect after purchase
digital_entry_slugtextPublished entry slug unlocked after purchase
digital_labeltextLink label (default Download)

Priority when multiple are set: fileurlentry slug.

Grants and access

When an order is marked paid, DigitalFulfillmentService creates grants. Customers access downloads via:

  • Email — Links in order confirmation (when emails enabled)
  • Account/commerce/orders/{order_number} (requires sign-in)
  • Token URL/commerce/access/{64-char-token} works from email without sign-in

Delivery types

TypeBehaviour
FileStreams media file from disk
URLRedirects to configured URL
EntryRedirects to /{product-type}/{slug}

Requires migration 054 (cms_commerce_digital_grants).

Order history

  • Logged-in customers/commerce/orders lists orders by account and email
  • Guests/commerce/orders/lookup with order number + email

Orders link to PHPAuth accounts via customer_user_id when buyer logged in at checkout, or automatically when Stripe email matches existing account.

Fulfillment on payment

  1. Inventory — Decrement stock_qty when tracking enabled
  2. Digital grants — Issue download tokens
  3. Emails — Customer confirmation with totals and ship-to; optional admin notification
  4. Coupons — Increment use count once per order

Admin order management

  • Orders list — Filters by status, email, order #, date range
  • Order detail — Line items, payment status, shipping address
  • Refund order — Stripe Refund API; marks order refunded; restores inventory; revokes digital grants
  • Digital grant actions — Resend delivery email, Revoke, Regenerate token
  • Export CSV — Respects list filters for accounting

Troubleshooting

  • No download email — Emails disabled in settings or mail() misconfigured on server.
  • Token expired or revoked — Regenerate from admin order detail after refund check.
  • File download 404 — Media file missing from public/uploads/; restore from backup.