Reseller Suite for WHMCS — Stores and Brands Guide 1/2: Settings, Domains, Money, Templates, Reminders and Abandoned Carts

قراءة 15 دقيقة 1 مشاهدة

Version 0.9.1 · Full Suite · Stores and Brands setup guide, part 1 of 2.

Store mode gives each reseller a white-label store inside your WHMCS: his domain, logo, colours, prices, emails, pages and clients. Provider brands (multibrand) use the same engine for your own extra brands.

1. Settings (Addons → Reseller Suite for WHMCS → Settings → Stores and brands)

Setting What to enter
Host stores point to The host name store domains CNAME to, e.g. stores.example.net (defaults to your System URL host).
Your other host names Every other host of your WHMCS, so nobody can claim them as a store.
Your nameservers Your WHMCS default nameservers. In stores they are replaced with the store's own nameservers on new domains and on service pages.
Panel host names key=host per line, e.g. cpanel=srv1.example.net. Stores enter their own host for each key (e.g. cpanel.store.com).
SPF part What stores add to their SPF record, e.g. include:_spf.example.net.
Ticket departments Departments whose tickets stores answer for their clients, plus the department for escalated tickets.

Group permissions (Groups → edit): own domain, collecting payments himself, own SMTP, pages, tickets, log in as client, suspend/unsuspend, profit rule, stores per reseller.

2. Store domains and certificates

The reseller adds two records at his DNS provider and presses Check:

shop.store.com                      CNAME  stores.example.net
_arahoster-verify.shop.store.com    TXT    <token shown in his area>

A store can go live only after this check. It is re-checked daily.

Certificates: put a web server with on-demand TLS in front of WHMCS and let it ask the suite which names are allowed. Caddy example:

{
  on_demand_tls {
    ask http://127.0.0.1/modules/addons/reseller_suite/tls-ask.php
  }
}
https:// {
  tls { on_demand }
  reverse_proxy 127.0.0.1:8080
}

tls-ask.php answers 200 only for verified store domains that are not disabled, only to the addresses in "Addresses allowed to ask for certificates" (default: this server), and never to requests relayed by a proxy. If WHMCS runs behind that server, list it under "Proxies in front of WHMCS" so rate limits see the real visitor address.

3. Invoice PDFs

Add this line to templates/<your theme>/invoicepdf.tpl, right after the # Logo block:

@include ROOTDIR . '/modules/addons/reseller_suite/resources/invoicepdf_brand.php';

Store and brand clients then get the brand's name, "pay to" text and logo (PNG/JPG, cached under assets/img/ars/). Other invoices are unchanged.

4. Money

  • You collect (default). Store clients pay through your gateways (a provider brand can limit which ones). When an invoice is paid, the reseller's share (store price − his cost, or the group's percentage rule) is added to his balance once per invoice line. He can withdraw store profit (never top-ups) as a payout; you pay it outside WHMCS and mark it paid.
  • The reseller collects (permission "collect payments himself"). Activate the gateways Card (store) and Bank transfer (store) in Payment Gateways. Each store enters its own Stripe keys and bank details. Before a client can pay, your share of the invoice is held on the reseller's balance; the payment is recorded only after that share is captured. No balance → the client cannot pay online yet, and nothing is activated. A Stripe payment that arrives without cover is parked and recorded after the reseller tops up.
  • Stripe webhook URL for each store (event checkout.session.completed): https://<your-whmcs>/modules/gateways/callback/reseller_suite_store_stripe.php. The signature is verified with that store's webhook secret.
  • No activation before payment. Store services and domains are not set up, and store domains are not renewed, while the invoice is unpaid or a reseller-collected payment's share is not captured — whatever starts it.
  • Taxes. Invoices you collect are yours: your WHMCS tax rules apply and the tax is yours. For store invoices created after the update the tax state WHMCS used is recorded at creation, and with an inclusive tax type that tax is taken out of the sale before the reseller's share (older invoices keep the earlier settlement). Store prices must then leave the floor after your highest tax rate; existing prices that do not are listed to the reseller (Store prices) and counted under Settings. A store that collects payments itself can switch on its own taxes (reseller area → Taxes). Its rate for the client's country is written into the WHMCS invoice tax rate when the invoice is created (before the invoice email), so WHMCS computes, rounds and shows the tax and each product's "Apply Tax" setting still decides which lines are taxed; your own tax rule is replaced on those invoices (0 % when the store has no rate). Needs Tax Support on in WHMCS (Setup → Payments → Tax Configuration). Prices the store entered with tax are turned into net lines when your WHMCS tax type is exclusive (and the other way round), so the client pays the entered price (±0.01 per line from rounding). EU business clients in another country with a valid VAT number get 0 % (reverse charge), also when WHMCS Auto Tax Exempt exempted them; business clients outside the EU and the store's country get 0 % with an "outside the scope" note — format checked offline; an optional VIES check runs from cron only (30 seconds per run at most, timeouts, cache) and never blocks checkout. A confirmation changes an unpaid invoice only with Proforma Invoicing / Sequential Paid Invoice Numbering on, and the invoice email is sent again. Drafts are taxed when published. An invoice is never changed after a payment, credit, payment session or an admin edit of its lines. The tax report is built from append-only payment and refund events; partial refunds (the invoice stays Paid) are not included. The provider share held on the reseller's balance never includes tax. Switch: Settings → Stores and brands → "Allow resellers to charge tax" (default on); each store's setup is shown on its brand page.
  • Add-funds and mass-pay invoices of store clients are always paid to you. Refunds take the reseller's share back. Payouts can only withdraw store profit that was not spent (spending uses top-ups first).

