RedFamosa Documentation

RedFamosa — SMM Panel Script

A complete Social Media Marketing panel you install on your own hosting: sell followers, likes and views through a branded storefront, buy them wholesale from upstream providers, and open child panels for your own resellers — each on their own domain.

RedFamosa is a self-hosted PHP script. You upload one ZIP to your server, run a six-step web wizard and end up with a working panel — no console, no Composer, no build step. Your customers top up a prepaid balance and place orders; the panel routes those orders to your upstream providers and keeps your margin.

What version 1.0.2 includes
  • Six-step web installer, Production or Demo data
  • Upstream provider manager (standard SMM API)
  • Catalogue: platforms → categories → services
  • Order pipeline with drip-feed, refill and cancel
  • Immutable, auditable wallet ledger
  • Payment methods: manual transfer, Stripe, PayPal
  • Top-up bonus tiers and multi-currency display
  • Reseller child panels on their own domain
  • Reseller subscription plans billed from the wallet
  • Plan-gated own provider for resellers
  • Public API in the standard SMM format
  • Omnichannel CRM with seven channels
  • AI agents with a knowledge base, plus automations
  • Embeddable web-chat widget
  • Tickets, blog, FAQ, news and landing page
  • Blacklists for IP, link and e-mail
  • Owner and reseller dashboards with charts
  • Three client skins and three landing skins
  • English and Spanish, light and dark mode

1.1 Who it is for

RedFamosa is built for the entrepreneur who wants to run an SMM reselling business rather than write one. The typical owner:

1.2 The three roles

RoleAreaWhat they can do
Owner + staff /admin Full administration: providers, catalogue, pricing, payments, child panels, plans, users, tickets, CRM, settings and reports. Staff get a role with granular permissions, so you can hire an operator without handing over the keys to the business.
Reseller /panel Runs a child panel on their own domain. Buys from you at your price, sets their own resale price, manages their own clients, keeps their own CRM inbox, and tops up their balance by paying you.
Client /app The end buyer. Tops up a balance, places orders, follows their progress, opens support tickets and automates through the public API.
One database, strict scoping Every panel — yours and every reseller's — lives in a single database, scoped by panel. The owner never sees a reseller's client data and a reseller never sees another reseller's. Reaching for another panel's record returns a plain 404 rather than an error that would confirm the record exists.

1.3 How to read this manual

Chapters 2 to 4 get you installed and configured — read them in order the first time. Chapters 5 to 8 cover day-to-day operation. Chapters 9 and 10 are the reseller business. Chapters 11 and 12 are the integrations: the public API and the CRM. Chapter 13 is the background worker every panel needs, and chapter 14 collects the things that go wrong, with the fix for each.

Throughout the manual, {APP_URL} means the address of your panel as you entered it during installation, for example https://panel.example.com. Screens are written as Menu → Sub-menu, matching the sidebar of the admin area. All example domains, e-mail addresses and keys are fictitious.

The short version Point your domain at the public/ folder, open it in a browser and complete the wizard (§3). Then add a provider and sync its catalogue (§5), enable a payment method (§8) and choose how background work runs (§13). Everything else is optional.

2. Server requirements

RedFamosa ships with its PHP dependencies and compiled front-end assets already bundled, so the server needs neither Composer nor Node.js. A standard PHP + MySQL hosting account is enough.

PHP

PHP 8.2 or newer (8.3 and 8.4 are supported). The installer compares your version against 8.2.0 and refuses to continue below it.

Required PHP extensions

These thirteen extensions are exactly what the installer checks, one row per line on screen:

ExtensionUsed for
bcmathExact arithmetic in the wallet ledger and price calculations.
ctypeCharacter checks used by the framework and by input validation.
curlOutbound calls to providers, payment gateways and webhooks.
fileinfoReal MIME-type detection for uploaded files.
gdImage processing for avatars and payment proofs.
intlNumber, date and currency formatting.
jsonEncoding of API payloads and stored settings.
mbstringMulti-byte strings and translations.
opensslEncryption of provider keys, gateway secrets and channel tokens.
pdo_mysqlMySQL / MariaDB driver.
tokenizerRequired by the framework itself.
xmlParsing XML responses from some gateways.
zipArchive handling used by exports and updates.

On cPanel these live in MultiPHP Extensions (or Select PHP Version → Extensions). Nearly every host enables all thirteen by default.

Database

Write permissions

The user that runs PHP must be able to write to these five paths. They are the same five the wizard verifies in step 2:

PathWhy
storage/appUploads and the installation lock file.
storage/frameworkCompiled views, sessions and cache.
storage/logsThe application log.
bootstrap/cacheCompiled configuration and routes.
.envThe installer writes your settings into this file. If the file does not exist yet, the project root itself must be writable so it can be created.

On cPanel the PHP user is the account owner, so uploading through File Manager already gives the right ownership. If a check fails, set directories to 755 and the .env file to 644.

Web server

Apache 2.4+ with mod_rewrite and AllowOverride All (the cPanel default), or Nginx with the usual try_files rule for a front controller. In both cases the document root must point at the public/ sub-folder, never at the project root.

No Composer, no npm The ZIP you downloaded already contains vendor/ (every PHP package) and public/build/ (compiled CSS and JavaScript). You never run composer install or npm install on the server.
Get your certificate first Sessions, payment callbacks and messaging webhooks all behave better over TLS, and some require it. Issue the certificate before you install — on cPanel, AutoSSL does it for free. If the site is still on plain http://, type the address with http:// in the wizard: §14.1 explains what breaks when the two disagree.

3. Installation

RedFamosa installs through a browser wizard of six steps. Each step validates before it lets you continue, and tells you exactly what to fix without leaving the screen. A normal installation takes about five minutes, most of it spent creating the database in your hosting panel.

What the wizard does for you It writes the .env configuration file, creates every database table, seeds the data you choose, creates your owner account and finally writes storage/app/installed.lock — the file that marks the panel as installed and permanently closes the wizard.

3.1 Prepare your hosting

Do this before opening the wizard. The instructions are written for cPanel because that is what most buyers have; on a VPS the same five points apply with your own tooling.

  1. Upload the product ZIP to your account through File Manager or FTP, and extract it. You get a folder containing app/, public/, vendor/ and the rest of the script.
  2. In cPanel → Domains (or Subdomains), set the document root of the domain to the public folder inside that directory. This is the step people skip and the reason most "it does not work" tickets exist: requests must land in public/, never in the project root.
  3. In cPanel → MySQL Databases, create an empty database and a database user, then add the user to the database with All privileges. Write down the database name, user and password.
  4. Issue an SSL certificate for the domain (cPanel → SSL/TLS Status → Run AutoSSL) if you have not already.
  5. Open your domain in a browser. Because the panel is not installed yet, every address redirects to /install and the wizard opens by itself.
There is nothing to do about .env On the very first request the panel notices there is no .env file, copies .env.example over it and generates a fresh APP_KEY for you. That is why the project root must be writable. If you prefer to prepare it yourself, copying .env.example to .env by hand before the first visit works just as well.

3.2 Step 1 — Welcome

The opening screen states what the wizard is about to do and lists the three things you were asked to prepare. Click Get started to continue.

Installer step 1: the welcome screen with the before-you-begin checklist and the Get started button.
What to look at: the progress rail on the left. It stays visible for the whole installation and marks each finished step with a check, so you always know where you are. The version you are installing is printed at the bottom of that rail.

3.3 Step 2 — Requirements

The wizard inspects the server and shows the result in three blocks: your PHP version, the thirteen required extensions, and the five paths that must be writable. Everything must be green before Continue does anything.

Installer step 2: the requirements screen listing PHP version, thirteen extensions and five writable paths, all passing.
What to look at: the badge at the end of every row. OK / Loaded / Writable means that check passed. Any row that is not green is a change you must make on the server — the table in §14.1 lists the fix for each one.
Failing checkWhat to do
PHP version below 8.2Switch the PHP version of the domain in cPanel → MultiPHP Manager (or Select PHP Version), then reload the page.
An extension is missingEnable it in cPanel → MultiPHP Extensions. On a VPS, install the matching php8.x-* package and restart PHP-FPM.
A path is not writableSet the folder to 755 and make sure it belongs to the account that runs PHP. On a VPS: chown -R www-data:www-data storage bootstrap/cache.
.env is not writableSet the file to 644. If the file does not exist at all, the project root must be writable so it can be created.

3.4 Step 3 — Database

Enter the credentials of the empty database you created. Test connection opens a real connection and reports either success or the exact driver error; the Continue button stays disabled until that test passes, and the server checks the connection again before saving, so a copy-paste mistake cannot get through.

Installer step 3: database connection form with host, port, database name, username and password, showing a successful connection test.
What to look at: the green Connection successful banner above the form. Until it appears, only Test connection is clickable. On shared hosting the host is almost always localhost or 127.0.0.1 and the port 3306.
Host
localhost on nearly every shared host. Managed platforms sometimes give you a separate database hostname.
Port
3306 unless your host says otherwise.
Database name
The database you created. On cPanel it carries your account prefix, for example myaccount_redfamosa.
Username
The database user, also prefixed on cPanel.
Password
That user's password.

3.5 Step 4 — Application

Four values that define the panel itself.

Installer step 4: application settings with panel name, panel URL, base currency and timezone.
What to look at: the Panel URL field. Every link the panel ever generates — password resets, payment returns, webhook addresses — is built from this value, including its http:// or https:// prefix. Enter the address exactly as visitors will type it, with no trailing slash.
Panel name
Your brand. It appears in the header, the browser tab and outgoing e-mail.
Panel URL
The public address, with scheme and without a trailing slash, for example https://panel.example.com. Stored as APP_URL.
Base currency
The currency of the ledger — every balance, order cost and provider payment is recorded in it. Clients can display other currencies later (§8.4), but this one is the accounting currency.
Timezone
The server timezone written to APP_TIMEZONE. Reports and scheduled work follow it.
Choose the base currency carefully It is the unit the whole ledger is written in. Changing it after balances and orders exist does not convert anything — the old numbers keep their value and simply get read as a different currency. Decide now.

3.6 Step 5 — Admin account

Create the owner account: the super admin with unrestricted access to the panel.

Installer step 5: create the admin account with full name, email, password and confirmation.
What to look at: the hint under the password fields. The minimum is eight characters and the confirmation must match. This account cannot be recovered from the wizard afterwards — only through the normal password-reset e-mail, which needs working SMTP (§4.2). Save the credentials before you continue.

3.7 Step 6 — Install: Production or Demo

The last step asks one question: how much data should the panel start with. Pick a card and press Install now.

Installer step 6: choosing between Production and Demo seed data before pressing Install now.
What to look at: the two cards. The selected one is outlined — Production is preselected. This choice only affects the data that is inserted; the database structure is identical either way.
ModeWhat gets insertedChoose it when
Production Only the essentials: roles and permissions, the currency list, the language list with English and Spanish enabled, the platform taxonomy, the default settings, the starter reseller plans, your owner panel with its domain, and your admin account. The service catalogue is empty — you fill it from your own providers. Any real site. This is the recommended choice: nothing to clean up later, and no invented catalogue to confuse a customer.
Demo Everything above, plus a full sample business: example providers, dozens of categories and services, sample clients and staff, orders in every state including drip-feed, payment methods and bonus tiers, support tickets, blacklist entries, a second panel that acts as a reseller with its own clients and an active subscription, and a populated CRM with channels, labels, quick replies, AI agents and conversations. You want to explore the product with populated screens, or you are recording a demo. Not for a live site — the sample records are indistinguishable from real ones once you start working.
Use Production for a real panel There is no "remove the demo data" button. If you install with Demo and later decide to go live, the clean route is to drop the database, create an empty one and run the wizard again choosing Production. Deciding correctly now costs nothing; deciding later costs a reinstall.

