PHPackages                             hansadema/whmcs-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. hansadema/whmcs-sdk

AbandonedLibrary[API Development](/categories/api)

hansadema/whmcs-sdk
===================

Simple OOP wrapper for the WHMCS API

0.1.1(9y ago)33.6k2[1 issues](https://github.com/HansAdema/whmcs-sdk/issues)[1 PRs](https://github.com/HansAdema/whmcs-sdk/pulls)MITPHP

Since Mar 5Pushed 6y agoCompare

[ Source](https://github.com/HansAdema/whmcs-sdk)[ Packagist](https://packagist.org/packages/hansadema/whmcs-sdk)[ RSS](/packages/hansadema-whmcs-sdk/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

WHMCS SDK
=========

[](#whmcs-sdk)

A simple wrapper around the WHMCS API.

Installation
------------

[](#installation)

This package is installed using Composer. You can use the following command to add it to a project.

```
composer require hansadema/whmcs-sdk
composer update
```

Usage
-----

[](#usage)

This API client encapsulates the WHMCS with a simple OO wrapper.

First, you need to create a client instance with the details of your WMCS installation:

```
$api = new \HansAdema\WhmcsSdk\Client('https://example.com/whmcs/installation/url/', 'myusername', 'mypassword');
```

Note the trailing `/` in the URL. The username and password are the credentials of a user with the "API Access" permission. You can use your main admin user for this, but for security it's recommended to create a special API user for every project.

After creating the client, you can start to send a request. The methods correspond to the action names from [the WHMCS API](https://developers.whmcs.com/api/api-index/), the other attributes can be submitted as an array.

For example, to execute the "AcceptOrder" action, you could use the following code.

```
try {
    $result = $api->acceptOrder([
        'orderid' => 123,
        'serverid' => 456,
        //...
    ]);
} catch (\HansAdema\WhmcsSdk\RequestException $e) {
    echo "Error connecting to WHMCS: ".$e->getMessage();
} catch (\HansAdema\WhmcsSdk\ResponseException $e) {
    echo "There was an issue with your API call: ".$e->getMessage();
}
```

Note that two different types of exceptions are being used here. The `RequestException` is used whenever there is a problem connecting to your WHMCS installation, for example because the installation is down or the credentials are not correct. The `ResponseException` is thrown whenever the API result was not successful, for example due to missing or invalid method parameters.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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

2

Last Release

3399d ago

### Community

Maintainers

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

---

Top Contributors

[![Grendel7](https://avatars.githubusercontent.com/u/1823324?v=4)](https://github.com/Grendel7 "Grendel7 (3 commits)")[![HansAdema](https://avatars.githubusercontent.com/u/174806651?v=4)](https://github.com/HansAdema "HansAdema (1 commits)")

### Embed Badge

![Health badge](/badges/hansadema-whmcs-sdk/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1772.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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