What you will build
- A digital variant — one whose delivery profile requires no shipping address, so a fully digital cart completes checkout without a delivery step.
- A downloadable file on it — uploaded to private storage and attached as a digital asset.
- Automatic delivery — a download link granted on order placement, and an email that sends it.
- Mixed carts — physical and digital items in one order, handled without extra work.
1. Make the product digital
A variant is digital when its delivery profile is a digital one. A store ships with a built-in Digital delivery profile; assign it to the product and the product’s variants stop asking for a shipping address.A product’s delivery profile is auto-assigned when it is created — from its product type’s template, or the store default. You only set it explicitly to change it. Selling from the dashboard, this is the Shipping profile field on the product page.
2. Attach the file
Upload the file to private storage and attach it to the variant as a digital asset. Private storage matters: a digital file is only ever served through a short-lived signed link, so the Admin API refuses a blob that landed on the public bucket.Admin SDK
authorized_clicks and authorized_days off to inherit the store’s download limits, or set them per file to mix evergreen downloads with time-limited ones. See the allowance for how the limits resolve.
On a marketplace
A seller attaches files to their own products the same way, from the Digital files card on the product page in their seller panel, or through the Seller API. They can upload, replace and delete files and set per-file download limits. A product belonging to another seller answers404.
Sellers upload files only. A custom digital asset provider is your own integration, so sellers cannot pick one. A file you attached with a provider still appears on the seller’s product, without its provider settings, and the seller cannot replace it.
Seller uploads are off until you turn them on, under Settings → Marketplace → Seller files, because a file a buyer downloads under your name is one you vouch for. Three settings shape them:
- Let sellers upload digital files (
seller_digital_assets_enabled). Off, the seller panel shows the files you attached and nothing else. - Accepted file types for sellers (
seller_digital_asset_content_types). Checked against the file’s own signature where it has one, not its name, so a renamed executable does not pass as a PDF; a format with no signature, such as plain text, is taken at the type the upload declared. An entry names one type, or a whole family with*as the subtype (audio/*). The default covers documents, ebooks, archives, audio, video, images and plain text; addapplication/octet-streamonly if your sellers trade in a format nothing recognises, since it admits anything unknown. Your own uploads are never restricted. - Review file changes on products already on sale (
review_seller_digital_asset_changes, on by default). A seller adding or replacing a file on an approved product sends it back to review and off sale until you approve it again; the new submission says why. Changing download limits does not. The setting does nothing when seller products publish automatically.
- Seller SDK
- cURL
3. Let the order deliver itself
There is no step three to configure. When the order is placed, the digital fulfillment provider runs automatically — it needs no address and no manual dispatch — and grants the buyer one download link per file, per purchased unit.Spree::DigitalAssetMailer then emails the links as a message of its own, so it survives a replaced order-confirmation template and can be re-sent from the order page.
The customer downloads by following the link’s token; each download is counted against the allowance and publishes a digital_link.downloaded event. If they exhaust their downloads or you replace the file mid-sale, an admin restores access by resetting the link from the order page.
To deliver something other than an uploaded file — a license key minted on demand, an entitlement from your own system — the delivery step is pluggable. See Build a Custom Digital Asset Provider.
4. Mixed carts work on their own
A cart with both physical and digital items needs nothing special. Spree splits the order into separate fulfillments per delivery profile, so the physical items collect an address and ship while the digital items skip straight to granting links. The delivery step only appears when at least one item actually needs shipping; an all-digital cart never sees it.Related documentation
- Products → Digital products — the concepts: assets, links, allowances, providers
- Build a Custom Digital Asset Provider — deliver a key or external file instead of an upload
- Fulfillments — delivery profiles, providers, and how orders are fulfilled