While the progress bar runs, the wizard verifies the database once more, creates every table, seeds the data for the mode you chose, creates your admin user, checks the writable paths and finally writes the configuration file and the lock file. When it finishes you land on the confirmation screen.

Installation complete screen with a link to the login page.
What to look at: every step in the rail is now checked. From here the wizard is closed for good: any later visit to /install redirects to the home page, because storage/app/installed.lock now exists.

What the wizard writes into .env

Only these sixteen values — everything else in the file keeps the documented default and can be changed by editing the file (§4.4):

KeyValue it writes
APP_NAMEThe panel name from step 4.
APP_URLThe panel URL from step 4.
APP_TIMEZONEThe timezone from step 4.
RF_DISPLAY_TIMEZONEThe timezone from step 4 as well. This one decides how dates are shown to your users, while APP_TIMEZONE decides how the server stores them. The wizard sets both to the same value, so the panel reads correctly from the first minute.
APP_ENV / APP_DEBUGAlways production and false.
DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORDThe connection from step 3.
SESSION_DRIVERdatabase
CACHE_STOREfile
QUEUE_CONNECTIONdatabase
AUTOMATION_MODEmiddleware — the setting that works without any server configuration (§13).

APP_KEY is not written here: it was generated on the very first request, before the wizard even opened.

3.8 First login

Sign in with the e-mail and password from step 5 and you land in the admin dashboard. On a Production install every counter is zero — that is correct, the panel is waiting for you to fill it.

The admin dashboard right after a Production installation, with all counters at zero and the full navigation sidebar.
What to look at: the sidebar, which is the map of the whole product — Operation, Orders, Catalog, Finance and Users, with the CRM and reseller groups further down. The top bar carries the link to your public site, the language switcher, the light/dark toggle and your account menu.

A sensible order for the first hour:

  1. Add your upstream provider and sync its catalogue — §5.
  2. Review prices and hide the services you do not want to sell — §6.
  3. Configure SMTP so account and order e-mail actually leaves the server — §4.2.
  4. Enable at least one payment method — §8.2.
  5. Decide how background work runs and confirm it is running — §13.
  6. If you will sell reseller panels, set the reseller domain variables — §4.5.

3.9 Updating the script

  1. Back up your database and your .env file. Do not skip this.
  2. Upload and extract the new release over the existing installation, keeping your .env file and your storage/ directory.
  3. Run the database migrations. With SSH or cPanel Terminal: php artisan migrate --force.
  4. Clear the compiled caches: php artisan optimize:clear.
Never overwrite .env or storage/ .env holds your database credentials and your APP_KEY. Replacing the key makes every encrypted value in the database — provider API keys, gateway secrets, messaging tokens — permanently unreadable. storage/ holds uploaded files and installed.lock; deleting the lock file re-opens the installer on a live site.

4. Configuration

RedFamosa is configured in two places, and knowing which is which saves a lot of searching:

WhereWhat lives thereApplies
Admin → Settings Everything an operator changes while running the business: branding, e-mail, payment methods, security options, CRM settings. Stored in the database, per panel — each reseller has their own copy. Immediately.
The .env file Everything the installation needs: database credentials, the panel address, the reseller-domain targets, tuning for background work and for the provider client. One file for the whole installation, no screen to edit it. On the next request. Restart the queue worker or scheduler if you use them.

4.1 General settings

Admin → Settings is a single screen with a row of tabs. Changes apply immediately — there is nothing to restart.

TabWhat you set there
GeneralSite title, support e-mail address, timezone and date format.
BrandingLogo, favicon and the panel's primary colour — the accent that drives the whole interface.
SEOMeta title, description and the image used when your address is shared.
Social mediaThe profile links shown in the public footer.
AnalyticsGoogle Analytics, Tag Manager, Meta Pixel and a free-form snippet.
Social loginGoogle (including One Tap) and Facebook sign-in, with the app credentials.
Security & accessSee §4.3.
MaintenanceMaintenance mode with its own heading, message and a list of IPs still allowed in.
CurrencyThe base currency of this panel.
EmailSMTP credentials and the test send — §4.2.
Default settingOperational defaults: whether visitors may sign up, whether the service list is public, whether the API is enabled, rows per page, reCAPTCHA keys, the ticket limit per client and the average order time shown to clients.

Where things actually live

Not everything an operator thinks of as "a setting" is inside this screen. The frequent searches:

Looking forIt is here
Allow / block new client registrationSettings → Default setting
Base currency of the panelSettings → Currency
Exchange rates and the list of currenciesAdmin → Currencies (§8.4)
Default language, adding a languageAdmin → Languages
Payment methods and their keysAdmin → Payments (§8.2)
Top-up bonus tiersAdmin → Payment Bonuses (§8.3)
Blocked IPs, links and e-mailsAdmin → Blacklist
Outgoing order webhooksAdmin → Webhooks (§11.5)
How background work runs, and when it last ranAdmin → Cron Jobs (§13)
The public address of the panelAPP_URL in .env (§4.4) — there is no admin field for it
Minimum and maximum order quantityPer service, in Admin → Services — there is no global minimum
Every panel has its own settings These settings belong to the panel you are signed in to. A reseller opens the same screen inside their own panel and sets their own title, logo, colour, currency and SMTP — which is what makes a child panel look like a different product rather than a copy of yours.

4.2 Email (SMTP)

The panel sends account e-mail, password resets, payment confirmations, ticket replies and the reseller billing notices. Until SMTP is configured, none of that leaves the server. Open Settings → Email:

Provider preset
Picks the usual host and port for a common mail provider so you only fill in the credentials.
SMTP host
Your provider's outgoing server.
SMTP port
587 with TLS or 465 with SSL. Avoid port 25 — shared hosts usually block it.
Encryption
tls, ssl or none. Match it to the port.
Username / password
Normally the full mailbox address and its password. The password is write-only: leave the field blank to keep what is stored.
From address / from name
What your customers see as the sender. Many providers reject mail whose sender is not the authenticated account.
Welcome e-mail
Whether a new client gets a welcome message on registration.

Use Send test before you save your work as done: it sends a real message to the address you type, using the values currently on screen, and reports the exact SMTP error if the server refuses.

Two-factor accounts need an app password If the mailbox is protected by two-factor authentication — which is normal for the big providers — generate a dedicated app password for SMTP. The account's login password will always be rejected.

4.3 Security

Settings → Security & access holds four controls:

Admin IP allowlist
Restrict the admin area to specific addresses. Powerful, and easy to lock yourself out with — add your own current address first, and be sure it is static.
Session lifetime
Minutes before an idle session expires, from 5 minutes to 30 days.
Force staff two-factor
When on, every staff and admin account must set up two-factor authentication before it can work. Clients can always enable it for themselves from their own profile.
Minimum password length
Between 6 and 72 characters, applied to new passwords and to changes.

Two more protections are always on and need no configuration: failed sign-ins are throttled automatically (five attempts per minute for a given account and address), and every form is protected against cross-site request forgery.

Forcing HTTPS is your web server's job There is no "force HTTPS" switch in the panel: redirecting http:// to https:// belongs in your web server or in .htaccess, where it is more reliable. What the panel does need is a matching APP_URL and SESSION_SECURE_COOKIE=true once you are on HTTPS — see §4.4.

4.4 The .env file

.env sits in the project root, next to artisan — one level above public/. It is created for you on the first request by copying the fully commented .env.example that ships with the product, and the installer then fills in fifteen values (§3.7). Every other setting keeps its documented default until you edit the file.

This is the part of the product that has no user interface, so it is worth knowing what is in there. Open it with the cPanel File Manager editor (enable "show hidden files" — the name starts with a dot) or over SSH. The file is organised in commented blocks:

BlockContainsTouch it when
ApplicationAPP_NAME, APP_KEY, APP_ENV, APP_DEBUG, APP_URL, locales, APP_TIMEZONEYou move the panel to another address or change its name.
DatabaseDB_*You move the database to another server.
Sessions, cache and queueSESSION_DRIVER, SESSION_LIFETIME, SESSION_SECURE_COOKIE, SESSION_DOMAIN, CACHE_STORE, QUEUE_CONNECTIONYou add Redis, or you serve resellers from sub-domains of one domain.
Background workAUTOMATION_*See §4.6.
E-mailMAIL_*You prefer to set SMTP in the file instead of in Settings.
Panel branding and reseller domainsRF_BRAND_PRIMARY, RF_PANEL_*, RF_DISPLAY_TIMEZONE, RF_ROUNDING_DECIMALS, RF_DEFAULT_MARKUPSee §4.5.
Upstream providersRF_PROVIDER_*, RF_BREAKER_*, dispatch and polling batchesSee §4.7.
Public APIRF_API_*, RF_WEBHOOK_*See §4.7 and §11.
CRM and messagingCRM_*You use the omnichannel inbox (§12).
Social sign-inGOOGLE_*, FACEBOOK_*You want "continue with" buttons on the sign-in page.
LoggingLOG_CHANNEL, LOG_STACK, LOG_DAILY_DAYS, LOG_LEVELYou are diagnosing a problem. Put LOG_LEVEL back to error afterwards.
RedisREDIS_*You actually have a Redis server.
Demo modeRF_DEMO_MODESee §4.8.

The five values that matter most

APP_URL
The address of the panel. Every link the panel produces is built from it, including the scheme — see the warning below.
APP_KEY
The encryption key. Provider API keys, gateway secrets and channel tokens in the database are encrypted with it. Back it up with the database and never change it on a live panel.
APP_DEBUG
Must stay false on a public site. Set to true and any visitor who triggers an error sees file paths and configuration.
SESSION_SECURE_COOKIE
true only when the site really is on HTTPS. Set it on a plain-HTTP site and nobody can stay signed in, because the browser never sends the cookie back.
AUTOMATION_MODE
How background work runs. The whole of §13 is about this one line.
The scheme in APP_URL is not cosmetic The panel generates every link, form action and redirect with the scheme written in APP_URL. If it starts with https:// while the site is still served over plain http://, the wizard's own buttons and every internal link point at an address the server does not answer, and the panel looks broken. Use https:// only once the certificate is really installed. See §14.1.
.env must never be reachable from the web It holds your database password and your encryption key. Because the document root points at public/, the file sits outside it and cannot be requested — which is another reason the document root must be set correctly. After editing the file, run php artisan optimize:clear if you have SSH, or simply reload the site.

4.5 Reseller domains: the variables with no screen

These three lines are what turn reseller panels (§9) from a concept into a working feature. There is no admin screen for them — they can only be set in .env, and they ship empty on purpose, because promising an address your hosting does not actually serve is worse than not offering the option.

VariableWhat it enablesExample
RF_PANEL_BASE_HOST Free sub-domains for your resellers. With panels.example.com, a reseller called max is served at max.panels.example.com. Leave it empty and the admin refuses to assign sub-domains at all — it tells you to set this variable first. panels.example.com
RF_PANEL_IP The A record target a reseller publishes to point their own domain at your server. Needed for apex domains such as example.com, which cannot use a CNAME. 203.0.113.10
RF_PANEL_CNAME_TARGET The CNAME target for the same purpose, normally the host name of your own panel. Empty means the CNAME route is simply not offered. panel.example.com

Both DNS targets are printed to the reseller on their own Domains screen, so fill in at least one — otherwise the reseller is told to point their domain somewhere and is given nothing to point it at.

