Documentation
Shop
Configure the first-party image-rights shop, Stripe Checkout, webhook events, pricing, and fulfillment behavior.
SHOP.mdThe DesertCMS shop is a first-party module served from the main site:
https://example.com/shop
It uses the main deployment's config, SQLite database, uploaded media records, and public photo derivatives. It should not be configured as a contributor subdomain.
Enable The Module
In Admin Settings > Modules, enable Shop. Then open Admin Settings > Modules > Shop.
The config defaults for a standard install are:
module_shop_enabled = 1
shop_enabled = 1
shop_domain =
shop_url =
shop_require_purchase_token = 1
stripe_secret_key =
stripe_webhook_secret =
Leave shop_domain and shop_url blank unless maintaining an older dedicated-host deployment. Blank values make shop links resolve to /shop on the main site_url.
Stripe Keys
Set the Stripe secret key and webhook secret in /etc/desertcms.conf or in Admin Settings > Modules > Shop:
stripe_secret_key = sk_live_...
stripe_webhook_secret = whsec_...
Use Stripe test keys only on staging. Live shops should use live keys and a live webhook endpoint.
Webhook Endpoint
Configure Stripe to send events to:
https://example.com/shop/stripe/webhook
Select these events:
checkout.session.completed
checkout.session.async_payment_succeeded
checkout.session.async_payment_failed
checkout.session.expired
DesertCMS verifies the Stripe signature before updating orders. Replayed webhook event ids are ignored after the first successful record.
Pricing Photographs
Upload photographs through Admin Media first. The shop settings page lists media with owner/uploader context so the admin can see which main-site or contributor-site owner is tied to each photograph.
Each listing supports:
- personal use price
- commercial use price
- full-rights price
At least one enabled price must be greater than zero before a listing can be active.
Fulfillment Behavior
Checkout creates a pending order before redirecting the customer to Stripe Checkout. Stripe webhooks mark the order paid, canceled, or failed.
When a full-rights order is paid, DesertCMS records the full-rights sale timestamp, disables every rights option for that listing, and removes the photograph from the public catalog.
Original files remain private. The shop uses public display derivatives for listing images and Stripe product images.
Operations Checklist
- Confirm
/shoploads from the main domain. - Confirm
/shop/stripe/webhookis configured in Stripe. - Confirm
stripe_secret_keystarts withsk_live_for production. - Confirm
stripe_webhook_secretstarts withwhsec_. - Confirm media ownership looks correct before pricing contributor photographs.
- Run a test checkout in Stripe test mode before switching to live keys.