5. Email

Emails to store clients always carry the store's name, logo, links and signature. When the store also has its own sender (verified DKIM key on its sender domain, or its own SMTP server) and "Let stores send email from their own address" is on, the email is sent from the store's address and logged in the client's email history; any failure falls back to WHMCS sending the re-branded email.

6. Store templates (Full Suite)

Resellers find six ready-made store templates at the top of Home page in the reseller area: Modern, Minimal, Corporate, Bold, Arabic-first and Dark (original designs). A template sets the home page layout and section order, the four store colours (unless the reseller keeps his own) and the fonts; it never touches his logo, texts, plans, pages or settings. He sees a live preview with his own texts and prices first, applies with one click, and can undo the last change (the previous design and colours are kept in the brand setting template_backup). Templates use system fonts only, no CDN or remote file, logical CSS properties (Arabic and other RTL languages) and visible focus states; button and header text is chosen for contrast. Links go to the normal WHMCS cart, so checkout works as before.

Admin → Brands → Store templates: switch templates on or off for all stores (store_templates_off) and choose the default for new reseller stores (store_template_default, none by default). A switched-off template can no longer be applied; stores already using it keep it. Applying a template needs the Full Suite; existing stores keep their look whatever the licence. Team members with the Store area may apply and undo, like the home page design.

7. Pages and domain search

  • Store pages: index.php?m=reseller_suite&p=<address> (terms, privacy, home, offers). Ready-made templates are added as drafts.
  • Domain search page: index.php?m=reseller_suite&search=1 — one name across many TLDs or up to 20 names, by category, with the store's prices. Categories, labels and order: Admin → Domains (menu Selling).
  • Store price list page: index.php?m=reseller_suite&pricelist=1 — the store's prices for its clients (not to be confused with the reseller's My prices tab or your public reseller price list).

8. WhatsApp and SMS reminders to store clients

Provider: Addons → Reseller Suite for WHMCS → Client reminders (menu Stores). Off until you turn it on.

  • Allow client reminders in reseller stores (reminders_enabled), Most messages per store per day (reminders_max_per_day, default 200, counted per local day of each store; the rest waits for the next day), Most messages per reseller per day over all his stores (reminders_max_per_reseller, default 500, last 24 hours), Offer my shared SMS sender to every store (reminders_shared) and Most messages per day through the shared sender for all stores together (reminders_shared_max_per_day, default 1000, last 24 hours). Every message taken for sending counts, test messages included; over a 24-hour cap a message waits an hour and tries again.
  • Shared SMS sender (optional): Twilio or your own HTTPS SMS gateway. Stores without their own SMS sender may choose it; you pay the SMS provider for those messages (costs are not tracked by the suite). Only the standard texts go through it, never a store's own text, and a reseller may send at most 3 test messages a day through it. Its errors are shown only to you (latest errors on this page); the reseller's log shows "The shared sender could not send it". There is no shared WhatsApp sender: WhatsApp templates and the business name belong to each store.
  • Last 7 days: messages sent, failed, waiting and skipped per reseller.

Reseller (Store → Reminders): senders (his own WhatsApp Business Cloud API number, Twilio or HTTPS SMS gateway), which reminders are on and when, texts per language, quiet hours, a log and an opt-out list. See the reseller guide.