The sub-domain feature needs wildcard DNS RF_PANEL_BASE_HOST only works if a wildcard DNS record (*.panels.example.com) resolves to this server and the web server answers for that wildcard with the same document root as the main panel. On cPanel that means a wildcard sub-domain; on a VPS, a server_name *.panels.example.com block. A wildcard TLS certificate is what keeps those sub-domains on HTTPS. RedFamosa never issues certificates — that is your hosting's job.

Two more lines in the same block are worth knowing:

RF_BRAND_PRIMARY
The accent colour used when a panel has not chosen its own. Each panel can override it with its own primary colour.
RF_DISPLAY_TIMEZONE
The timezone used to group dashboard and report figures by day when APP_TIMEZONE is left at UTC. Set it to the timezone you actually think in, or your "today" will not line up with your working day.

4.6 Background work

AUTOMATION_MODE chooses how recurring work runs; the intervals below choose how often. The three modes and how to set each one up are covered in §13.

VariableShipped valueMeaning
AUTOMATION_MODEmiddlewaremiddleware, queue or scheduler. See §13.1.
AUTOMATION_THROTTLE60Minimum seconds between two runs of the same recurring task.
AUTOMATION_SYNC_INTERVAL3600Seconds between automatic provider catalogue syncs.
AUTOMATION_SCRAPE_INTERVAL86400Seconds between metadata scrapes of a provider's public page. Deliberately slow: one provider per tick.
AUTOMATION_AVGTIME_INTERVAL3600Seconds between recalculations of average delivery times.
AUTOMATION_SUBSCRIPTIONS_INTERVAL3600Seconds between reseller-plan billing passes when there is no real cron (§10.7).
AUTOMATION_MAX_JOBS25Most jobs a single piggybacked pass may run, so a visitor's page never hangs.
AUTOMATION_MAX_SECONDS10Hard time limit for that same pass.
The mode can also be switched from the admin Admin → Cron Jobs lets you change the automation mode without editing files; that choice is stored in the database and takes precedence, which makes the .env line the installation default rather than the last word. The intervals above are read from .env only.

4.7 Providers, orders and the public API

Sensible defaults ship for all of these. Change them when a provider is slow, when you run a high volume of orders, or when you want the public API to be stricter.

Talking to upstream providers

VariableShipped valueMeaning
RF_PROVIDER_TIMEOUT30Seconds to wait for a provider's API before giving up.
RF_PROVIDER_RETRIES2Retries after a failed call.
RF_PROVIDER_RETRY_DELAY_MS500Milliseconds to wait between those retries.
RF_BREAKER_THRESHOLD5Consecutive failures before the circuit breaker opens and the provider is paused.
RF_BREAKER_COOLDOWN300Seconds a tripped provider stays paused before it is tried again.
RF_CATALOG_CACHE_MINUTES60How long a fetched provider catalogue is cached.
Why the circuit breaker matters Without it, one dead provider makes every dispatch pass wait for its timeout, and a queue of orders for healthy providers stalls behind it. After RF_BREAKER_THRESHOLD consecutive failures the panel stops calling that provider for RF_BREAKER_COOLDOWN seconds and keeps working on the rest.

Order pipeline

VariableShipped valueMeaning
RF_DISPATCH_BATCH25Orders sent upstream per dispatch pass.
RF_MULTISTATUS_BATCH100Orders queried per multi-status call.
RF_POLL_MIN_SECONDS / RF_POLL_MAX_SECONDS60 / 3600The window the panel spaces status checks across: fresh orders are polled often, long-running ones progressively less.
RF_REFILL_WINDOW_DAYS30Days a client may request a refill after an order completes (§7.4).
RF_DEFAULT_MARKUP20Percentage added over a provider's cost when importing a new service.
RF_ROUNDING_DECIMALS4Decimal places kept for prices. Per-unit amounts are tiny, so 4 is the safe default.

Public API and outgoing webhooks

VariableShipped valueMeaning
RF_API_RATE_LIMIT120Requests per minute per API key. 0 removes the limit (§11.4).
RF_API_IDEMPOTENCY_TTL1440 = 24 hMinutes a repeated add request carrying the same Idempotency-Key replays the original answer instead of creating a second order (§11.3).
RF_WEBHOOK_TIMEOUT10Seconds the panel waits for your webhook endpoint to answer.
RF_WEBHOOK_MAX_ATTEMPTS5Delivery attempts before a webhook is abandoned (§11.5).

CRM

VariableShipped valueMeaning
CRM_META_GRAPH_VERSIONv21.0Graph API version used for WhatsApp, Messenger and Instagram. Change it only when Meta asks you to.
CRM_EMAIL_INTERVAL60Seconds between mailbox polls for e-mail channels.
CRM_TOKEN_HEALTH_INTERVAL3600Seconds between channel-token health checks.
CRM_TOKEN_WARN_DAYS / CRM_TOKEN_EXTEND_DAYS / CRM_TOKEN_IG_REFRESH_DAYS14 / 21 / 30How many days ahead of expiry the panel warns you, tries to extend a token, and refreshes an Instagram token.
CRM_INBOX_PAGE_SIZE25Conversations per page in the inbox.
CRM_MEDIA_DISKpublicWhere inbound attachments are stored.

4.8 Demo mode

RF_DEMO_MODE=false ships in the file and should stay that way on any real site. Setting it to true does two specific things, both aimed at a public demo you want strangers to walk into:

Never enable demo mode on a panel with real customers It is a shortcut past the front door. It does not sandbox anything, it does not reset data and it does not hide money — it only makes signing in easier. Keep it false unless the site exists purely to be looked at. Note that demo mode is unrelated to the Demo data option in the installer (§3.7), which only chooses what gets seeded.

5. Providers (upstream SMM)

A provider is the wholesale SMM service you buy from. Your panel is the shop window; the provider does the actual delivery. RedFamosa talks to any provider that implements the standard SMM API — the key + action format, widely known as the Perfect Panel API, that virtually the whole industry has settled on.

5.1 The provider protocol

Every call is a single request carrying your API key and the name of the action:

POST https://provider.example.com/api/v2
Content-Type: application/x-www-form-urlencoded

key=YOUR_API_KEY&action=ACTION[&...additional parameters]

RedFamosa uses these actions against your providers:

ActionWhen RedFamosa calls it
servicesWhen you sync a catalogue — it returns the provider's full service list with IDs, names, rates and limits.
addWhen an order is dispatched. The provider answers with its own order ID, which the panel stores.
statusTo follow a single order.
multi-statusTo follow many orders in one call — the efficient path used by the polling pass.
balanceTo read your credit at the provider, and as the connection test.
refillWhen a refill is requested for an order that lost quantity.
cancelWhen a cancellation is requested for an order not yet delivered.
Not every provider implements everything services, add, status and balance are universal. Refill and cancel are per-service capabilities: the catalogue sync reads those flags from the provider and only the services that really support them offer the buttons to your clients.

5.2 Adding a provider

Go to Admin → Providers → Add provider:

Name
An internal label. Your clients never see it.
API URL
The endpoint the provider gave you, usually ending in /api/v2.
API key
Your key from the provider's dashboard. Stored encrypted and never shown again in full after saving.
Default markup %
The margin added over the provider's rate when services are imported. 40 means you sell at 1.4× the wholesale price. Individual services can be re-priced afterwards.
Status
Active or inactive. An inactive provider is never polled and never receives orders.

After saving, open the row's menu and run Test connection. It calls the provider's balance action, so a success proves both that the URL is right and that the key is accepted.

5.3 Syncing the catalogue

Sync services on the provider row imports the provider's list into your catalogue. The dialog controls exactly what the sync is allowed to touch:

Markup %
Overrides the provider's default markup for this run.
Scope
This provider only, or every provider at once.
Fields to sync
Which fields may be overwritten on services you already imported: cost, sale price, status, name, min/max, drip-feed flag, cancel flag. Untick anything you have customised locally — this is how you keep your own names and prices through a re-sync.
Bulk import limit
How many new services to bring in. A first sync of a large provider can add thousands of rows; importing in batches keeps the catalogue reviewable.
Currency rate
An optional multiplier when the provider quotes in a different currency from your base currency.
Categories are created for you Imported services bring their category name with them. The panel creates the category if it does not exist and attaches it to the matching platform by name, so two providers that both sell "Instagram Followers" land in one category rather than two.
Review prices before you open the shop A markup is a blunt instrument: it applies the same percentage to a service costing a fraction of a cent and to one costing several units of currency. After the first sync, sort the catalogue by price and sanity-check both ends before you let clients order (§6).

5.4 Balance, metadata and reliability

Provider balance

The provider list shows your current credit at each active provider, refreshed by the background worker. That is your buying power: when it runs out, orders start failing at the provider even though your own clients paid you. Top it up with the provider directly, and keep an eye on the figure — it is the single most common cause of a panel that "stopped delivering".

Metadata scraping

Many providers publish a public services page with descriptions and average delivery times that their API does not return. Enable scrape metadata on a provider and give it that public URL: a background task reads the page on a slow schedule — one provider per tick, at most once per AUTOMATION_SCRAPE_INTERVAL — and fills in the description and average time that your clients then see on the order form. The fetch is capped in time and size and is not allowed to reach private addresses.

When a provider misbehaves

Calls carry a timeout and a small number of retries, and a circuit breaker sits in front of every provider: after a run of consecutive failures the panel stops calling it for a cooldown period and moves on to the others, so one broken provider cannot hold up everybody else's orders. The thresholds are in §4.7.

Credentials are encrypted at rest Provider API keys, payment gateway secrets and messaging tokens are encrypted before they are stored, using your installation's APP_KEY. They are never returned by the API and never written to the log. This is also why replacing APP_KEY on a live panel is destructive: nothing already encrypted can be read back.

6. Catalogue

The catalogue is the three-level structure your clients browse: platforms → categories → services. Providers fill it; you curate it.

6.1 Platforms

Platforms are the social networks — Instagram, TikTok, YouTube, Facebook, X, Telegram and so on. RedFamosa ships with twenty-four definitions plus an Other catch-all, created the moment the panel is installed. They do two jobs: they group categories in the admin, and they power the network selector at the top of the client order form.

You do not create platforms by hand. When a category is imported, the panel infers its platform from the category name; anything it cannot place lands in Other, where you can reassign it.

6.2 Categories

Categories sit under a platform and group related services — Instagram Followers, TikTok Views. They are created automatically during a catalogue sync and can be renamed, reassigned or reordered in Admin → Categories. A category name is shared: the same name coming from two different providers is one category, not two, which is what lets you sell the same product from several sources without duplicating your shop.

6.3 Services

A service is what a client actually buys. Manage them in Admin → Services.

FieldWhat it does
NameThe name clients see. Yours to rewrite — provider names are often unreadable.
CategoryWhere it appears in the storefront.
TypeHow the order is submitted upstream. See the list below.
Cost per 1,000What the provider charges you. Filled by the sync.
Rate per 1,000What you charge. Cost plus your markup; edit it freely.
Min / MaxThe quantity range accepted. Orders outside it are refused at creation.
Provider & provider service IDWhich upstream account fulfils it, and under which ID.
RefillWhether clients may request a refill, within the guarantee window.
CancelWhether clients may request a cancellation.
Drip-feedWhether the service may be delivered in scheduled instalments (§7.4).
Average timeThe delivery estimate shown on the order form, from the metadata scrape or typed by you.
DescriptionThe detail panel on the order form: what is delivered, quality, guarantees.
StatusActive (orderable) or hidden (kept, with its order history, but out of the storefront).

