PHPackages                             hampel/synergy-wholesale - 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. hampel/synergy-wholesale

ActiveLibrary[API Development](/categories/api)

hampel/synergy-wholesale
========================

Synergy Wholesale API wrapper using SoapClient

1.5.1(2mo ago)23321[1 PRs](https://github.com/hampel/synergy-wholesale/pulls)1MITPHPPHP &gt;=5.4.0

Since Aug 7Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/hampel/synergy-wholesale)[ Packagist](https://packagist.org/packages/hampel/synergy-wholesale)[ Docs](https://github.com/hampel/synergy-wholesale)[ RSS](/packages/hampel-synergy-wholesale/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (36)Used By (1)

Synergy Wholesale API Wrapper
=============================

[](#synergy-wholesale-api-wrapper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8793ec94399a0ce49ea24e9e5c6b6756e592376b7eaa024450866c01cad70c49/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68616d70656c2f73796e657267792d77686f6c6573616c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hampel/synergy-wholesale)[![Total Downloads](https://camo.githubusercontent.com/cc63b667c2985b4c905898e83a6493a81c09c37f297325d5b4009d854a37f95d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68616d70656c2f73796e657267792d77686f6c6573616c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hampel/synergy-wholesale)[![Open Issues](https://camo.githubusercontent.com/f3755d0b857e8353ee370f7ec2ef2ec28fa0c7202c1ce2199c28b597d0139873/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d7261772f68616d70656c2f73796e657267792d77686f6c6573616c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/hampel/synergy-wholesale/issues)[![License](https://camo.githubusercontent.com/56c779c9aadad6898b8bbe908213ccac4187a5122129484479be7dfbc54778dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f68616d70656c2f73796e657267792d77686f6c6573616c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hampel/synergy-wholesale)

Synergy Wholesale API wrapper using SoapClient

By [Simon Hampel](mailto:simon@hampelgroup.com)

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

[](#installation)

To install using composer, run the following command:

`composer require hampel/synergy-wholesale`

Note that if you intend to use this package with Laravel, we recommend installing the [hampel/synergy-wholesale-laravel](https://packagist.org/packages/hampel/synergy-wholesale-laravel) package instead, which provides a simple Laravel service provider and Facade for working with this API wrapper. The Laravel version automatically links into the Laravel logging system as well, making it easy to keep track of issues with the API.

Usage
-----

[](#usage)

You will need to turn on API access in your Synergy Wholesale control panel, which will tell you your Reseller ID. You also need to add the IP address of your web server to the IP whitelist to enable an API key.

Specify the Reseller ID and API Key as parameters to the SynergyWholesle constructor.

You can optionally specify a logging implementation which uses the psr/log interface (eg [Monolog](https://github.com/Seldaek/monolog)), which will enable the API calls and responses to be logged for debugging and error tracking purposes.

This API wrapper provides a rich object-oriented interface to the API calls, using value objects to construct inputs which provide granular validation of input data.

Raw responses from the API are stdClass objects containing public properties with the response values. This wrapper processes and validates these responses and provides a richer interface for accessing the returned data.

Exceptions are thrown on errors.

**Long-hand Initialisation Example**

```
// start by creating a SoapClient with the location of the WSDL file supplied by Synergy Wholesale
$client = new SoapClient(null, array('location' => SynergyWholesale::WSDL_URL, 'uri' => ''));

// create a Response generator (the engine which maps command objects to response objects)
$responseGenerator = new \SynergyWholesale\BasicResponseGenerator();

// now we can build our command execution engine, pass "null" for the logger if we don't have one
$sw = new \SynergyWholesale\SynergyWholesale($client, $responseGenerator, null, "reseller_id", "api_key");
```

**Alternative Static Factory Example**

```
// does all the heavy lifting for you if you don't need a logger
$sw = \SynergyWholesale\SynergyWholesale::make("reseller_id", "api_key");
```

**Balance Query Command Example**

```
// create a command object for the SynergyWholesale service to execute
$command = new BalanceQueryCommand(); // no parameters required for this call!

// execute the command
try {
    $response = $sw->execute($command);
}
catch (Exception $e) {
    // different exceptions are thrown on different types of errors
    // you can be as coarse or as granular as you like with error handling
    exit("Error executing command: " . $e->getMessage());
}

echo "Account balance: " . $response->getBalance();
```

**Domain Information Command Example**

```
// need to create a Domain object first
try {
    $domain = new \SynergyWholesale\Types\Domain('example.com');
}
catch (\SynergyWholesale\Exception\InvalidArgumentException $e) {
    exit("Error building domain object: " . $e->getMessage());
}

// pass this as a parameter to the command
$command = new DomainInfoCommand($domain);

// execute the command
try {
    $response = $sw->execute($command);
}
catch (Exception $e) {
    exit("Error executing command: " . $e->getMessage());
}

echo "

// check availability of a domain for registration
$command = new CheckDomainCommand('example.com');
$response = $sw->execute($command);

var_dump($response);
```

Notes
-----

[](#notes)

Only the Domain Name and SMS API calls have been implemented

TODO:

- Implement all the other calls to the SynergyWholesale API

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance83

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 98.5% 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 ~124 days

Recently: every ~645 days

Total

35

Last Release

84d ago

Major Versions

0.5.1 → 1.0.02015-02-13

PHP version history (2 changes)0.1.0PHP &gt;=5.3.0

1.3.1PHP &gt;=5.4.0

### Community

Maintainers

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

---

Top Contributors

[![simonhampel](https://avatars.githubusercontent.com/u/443890?v=4)](https://github.com/simonhampel "simonhampel (255 commits)")[![paulferrett](https://avatars.githubusercontent.com/u/282405?v=4)](https://github.com/paulferrett "paulferrett (4 commits)")

---

Tags

api-clientdnsdomainssoapclientsynergywholesaleapidnssoapdomainsSynergy Wholesale

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hampel-synergy-wholesale/health.svg)

```
[![Health](https://phpackages.com/badges/hampel-synergy-wholesale/health.svg)](https://phpackages.com/packages/hampel-synergy-wholesale)
```

###  Alternatives

[algolia/algoliasearch-client-php

API powering the features of Algolia.

69333.0M114](/packages/algolia-algoliasearch-client-php)[hiddeco/transip

The better TransIP API client.

22319.8k2](/packages/hiddeco-transip)[webit/w-firma-api

wFirma.pl API

1820.2k](/packages/webit-w-firma-api)

PHPackages © 2026

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