Overview
Commerce keeps auto-renew turned OFF at the registrar for all managed domains. This means the registrar will never silently charge for a renewal — every renewal goes through a Commerce invoice that the client pays explicitly.
This approach gives Commerce full control over billing, renewal timing, and expiry notifications.
Renewal Process
Step 1 — Renewal Invoice Generation
The commerce:check-expiring-domains command runs daily at 04:00.
It finds all domains where:
status = activeauto_renew = trueexpiry_dateis within 30 days- No existing unpaid renewal invoice exists for this domain
A renewal invoice is generated for each matching domain and sent to the client by email.
Step 2 — Client Pays the Invoice
The renewal invoice email contains:
- Domain name
- Current expiry date
- Renewal price (from
domain_tlds.renew_price) - Payment link
Step 3 — RenewDomainJob
When the invoice is paid, InvoiceService::markPaid() dispatches RenewDomainJob.
The job:
- Calls
renew(domain, years)on the active registrar module. - On success: updates
domains.expiry_datewith the new expiry date returned by the registrar. - Sends a renewal confirmation email to the client with the new expiry date and amount paid.
Step 4 — Sync Confirms Renewal
commerce:sync-domain-statuses (daily 05:00) independently confirms the renewal by calling getDomainInfo for expiring domains, providing a safety net if the renewal job result was ambiguous.
What Happens If the Invoice Is Not Paid
| Timeline | What Happens |
|---|---|
| Day -30 | Renewal invoice generated and emailed |
| Day -14 | Overdue reminder email sent |
| Day 0 | Domain expires at registrar |
| After expiry | sync-domain-statuses detects expiry → status = expired |
| Registrar redemption period | Domain enters redemption at registrar; recovery may cost extra |
| After redemption | Domain deleted by registry; available for re-registration |
Once a domain enters the registrar's redemption period, recovery fees apply (often $50–$200 depending on the registry). Standard renewal is no longer possible.
Disabling Auto-Renew
Clients can disable auto-renew per domain at /client/domains/{domain} — the toggle stores auto_renew = false on the domains record. With auto-renew off:
- No renewal invoice is generated.
- No job is dispatched.
- The domain expires naturally at its current expiry date.
Admins can also set this in Admin → Domains → [domain] → Info Panel.
Manual Renewal (Admin)
To renew a domain manually outside the invoice flow:
- Go to Admin → Domains → [domain].
- Click Renew in the Actions panel.
- Select the number of years.
- Confirm — this dispatches
RenewDomainJobimmediately (bypasses invoice).
Use this for corrections, promotional renewals, or recoveries where the invoice was already written off.
Scheduled Commands
| Command | Schedule | Purpose |
|---|---|---|
commerce:check-expiring-domains |
Daily 04:00 | Generate renewal invoices 30 days before expiry |
commerce:sync-domain-statuses |
Daily 05:00 | Sync expiry dates and statuses with registrar |