Licences
Products can have a time-limited licence. When a customer purchases a product with a licence duration, a ProductLicence record is created that tracks the expiry date, renewal status, and reminders.
Setting Up a Licence
When creating or editing a product at /payments/products/create:
- In the Licence card, toggle "This product has a time-limited licence"
- Select a duration: 1 month, 3 months, 6 months, 1 year, or custom (any number of days)
- Optionally toggle "Allow customers to renew expired licences"
A product can have a licence without a downloadable file (e.g. software licence key, API access) or both a file and a licence.
How It Works
- Customer purchases the product
- A
ProductLicencerecord is created with the expiry date - 7 days before expiry — customer receives a renewal reminder email
- On expiry — customer receives an expiry notification email
- Both emails include a "Renew Now" button
Renewal Flow
- Customer clicks the renewal link in the email
- Redirected to Stripe (or PayPal) checkout for the same product amount
- After payment, a new licence is created with a fresh expiry date
- The old licence is marked as "renewed"
Already Renewed Protection
If a customer clicks a renewal link for a licence that was already renewed, they see a friendly "Already Renewed" message instead of being charged again.
Managing Licences
Go to Licences in the sidebar (under Money). The page shows:
- Summary cards — total, active, expiring (≤30 days), expired
- Sortable table — customer, product, issued date, expires date, days left, duration, status
- Status badges — Active (green), Expiring (yellow/orange), Expired (red), Renewed (blue)
- Send Reminder button — manually trigger a renewal email for any licence
- Filters — by status (all/active/expiring/expired/renewed), search by customer or product
- Dashboard-style pagination with page numbers
Licence vs Download
Licences and downloads are separate:
- Download — created when a product has a file attached (
IsDigitalDownload) - Licence — created when a product has a duration (
LicenceDurationDays) - A product can have both, one, or neither
Background Service
The LicenceRenewalService runs every hour:
- Sends pre-expiry reminders 7 days before (configurable via
Licence:ReminderDaysBefore) - Sends expiry notifications when the licence expires
- Both emails include a branded "Renew Now" button