KLYRN
KLYRN Web
All documentation
  1. Home
  2. Docs
  3. Selling hosting

Selling hosting

KLYRN has a storefront, a checkout, orders, payments, customers, services and renewals built in, running on your own server. It is for the provider who has no billing system yet.

What it is, and what it is not

The store lists your plans, takes payment and turns a payment into a working account. It runs on the same server as the hosting. No external service sits in the path, and no billing vendor charges a monthly fee.

It is deliberately small. It will not become any of these:

A ticketing system
No helpdesk, no queues, no SLAs
A registrar
KLYRN never sells or renews a domain name
A CRM
It keeps customers and no sales pipeline
An accounting or tax engine
It records what was charged. Your accountant owns the rest

A provider who needs those runs WHMCS, and KLYRN ships an integration for it.

The two rules that make it safe

It never provisions anything itself. A successful payment creates a durable job that fills in a provisioning request. The job hands it to the one provisioning engine, the same one the panel and the CLI use. The billing code has no second way to make an account, so one customer cannot end up with two.

It never trusts a browser about money. An order becomes paid for one of two reasons. A payment provider's verified callback said so, or an administrator checked their bank and said so. A request that claims it has been paid changes nothing.

Products, terms and coupons

A product is a plan you sell: a name, a price, a billing term, and the hosting package it provisions. Three terms are supported:

Monthly
Advances the due date by 1 month
Quarterly
Advances by 3 months
Yearly
Advances by 12 months

Renewal dates advance in months, and the day of the month is kept. A monthly service bought on the 31st stays on the 31st in months that have one. In months that do not, it lands on the last day of the month.

Coupons are a percentage or a fixed amount and can be limited by use count and expiry. They are validated at checkout.

Getting paid

Payment methods are pluggable. The one that ships with every install is manual payment: bank transfer, cash, or invoice on account. It covers any method where a person confirms the money arrived.

Manual payment reports itself as not automated. Until a person confirms the money, the order stays in pending_payment, where everyone can see it.

KLYRN ships no bank details, and no example of any. The payment instructions contain no IBAN and no placeholder. The field ships empty, and the readiness check tells you it is empty before you publish.

What happens after checkout

An order moves through these states, and the panel shows the current one at every step:

draft
Started and not yet submitted
pending_payment
Waiting on money
paid
Money confirmed, by callback or by a person
provisioning
Handed to the provisioning engine
active
The account exists and works
failed
Provisioning did not finish, and the reason is recorded
cancelled
Stopped before it became a service
refunded
Money returned, recorded against the order

The order becomes a service, which has its own states: pending, provisioning, active, provision_failed, suspended, cancel_pending, cancelled, termination_pending and terminated.

Cancelling and terminating are separate on purpose. A customer who cancels at the end of a paid term has not asked for their data to be deleted.

The customer portal

Customers see their orders, services and profile, and can change or cancel a plan without emailing you. A plan change is previewed before it is applied, with what it costs and what it changes. A pending change can be cancelled.

"Manage hosting" takes them from the portal into the panel. Usually that is an ordinary link, because the portal and the panel share one session. A storefront published on its own hostname is the exception: the panel's SameSite=Strict session cookie does not travel there. For that case KLYRN issues a single-use hand-off ticket and leaves the cookie strict.

Publishing the storefront

The storefront can serve on its own hostname with its own certificate. Until DNS for a dedicated name points here, it serves at /shop on the panel's hostname. KLYRN tells you which of the two is currently true.

A readiness check runs before you publish and names each thing that is not finished. That can be no payment instructions, no products, no hostname, or a hostname whose certificate has not been issued yet.

Renewals, overdue and suspension

A billing run generates what is due and advances the dates. On a schedule you set, it moves unpaid services into overdue and then suspended. Suspension is reversible and deletes nothing. Termination is a separate, later, deliberate step.

Each of those transitions is a recorded event with a time and a reason.

Discord WhatsApp