> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salesive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Digital stores

> Sell PDFs, books and other downloads with Salesive: one-time purchases, 30-day passes, an all-access pass, a buyer library and protected downloads.

A **digital store** is the fourth Salesive [store type](/index#store-types). It sells files instead of goods: PDFs, ebooks and archives. There is no stock, no variants and no shipping. A buyer pays, receives an email with their download link, and finds everything again in their **library** on the storefront.

<Note>
  Digital stores are available to all stores. Choose **Digital store** when you create your store ("Sell PDFs, books and downloads. Buyers get their file by email"). Digital stores use the same `*.salesive.shop` and `*.salesive.store` addresses as e-commerce stores.
</Note>

## What you can sell

| | |
| - | - |
| **Formats** | `pdf`, `epub`, `mobi` and `zip`. Salesive checks the first bytes of the file, so a renamed `.exe` or `.html` is refused. |
| **Size** | Up to **90 MB** per file. For a larger book, compress it or split it into parts. |
| **Covers** | Pictures buyers see in your store. The dashboard takes up to 5 per product (the API accepts up to 10). The first is the main cover. |
| **Details** | Name, author, description and an optional [category](#categories). |

Every file is stored **privately**. It never gets a public link and never appears in your Media library. Buyers can only reach it through a link that Salesive checks on every request.

Your storage allowance on a digital store starts at 2 GB by default.

## How buyers pay

Each product has an **access** setting that decides how it can be bought. Prices are in your store currency, for example `4500` for ₦4,500.

| Access | What the buyer can choose | Price you set |
| - | - | - |
| `purchase` | A **one-time purchase**: permanent access, never expires. The buyer can download the file. | One-time price |
| `subscription` | A **30-day pass** for this product. The buyer **reads it online** and cannot download it. | Price for 30 days |
| `both` | Either of the two. | Both prices |

<Warning>
  A 30-day pass and the all-access pass are **read-only**. If renters could download the file, one month's rent would buy a permanent copy. Because reading happens in the browser, a title sold this way (`subscription`, `both`, or included in the all-access pass) must be a **PDF**. Only a title sold as a one-time purchase can be an EPUB, MOBI or ZIP.
</Warning>

A price you need must be above 0, and the price shown on catalog cards is the cheapest way in. For example a cookbook with `access: "both"`, a one-time price of ₦4,500 and a 30-day price of ₦1,500 shows as "from ₦1,500".

### The all-access pass

The **all-access pass** is one store-wide price for 30 days of every product you marked **Include in the all-access pass**, for example ₦7,500. It is checked live: a book you add to the pass tomorrow is available to existing pass holders tomorrow, and a book you remove stops being downloadable with the pass straight away. The period is fixed at 30 days, and the pass needs a price above 0 before you can switch it on.

### Rules at checkout

* A cart holds only digital lines. Mixing digital and other kinds of items is refused with the code `mixed_cart`.
* Every digital line has a quantity of 1, and the price is always recomputed from your catalog, never taken from the buyer's device.
* Choosing the other way to buy a book that is already in the cart replaces the line.
* A buyer cannot buy a permanent copy twice. Buying a pass again is fine: it **extends** the same access by 30 days, on top of whatever is left.
* Buyers must be signed in with a real account, because access is delivered to their email. Guest sessions cannot check out.
* Once payment is confirmed the order becomes `completed` straight away (there is nothing to ship) and access is granted.
* If you cancel or refund an order, the access it gave is taken back. A pass that other purchases also feed only loses the days that order added.

## How buyers get their files

1. **Email.** When a payment is confirmed the buyer receives an email. A title bought outright carries a download link. A 30-day pass or the all-access pass links to the library, where it is read online.
2. **Library.** The storefront has a [`/library`](/routing#account-and-orders) page where a signed-in buyer sees every title they hold, how many days are left on a pass, a **Read** button, a **Download** button for titles bought outright, a Renew button and the auto-renew switch. Expired titles stay listed so they can be renewed.

### Reading a rental online

A 30-day pass or the all-access pass opens in a reader inside the library page. The pages are drawn on screen, so there is no file link, no save or print button and nothing to share. Every page carries a small footer with the reader's email address, the store and a short access id (PDFs up to 30 MB). When the access ends, the reader stops opening the book.

<Note>
  Anything shown in a browser can still be copied by a determined person, for example with screenshots. The reader removes the easy ways to keep a copy, the footer makes a leaked copy traceable, and access stops when the pass does. A buyer who wants to keep a book should buy it outright.
</Note>

A renter can open a title **40 times per day**. A link to download a rented title (for example one in an email sent before this rule) answers `403` with `read_only` and points to the library.

### Download rules

These rules apply to titles bought outright.

| Rule | Value |
| - | - |
| Downloads | **5 per day** for each title, per access, counted by UTC day. After that the buyer sees a "Daily download limit reached" message and can try again the next day. |
| Watermark | PDFs up to **30 MB** are stamped on every page with a small footer naming the buyer's email address, the store and a short access id, so a leaked copy can be traced. Larger PDFs and other formats are delivered without a stamp. |
| Storage | Files live in a private bucket. A download redirects to a link that lasts 5 minutes. |
| Email scanners | Mail clients and link scanners that probe a link with `HEAD` do not use up a download. |
| Ended access | A link for access that has ended says so and points the buyer to the library to renew. Revoked access stops working at once. |
| Passes | A 30-day pass or the all-access pass cannot download: the link answers `403` `read_only`. |

Developers can see the exact responses in [Download a purchased file](/api-reference/endpoint/downloads/download).

## Auto-renew

A buyer can choose **Renew automatically** when buying a 30-day pass (a product pass or the all-access pass). It works like this:

* The card is saved only if the buyer pays by **card through Paystack** and the card can be charged again. Other payment methods complete the purchase but do not enable auto-renew.
* A daily job (08:00, Lagos time) looks at passes that end within **3 days** and charges the saved card at **today's price**, through an ordinary order. When the payment is confirmed the pass is extended by 30 days.
* Buyers are emailed shortly before a pass ends (when auto-renew is on, a renewal notice with the date and amount instead), when it has ended, and whenever a renewal fails.
* After **3 failed charges** auto-renew switches itself off.
* From the library the buyer can turn it **off** at any time, which deletes the saved card. They can only turn it back **on** while a card is still saved, otherwise they tick "Renew automatically" the next time they buy.

## Managing your store

In the dashboard a digital store shows these pages:

| Page | Where | What it does |
| - | - | - |
| **Digital** | Sidebar, `/digital` | Your products with their sales and active buyers, plus the buttons below. Add a product, edit it, list or unlist it, feature it, delete it (one or many). |
| **Media** | Sidebar, `/media` | The shared image library for covers. Private book files are not shown here. |
| **Categories** | Digital page | The same categories list the other store types use. A category is optional on a digital product. |
| **Buyer Access** | Digital page | Everyone who holds access, filtered by product, status (active, expired, revoked) or email. |
| **All-access Pass** | Digital page | Turn the pass on, set its name, description and price for 30 days. |

There is no Point of Sale on a digital store.

### Adding a product

On **Add Product**, enter the name, author and description, add covers, choose how buyers get it and set the prices, then upload the file. A product **without a file is saved unlisted** and cannot be listed until a file is attached, so you never sell a book buyers cannot download. Replacing a file deletes the old one from storage.

### Buyer Access

From **Buyer Access** you can manage who can download what, without a payment:

* **Grant access** to a product or to the all-access pass, either permanent (`lifetime`) or a `pass` of any number of days (30 by default, up to 3650). The buyer needs an existing shopper account in your store: if the email has never signed in, you will be told they need to sign in to your store once first. The all-access pass can only be granted as a pass.
* **Extend** a pass by a number of days. Permanent access cannot be extended, and neither can revoked access (grant it again instead).
* **Revoke** access, with an optional reason. Downloads stop immediately. Revoking twice keeps the first reason.

If a buyer paid but their access could not be granted (rare, for example if a service was down at that moment), the page lists those orders and you can retry them.

## Free preview

Sellers can let shoppers read the first pages of a PDF book before they buy.

* It is **on by default** for PDF products, showing **3 pages**. You can switch it off per product or choose 1 to 20 pages.
* A preview **never shows more than half of the book**, and always at least one page. A 5-page book shows 2 pages, and a one-page PDF has no preview.
* The preview is a new PDF made from the chosen pages only, so the rest of the book is not hidden inside the file. Each page carries a footer such as `Preview: first 3 of 120 pages`.
* Previews work for **PDFs up to 60 MB**. Epub, mobi and zip products have none.
* Storefront items report `preview: { available, pages }`, and the preview itself is a public PDF at [`GET /digital-products/{id}/preview`](/api-reference/endpoint/digital/get-preview). Apps read and set it with the `preview` field of a [digital product](/apps-api/endpoint/digital-products/create-digital-product).

## For developers and theme authors

### Theme support

Only Salesive's **default theme** supports digital stores today: a catalog as the home page, product pages, cart, checkout, orders and the `/library`. A theme can declare `"digital"` in [`shopTypes`](/development#declare-supported-store-types), but a digital store on any other theme has no digital pages.

`/library` is an [automatic route](/routing#account-and-orders): the platform serves it with the default theme.

### Store API

Digital stores use the normal catalog, cart and order endpoints, which return `catalogType: "digital"` and items with `itemType: "digital"`:

| Task | Endpoint |
| - | - |
| List and read items | [`GET /products`](/api-reference/endpoint/products/get-all) and [`GET /products/{id}`](/api-reference/endpoint/products/get-by-id) |
| See the all-access pass | [`GET /digital/pass`](/api-reference/endpoint/digital/get-pass) |
| Add a book or the pass to the cart | [`POST /cart`](/api-reference/endpoint/cart/add-item) with `digitalId` and `mode`, or `allAccess` |
| Check out | [`POST /orders/from-cart`](/api-reference/endpoint/orders/create-from-cart) |
| Show the buyer's library | [`GET /library`](/api-reference/endpoint/library/get-library) |
| Switch auto-renew | [`POST /library/{entitlementId}/auto-renew`](/api-reference/endpoint/library/set-auto-renew) |
| Download | [`GET /downloads/{token}`](/api-reference/endpoint/downloads/download) and [`GET /downloads/{token}/{productId}`](/api-reference/endpoint/downloads/download-all-access) |

Renewing a pass is buying it again: add the same item to the cart with `mode: "pass"` (or `allAccess: true`) and check out.

### Apps API

Third-party apps can manage a digital store with the **same scopes as the rest of the catalog**: `READ_INVENTORY` for reads and `WRITE_INVENTORY` for writes. There are no new scopes. The endpoints are under [Digital products](/apps-api/endpoint/digital-products/list-digital-products) and [Digital access](/apps-api/endpoint/digital-access/list-digital-access).

Two limits to plan for:

* An app **cannot upload the book file**. Files are uploaded to private storage with a store file token that app tokens cannot obtain, so an app can prepare listings but the merchant attaches the file from the dashboard.
* An app also cannot read the book file. The dashboard-only `GET /digital-products/{id}/file-url`, which returns a 5 minute link to the private file, refuses app and MCP tokens with `403`.
* `READ_INVENTORY` also exposes buyers' email addresses through [List buyer access](/apps-api/endpoint/digital-access/list-digital-access).

[Webhooks](/apps-api/webhooks) fire for `digital-products` and `digital-access` changes.

### Form builder

A [product field](/form-builder/field-types#catalogue-by-store-type) follows the store type, so on a digital store it lists digital products. Pin it with `"catalog": "digital"`.

## Switching store type

You cannot change a digital store into another type yourself, or the other way round. A Salesive administrator can switch a store's type on your behalf. Nothing is deleted: each store type keeps its own catalog (products, menu items, services, digital products), so switching back shows the old items again. A digital store with buyers who still hold access needs an extra confirmation from the administrator.

## Limits at a glance

| | |
| - | - |
| File formats | `pdf`, `epub`, `mobi`, `zip` |
| Largest upload | 90 MB |
| Downloads | 5 per day for each title and access (titles bought outright) |
| Watermarked PDFs | Up to 30 MB |
| Pass length | 30 days |
| Download link lifetime | 5 minutes for the file link behind the redirect |
| Bulk delete | Up to 50 products |
| Grant length | 1 to 3650 days |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.