Creating Registrar Modules
Custom registrar integration
What it is
Registrar modules integrate with domain registrars (Domainbox, eNom, OpenSRS, NameSilo, Namecheap, ResellerClub, etc.). They handle domain availability checks, registration, renewal, transfer, and management.
Directory structure
modules/registrars/yourregistrar/
├── module.json
├── YourRegistrarRegistrar.php
└── YourRegistrarApiClient.php (optional, for API calls)
Required class methods
Implement ModuleInterface. Your class must define:
getName(),getType()(return"registrar")getConfigFields()– reseller ID, username, password, test mode, etc.initialize(array $config)– store config, create API clientexecute($action, $params)– handle actions (see below)isEnabled()
execute() actions
| Action | Purpose |
|---|---|
check_availability | Check if domain is available. Params: domain. Return: success, available, price |
register | Register domain. Params: domain, years, contacts |
renew | Renew domain. Params: domain, years |
transfer | Transfer domain. Params: domain, auth_code |
get_info | Get domain info (status, expiry, nameservers) |
update_nameservers | Update nameservers |
update_contacts | Update registrant/admin/tech contacts |
get_auth_code | Get EPP/auth code for transfer |
validate_credentials | Test API connection |
Return format
Always return an array: ["success" => true, "available" => true, "price" => 9.99] or ["success" => false, "error" => "message"].
Reference
See modules/registrars/domainbox/ for a full Domainbox SOAP API implementation.
Was this helpful?