PHPackages                             petebishwhip/whmcsapi - 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. petebishwhip/whmcsapi

AbandonedArchivedLibrary[API Development](/categories/api)

petebishwhip/whmcsapi
=====================

This project is simple. It is an object-oriented library of the WHMCS API functions.

1.0.0-alpha.2(6y ago)4133[108 issues](https://github.com/PeteBishwhip/WHMCSAPI/issues)MITPHP

Since Mar 8Pushed 5y ago2 watchersCompare

[ Source](https://github.com/PeteBishwhip/WHMCSAPI)[ Packagist](https://packagist.org/packages/petebishwhip/whmcsapi)[ RSS](/packages/petebishwhip-whmcsapi/feed)WikiDiscussions master Synced today

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

WHMCSAPI - The WHMCS, PHP API Wrapper
=====================================

[](#whmcsapi---the-whmcs-php-api-wrapper)

[![Build Status](https://camo.githubusercontent.com/f003ff57cc902dbec94e0fe3b40316473133b7d194c59f11970a6e2c2529a930/68747470733a2f2f7472617669732d63692e6f72672f5065746542697368776869702f57484d43534150492e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/PeteBishwhip/WHMCSAPI)[![Mergify Status](https://camo.githubusercontent.com/e96065df303f2a966d8702c337333406ceecebea76214f6570910d6fa1b6868d/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e742e7376673f75726c3d68747470733a2f2f67682e6d6572676966792e696f2f6261646765732f5065746542697368776869702f57484d4353415049267374796c653d666c6174)](https://mergify.io)

This project is simple. It is an object-oriented library of the WHMCS API functions. To use this wrapper is simple.

Requirements
============

[](#requirements)

- PHP 7.3 (It may work on lower. I only test on PHP 7.3 due to dev-dependencies)
- Composer
- WHMCS Installation (and License!) - [Buy Here](https://www.whmcs.com/members/aff.php?aff=40067)

Usage
-----

[](#usage)

First, import the library. As WHMCSAPI is currently in alpha/beta status, set the minimum version to `1.0@alpha`:

```
composer require PeteBishwhip/WHMCSAPI:"^1.0@alpha"
```

After you have imported the library, initialize the wrapper by providing three values.

VariableDescription$apiIdentifierYour API Identifier$apiSecretYour API Secret$whmcsUrlYour WHMCS URL (e.g. )```
use WHMCSAPI\WHMCSAPI;

// $whmcsApi = new WHMCSAPI('abc123', '123cba', 'https://example.com/whmcs/');
$whmcsApi = new WHMCSAPI($apiIdentifier, $apiSecret, $whmcsUrl);
```

After initializing the library, use `command` to set the API command you want to use:

```
try {
    $whmcsApi->command('AcceptOrder');
} catch (\WHMCSAPI\Exception\FunctionNotFound $e) {
    // Perform error handling here
    // You can retrieve the error with
    // $e->getMessage();
}
```

If the command is not available, a `\WHMCSAPI\Exception\FunctionNotFound` exception will be thrown to allow for catching errors. If you want to perform all actions in the same try/catch, catch `WHMCSAPI\Exception\Exception`. All exceptions extend from this.

From there, you can set any variables as documented in the WHMCS Developer Documentation:

```
$whmcsApi->orderid = 25;
```

When ready, you can finally execute the command:

```
$result = $whmcsApi->execute();
```

Contributing
------------

[](#contributing)

Please see CONTRIBUTING.md for advice and guidance.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.2% 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 ~1 days

Total

2

Last Release

2253d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8aefa1209c2b627a0d61ace3d07f04ab7fc1ae5508d2b0f5164543ed33a2453f?d=identicon)[PeteBishwhip](/maintainers/PeteBishwhip)

---

Top Contributors

[![PeteBishwhip](https://avatars.githubusercontent.com/u/9081809?v=4)](https://github.com/PeteBishwhip "PeteBishwhip (46 commits)")[![mergify[bot]](https://avatars.githubusercontent.com/in/10562?v=4)](https://github.com/mergify[bot] "mergify[bot] (10 commits)")[![ODSMarcus](https://avatars.githubusercontent.com/u/17219291?v=4)](https://github.com/ODSMarcus "ODSMarcus (6 commits)")

---

Tags

phpphp73whmcswhmcs-api

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/petebishwhip-whmcsapi/health.svg)

```
[![Health](https://phpackages.com/badges/petebishwhip-whmcsapi/health.svg)](https://phpackages.com/packages/petebishwhip-whmcsapi)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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