Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Spaceship Domain Registrar for WHMCS

A white-label WHMCS domain registrar module built on the Spaceship API. WHMCS talks to this module, the module talks to Spaceship, and your customers never see who the upstream registrar is — every domain operation (nameserver changes, EPP codes, DNS, privacy, renewals) runs automatically through the standard WHMCS workflow.

Version 1.0.0

Why this module

Spaceship enforces tight, per-domain rate limits — most importantly 5 requests per domain every 300 seconds on the domain-info endpoint. A naive integration trips this instantly (WHMCS calls several registrar functions when you open a single domain page) and shows Registrar Error: Request rate limit exceeded.

This module is built around that constraint:

  • Request-level caching — the expensive GET /v1/domains/{domain} lookup is fetched once per page load and shared by every callback (GetDomainInformation, GetNameservers, GetRegistrarLock, Sync, …).
  • Automatic retry with backoff — 429 and 503 responses are retried with exponential backoff, honouring Retry-After / rate-limit reset headers when present.
  • No background polling hooks — nothing fires extra API calls on admin page loads.
  • Contact de-duplication — identical registrant/admin/tech/billing data creates a single contact instead of four.

Features

  • Domain availability & premium pricing lookups
  • Domain registration, transfer and renewal
  • Nameserver management
  • Full DNS record management (A, AAAA, CNAME, ALIAS, MX, TXT, NS, SRV)
  • WHOIS contact management
  • WHOIS privacy / ID protection toggle
  • Transfer (registrar) lock
  • EPP / auth code retrieval for transfers out
  • Glue / child nameserver management
  • Auto-renew control
  • Domain & transfer sync (cron) — feeds the WHMCS domain synchronisation report
  • Domain deletion & restore from redemption
  • Consolidated GetDomainInformation
  • Premium domain pricing on availability lookups
  • Live API connection test on the configuration screen

Requirements

  • WHMCS 9.0.4 or later
  • PHP 8.3 or later with the curl and json extensions
  • Spaceship API key & secret (API Manager)

Installation

  1. Copy the spaceship directory into /path/to/whmcs/modules/registrars/.
  2. In the WHMCS admin area go to System Settings → Domain Registrars, find Spaceship Domain Registrar and click Activate.
  3. Enter your API credentials and options (below).

Configuration

Option Description
API Key Your Spaceship API key.
API Secret Your Spaceship API secret.
Test Mode Logs extra detail for troubleshooting.
Default Nameserver 1–4 Optional white-label vanity nameservers used for new registrations when the order specifies none. Leave blank to use the registry default.
Auto Renew by Default Enable auto-renew on new registrations/transfers.
Wait for Registration If on, registration blocks until the registry confirms. Leave off (recommended) to avoid PHP timeouts — the sync cron confirms the domain shortly after.
API Connection Read-only indicator. Shows ✓ Connected / ✗ failed after a live ping whenever you open the config page — verify this before relying on the module.

Note on TLD pricing: the Spaceship API exposes no bulk price endpoint, so the module does not auto-import standard TLD prices (configure those under System Settings → Domain Pricing). Per-domain premium pricing is returned during availability checks and handled automatically.

White-label notes

The registrar module name is only ever visible in the WHMCS admin area; customers never see it. For a fully white-label customer experience, set your own Default Nameservers so WHOIS/DNS do not expose Spaceship's hostnames. (The registry of record on the public WHOIS is determined by Spaceship and is outside the module's control — this is inherent to domain reselling.)

Rate limits (reference)

Endpoint Limit
GET /v1/domains/{domain} 5 / domain / 300s
GET /v1/domains (list) 300 / user / 300s
Registration 30 / user / 30s

Translations

All module-specific text (config labels, status messages, admin buttons, operational messages) is loaded from language files in spaceship/lang/. english.php is the base/fallback catalogue; italian.php is included as a second language. The module automatically uses the active WHMCS language (admin or client) and falls back to English for any untranslated key.

To add a language, copy lang/english.php to lang/<language>.php (matching the WHMCS language name, e.g. spanish.php, french.php) and translate the values — no core or module code changes are required.

The standard client-area domain management UI (nameservers, EPP, DNS, etc.) is rendered by WHMCS core and is already translated by WHMCS's own language files. Error text returned by the Spaceship API is provided by the registrar.

Logging

All API calls are recorded in System Logs → Module Log (look for the spaceship module). Credentials are masked automatically.

License

MIT — see LICENSE.

Author

Devrook.com

About

White-label WHMCS domain registrar module for the Spaceship API.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages