Overview
Namecheap is one of the most popular domain registrars with clean API documentation and a developer-friendly XML API. Commerce's Namecheap module supports all standard domain operations. A key requirement: your Commerce server's IP address must be whitelisted in Namecheap before any API call will succeed.
Credential Fields
| Field | Description |
|---|---|
| API User | Your Namecheap account username |
| API Key | The API key generated in your Namecheap account |
| Client IP | The public IP address of your Commerce server |
| Sandbox | Toggle on to use the Namecheap sandbox environment |
Getting Your Credentials
- Log in to namecheap.com.
- Go to Profile → Tools → Namecheap API Access.
- Click Enable API Access if not already enabled.
- Add your Commerce server's public IP address to the IP whitelist — this is mandatory.
- Copy the API Key.
- Your Namecheap account username is the API User.
The IP whitelist is enforced at Namecheap's end. Requests from any IP not on the whitelist receive a
1.3.1.1 - Invalid IPerror, regardless of whether the API key is correct. If your Commerce server's IP changes, you must update the whitelist immediately.
Sandbox vs Production
| Environment | API Endpoint |
|---|---|
| Sandbox | https://sandbox.namecheap.com/xml.response |
| Production | https://api.namecheap.com/xml.response |
The sandbox has a separate test account — register at sandbox.namecheap.com (free). Sandbox and production do not share whitelist or account data.
API Protocol
- Transport: HTTPS GET
- Response format: XML
- Authentication:
ApiUser,ApiKey, andClientIpquery parameters on every request - Username parameter:
UserName(typically the same asApiUserfor non-reseller accounts)
WHOIS Privacy
Namecheap provides WHOIS privacy via WhoisGuard (free for most TLDs). Commerce uses two calls:
| Action | API Command |
|---|---|
| Enable | namecheap.whoisguard.AddWhoisguardPrivacy + namecheap.whoisguard.EnableWhoisguardPrivacy |
| Disable | namecheap.whoisguard.DisableWhoisguardPrivacy |
Connection Test
Commerce sends namecheap.users.getBalances to verify API access. A successful response (no IP error, valid API key) confirms connectivity.
Setup Checklist
- Log in to Namecheap → Profile → Tools → Namecheap API Access.
- Enable API and whitelist your Commerce server's public IP.
- Copy the API key.
- Go to Admin → Settings → Registrar → Namecheap in Commerce.
- Enter API User, API Key, and Client IP.
- Toggle Sandbox on if using test credentials.
- Click Test Connection — confirm success.
- Save.
- Populate the TLD Manager with Namecheap's TLD catalog and retail prices.
Common Issues
| Error | Cause | Fix |
|---|---|---|
Invalid IP |
Commerce server IP not whitelisted | Add IP to Namecheap API Access whitelist |
Invalid API Key |
Wrong key pasted | Regenerate and re-enter API key |
User is not eligible for API access |
API not enabled | Enable API in Namecheap Profile → Tools |