HostKarle Reseller - WHMCS module
=======================================

Sell HostKarle plans from your own WHMCS. When your customer orders, the module
creates the service at HostKarle and pays for it from your reseller wallet.
Requires WHMCS 8.x, PHP 7.4 or newer, and a HostKarle reseller account.

1. Get reseller access
   - Log in at https://my.hostkarle.in (or sign up) and open a support ticket asking for
     reseller access. Once it is on, add funds to your wallet.
   - Client area > API & webhooks > create a token with these abilities:
     products:read, orders:create, orders:read, services:read, services:manage,
     services:cancel, invoices:pay, wallet:read

2. Install
   - Unzip this file into your WHMCS root folder. It creates
     modules/servers/hostkarlereseller/

3. Add the server
   - WHMCS Admin > System Settings > Servers > Add New Server
   - Module: "HostKarle Reseller"
   - Hostname: my.hostkarle.in
   - Password: your API token, Secure (SSL): on
   - Click Test Connection, then save. Put the server in a server group.

4. Create products
   - WHMCS product > Module Settings: pick "HostKarle Reseller" and the server group,
     then pick the HostKarle plan from the list.
   - Web hosting plans: use WHMCS product type "Shared Hosting" and require a domain.
     Your customer's WHMCS password becomes the control panel password.
   - VPS plans, operating system: set "Default OS", or add a configurable option named
     "Operating System" whose values look like  ubuntu-24|Ubuntu 24.04
     The part before | is the OS key. Each plan's keys are in the API:
     GET https://my.hostkarle.in/api/v1/products/<plan id>  (field "os"), or ask support.
     Leave both blank to use the plan's default OS.
   - Set the WHMCS billing cycle to one that the plan is priced for (Monthly, Quarterly...).
   - Set your own selling price.

What the module does
   Create, Suspend, Unsuspend, Terminate, Renew, Change Password, Change Package,
   Sync from API, and a client-area page with the service details.
   Web hosting: one-click "Log in to control panel" (admin and client area).
   VPS: Start, Stop and Reboot buttons for you and your customer.
   Renew only renews at HostKarle when its due date is behind WHMCS, so you are
   never billed twice. Orders fail with a clear message if your wallet is too low.

Support: open a ticket at https://my.hostkarle.in