Service types

The type decides which extra fields the order form asks for and how the order is sent upstream. It is set by the sync from the provider's own type and can be corrected by hand.

TypeWhat the client provides
DefaultA link and a quantity. Almost everything you sell is this type.
PackageA link only — the quantity is fixed by the package.
Custom comments / custom comments packageA link and the list of comments to post, one per line. The quantity is the number of lines.
Mentions (custom list, hashtag, user followers, media likers, with hashtags)A link plus the source of the people to mention: a list of usernames, a hashtag, another account's followers, or the accounts that liked a given post.
Comment likesA link to the post and the username whose comment should receive the likes.
SubscriptionsA profile link plus the rules for future posts: how many units per new post, and the range of posts to cover.
Drip-feed is not a type It is a flag any ordinary service can carry. A drip-feed service is still ordered normally; the client simply chooses to receive it in instalments (§7.4).

6.4 Bulk management

A first sync can bring in thousands of services, so the services screen is built for volume. Group the list by category, select rows individually, a whole category, or everything that matches the current filter, and apply one action:

Sell less, better A catalogue of four thousand near-identical services converts worse than eighty you can stand behind. Import everything, then hide what you have not tested. Hidden services keep their prices and come back with one click.

7. Orders

An order is a quantity of one service against one target link. From creation to completion the whole pipeline runs in the background: the panel dispatches to the provider, follows the order and reports what the provider actually says.

7.1 Placing an order

  1. The client picks a network from the grid at the top of the form.
  2. Then a category, then a service. The form shows the description, the average delivery time, the accepted quantity range and the price per 1,000.
  3. They paste the link and type the quantity; the charge is calculated as they type.
  4. Place order validates in one pass: the link and their account against the blacklists, the quantity against the service range, and the charge against their balance.

The charge leaves the wallet the moment the order is created — that is what an order in awaiting state means — and the background worker picks it up for dispatch on the next pass.

7.2 Bulk order

Clients who work with many links use the Bulk order tab. One order per line, three values separated by pipes:

service_id|link|quantity
143|https://example.com/profile/one|1000
143|https://example.com/profile/two|2500
207|https://example.com/post/abc|500

Every line is parsed before anything is created. A line with the wrong number of fields, a non-numeric service or quantity, or an empty link is reported with its line number and skipped — the valid lines still go through, so one typo does not cost the whole batch.

Three fields, no more Drip-feed values are not accepted in bulk. A line with a fourth field is rejected as a format error. Drip-feed orders are placed one at a time on the normal form, or through the public API.

7.3 Order states

These are the states an order moves through in the admin. The rule the whole pipeline is built around: an order only becomes Completed when the provider says so.

StateMeaning
AwaitingCreated and paid for; waiting for the next dispatch pass. Nothing has been sent upstream yet.
PendingAccepted by the provider, which returned its own order ID. The panel is now polling it.
ProcessingThe provider reports it is working on the order.
In progressDelivery has started.
ActiveA drip-feed parent whose instalments are still being released.
CompletedThe provider confirmed full delivery.
Part of the quantity was delivered and the rest will not be. The undelivered portion is refunded to the wallet.
CanceledCancelled before delivery. The charge is credited back to the client's wallet.
RefundedRefunded by an administrator after the fact.
ErrorThe provider rejected the order, or the service no longer exists. The provider's own message is stored on the order so you can see why.
SimulatedA manual marker meaning "this was never really sent upstream". Only an administrator can set it.
An error is not a refund When a provider rejects an order the panel does not silently return the money: it parks the order in Error with the provider's message attached, because the right answer is often to fix the service and retry rather than to refund. Deciding is your job — open the order and either retry it or cancel it, which is the action that credits the wallet. Watch the Error filter: a pile of them usually means an exhausted provider balance or a service ID that changed upstream.

The public API speaks a slightly different vocabulary, because API clients expect the standard SMM status names. The panel translates on the way out:

Internal stateReturned by the API
Awaiting, Pending, SimulatedPending
ProcessingProcessing
In progressIn progress
ActiveActive
CompletedCompleted
PartialPartial
Canceled, ErrorCanceled
RefundedRefunded

7.4 Refill, cancel and drip-feed

Refill

When a service has refill enabled and the delivered count later drops, the client gets a Refill button on the order row for as long as the guarantee window lasts (RF_REFILL_WINDOW_DAYS, thirty days as shipped). The request is forwarded to the provider and its refill reference is stored, so the refill can be followed separately from the original order.

Cancel

When a service has cancel enabled, a client — or you, from the admin — can ask for cancellation while the order is still undelivered. The request goes upstream; on confirmation the charge is credited back to the wallet as a new ledger entry. Cancellations that the client asks for arrive in Admin → Cancel Requests.

Drip-feed

Drip-feed spreads a delivery over time instead of dropping it all at once — the natural way to grow an account. On a drip-feed service the client sets:

Quantity
How many units each run delivers.
Runs
How many times to repeat it.
Interval
Minutes between runs, from 1 minute to 1,440 (24 hours).

The client pays the full amount once, when the parent order is created. From then on the background worker releases one child order per interval, each drawing its share from the amount already paid — no further debit is ever taken. The parent stays Active and shows overall progress; it becomes Completed when the last run has been released. Everything drip-feed related is listed under Admin → Drip-feed.

Drip-feed needs the background worker Runs are released by the same machinery that dispatches and polls orders. In middleware mode that machinery only moves when someone visits the site, so a panel with no traffic at 3 a.m. releases its 3 a.m. run late. If you sell drip-feed seriously, use scheduler or queue mode (§13).

7.5 Admin order management

Admin → Orders lists every order in your panel with filters by status, service, provider, client and date. From a row you can open the order, read the provider's raw response, retry a dispatch, and edit the status by hand.

Editing a status moves money only in one direction Setting an order to Canceled credits the client's wallet. Every other manual status change is a label change: it does not touch the balance. Use Simulated honestly — it exists to record that an order never reached a provider, not to make a failure look finished.

8. Billing

RedFamosa is prepaid. A client adds funds, and orders spend from that balance. Every movement — deposit, bonus, order charge, refund, adjustment, reseller margin, plan charge — is a line in a ledger.

8.1 The ledger

There is no editable "balance" column that could drift out of step with reality. A balance is the sum of that wallet's ledger entries, and entries are only ever appended — never edited, never deleted. That single decision is what makes the money in the panel auditable: you can always answer "where did this figure come from" by reading the lines.

Entry typeCreated when
depositA top-up is confirmed, manually or by a gateway.
bonusA top-up qualifies for a bonus tier (§8.3).
order_debitAn order is created.
order_refundAn order is cancelled or partially delivered.
reseller_cost_debitA reseller's client orders: the reseller pays you your price.
reseller_marginThe difference the reseller keeps on that same order.
manual_adjustAn administrator corrects a balance, with a reason.
chargebackA confirmed payment is reversed.
plan_charge / plan_refundA reseller subscription is billed or refunded (§10).

You read the ledger in Admin → Transaction Logs; clients see their own under Transactions in their area. To correct a balance, do not look for an editable field: use the balance adjustment on the user, which writes a manual_adjust entry with your reason attached.

8.2 Add Funds and payment methods

Payment methods live in Admin → Payments, where each one is a row you create, configure and enable. Three are available:

Manual / bank transfer

The client picks the manual method, enters an amount, uploads a proof of payment and submits. The deposit waits for you: you review it in the admin and approve or reject it, and approval is what credits the wallet (plus any bonus). You configure the instructions shown before the upload — bank details, a QR image, whatever your customers need — and you can attach an image to them.

Start here Manual is the method to enable on day one: it needs no account anywhere, works in every country, and lets you take real money while a gateway application is still being reviewed.

Stripe

Card payments through Stripe Checkout.

Publishable key
From your Stripe dashboard, under developer API keys.
Secret key
Stored encrypted; used server-side only.
Webhook secret
From the webhook endpoint you create in Stripe. It is what proves an incoming payment notification really came from Stripe.
Mode
Sandbox while you test, live when you are ready.

In your Stripe dashboard, add an endpoint pointing at {APP_URL}/api/webhooks/stripe.

PayPal

Client ID
From your PayPal REST application.
Secret
Stored encrypted; used server-side for the token exchange.
Webhook ID
The ID PayPal assigns to the webhook you create, used to verify notifications.
Mode
Sandbox or live.

The PayPal webhook endpoint is {APP_URL}/api/webhooks/paypal.

Test with a real, small payment Sandbox proves the keys are valid; it does not prove that your live account, currency and webhook are wired together. Before you announce the panel, switch to live and send yourself one minimal top-up. If the wallet does not move, the webhook is the first thing to check.

8.3 Payment bonuses

Admin → Payment Bonuses is where you reward bigger top-ups. A tier is three things: the payment method it applies to, the amount from which it applies, and the percentage to add.

Bank transfer   from  50   +5 %     a 50 top-up credits 52.50
Bank transfer   from 100  +10 %     a 100 top-up credits 110.00

The bonus is granted when the deposit is confirmed — on approval for a manual payment, on the gateway's confirmation otherwise — and it is written as its own bonus ledger entry, so the deposit and the gift you added to it never blur together in the accounts.

8.4 Multi-currency

The base currency you chose during installation is the currency of the ledger: every balance, charge and refund is recorded in it, and it is the only one that matters accounting-wise. Clients may nonetheless read the panel in another currency: they pick a display currency in their profile and every amount is converted for display only.

Admin → Currencies is where the list lives. Each currency carries a rate to base: how much one unit of that currency is worth in your base currency. Your base currency is pinned at 1 and cannot be switched off once there are ledger entries.

The rates are yours to maintain RedFamosa ships approximate rates so a fresh install is usable on day one. They are not a live feed and nothing updates them automatically. If you show prices in several currencies, put "review the exchange rates" on your own calendar — a stale rate quietly sells at the wrong price.

9. Resellers (child panels)

A reseller gets a panel of their own: their own address, their own name and colours, their own clients, their own catalogue prices, their own CRM inbox. To their customers it is a product, not a page of yours. Technically it is a child panel inside your installation, and the isolation is enforced at the database level — a reseller cannot read your data or another reseller's.

This chapter covers the reseller as a panel. Charging them a monthly fee for it is chapter 10.

9.1 The price chain

Four prices stack, and each participant only ever sees the two that concern them:

Provider cost        what you pay your upstream provider
  + your markup
