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

ActiveLibrary[API Development](/categories/api)

dealt/dealt-sdk
===============

Dealt API SDK

v0.0.10(3y ago)09.7k↓39.7%2MITPHPPHP &gt;=7.0 || ^8.0

Since Mar 22Pushed 3y ago3 watchersCompare

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

READMEChangelog (8)Dependencies (4)Versions (11)Used By (0)

[![](https://camo.githubusercontent.com/d62ef68df9fc6e4c23b9e3cd3626b3ded21a0363e7a517a9eb82d873d8abf05a/68747470733a2f2f6465616c742e66722f6c6f676f2e737667)](https://camo.githubusercontent.com/d62ef68df9fc6e4c23b9e3cd3626b3ded21a0363e7a517a9eb82d873d8abf05a/68747470733a2f2f6465616c742e66722f6c6f676f2e737667)

Dealt PHP SDK
-------------

[](#dealt-php-sdk)

### Installation ⚙️

[](#installation-️)

###### Requirements

[](#requirements)

[PHP 7+](https://php.net/releases/) - *library tested on php 7.0, 7.1, 7.2, 7.3, 7.4 &amp; 8.1*

###### Composer

[](#composer)

```
composer require dealt/dealt-sdk
```

### Usage ✨

[](#usage-)

###### Dealt Client initialization

[](#dealt-client-initialization)

Initalize the Dealt client with your api key. You can specify the API environment you want to target using the `DealtEnvironment` constants. Use `DealtEnvironment.TEST` for development purposes.

```
use Dealt\DealtSDK\DealtClient;
use Dealt\DealtSDK\DealtEnvironment;

$client = new DealtClient([
    "api_key" => "secret_dealt_api_key",
    "env" => DealtEnvironment::$PRODUCTION
]);
```

###### Checking offer availability

[](#checking-offer-availability)

Check if an offer is available for a given country / zipCode :

```
/** @var Dealt\DealtSDK\GraphQL\Types\Object\OfferAvailabilityQuerySuccess */
$offer = $client->offers->availability([
    'offer_id' => 'your-offer-uuid',
    'address'  => [
        'country' => 'France',
        'zip_code' => '75016',
    ]
]);

$available = $offer->available;

/** @var Dealt\DealtSDK\GraphQL\Types\Object\Money */
$net_price = $offer->net_price;

/** @var Dealt\DealtSDK\GraphQL\Types\Object\Money */
$gross_price = $offer->gross_price;

/** @var Dealt\DealtSDK\GraphQL\Types\Object\Money */
$vat_price = $offer->vat_price;
```

###### Getting a mission by id

[](#getting-a-mission-by-id)

```
/** @var Dealt\DealtSDK\GraphQL\Types\Object\MissionQuerySuccess */
$result = $client->missions->get("your-mission-id");

/** @var Dealt\DealtSDK\GraphQL\Types\Object\Mission */
$mission = $result->mission;

/** @var Dealt\DealtSDK\GraphQL\Types\Object\Offer */
$offer = $mission->offer;
```

###### Getting all missions

[](#getting-all-missions)

```
/** @var Dealt\DealtSDK\GraphQL\Types\Object\MissionsQuerySuccess */
$result = $client->missions->all();

/** @var Dealt\DealtSDK\GraphQL\Types\Object\Mission[] */
$missions = $result->missions;
```

###### Submitting a mission

[](#submitting-a-mission)

```
/** @var Dealt\DealtSDK\GraphQL\Types\Object\SubmitMissionMutationSuccess */
$result = $client->missions->submit([
    "offer_id" => "your-offer-id",
    "address" => [
        "country" => "France",
        "zip_code" => "92190",
        "city" => "Antony",
        "street1" => "XX Rue de la Paix"
    ],
    "customer" => [
        "first_name" => "John",
        "last_name" => "Doe",
        "email_address" => "xxx@yyy.zzz",
        "phone_number" => "+33700000000"
    ],
    "webHookUrl" => "https://optional.webhook.url",
    "extraDetails" => "https://test-shop.com/optional/product.html"
]);

/** @var Dealt\DealtSDK\GraphQL\Types\Object\Mission */
$mission = $result->mission;
```

###### Canceling a mission

[](#canceling-a-mission)

```
/** @var Dealt\DealtSDK\GraphQL\Types\Object\CancelMissionMutationSuccess */
$result = $client->missions->cancel("your-mission-id");

/** @var Dealt\DealtSDK\GraphQL\Types\Object\Mission */
$mission = $result->mission;
```

###### Return types

[](#return-types)

Common return types you will encounter while interacting with the Dealt PHP SDK :

**Dealt\\DealtSDK\\GraphQL\\Types\\Object\\Mission**

propertytype**id**string**offer**Dealt\\DealtSDK\\GraphQL\\Types\\Object\\Offer**status**string**created\_at**string**Dealt\\DealtSDK\\GraphQL\\Types\\Object\\Offer**

propertytype**id**string**name**string**Dealt\\DealtSDK\\GraphQL\\Types\\Object\\Money**

propertytype**currency\_code**string**amount**float### Development 👨🏼‍💻

[](#development-‍)

In order to run the E2E tests you will need to export the following environment variables in your current session (or automatically source them in your .zshrc or .bashrc)

```
DEALT_TEST_API_KEY=your-secret-api-key
DEALT_TEST_OFFER_ID=your-offer-id
```

```
composer lint # lint source files
composer test:lint # ensure valid codestyle
composer test:types # phpstan reporting
composer test:unit # phpunit tests
```

### Dealt GraphQL API compatibility ✨

[](#dealt-graphql-api-compatibility-)

GraphQL Operationoperation typesupported**offerAvailability***query*✅**missions***query*✅**mission***query*✅**submitMission***mutation*✅**cancelMission***mutation*✅

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.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 ~46 days

Recently: every ~83 days

Total

10

Last Release

1100d ago

PHP version history (2 changes)v0.0.1PHP &gt;=7.1 || ^8.0

v0.0.7PHP &gt;=7.0 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![edvincandon](https://avatars.githubusercontent.com/u/11134131?v=4)](https://github.com/edvincandon "edvincandon (81 commits)")[![CrisCR](https://avatars.githubusercontent.com/u/9980130?v=4)](https://github.com/CrisCR "CrisCR (3 commits)")[![remievraere](https://avatars.githubusercontent.com/u/17797591?v=4)](https://github.com/remievraere "remievraere (1 commits)")[![SebLours](https://avatars.githubusercontent.com/u/5138394?v=4)](https://github.com/SebLours "SebLours (1 commits)")

---

Tags

apisdkdealt

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

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