Skip to content

Knowledgebase

Preview and schedule exact domain price imports from the command line

domain-nexus, resellers

The connector's command-line price importer can preview and apply an exact catalogue of supported domain terms. Use it when your pricing process is managed by a scheduled server task or an administrator with shell access. The script reads the connector's saved credentials, so the command line does not need an API key.

01 Run a reviewed preview

  1. Confirm the installed connector's saved account and current HTTPS endpoint.
  2. Use the PHP CLI supported by your WHMCS installation, with the required extensions including BCMath for pricing calculations.
  3. Choose the intended percentage and optional fixed markup. The following 10 percent example is illustrative, not a recommended selling margin.
  4. From the WHMCS installation directory, run the preview with your actual generated module folder replacing MODULE_SLUG.
Command example
php modules/registrars/MODULE_SLUG/sync-prices.php --markup=10

Inspect the report's currency, TLDs, register/renew/transfer prices, supported terms, skipped or failed entries and feature changes. Unsupported or absent exported terms must not become invented prices. Preserve the current price configuration before applying.

02 Apply and schedule

Command example
php modules/registrars/MODULE_SLUG/sync-prices.php --markup=10 --apply

Use the same reviewed account and markup settings. Check the exit status and report; a non-zero result requires investigation. The script is CLI-only and is not a web endpoint.

For recurring operation, configure your normal scheduler with the correct absolute PHP binary, installed script path and approved arguments. Capture a redacted report, avoid overlapping runs and make failures visible to the pricing owner. Do not run another price synchronisation process with conflicting markups.

Common questions

Will this reprice existing invoices?

No. Catalogue synchronisation updates the offered price configuration. Existing customer renewal charges and already-created invoices have their own billing rules.

Can I also run Registrar TLD Sync?

The standard tool's minimum-term model can replace the exact term matrix with its own calculations. Choose a deliberate pricing workflow and avoid competing writers.

Should I add the secret as a cron argument?

No. The script reads saved connector configuration. Keep credentials out of command histories, process arguments and emailed reports.

Why does CLI fail while the web connection works?

Compare PHP versions, extensions, configuration, permissions and network access for the scheduled process. Diagnose that environment before changing prices or credentials.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support