PHPackages                             lyhiving/namecheap-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. lyhiving/namecheap-sdk

ActiveLibrary[API Development](/categories/api)

lyhiving/namecheap-sdk
======================

SDK library for Namecheap APIs Base on Saddam Hossain SDK

1.3(6y ago)113MITPHPPHP &gt;=5.6

Since Oct 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/lyhiving/namecheap-sdk)[ Packagist](https://packagist.org/packages/lyhiving/namecheap-sdk)[ RSS](/packages/lyhiving-namecheap-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

Namecheap SDK for APIs
======================

[](#namecheap-sdk-for-apis)

![Latest Version](https://camo.githubusercontent.com/cc3c4c13c29343b7038e0635bbae33f0fdd010b5d4edeb79c49bae952d4caa5c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656c656173652d76312e302d626c75652e737667)![Build Status](https://camo.githubusercontent.com/36db3cc2c780a366939d5217da16dfd614a92d33cf765edf878757bf1cfca49c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c642d6572726f722d6c69676874677265792e737667)![Total Downloads](https://camo.githubusercontent.com/7411dd377fb35bedabb937b7d6cbc7875951564c49eedefeb09a08d21095a3e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f776e6c6f6164732d316b2d677265656e2e737667)

Namecheap SDK is a PHP lib that makes it easy to manage Namecheap APIs.

API Methods Examples:
---------------------

[](#api-methods-examples)

### Create a connection to the Namecheap API which you can then pass into other services, e.g. domains, later on

[](#create-a-connection-to-the-namecheap-api-which-you-can-then-pass-into-other-services-eg-domains-later-on)

```
#getDoaminList.php
require_once "vendor/autoload.php";

$apiUser = $userName = 'ncusername';
$apiKey = '****************************';
$clientIp = '198.168.0.123';
// Return type can be: xml (default), array, json
$returnType = 'json';

$client = new Namecheap\Api($apiUser, $apiKey, $userName, $clientIp, $returnType);
$client->setCurlOption(CURLOPT_SSL_VERIFYPEER, false); // For local development env (if needed)

$ncDomains = new  Namecheap\Domain\Domains($client);
$ncDomains->enableSandbox(); // Enable sandbox mode for the current instance

$domainList = $ncDomains->getList();

print_r($domainList);
```

```
$contactsInfo = $ncDomains->getContacts($domainName);
$result = $ncDomains->create($dataArr);
```

#### domains

[](#domains)

```
$ncDomains = new  Namecheap\Domain\Domains($apiUser, $apiKey, $userName, $clientIp, 'json');
$domainList = $ncDomains->getList();
$contactsInfo = $ncDomains->getContacts($domainName);
$result = $ncDomains->create($dataArr);
```

#### domains.dns

[](#domainsdns)

```
$ncDomainsDns = new  Namecheap\Domain\DomainsDns($apiUser, $apiKey, $userName, $clientIp);
$list = $ncDomainsDns->getList('domain', 'com');
$default = $ncDomainsDns->setDefault('domain', 'com');
```

#### domains.ns

[](#domainsns)

```
$ncDomainsNs = new  Namecheap\Domain\DomainsNs($apiUser, $apiKey, $userName, $clientIp);
$list = $ncDomainsNs->create('domain', 'com', 'ns1.domain.com', '192.165.15.103');
```

#### domains.transfer

[](#domainstransfer)

```
$ncDomainsTrns = new  Namecheap\Domain\DomainsTransfer($apiUser, $apiKey, $userName, $clientIp);
$getStatus = $ncDomainsTrns->getStatus($transferID);
```

#### ssl

[](#ssl)

```
$ncSsl = new  Namecheap\Ssl\Ssl($apiUser, $apiKey, $userName, $clientIp);
$result = $ncSsl->create($Years, $Type, $SANStoADD, $PromotionCode);
```

#### users

[](#users)

```
$ncUsers = new  Namecheap\Users\Users($apiUser, $apiKey, $userName, $clientIp);
$pricing = $ncUsers->getPricing('DOMAIN');
$userBal = $ncUsers->getBalances();
# Change password
$result = $ncUsers->changePassword($oldPassword, $newPassword);
# Reset pass
$result = $ncUsers->changePassword($resetCode, $newPassword, true);
```

#### users.address

[](#usersaddress)

```
$ncUsersAddr = new  Namecheap\Users\UsersAddress($apiUser, $apiKey, $userName, $clientIp);
$getStatus = $ncUsersAddr->getInfo($AddressId);
```

#### whoisguard

[](#whoisguard)

```
$ncWhoisguard = new  Namecheap\Whoisguard\Whoisguard($apiUser, $apiKey, $userName, $clientIp);
$result = $ncWhoisguard->getInfo($WhoisguardID, $ForwardedToEmail);
```

Help and docs
-------------

[](#help-and-docs)

Installing
----------

[](#installing)

The recommended way to install Namecheap-sdk is through [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, run the Composer command to install the latest stable version of Namecheap-sdk:

```
php composer.phar require lyhiving/namecheap-sdk
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

You can then later update namecheap-sdk using composer:

```
composer.phar update
```

### BASE ON [naturalbuild/namecheap-sdk](https://packagist.org/packages/naturalbuild/namecheap-sdk). Just fix STD to SLD.

[](#base-on-naturalbuildnamecheap-sdk-just-fix-std-to-sld)

Version Guidance
----------------

[](#version-guidance)

VersionStatusPackagistNamespaceRepoDocsPSR-7PHP Version1.x---`lyhiving/namecheap-sdk``Namecheap`--No&gt;= 5.6

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

2410d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db1eb069d037acc80edcd4b46bc92eab5bf48255d4cd753390668b36de70bed1?d=identicon)[lyhiving](/maintainers/lyhiving)

---

Top Contributors

[![lyhiving](https://avatars.githubusercontent.com/u/70043?v=4)](https://github.com/lyhiving "lyhiving (5 commits)")

---

Tags

apinamecheapnamecheap SDKnamecheap php

### Embed Badge

![Health badge](/badges/lyhiving-namecheap-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/lyhiving-namecheap-sdk/health.svg)](https://phpackages.com/packages/lyhiving-namecheap-sdk)
```

###  Alternatives

[naturalbuild/namecheap-sdk

SDK library for Namecheap APIs

1623.6k1](/packages/naturalbuild-namecheap-sdk)[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)[karazieiev/namecheap-php-sdk

Namecheap API

1810.3k](/packages/karazieiev-namecheap-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