How it works:

  • What is sent: service renewal due (default 7 and 1 days before the next due date), domain renewal due (7 and 1 days), new unpaid invoice, invoice overdue (default 3 days after the due date), service suspended for non-payment (WHMCS suspension reason containing "Overdue"), domain expiring (30 and 7 days before the expiry date). Days are counted in the store's time zone. A step is sent once per item and date (unique key); a missed cron run sends it late, an overdue reminder at most 3 days late, older items are never dug up.
  • Which stores: live or in maintenance; a store in draft or preview sends nothing (waiting messages are cancelled).
  • Who gets it: only clients linked to that store, with a phone number that reads as E.164 (WHMCS phone and country; numbers we cannot read are skipped and shown as such), who have not opted out, and whose account is not closed. Every rule is checked again just before sending (the phone number is read again from the client's account), and so is the reason: an invoice paid, an item renewed or a service reactivated in the meantime cancels the message.
  • When: the cron plans once an hour (and at once when an invoice is created or a service suspended) and sends on every cron run (20 seconds at most per run). Quiet hours (default 21:00–09:00 store time) and the daily cap move a message to the next allowed moment.
  • Channel: SMS, or WhatsApp first when the store chose it and has an approved template for that reminder (variables {{1}}… in the fixed order shown on the screen); without a template the reminder goes by SMS.
  • Language: the client's WHMCS language; texts in English, Arabic, Spanish and Norwegian (defaults included, each store may write its own). Other languages get English.
  • Pay link: the unpaid invoice (viewinvoice.php?id=…) on the store's own domain when it has one, else on your WHMCS address; for a renewal without an invoice yet, the client area.
  • Retries: 3 tries for network errors, rate limits and provider errors 5xx (after 5 and 30 minutes); other errors fail at once. A message whose sending was interrupted (process stopped) counts as a try after an hour. The reseller can send a failed message again within 7 days. Each message is taken for sending by one cron process only. Provider message id and status are recorded; delivery receipts are not read.
  • Opt-out: store clients can turn reminders off and on at index.php?m=reseller_suite&reminders=1 (logged in). The reseller can mark a client; Twilio's STOP (error 21610) marks the client too. Only the client undoes his own choice, and turning reminders back on is refused when the session is a WHMCS admin acting as the client or the reseller's "log in as client" (marked on the way in, and for 2 hours after such a login); every opt-in and refused opt-in is logged with the real user. STOP is never undone from a web page: the client replies START to the sender.
  • Security: credentials are stored with WHMCS encrypt() and never shown again; saving or removing a sender is for the reseller's account owner and needs a fresh two-factor code when 2FA is on. Gateway addresses must be https on a public host name (no IP, no local name, no placeholder in the host part; resolved and checked again when sending, no redirects, never through a proxy from the server environment). A JSON body must be valid JSON with {to} and {text} inside strings. Every stored error has the credentials and gateway URL values removed. A client's privacy export lists his reminders; a completed deletion request removes his number and the texts from the log.

9. Abandoned carts (Full Suite)

Provider: Addons → Reseller Suite for WHMCS → Abandoned carts (menu Stores). Off until you turn it on; locked without the Full Suite.

  • Offer abandoned-cart reminders to every store (carts_enabled), Most reminders per cart (carts_max_reminders, 1–5, default 3; a store's later steps are cut), Most cart messages per store per day (carts_max_per_day, default 200, emails and texts together, per local day of the store; the rest waits for the next day).
  • Abandoned carts in the last 30 days: abandoned, recovered, recovered amount and reminders sent per reseller.

Reseller (Growth → Abandoned carts, team members with the Marketing area): settings per store (on/off, up to the maximum number of steps — default 1 hour, 1 day, 3 days —, email and/or texts, WhatsApp template name, a personal discount code on the last reminder: 1–50 %, valid 1–30 days), texts per language (email subject, email text, text message, discount line) and the latest carts with their reminders, plus the totals of the last 30 days.

How it works:

  • Capture: when a logged-in client of a live reseller store opens a cart page (ClientAreaPageCart), products, domains and add-ons of the WHMCS cart are saved (one open cart per client; EPP codes, passwords and secret-looking fields are left out). Never for a client of another store or reseller, a reseller's own account, a WHMCS admin or a reseller logged in as the client, or a client who unsubscribed. Emptying the cart in the same browser session closes it.
  • Ordered: AfterShoppingCartCheckout closes the cart as ordered (whatever the licence; it never refuses a checkout); any newer order of the client found later closes it too. A cart ordered after at least one reminder counts as recovered, with the order total.
  • Sending: on every cron run (15 seconds at most). The first step starts the abandoned count. Only one step per cart and run: when several are due at once only the latest goes out, and a step more than 48 hours late is skipped. Before each message: store live or in maintenance, reseller active with the store mode, client still that store's, active and not unsubscribed (a cart reminder is a service message about the client's own cart, so marketing email consent is not needed; newsletters still need it); outside the store's quiet hours and time zone (from Client reminders); under the daily cap.
  • Channels: email through WHMCS SendEmail (the store's branding is applied by the email hook) with a button to the cart and an unsubscribe link; texts only through the store's own reminder sender (WhatsApp with the store's approved template when its reminder channel is WhatsApp — variables {{1}} name, {{2}} store, {{3}} resume link, {{4}} unsubscribe link —, else SMS), never your shared sender, only when Client reminders are on, and never to a client who opted out of reminders. Every text carries the unsubscribe link.
  • Resume link: index.php?m=reseller_suite&cart=<token> on the store's own domain, in the client's language. 64 random hex characters, stored only as a hash (and encrypted for the messages). It needs a login and works only for that client, in that store, while the cart is open, for 30 days after his last activity; it never replaces a cart already in the session. The personal code is put in the cart.
  • Unsubscribe: index.php?m=reseller_suite&cart_unsub=<token>, no login; the client confirms with a button (a link scanner opening the page changes nothing). It stops that store's cart reminders for him. Both links are rate-limited per IP.
  • Discount code: a WHMCS promotion (mod_arars_vouchers kind cart) for that client only, once, in that store only, on the cart's products without configurable options and its domain extensions the reseller sells; first payment only; out of the reseller's profit. Not in the reseller's voucher list or limit; removed a day after it expires.

This article is part of the complete Reseller Suite for WHMCS guide. All guide articles.

هل كانت المقالة مفيدة ؟