Everyone

Namecheap

How to configure and use the Namecheap registrar module in Commerce, including IP whitelist requirements, API key setup, and WhoisGuard privacy.

Last updated 1776211200

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

  1. Log in to namecheap.com.
  2. Go to Profile → Tools → Namecheap API Access.
  3. Click Enable API Access if not already enabled.
  4. Add your Commerce server's public IP address to the IP whitelist — this is mandatory.
  5. Copy the API Key.
  6. 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 IP error, 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, and ClientIp query parameters on every request
  • Username parameter: UserName (typically the same as ApiUser for 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

  1. Log in to Namecheap → Profile → Tools → Namecheap API Access.
  2. Enable API and whitelist your Commerce server's public IP.
  3. Copy the API key.
  4. Go to Admin → Settings → Registrar → Namecheap in Commerce.
  5. Enter API User, API Key, and Client IP.
  6. Toggle Sandbox on if using test credentials.
  7. Click Test Connection — confirm success.
  8. Save.
  9. 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

Related