= Owner price        your sale price
  + plan catalogue markup   (the cut attached to the reseller's plan, see 10.2)
= Reseller cost      what the reseller pays you per order
  + reseller margin
= Client price       what the reseller's own client pays

When a client of a reseller places an order, three things happen in one transaction:

Two ways to earn from a reseller You can take your cut on every order, by putting a catalogue markup on their plan; or you can give them your own price and charge a flat monthly fee instead. The seeded plans show both models: Free costs nothing but sells the catalogue at +30%, while Pro costs a monthly fee and sells at your own price. Mixing both is possible, but pick one story for each tier so a reseller can do the arithmetic.

9.2 Creating a child panel

Admin → Resellers → Resellers lists every child panel with its plan, subscription state, wallet balance and domains. Create reseller provisions everything in one action — the panel, its administrator account with the reseller role, and optionally their first subscription:

Panel name
The reseller's brand, used across their panel and e-mail.
Subdomain
The name under your platform host: max becomes max.panels.example.com. Requires RF_PANEL_BASE_HOST — without it the admin refuses to assign a subdomain and tells you which variable to set (§4.5).
Administrator
Name, e-mail and initial password of the person who will run the panel.
Primary colour
Their accent colour. They can change it later in their own settings.
Client template / landing template
Which storefront skin and which landing skin the panel opens with, chosen from the ones their plan includes.
Plan and trial
The subscription to start them on, with or without its trial period (§10).

From the same screen you can later adjust a reseller's balance, register a payment they made you, change their plan, edit their branding, or deactivate the panel.

9.3 Domains and SSL

A child panel can be served in two ways, and the reseller sees both on their own Domains screen:

RouteHow it worksRequires
Platform subdomain You give them name.panels.example.com. Nothing for them to configure; it works the moment you assign it. RF_PANEL_BASE_HOST, a wildcard DNS record and a wildcard certificate on your side.
Their own domain They add the domain in their panel and point its DNS at your server — an A record to RF_PANEL_IP for an apex domain, or a CNAME to RF_PANEL_CNAME_TARGET for a sub-domain. The panel gives them a TXT record to publish, checks it, and activates the domain once it verifies. At least one of the two DNS targets set in .env, and their plan allowing a custom domain.

Requests are routed by the Host header: the panel resolves which child panel owns the incoming host and serves that panel's branding, catalogue and prices.

Certificates are your hosting's job RedFamosa never issues TLS certificates. Each domain you serve needs one, from cPanel AutoSSL, from your VPS certificate tooling, or through a proxy such as a CDN that terminates TLS in front of you. A reseller's domain without a certificate loads with a browser warning, which is the fastest way to lose their customers — agree who handles it before you sell the tier.

9.4 Margin management

The reseller sets their own selling prices from Margins & Pricing in their panel — if their plan includes that module (§10.2). They can set a default margin over their cost for everything, override it for a whole category, and override it again for a single service. The most specific rule wins: service, then category, then the default.

Their clients never see your price, the provider's cost or anything else from upstream. They see one price, the reseller's.

9.5 Reseller balance

A reseller pays you the same way a client does: they top up their wallet through the payment methods you have enabled, and every order their clients place draws from it in real time. You can also register a payment manually from the reseller's row when they pay you by transfer.

An empty reseller wallet stops their shop If the reseller's balance cannot cover an order, the order fails at the debit and their client sees a plain "insufficient funds" message — with no hint that the reason is upstream. It looks like their panel is broken, and they will hear about it. Tell your resellers how the wallet works on day one, and keep an eye on the balance column in the reseller list.

10. Reseller plans and subscriptions

Plans turn resellers into recurring revenue. A plan defines what a child panel can do and what it costs per period; the fee is taken automatically from the reseller's existing wallet, as a ledger entry, with no card checkout and no second payment gateway to configure.

How a reseller pays their plan A reseller keeps one prepaid wallet in your panel — the same wallet their clients' order costs come out of. A plan charge is a debit from that wallet, written as a plan_charge ledger entry. They keep it funded through Add funds exactly as before. Nothing new to install, and one balance to watch instead of two.

10.1 Creating plans

Admin → Resellers → Plans. Three plans are seeded so you have a working commercial structure on day one — Free, Pro and Business — and you can edit, rename or replace them entirely.

Name and slug
The slug is the stable internal key; leave it blank and it is derived from the name.
Price and currency
0 makes a free tier. The currency must be your base currency, because the charge is a wallet debit.
Billing period
monthly, quarterly, semiannual, annual or lifetime. A lifetime plan is charged once and never renews.
Trial days
Delays the first charge until the trial ends. 0 means no trial.
Grace days
How long a subscription stays past due before it is suspended. Three days by default.
Public
Public plans appear on the reseller's own upgrade page, where they can switch to them without asking you.
Highlights
The selling lines shown on the plan card. Free text — a highlight describes what the tier gives, it never enforces anything.

10.2 The feature matrix

A plan does not meter usage. There are no quotas on clients, services or orders per day — a reseller on the smallest tier can grow without hitting a wall, which is the point. What a plan decides is which modules their panel has, what they pay for the catalogue and how many domains they may bring.

Modules that are always included

Six modules can never be switched off, because a panel without them is not a panel: the dashboard, categories and services, orders, clients, the finance area (wallet, top-ups, ledger and plan billing) and settings with branding.

Optional modules

Twelve more are checkboxes on the plan form. All of them are on by default — you switch a module off to build a cheaper tier, never on. A plan created before a module existed still grants it.

ModuleWhat the reseller loses without it
Margins & pricingThe screen where they set their own markup over your catalogue.
CRM inbox & channelsThe whole omnichannel inbox, contacts and labels.
CRM AI agentsAutomatic AI replies on their channels.
CRM automationsRule-based flows on their conversations.
Support ticketsTheir clients can no longer open tickets.
Team seatsSub-accounts with their own permissions.
Content & blogNews, FAQs, blog posts and static pages.
Landing page studioTheir own editable landing page.
Custom domainThe domains screen. It stays visible even on a subdomain-only tier, so they can see what a higher tier would add.
Client portalThe storefront their clients buy from.
Reseller APIThe public API surface for their own clients.
BlacklistBlocking links, domains and words on their panel.

The commercial dials

SettingMeaningSeeded values
Catalogue markup % Your cut over the owner price on every order this tier's resellers place. 0 means they buy at your own price. Free +30%, Pro 0%, Business 0%
Custom domains How many domains of their own they may connect. 0 means the platform subdomain only; -1 means unlimited. Free 0, Pro 1, Business 5
Own providers Whether they may connect their own upstream SMM provider and sell its catalogue alongside yours (§10.9). Off unless you turn it on. Business only
Client and landing skins Which storefront and landing designs the tier includes. A skin added in a future release is granted to existing plans rather than silently withheld. All, by default
Plan terms are read live Features resolve through the plan row as it is now. Move Free from +30% to +40% and every Free reseller moves with it on their next order — there is no per-subscriber snapshot to update, and no way to grandfather one reseller except by putting them on another plan. Only the money already agreed is frozen: price, currency and billing period are copied onto the subscription when it starts, so a price rise never surprises an existing subscriber mid-term.

10.3 Managing resellers

The reseller list shows plan, subscription status, wallet balance and domain count for every child panel. Provisioning a new one is covered in §9.2; opening a row gives you the subscription controls below.

10.4 Subscription actions

Every action that moves money is permission-gated: comp and refund need their own permissions, which staff do not have unless you grant them.

ActionEffect
Assign or change planStarts a new subscription; the previous one is retired to history. Optional price override and trial.
CompA free subscription: active, priced at zero, never charged. For partners and for making an apology stick.
Override priceFuture periods bill your figure instead of the plan price. Recorded on the subscription.
Extend expiryPushes the period end and the next charge forward by N days at no cost — goodwill without touching the price.
Suspend / reactivateLocks or unlocks the reseller area and blocks new orders on their storefront.
Cancel now / at period endImmediate lock, or let them ride out the period they paid for and expire at the end of it.
Refund a chargeCredits a plan charge back to the reseller's wallet as a plan_refund. Idempotent: refunding twice does not pay twice.

10.5 Billing lifecycle

A background pass charges each due subscription exactly once per period. The charge is idempotent and transactional: the period's charge row is unique, the subscription is locked for the attempt, and a period that is already paid short-circuits before any debit. A subscription moves through six states:

trialing --(charge succeeds at trial end)--> active
active   --(renewal succeeds)-------------> active
         --(not enough balance)-----------> past_due --(top up, charge ok)--> active
past_due --(grace elapsed)----------------> suspended --(pay, reactivate)---> active
                                            cancelled / expired  (end of life)
A failed charge never advances the period A reseller who cannot pay stays on the same period and is retried. They never get a free month out of a failed charge, and they never get double-charged for catching up.

10.6 Dunning and suspension

When a renewal fails for lack of balance the subscription becomes past due and a grace deadline is set from the plan's grace days. The reseller is e-mailed on the first and third failed attempt — enough to be noticed, not enough to be noise. If the grace window runs out the subscription is suspended and a final notice goes out. A trial that is about to convert triggers its own heads-up a few days before the first charge.

What a suspended reseller sees Their storefront stops accepting new orders with a polite "temporarily unavailable" message, while orders already in flight keep running to completion — their customers are not punished for their unpaid invoice. Their own admin area is locked down to the billing and top-up pages, so they can always pay their way out without contacting you.

10.7 Charge cadence

Billing rides on the same machinery as everything else in §13, so it works with or without a real cron:

Hourly is enough. A period boundary crossed within the hour is charged on the next pass, and a balance only changes when the reseller tops up.

10.8 Reseller self-serve billing

Resellers open Finance → Plan & Billing in their own panel to see their current plan, the next charge and their balance. When something is owed they get the amount due, a Pay now button that collects the period immediately from their wallet, and a link to add funds. They can also upgrade or downgrade to any public plan themselves — the difference is taken from the wallet, with no checkout and no ticket to you.

10.9 Own SMM provider

On a plan with own providers enabled, the reseller gets Storefront → My Providers. There they register their own upstream provider — URL and API key, stored encrypted — test the connection, and import its catalogue into their own services, alongside the catalogue they resell from you.

Price the tier accordingly A reseller with their own provider stops buying from you on those services. That is exactly why the feature belongs on your most expensive tier: the subscription replaces the per-order margin you no longer earn. The seeded Business plan is built on that trade.

10.10 Plan limits reference

SettingEnforced where
Optional module on/offThe reseller's sidebar and the routes behind it — a module that is off has no menu entry and no reachable page.
Catalogue markup %Order creation on the reseller's storefront: it is added to the owner price to form the reseller's cost.
Custom domainsReseller → Domains, when they try to add one.
Own providersReseller → My Providers: the screen only exists on a tier that allows it.
Client and landing skinsThe template pickers, in the admin and in the reseller's own settings.
Subscription usableThe reseller area as a whole, and the storefront order block when they are suspended.
No subscription yet? Nothing is enforced A reseller you created without assigning a plan keeps full access until one is assigned. Opt-in features such as own providers stay off until a plan unlocks them.

11. Public API

RedFamosa exposes the standard SMM API, the same key + action contract your own providers speak. Any bot, reseller integration or shop plugin written for that format works against your panel without a single change — which is exactly why your customers will ask for it.

11.1 The endpoint

POST {APP_URL}/api/v2

{APP_URL}/api/v1 is an alias of the same handler, so clients configured for either version work. Requests may be sent as application/x-www-form-urlencoded, as JSON, or even as a query string on a GET — the parameters are read the same way. Two are always required:

key
The caller's API key. It identifies the user and the panel, so a reseller's client automatically gets the reseller's catalogue and prices.
action
The operation to perform.

Responses are JSON. Errors come back as {"error": "..."} with a human-readable message.

11.2 Actions

ActionParametersReturns
services— An array of the active services this key may order, each with service, name, type, category, rate, min, max, dripfeed, refill and cancel. rate is the price this caller pays.
add service, link, quantity; plus runs and interval for drip-feed, comments for custom comments, and the equivalent extras for the other service types {"order": 12345}
statusorder {"charge","start_count","status","remains","currency"}. A drip-feed parent answers with its status, its runs and the list of child order IDs.
status (multiple)orders — comma-separated IDs An object keyed by order ID; an unknown ID returns {"error": "..."} in its own slot instead of failing the whole call.
balance—{"balance","currency"}
refillorder, or orders for several{"refill": id}, or one entry per order.
refill_statusrefill, or refillsThe state of a refill request.
cancelorders — comma-separated IDsOne entry per order with its cancellation ID or an error.

A complete example

curl -X POST https://panel.example.com/api/v2 \
  -d "key=YOUR_API_KEY" \
  -d "action=add" \
  -d "service=143" \
  -d "link=https://example.com/profile/one" \
  -d "quantity=1000"

{"order":12345}

11.3 Idempotency-Key

Network calls fail halfway. A client that retries an add without protection buys the same order twice — and then asks you for a refund. Send a unique key with each order attempt and the problem disappears:

POST /api/v2
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000

key=YOUR_API_KEY&action=add&service=143&link=https://example.com/p/1&quantity=1000

The first request creates the order and its answer is stored against the key. A later request with the same key replays that stored answer instead of creating a second order, for as long as RF_API_IDEMPOTENCY_TTL allows — 1,440 minutes, that is 24 hours, as shipped. If a retry arrives while the first one is still being processed, it is told so rather than being let through.

Generate one key per intent The key must identify the order the customer meant to place, not the HTTP call: generate a UUID when the customer presses the button and reuse it for every retry of that same order. Applies to add only — the other actions are already safe to repeat.

11.4 Rate limits

The API is limited per key: RF_API_RATE_LIMIT requests per minute, 120 as shipped, and 0 removes the limit entirely (§4.7). Over the limit the answer is HTTP 429 with a Retry-After header telling the client how many seconds to wait. Requests carrying an invalid key are throttled separately and more tightly, which is what stops someone guessing keys.

11.5 Outgoing webhooks

Instead of having integrations poll status in a loop, let the panel push. Configure the endpoint in Admin → Webhooks: the URL to call and the signing secret it will be signed with.

When an order changes state the panel POSTs JSON:

{
  "event":     "order.status_changed",
  "timestamp": "2026-01-31T10:24:05+00:00",
  "data": {
    "order":       12345,
    "status":      "Completed",
    "charge":      "4.5000",
    "start_count": 1200,
    "remains":     0,
    "currency":    "USD",
    "service":     143,
    "link":        "https://example.com/profile/one"
  }
}

Every delivery carries an X-Webhook-Signature header: an HMAC-SHA256 of the body computed with your signing secret. Verify it before you trust a payload — otherwise anyone who learns your endpoint can invent order updates.

Attempts
RF_WEBHOOK_MAX_ATTEMPTS, five as shipped.
Backoff
1 minute, 5 minutes, 15 minutes, then 1 hour — roughly an hour and a half of retries in total.
Timeout
RF_WEBHOOK_TIMEOUT seconds per attempt, ten as shipped. Answer 200 fast and do your work afterwards.
Webhooks are configured by the panel owner This is an operator-level integration, not a per-client setting: clients get their orders through the API, and you get the push notifications. There is no webhook field in the client area.

11.6 Getting the API key

A client finds their key in their own area under API, where they can issue one and regenerate it. The key is displayed once, at the moment it is created: only a hash of it is stored afterwards, so nobody — including you — can read it back later. A client who loses their key regenerates it, which invalidates the old one.

Each key belongs to one user in one panel. A reseller's client calling the API gets the reseller's catalogue at the reseller's prices, never yours. The API as a whole can be switched off for the panel in Settings → Default setting.

12. CRM — omnichannel

One inbox that turns WhatsApp, Messenger, Instagram, Telegram, e-mail, a web-chat widget and your own support tickets into a single conversation stream — answered by AI when you want, driven by automations, and wired to turn a chat into a paying client of the panel.

12.1 Overview

The CRM is built into the product. There is nothing extra to install: once the panel is installed it appears as the CRM group in the sidebar of the owner admin (/admin/crm) and of every reseller panel (/panel/crm).

What it gives you
  • A three-pane unified inbox
  • Seven channels, including internal tickets
  • AI agents with a knowledge base
  • A visual automation builder
  • The chat-to-client conversion funnel
  • An embeddable web-chat widget
  • Contacts, labels and quick replies
  • Reports, and full isolation per panel

In one paragraph: an operator — you, or one of your resellers — receives messages from every channel in one place. An AI agent can answer automatically using a knowledge base you paste in, and hand over to a human when it is out of its depth. An automation can run a whole flow: greet a prospect, create a client account on the panel, send the credentials over the same chat, force a password change on first sign-in and hand the conversation to a sales agent. That is the full path from a social-media message to a client who tops up and orders.

Roles at a glance

RoleWhat they do in the CRM
Owner / super adminEverything. Configures the Meta and Instagram apps, the AI keys and every setting, and sees the internal Support channel.
StaffWorks the inbox and manages agents, automations, contacts, labels and reports — but cannot touch channel credentials or CRM settings.
Reseller adminThe same CRM, scoped to their own panel: their own channels, their own AI keys, their own inbox. They never see yours.
ClientDoes not see the operator inbox at all. They chat through the web widget and open support tickets, which reach you as conversations.
Every panel is isolated, including in the background Each panel stores its own channel credentials, AI keys and settings, encrypted and invisible to any other panel. Each panel has its own webhook address and verify token (§12.14), so a reseller's WhatsApp messages route to the reseller and never to you. Inbox, contacts, automations, labels and reports are filtered to the current panel, and every queued job pins its panel before touching data.

12.2 Permissions and roles

The CRM adds eleven permissions to the panel's role system. They gate both the menu entries and the actions inside each screen.

PermissionGrants
crm.viewBaseline access to the CRM area.
crm.inboxOpen the inbox and read conversations.
crm.sendReply, write internal notes, assign and resolve.
crm.channels.manageSee the Channels screen and the token-health state.
crm.channels.credentialsWrite channel credentials: create, edit or delete a channel, connect through OAuth, sync WhatsApp templates, register the Telegram webhook.
crm.ai.manageCreate AI agents and manage the knowledge base.
crm.automations.manageBuild and switch on automations.
crm.contacts.manageManage the contact directory and quick replies.
crm.labels.manageManage labels and quick replies.
crm.reports.viewView the CRM reports.
crm.settings.manageOpen CRM Settings: the Meta and Instagram apps, verify token, AI keys, widget and operational toggles.

Who gets what out of the box

Rolecrm.channels.credentialscrm.settings.manageThe other nine
Super adminyesyesyes
Staffnonoyes
Reseller adminyesyesyes
Clientnonono
Staff cannot touch secrets, by design A staff member can work the entire inbox and even see the channel list, but can never overwrite an access token or app secret, delete a channel, or open CRM Settings. A reseller admin manages their own credentials, because they are theirs. If you want a staff member to connect channels, grant crm.channels.credentials to their role explicitly.

To build a chat-only agent role, create a role with just crm.view, crm.inbox and crm.send. Whether that agent sees every conversation in the panel or only their own is the agent visibility setting (§12.4).

12.3 The unified inbox

Open it at /admin/crm, or /panel/crm in a reseller panel. Three panes side by side:

PaneContents
Left — conversationsThe filtered list, most recent first, paginated (twenty-five per page as shipped). Each row shows the contact, the channel, a preview of the last message, how long ago it arrived and an unread badge.
Middle — threadThe full history, the channel banner (for example the state of the WhatsApp 24-hour window) and the reply box.
Right — contextThe contact card, the linked client account if there is one, labels, the assigned AI agent and human, and quick actions.

Tabs, filters and search

Status tabs
Open, Pending, Resolved, each with a live counter.
Assignment
All, mine, or unassigned.
Channel
Narrow to one channel type, or show everything.
Search
Free text across the conversations in the current tab.

The list refreshes by polling, and the open thread refreshes faster, so new messages appear without touching anything. There are no websockets — deliberately, because that is what makes the inbox work on plain shared hosting.

Working a conversation

Support tickets arrive here too Every panel has an implicit Support channel. When a client opens or replies to a support ticket — from their own area, unchanged for them — it appears in your inbox as an ordinary conversation. Reply from the inbox and it is written back to the ticket; resolve it here and the ticket closes. The ticket stays the system of record; the inbox is the single envelope your team works from. AI on support tickets is off by default.

12.4 CRM Settings — the one-time setup

Channels live at CRM → Channels, but before any Meta channel can be connected you must fill in your app details at CRM → CRM Settings. Secrets there are write-only — leaving a secret field blank keeps the stored value — and are encrypted at rest.

Meta app (WhatsApp, Messenger, Instagram messaging)

Meta App ID
From your app on the Meta developers site, under basic settings.
Meta App secret
Same page. Used server-side to verify webhook signatures and exchange OAuth codes.
Embedded Signup configuration ID
The WhatsApp Embedded Signup configuration from your Meta app. This is what enables the one-click Connect WhatsApp button.
Verify token
Any string you choose; leave it blank and one is generated. You paste the same value into your Meta app's webhook configuration.
Graph version
The Graph API version, v21.0 as shipped. Change it only when Meta asks you to.

Instagram app

Instagram messaging uses a separate child app with its own credentials — that is Meta's design, not ours. Enter its App ID and App secret here to enable the Connect Instagram button.

The two values you copy into Meta

Webhook URL
{APP_URL}/crm/webhooks/meta/{panelUid} — paste it into your Meta app as the callback URL. The identifier at the end belongs to this panel only.
OAuth redirect URI
{APP_URL}/crm/oauth/callback — add it to the valid OAuth redirect URIs. One redirect serves you and every reseller.

Paste your verify token alongside the webhook URL in the same Meta screen.

What to enable in the Meta app Add the products you need — WhatsApp, Messenger, Instagram — subscribe the app to webhooks for the messaging fields, and request the messaging permissions for each product. While your app is in development mode only users you added as testers or admins can connect it, which is the usual reason a connection works for you and not for a colleague.

The rest of the screen

AI keys
Panel-level OpenAI, Anthropic and Gemini keys, used when an agent has no key of its own (§12.11).
Knowledge base
Switch it on or off and set how many knowledge chunks are retrieved per answer (five by default).
Widget branding and allowed origins
The text under the widget and the list of sites allowed to embed it (§12.13).
Auto-resolve days
Automatically resolve conversations idle for N days. Zero disables it.
Agent visibility
All lets agents see the whole panel; assigned limits them to conversations assigned to them or unassigned.
Notification sound
Play a sound when an unread message arrives.
E-mail new-thread hours
How long before a reply by e-mail is treated as a new conversation rather than the same one.
AI on support
Whether the AI may answer internal support tickets. Off by default.
Welcome tour steps
The content used by the welcome-tour automation step.

12.5 WhatsApp (Cloud API)

The easy way. Once the App ID, App secret and Embedded Signup configuration ID are saved, a Connect WhatsApp button appears on the Channels screen.

  1. Click Connect WhatsApp. A Meta window opens.
  2. Sign in and choose — or create — the WhatsApp Business Account and the phone number to authorise.
  3. The window returns a code, which the panel exchanges server-side; your App secret never reaches the browser. The WhatsApp account is subscribed to your webhook and the channel is filled in automatically: phone number ID, business account ID and display number.

Manual alternative. If you already have the values from Meta's API setup screen, use Add channel → WhatsApp and fill in the phone number ID (the routing identifier), a permanent access token, the App secret, the WhatsApp Business Account ID and the display number.

The 24-hour window and templates WhatsApp only allows free-form messages within 24 hours of the customer's last message. Outside that window you must send an approved template. The inbox shows the window state on the thread banner and blocks a free-form send once it has closed. Use the channel menu's Sync templates to pull your approved templates from Meta.
A Meta channel needs its App secret Inbound webhook signatures are verified fail-closed: a WhatsApp, Messenger or Instagram channel with no stored App secret cannot verify incoming messages, so it will not receive any. Always save the secret.

12.6 Messenger

  1. On Channels, click Connect Messenger. Facebook's consent dialog opens, asking for the page-messaging permissions.
  2. Authorise your page. The panel exchanges the code server-side, subscribes the page to your webhook and creates the channel.

Manual alternative: Add channel → Messenger with the page ID (the routing identifier), a page access token and the App secret.

Outside the 24-hour window Messenger enforces its own 24-hour rule. Outside it, the panel sends with the human-agent message tag where the conversation is eligible for it.

12.7 Instagram

Enter the separate Instagram app credentials in CRM Settings first, then:

  1. Click Connect Instagram on the Channels screen.
  2. Authorise the Instagram business account — Instagram messaging requires a business or creator account linked to a Facebook page.
  3. The panel completes the token exchange, creates the channel and subscribes it. The long-lived token is stored and refreshed automatically before it expires.

Manual alternative: Add channel → Instagram with the Instagram account ID (the routing identifier), an access token and the App secret.

Token health The Channels screen shows a token badge. Instagram's long-lived tokens last around sixty days; a background task validates them and refreshes them ahead of the deadline. If one was revoked you will see a reconnect indicator — run the connect flow again and it is fixed.

12.8 Telegram

Telegram needs no Meta app, just a bot.

  1. In Telegram, ask BotFather for a new bot and copy the bot token and the bot's username.
  2. On Channels, Add channel → Telegram, paste both and save.
  3. Open the channel menu and click Register webhook. This tells Telegram to deliver updates to {APP_URL}/crm/webhooks/telegram/{channelUid}, with a secret token derived from your bot token so that only Telegram can post to it.

Messages to your bot now land in the inbox, and reply keyboards produced by button steps are rendered natively.

12.9 Email (IMAP and SMTP)

E-mail is pulled over IMAP — there is no webhook — and sent over SMTP. Use Add channel → Email:

Email address
The mailbox, which is also the routing identifier.
Password
The mailbox password. For a provider with two-factor authentication, an app password.
IMAP host and port
For incoming mail, typically port 993.
SMTP host and port
For outgoing replies, typically port 465 or 587.
From name
The display name on replies.

A background task polls the mailbox on an interval — every sixty seconds as shipped — so this channel depends on your automation mode actually running (§13). Replies are threaded by message ID, quoted text is trimmed, and automatic replies are filtered out instead of starting conversations with a robot.

12.10 Web Chat and Support

Add channel → Web Chat creates the widget channel:

Widget title
The header of the chat window.
Greeting
The first message a visitor sees.
Accent colour
The launcher and header colour. It starts from the panel's own primary colour, so a reseller's widget matches their brand without being told to.
Position
Bottom left or bottom right.

Saving gives you the script tag to paste into any site — see §12.13 for embedding, branding and security.

The Support channel, by contrast, is created for you: one per panel, not shown in the channel list and not editable. It exists only to bring your internal tickets into the inbox.

12.11 AI agents

Manage them at CRM → AI Agents. An agent is a reusable configuration that answers conversations automatically while the bot is active on them.

  1. New agent, and give it a name such as "Sales" or "FAQ bot".
  2. Pick a provider and a model.
  3. Optionally paste an API key for this agent; leave it blank to use the panel-level key. Test key validates it against the live provider before you save.
  4. Write the system prompt — the persona, the rules, the goal. This is where the quality of the whole thing is decided.
  5. Set the temperature and the maximum tokens per reply.
  6. Decide whether fallback to human is on, and save.
ProviderSelectable models
OpenAIgpt-4o-mini, gpt-4o, gpt-4.1-mini, gpt-4.1
Anthropicclaude-3-5-haiku-latest, claude-3-5-sonnet-latest, claude-sonnet-4-latest
Geminigemini-1.5-flash, gemini-1.5-pro, gemini-2.0-flash
Every panel pays for its own AI An agent uses its own key first and falls back to the panel-level key. Keys are never shared between panels, so each reseller pays for their own usage — you are not funding their bot. Knowledge-base embeddings are the one exception in kind: they always use an OpenAI key, the agent's or the panel's.

Knowledge base

While editing an agent, add knowledge sources: a title and the text — your FAQs, prices, policies, service descriptions. The panel splits it into chunks and indexes them; when the agent answers, the most relevant chunks are retrieved and injected into the prompt, so replies come from your content instead of from the model's imagination. How many chunks are used is the top K value in CRM Settings, five by default.

Handing over to a human

With fallback to human on, the agent is told it may emit a [TRANSFER] marker when it cannot help. When it does, the panel strips the marker from the text, pauses the bot on that conversation and assigns it to the least loaded member of the team. With the setting off, the agent never hands over by itself — a pure round-the-clock FAQ bot — though a human can always take over simply by replying.

Switching AI on

If the AI does not answer A conversation only gets an AI reply when the bot is active and not paused, the conversation has an agent (or the panel has a default one), there is a valid API key, and the incoming message is text — a bare image does not trigger a reply. For support tickets, AI on support must also be on. See §14.4.

12.12 Automations

Build flows at CRM → Automations. An automation is a trigger plus a flow of steps that you assemble from a palette.

Triggers

TriggerFires when
First messageA brand-new conversation starts. A channel-specific flow wins over an all-channels one.
KeywordAn incoming message contains the text you specify, matched without case sensitivity.
Every messageAny inbound message at all.
Conversation assignedA conversation is assigned to a team member.
Label addedA label is attached to a conversation.
Conversation resolvedA conversation is marked resolved — useful for a satisfaction follow-up.

The step palette

GroupSteps
Messaging Send message (interpolated text) · Send media (image, audio, video or document by URL, with a caption) · Send gallery · Send buttons (rendered natively where the channel supports it) · Ask question (waits for the reply and stores the answer for later steps)
Flow Condition · Branch (wait for a keyword reply and take the matching path) · Wait · Drip follow-up (a deferred message, optionally only if the contact has not replied)
Actions Add label · Remove label · Set status · Assign AI agent · Assign staff · Pause bot · Resume bot · Create client account · Call webhook (an outbound POST or GET with an interpolated body, protected against internal-address abuse and capped at ten seconds)

Placeholders

Text steps interpolate values from the conversation. The editor offers the common ones as clickable chips:

{{contact.name|there}}     the contact's name, or "there" when unknown
{{contact.email}}         {{contact.phone}}
{{company.name}}          the panel's name
{{agent.name}}            the assigned team member
{{answers.email}}         an answer captured by an "ask question" step

The engine also resolves {{channel.name}}, {{channel.type}}, {{company.email}} and {{message.content}}, and any {{answers.<key>}} you defined in an ask question step. The | syntax supplies the fallback when a value is empty.

Templates

Fourteen ready-made flows ship with the product, so you rarely start from an empty canvas: order funnels and catalogue welcomes for WhatsApp, an Instagram DM welcome, new-customer onboarding, the capture-and-convert funnel, a keyword pricing responder, social-proof conversion and nurture flows, a win-back sequence, web-chat lead capture, an FAQ triage, a Telegram start menu, a Messenger FAQ with hand-off, and a plain welcome. Load one and edit it — it is faster than designing a flow from scratch, and it shows you what the steps do.

The flagship flow: capture and convert

Start a new automation from the Capture & convert template. It builds a first-message flow that welcomes the prospect, creates a client account on your panel, sends a short tour and hands the conversation to a sales agent.

What the create client account step really does:

The password is forced to change Accounts created from a chat are flagged. On first sign-in the client is sent to a mandatory change-password screen before they can do anything else, and the account is marked activated once they have.
Accounts are never created behind your back The CRM does not create a client because someone said hello. A client account is only ever created by an explicit create client account step in an automation you built, so you decide the exact moment a prospect becomes a client.

Save the automation, then switch it on from the list. The runs counter shows how many times it has executed, and flows are validated server-side on save.

12.13 The web chat widget

The web-chat channel gives you a widget for any external site.

<script src="https://panel.example.com/crm/widget/CHANNEL_UID.js" async></script>

Paste it before </body>. The script injects a floating launcher with your title, greeting, colour and position. It has no dependencies, keeps its session in the visitor's browser storage and polls for new messages.

Title, greeting, colour and position come from the channel; the small branding line under the widget comes from CRM Settings — blank hides it, which is what a reseller wants for a white-label site.

Putting it on your own landing page

You do not need to edit a template. Open Settings → Analytics, paste the same snippet into the free-form field, and save. It is rendered in the <head> of your landing page and of every public page, so the launcher appears on your own site exactly as it does on an external one.

Turn the Analytics switch on That field is only rendered when the master Analytics enabled toggle on the same screen is on. Pasting the snippet with the toggle off saves it but prints nothing, and the widget never appears. The field is shared with Google Analytics, Tag Manager and Meta Pixel — the toggle governs all of them at once.

Copy the snippet from the channel's own card on the Channels screen: it is generated with your panel address. A snippet copied from another installation — a demo, or a second panel of your own — points at that installation, so the visitor's messages arrive in its inbox and never reach yours.

Security: allowed origins

The widget endpoints enforce a fail-closed list of allowed origins per panel. In CRM Settings → widget allowed origins, list the sites permitted to embed it, one per line:

Exact host
shop.example.com
Wildcard subdomain
.example.com — any sub-domain of it
Anything
* — not recommended in production

The panel's own domain is always allowed. An origin that is not on the list gets no CORS header at all, so the embed simply does not work — which is the point. The widget's session is an opaque server-side token rather than a guessable ID — it travels in an X-RF-Widget-Session header — and the endpoints are rate-limited.

Signed identity for signed-in visitors

If you embed the widget on a page where the visitor is already signed in to your panel, you can hand the widget a signed identity so their chats attach to their account and survive across sessions. Set a global before the script loads:

<script>
  window.RF_WIDGET_IDENTITY = {
    user_id: 4821,
    name:    "Alex Doe",
    email:   "alex@example.com",
    expires: 1750000000,          // unix timestamp
    sig:     "hmac-sha256-hex"    // see below
  };
</script>
<script src="https://panel.example.com/crm/widget/CHANNEL_UID.js" async></script>

Your server computes the signature as:

sig = HMAC-SHA256( "{channel_uid}|{user_id}|{expires}", APP_KEY )

The panel re-verifies the signature and the expiry on every call and confirms the user belongs to the channel's panel. An invalid or expired signature is treated as an anonymous visitor rather than an error, so a stale page never breaks the chat.

12.14 Webhooks per panel

Each panel has its own inbound endpoints. The Meta channels share one address per panel; Telegram has one per channel:

Meta (WhatsApp + Messenger + Instagram)
  {APP_URL}/crm/webhooks/meta/{panelUid}         GET and POST

Telegram
  {APP_URL}/crm/webhooks/telegram/{channelUid}   POST

Both values to copy are shown on each panel's own CRM Settings screen. E-mail uses no webhook, and the widget resolves its panel from the channel identifier in the script URL.

How the work behind an inbound message is executed — parsing, media download, AI reply, automations — depends on AUTOMATION_MODE, exactly as for the rest of the panel: the webhook answers immediately and hands the work to the background. See §13.

12.15 Security notes

13. Cron and automation

A panel is not a website that waits to be clicked. Orders have to be sent upstream, their status polled, drip-feed runs released, catalogues synced, mailboxes read, channel tokens refreshed and reseller subscriptions charged. All of that is background work, and AUTOMATION_MODE decides how it runs.

13.1 The three modes

ModeHow the work runsRight for
middleware Each incoming web request also drains a little background work, with a lock so two visitors never run the same pass twice and a hard limit on how much one request may do. No cron, no worker, nothing to configure. Shared hosting, and any panel with steady traffic. This is what the installer sets.
scheduler One cron entry, once a minute, drives everything. Work happens on time whether or not anyone is visiting. Any host where you can add a cron job. The best value for the least effort.
queue The same once-a-minute cron enqueues the work, and a persistent worker executes it immediately as jobs arrive. Highest throughput and the most responsive. A VPS with a process supervisor, and panels with real volume.
The honest limitation of middleware mode It only moves when someone visits your site. A panel with no traffic overnight dispatches nothing overnight, and a drip-feed run scheduled for 4 a.m. is released when the first visitor arrives in the morning. It is a perfectly good way to start, and the right answer on hosting without cron — but the day you sell drip-feed or promise fast delivery, move to scheduler.

You can switch mode without editing files, in Admin → Cron Jobs. That screen also lists each scheduled task with the time it last ran and a Run now button — the fastest way to prove that your background processing actually works.

13.2 Setting up cron on cPanel

In cPanel → Cron Jobs, add a single entry running every minute:

* * * * * /usr/local/bin/php /home/USERNAME/redfamosa/artisan schedule:run >> /dev/null 2>&1

Two things to get right:

Then set AUTOMATION_MODE=scheduler. That one cron line drives two scheduled tasks: the automation tick every minute, and reseller plan billing every hour.

13.3 Running a queue worker

On a VPS, set AUTOMATION_MODE=queue, keep the once-a-minute cron entry from §13.2, and run a persistent worker:

php artisan queue:work --sleep=3 --tries=3 --timeout=60 --max-time=3600
Queue mode still needs the cron line In this mode the scheduled tick does not do the work itself — it enqueues it, and the worker executes it. Without the cron nothing is ever enqueued and the panel goes quiet. Cron plus worker is the correct combination.

Use Supervisor or a systemd unit to keep the worker alive and restart it if it stops. --max-time=3600 makes it exit once an hour so the supervisor restarts it with fresh code and fresh memory — also the reason you must restart the worker after an update.

13.4 What runs in the background

One thing to check when something "stopped working" Open Admin → Cron Jobs and read the last-run column. Nine times out of ten, an order that never left, an e-mail that never arrived and a subscription that was never charged are the same problem: the background worker is not running.

14. Troubleshooting and FAQ

14.1 Installation

"Please provide a valid cache path"

The application cannot write its compiled views. The storage/framework folder is missing its sub-folders, or they are not writable. Make sure these exist and are writable by the user that runs PHP:

storage/framework/cache/data
storage/framework/sessions
storage/framework/views
storage/logs
bootstrap/cache

Some FTP clients and unzip tools silently drop empty directories, which is how the folders go missing in the first place. Create them by hand in File Manager, set them to 755, and reload.

"No application encryption key has been specified"

There is no .env file. RedFamosa creates it on the first request by copying .env.example and then generating the key — so this message means the copy could not happen. Check that .env.example is present in the project root (some extraction tools skip files whose names start with a dot) and that the project root is writable so the new file can be created. Copying .env.example to .env yourself and reloading the page fixes it immediately.

The wizard's buttons and links point at https:// but the site is on http://

Everything the panel generates — links, form actions, redirects — uses the scheme written in APP_URL. If that value starts with https while the site is still served over plain http, every link points at an address your server does not answer, and the panel looks broken even though nothing is wrong with it.

Fix it in one of two ways: install the certificate and really serve the site over HTTPS (recommended), or edit APP_URL in .env to start with http://. Then reload. If you already finished the installation, also make sure SESSION_SECURE_COOKIE matches: true on HTTPS, false on plain HTTP — a secure cookie on an insecure site means nobody can stay signed in.

A requirements check will not turn green

See the table in §3.3. The most common case on shared hosting is that the domain is running an older PHP version than the account's default: change it in MultiPHP Manager for that specific domain, not globally.

A 500 error, or a blank page, right after uploading

The installer opens again on a panel that is already installed

storage/app/installed.lock is missing — almost always because storage/ was overwritten during an update. Do not run the wizard again: it would try to migrate an existing database. Restore the file from your backup, or create it with any content, and the panel comes straight back.

14.2 Orders and providers

Orders sit in "Awaiting" and never leave

Nothing is dispatching them. Open Admin → Cron Jobs and look at the last run of the automation tick. In middleware mode, remember the work only happens when someone visits the site — open the storefront in another tab and watch the timestamp move. If it does not move at all, see §13.

Orders end up in "Error"

The provider rejected them, and its own message is stored on the order — open one and read it. The usual causes, in order of likelihood: your balance at the provider is exhausted; the provider changed or removed that service ID; the link does not match what the service expects; the quantity is outside the provider's own limits. Fix the cause, then retry the order or cancel it to refund the client (§7.5).

What does "Simulated" mean?

It is a manual marker meaning "this order never really went upstream". Nothing sets it automatically. It exists so an operator can record the truth about an order instead of quietly marking it complete — and note that setting it does not refund anything: to return the money you cancel the order.

Can I connect more than one provider?

Yes, as many as you like. Any provider speaking the standard SMM API works. Different services can come from different providers, which is also how you build redundancy: keep a second provider configured for your best-selling services and repoint the service if the first one degrades.

A drip-feed order is releasing its runs late

Expected in middleware mode, where runs are released by visitor traffic. Move to scheduler mode (§13.2).

14.3 Billing and resellers

A client's balance is wrong

Balances are the sum of ledger entries, so there is no field to correct. Open the user in Admin → Users and adjust the balance with a positive or negative amount and a reason: that writes a new ledger entry and the displayed balance updates at once, with the history intact.

A card payment succeeded but the wallet did not move

The gateway's notification is not reaching you. Check that the webhook endpoint is registered in the gateway dashboard with the right address ({APP_URL}/api/webhooks/stripe or {APP_URL}/api/webhooks/paypal), that the signing secret in the payment method matches the one the gateway shows, and that APP_URL is the address the gateway can actually reach.

A reseller's subdomain does not resolve

Three things must all be true: RF_PANEL_BASE_HOST is set in .env, a wildcard DNS record for that host points at your server, and your web server answers for the wildcard with the same document root as the main panel. See §4.5.

A reseller cannot add their own domain

Either their plan does not allow custom domains — check the plan's domain count (§10.2) — or you have not filled in RF_PANEL_IP or RF_PANEL_CNAME_TARGET, in which case they are being asked to point their DNS at nothing.

A reseller says their clients cannot order

Look at two columns in the reseller list: their wallet balance and their subscription status. An empty wallet fails the debit for every order their clients place, and a suspended subscription blocks new orders on their storefront on purpose (§10.6).

14.4 CRM and channels

The "Connect WhatsApp / Messenger / Instagram" button is not there

Those one-click buttons only appear once the panel's app credentials are saved. For WhatsApp and Messenger you need the Meta App ID and App secret — plus the Embedded Signup configuration ID for the WhatsApp one-click flow; Instagram needs its own separate App ID and secret. You can always create the channel manually instead (§12.5–§12.7).

WhatsApp messages will not send

You are almost certainly outside the 24-hour window: free-form messages are only allowed within 24 hours of the customer's last message, and after that you must send an approved template. Run Sync templates on the channel and send one. If that is not it, test the channel's access token from its menu.

The AI does not reply

Check in this order: is there a default agent, or an agent assigned to that conversation; is the bot active and not paused (a human reply pauses it); is there a valid API key on the agent or on the panel; for a support ticket, is AI on support switched on. And remember the agent answers text — a bare image does not trigger a reply.

Telegram messages never arrive

Open the channel's menu and click Register webhook. Until you do, Telegram does not know where to deliver anything.

E-mails never arrive in the inbox

E-mail is pulled on a schedule, so your automation mode has to be running (§13). Then check the IMAP host and port, and make sure you used an app password if the mailbox has two-factor authentication.

The web widget does not connect

Add the site's domain to the widget's allowed origins in CRM Settings (§12.13). Requests from a domain that is not on the list are refused. Also confirm the channel is active and that the script URL carries the right channel identifier.

Messages are landing in the wrong panel

Each panel must copy its own webhook URL and verify token, from its own CRM Settings, into its own Meta app. The panel is chosen by the identifier in the webhook path, so a reseller who reuses your URL receives your routing.

A staff member cannot connect a channel or open CRM Settings

That is intended: staff do not hold crm.channels.credentials or crm.settings.manage. Grant those to their role if you want them to, or do the connection yourself (§12.2).

An Instagram channel shows "reconnect"

Instagram's long-lived tokens expire after about sixty days. The panel refreshes them automatically, but a token that was revoked cannot be refreshed — run Connect Instagram again.

Where do clients created from a chat end up?

They become ordinary client accounts on the same panel as the conversation, with a wallet created on their first credit or order. They sign in at that panel's client area, are forced to change their password once, and behave like any other client from then on (§12.12).

14.5 Maintenance

I changed APP_URL and the old address is still used

Clear the compiled configuration: php artisan optimize:clear. Without SSH, deleting the files inside bootstrap/cache/ has the same effect — they are regenerated on the next request.

How do I change the panel's language, or add one?

Admin → Languages is where the list lives and where the default is set; individual users choose their own in their profile. English and Spanish ship enabled, with several more locales listed and switched off.

How do I stop new registrations?

Settings → Default setting, and turn client sign-up off. The register link disappears and the route stops accepting registrations; you can still create clients yourself from the admin.

Where are the logs?

storage/logs/. The application log rotates daily and keeps a fortnight by default. If you are chasing a problem, set LOG_LEVEL=debug in .env, reproduce it, then put the value back to error — debug logging on a busy panel fills a disk faster than you would expect.

How do I update to a new version?

See §3.9. In short: back up, upload over the top without touching .env or storage/, run the migrations, clear the caches, and restart the queue worker if you use one.

15. Support and changelog

15.1 Getting support

If the manual has not answered your question:

What to include so the first reply is the useful one Your RedFamosa version, your PHP version, whether you installed with Production or Demo data, what you did, what you expected and what happened instead — and the last lines of storage/logs/laravel.log. A stack trace usually identifies the problem instantly. Never paste your .env, your APP_KEY or any live API key into a support message.

15.2 What is included

ModuleWhat it isDocumented in
SMM panelProviders, catalogue, orders, wallet and billing — the core business.§5–§8
Reseller panelsChild panels on their own domains, with their own clients and prices.§9
Plans & subscriptionsRecurring revenue from resellers, billed from their wallet.§10
Public APIThe standard SMM API for your clients' own tools.§11
CRM — omnichannelUnified inbox for seven channels, AI agents, automations and the web widget.§12
Support ticketsTicketing for your clients, bridged into the CRM inbox.§12.3
ContentBlog, static and legal pages, FAQs and news announcements — per panel, including per reseller.Admin → Blog / Pages / FAQs / News
Landing pageAn editable public landing page with three designs: Nova, Horizon and Pulse.Admin → Landing
Client storefront skinsThree client-area designs: Aurora, Vibrant and Midnight, selectable per panel.Settings → Branding
Social sign-inGoogle (including One Tap) and Facebook, configured per panel.Settings → Social login
BlacklistsBlock by IP, link or e-mail, panel-local or global across every panel.Admin → Blacklist
ReportsA year-at-a-glance calendar of payments, orders, tickets or profit.Admin → Reports

15.3 Changelog

Version 1.0.2

This release makes every switch, field and dropdown in Settings do what its label says. We reviewed all of them and reconnected each control that was not wired to anything.

Version 1.0.1

Version 1.0.0 — first public release

Under consideration for future releases

Not part of version 1.0.2 and not a commitment, but the directions the product is most likely to grow in: