PHPackages                             ibercheck/ibercheck-api-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. ibercheck/ibercheck-api-sdk

ActiveLibrary[API Development](/categories/api)

ibercheck/ibercheck-api-sdk
===========================

Ibercheck API SDK

v1.0.0(5y ago)0693MITPHPPHP &gt;= 7.2

Since Jul 11Pushed 5y ago2 watchersCompare

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

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

Ibercheck API SDK for PHP
=========================

[](#ibercheck-api-sdk-for-php)

[Ibercheck page](https://www.ibercheck.com) | [API Documentation page](https://www.ibercheck.com/docs/api/) | [API Playground page](https://www.ibercheck.com/docs/api/playground)

This SDK provides a friendly interface for performing requests and decode responses.

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

[](#installation)

You can use [Composer](https://getcomposer.org):

```
composer require ibercheck/ibercheck-api-sdk
```

Usage
-----

[](#usage)

### Create the sale hash

[](#create-the-sale-hash)

```
$hash = Ibercheck\Api\Sale::createSaleHash(
    's3cr3t', // Affiliate Secret
    'ABCD_123456', // Order number
    'autocheck' // Product mnemonic
);
```

### Authenticate webhook request

[](#authenticate-webhook-request)

```
if(!Ibercheck\Api\Webhook::isAuthentic(
        's3cr3t', // Affiliate Secret
        '596f6838cb5b....ae812fb62f91c6', // Value of `X-Ibercheck-Signature` header
        '{....}' // Webhook payload
    )
) {
    throw new Exception('Fraudulent webhook received');
}
```

### API Calls

[](#api-calls)

This SDK assist you for craft a well formatted API request and decode the response back to PHP.

```
// Exchange affiliate credentials with a private access token.
$oAuthRequest = new Ibercheck\Api\ApiRequest('POST', 'http://api_dev.ibercheck.net/oauth');
$oAuthRequest = $oAuthRequest->withJsonSerializableData(
    [
        'grant_type' => 'client_credentials',
        'client_id' => 'ACME_SL', // Affiliate Name
        'client_secret' => 's3cr3t', // Affiliate Secret
    ]
);
$oAuthResponsePayload = sendRequestToApi($oAuthRequest);

// Use the new private access token for authenticate your API requests.
$meRequest = new Ibercheck\Api\ApiRequest('GET', 'http://api_dev.ibercheck.net/me');
$meRequest = $meRequest->withAuthentication($oAuthResponsePayload['access_token']);
$meResponsePayload = sendRequestToApi($meRequest);
print_r($meResponsePayload);

function sendRequestToApi(Psr\Http\Message\RequestInterface $request) {
    $psr18HttpClient = new Psr\Http\Client\ClientInterface();
    $ibercheckApiClient = new Ibercheck\Api\Client($psr18HttpClient);

    try {
        $response = $ibercheckApiClient->sendRequest($request);
        $payload = $ibercheckApiClient->decodeResponseBody((string) $response->getBody());
    } catch (Ibercheck\Api\ApiCommunicationException $apiCommunicationException) {
        // A network error has occurred while sending the request or receiving the response.

        // Retry
    } catch (Ibercheck\Api\DeserializeException $deserializationException) {
        // Nobody knows when this happen, may an HTTP Proxy on our side or on your side started to return HTML responses with errors.

        // Retry
    } catch (Ibercheck\Api\ApiServerException $apiServerException) {
        // Our server has crashed. We promise to fix it ASAP.

        echo 'Error code', $apiClientException->getStatus(), PHP_EOL;
        echo 'Error type', $apiClientException->getType(), PHP_EOL;
        echo 'Error message', $apiClientException->getMessage(), PHP_EOL;
        echo 'Error detail', var_export($apiClientException->getDetail(), true), PHP_EOL;
    } catch (Ibercheck\Api\ApiClientException $apiClientException) {
        // Your client has sent an invalid request. Please check your code.

        echo 'Error code', $apiClientException->getStatus(), PHP_EOL;
        echo 'Error type', $apiClientException->getType(), PHP_EOL;
        echo 'Error message', $apiClientException->getMessage(), PHP_EOL;
        echo 'Error detail', var_export($apiClientException->getDetail(), true), PHP_EOL;
    }

    return $payload;
}
```

License
-------

[](#license)

Distributed under the [MIT license](LICENSE)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~787 days

Total

3

Last Release

2016d ago

Major Versions

v0.1.1 → v1.0.02020-10-31

PHP version history (3 changes)v0.1.0PHP &gt;= 5.5

v0.1.1PHP &gt;= 5.6

v1.0.0PHP &gt;= 7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/19fdc97ccc21fe2689824d70ab378dfd2364433eeaca3e9b321beeb68eb79106?d=identicon)[Maks3w](/maintainers/Maks3w)

---

Top Contributors

[![Maks3w](https://avatars.githubusercontent.com/u/1301698?v=4)](https://github.com/Maks3w "Maks3w (29 commits)")

---

Tags

hacktoberfestibercheck

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ibercheck-ibercheck-api-sdk/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69333.0M114](/packages/algolia-algoliasearch-client-php)[yoti/yoti-php-sdk

Yoti SDK for quickly integrating your PHP backend with Yoti

27539.9k1](/packages/yoti-yoti-php-sdk)[php-heroku-client/php-heroku-client

A PHP client for the Heroku Platform API

24404.8k4](/packages/php-heroku-client-php-heroku-client)[commercetools/commercetools-sdk

The official PHP SDK for the commercetools Composable Commerce APIs

19281.5k](/packages/commercetools-commercetools-sdk)

PHPackages © 2026

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