PHPackages                             gando/partner - 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. gando/partner

ActiveLibrary[API Development](/categories/api)

gando/partner
=============

Official PHP SDK for the Gando Partner API

v0.1.5(1w ago)041MITPHPPHP &gt;=8.2CI passing

Since May 26Pushed 1w agoCompare

[ Source](https://github.com/Gando-Solutions/gando-partner-php)[ Packagist](https://packagist.org/packages/gando/partner)[ RSS](/packages/gando-partner/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (7)Dependencies (27)Versions (9)Used By (1)

gando/partner
=============

[](#gandopartner)

Developer-friendly &amp; type-safe Php SDK specifically catered to leverage *gando/partner* API.

[![Built by Speakeasy](https://camo.githubusercontent.com/71ef224c6bd11075095ecd49b78ad617736dccf46e949dc4c985877f8a7523fd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275696c745f62792d535045414b454153592d3337343135313f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d663366346636)](https://www.speakeasy.com/?utm_source=gando/partner&utm_campaign=php)[![License: MIT](https://camo.githubusercontent.com/8a1ff31027469ca2c5675ef464bb370b090edf0e8baee7a8070ee83215a0f582/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c4943454e53455f2f2f5f4d49542d3362356264623f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d656666366666)](https://opensource.org/licenses/MIT)

Important

This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/gando/gando). Delete this section before &gt; publishing to a package manager.

Summary
-------

[](#summary)

Gando Partner API: API for **rental management software** and **multi–rental-operator platforms** integrating Gando on behalf of linked rental operators. Use **`gando_pk_`** keys (`x-api-key` or `Authorization: Bearer`) on `/api/partner/*`.

Table of Contents
-----------------

[](#table-of-contents)

- [gando/partner](#gandopartner)
    - [SDK Installation](#sdk-installation)
    - [Two credentials, two classes](#two-credentials-two-classes)
    - [SDK Example Usage](#sdk-example-usage)
    - [Authentication](#authentication)
    - [Available Resources and Operations](#available-resources-and-operations)
    - [Default retry policy](#default-retry-policy)
    - [Retries](#retries)
    - [Error Handling](#error-handling)
    - [Server Selection](#server-selection)
    - [Webhook signature verification](#webhook-signature-verification)
- [Development](#development)
    - [Maturity](#maturity)
    - [Contributions](#contributions)

SDK Installation
----------------

[](#sdk-installation)

The SDK relies on [Composer](https://getcomposer.org/) to manage its dependencies.

To install the SDK and add it as a dependency to an existing `composer.json` file:

```
composer require "gando/partner"
```

Two credentials, two classes
----------------------------

[](#two-credentials-two-classes)

Gando Partner integrations use **two different secrets** depending on what you are doing.

SecretPrefixClassUsePartner API key`gando_pk_``Gando\Partner\Api\Client`Call `/api/partner/*`Connect secret`gando_cs_`[`Gando\Partner\Connect\UrlBuilder`](docs/sdks/connect/README.md)Build signed `/register` URLsWebhook secret`gando_whsec_``Gando\Partner\WebhookVerifier`Verify inbound webhooks### Example

[](#example)

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Gando\Partner\Api\Client;
use Gando\Partner\Connect\UrlBuilder;

$api = new Client(apiKey: getenv('GANDO_API_KEY') ?: 'gando_pk_...');
$response = $api->accounts->list();

$builder = new UrlBuilder(
    connectSecret: getenv('GANDO_CONNECT_SECRET') ?: 'gando_cs_...',
    partnerSlug: 'fleetee',
    baseUrl: 'https://dashboard.gando.app',
);
$signupUrl = $builder->signupUrl(externalId: 'fleet_acct_42');
```

### PSR injection (enterprise/Symfony)

[](#psr-injection-enterprisesymfony)

`Gando\Partner\Api\Client` accepts optional PSR interfaces so you can reuse your existing stack:

- PSR-18: `Psr\Http\Client\ClientInterface`
- PSR-17: `Psr\Http\Message\RequestFactoryInterface`
- PSR-3: `Psr\Log\LoggerInterface`
- PSR-16: `Psr\SimpleCache\CacheInterface`
- PSR-14: `Psr\EventDispatcher\EventDispatcherInterface`

```
declare(strict_types=1);

use Gando\Partner\Api\Client;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Http\Client\ClientInterface as HttpClientInterface;
use Psr\Http\Message\RequestFactoryInterface;
use Psr\Log\LoggerInterface;
use Psr\SimpleCache\CacheInterface;

/** @var HttpClientInterface $httpClient */
/** @var RequestFactoryInterface $requestFactory */
/** @var LoggerInterface $logger */
/** @var CacheInterface $cache */
/** @var EventDispatcherInterface $events */

$api = new Client(
    apiKey: $_ENV['GANDO_API_KEY'],
    httpClient: $httpClient,
    requestFactory: $requestFactory,
    logger: $logger,
    cache: $cache,
    events: $events,
);
```

All PSR dependencies are optional. If you omit `httpClient` and `requestFactory`, the SDK auto-discovers implementations through `php-http/discovery` (works out-of-the-box when `guzzlehttp/guzzle` v7 is installed).

### Deposit create idempotency

[](#deposit-create-idempotency)

`POST /api/partner/deposits` is idempotent when the `Idempotency-Key` header is sent (UUID v4, 24h deduplication via Redis on the API). **`Gando\Partner\Api\Client`** auto-generates that key on `deposits->create()` when you omit it, so SDK retries do not create duplicate deposits. Pass your own key to override.

SDK Example Usage
-----------------

[](#sdk-example-usage)

### Example

[](#example-1)

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Gando\Partner;
use Gando\Partner\Models\Components;

$sdk = Partner\Gando::builder()
    ->setSecurity(
        new Components\Security(
            partnerApiKeyAuth: '',
        )
    )
    ->build();

$response = $sdk->accounts->list(
    page: 1,
    limit: 20

);

if ($response->object !== null) {
    // handle response
}
```

Authentication
--------------

[](#authentication)

### Per-Client Security Schemes

[](#per-client-security-schemes)

This SDK supports the following security schemes globally:

NameTypeScheme`partnerApiKeyAuth`apiKeyAPI key`partnerBearerAuth`httpHTTP BearerYou can set the security parameters through the `setSecurity` function on the `SDKBuilder` when initializing the SDK. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Gando\Partner;
use Gando\Partner\Models\Components;

$sdk = Partner\Gando::builder()
    ->setSecurity(
        new Components\Security(
            partnerApiKeyAuth: '',
        )
    )
    ->build();

$response = $sdk->accounts->list(
    page: 1,
    limit: 20

);

if ($response->object !== null) {
    // handle response
}
```

Available Resources and Operations
----------------------------------

[](#available-resources-and-operations)

Available methods### [Accounts](docs/sdks/accounts/README.md)

[](#accounts)

- [list](docs/sdks/accounts/README.md#list) - List linked rental operator accounts
- [revoke](docs/sdks/accounts/README.md#revoke) - Revoke partner ↔ rental operator link

### [Clients](docs/sdks/clients/README.md)

[](#clients)

- [list](docs/sdks/clients/README.md#list) - List clients across linked rental operator accounts
- [create](docs/sdks/clients/README.md#create) - Create a client for a linked rental operator account
- [update](docs/sdks/clients/README.md#update) - Update a partner-accessible client

### [Deposits](docs/sdks/deposits/README.md)

[](#deposits)

- [list](docs/sdks/deposits/README.md#list) - List deposits
- [create](docs/sdks/deposits/README.md#create) - Create a deposit for a linked rental operator
- [retrieve](docs/sdks/deposits/README.md#retrieve) - Get deposit by id
- [delete](docs/sdks/deposits/README.md#delete) - Delete or archive a deposit
- [update](docs/sdks/deposits/README.md#update) - Update deposit (change client or cancel pending payment)
- [getCapture](docs/sdks/deposits/README.md#getcapture) - Get latest capture for a deposit
- [capture](docs/sdks/deposits/README.md#capture) - Create a capture (encaissement)
- [sendEmails](docs/sdks/deposits/README.md#sendemails) - Send deposit link to multiple emails
- [sendDepositMail](docs/sdks/deposits/README.md#senddepositmail) - Send deposit link to one email
- [cancel](docs/sdks/deposits/README.md#cancel) - Close deposit (status close + optional email)
- [getPaymentMethod](docs/sdks/deposits/README.md#getpaymentmethod) - Masked card info for the deposit
- [getPdf](docs/sdks/deposits/README.md#getpdf) - Download deposit summary PDF

### [Webhooks](docs/sdks/webhooks/README.md)

[](#webhooks)

- [list](docs/sdks/webhooks/README.md#list) - List partner webhook endpoints
- [create](docs/sdks/webhooks/README.md#create) - Create partner webhook endpoint
- [delete](docs/sdks/webhooks/README.md#delete) - Delete partner webhook endpoint
- [update](docs/sdks/webhooks/README.md#update) - Update partner webhook endpoint
- [rotateSecret](docs/sdks/webhooks/README.md#rotatesecret) - Rotate partner webhook secret
- [getSecret](docs/sdks/webhooks/README.md#getsecret) - Get partner webhook secret
- [test](docs/sdks/webhooks/README.md#test) - Send test partner webhook delivery
- [getDeliveries](docs/sdks/webhooks/README.md#getdeliveries) - List partner webhook deliveries

Default retry policy
--------------------

[](#default-retry-policy)

All Partner API operations use the global `x-speakeasy-retries` extension from the Partner OpenAPI document (`PARTNER_SPEAKEASY_RETRIES` in `gando-app` → `lib/api/openapi/shared.ts`). Out of the box, the SDK retries transient failures without custom loops in partner integrations.

SettingValueStrategyExponential backoff (`initialInterval` 500 ms, `maxInterval` 60 s, `exponent` 1.5)Max elapsed time30 sStatus codes`429`, `5xx` (server errors)Connection errorsRetried when enabledAttemptsUp to **3** (1 initial + **2** retries) within the elapsed windowThe SDK respects a `Retry-After` response header when present. Override globally via `Gando::builder()->setRetryConfig(...)` or per call via `Utils\Options` (see below).

Retries
-------

[](#retries)

Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

To change the default retry strategy for a single API call, simply provide an `Options` object built with a `RetryConfig` object to the call:

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Gando\Partner;
use Gando\Partner\Models\Components;
use Gando\Partner\Utils\Retry;

$sdk = Partner\Gando::builder()
    ->setSecurity(
        new Components\Security(
            partnerApiKeyAuth: '',
        )
    )
    ->build();

$response = $sdk->accounts->list(
    page: 1,
    limit: 20,
    options: Utils\Options->builder()->setRetryConfig(
        new Retry\RetryConfigBackoff(
            initialInterval: 1,
            maxInterval:     50,
            exponent:        1.1,
            maxElapsedTime:  100,
            retryConnectionErrors: false,
        ))->build()

);

if ($response->object !== null) {
    // handle response
}
```

If you'd like to override the default retry strategy for all operations that support retries, you can pass a `RetryConfig` object to the `SDKBuilder->setRetryConfig` function when initializing the SDK:

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Gando\Partner;
use Gando\Partner\Models\Components;
use Gando\Partner\Utils\Retry;

$sdk = Partner\Gando::builder()
    ->setRetryConfig(
        new Retry\RetryConfigBackoff(
            initialInterval: 1,
            maxInterval:     50,
            exponent:        1.1,
            maxElapsedTime:  100,
            retryConnectionErrors: false,
        )
  )
    ->setSecurity(
        new Components\Security(
            partnerApiKeyAuth: '',
        )
    )
    ->build();

$response = $sdk->accounts->list(
    page: 1,
    limit: 20

);

if ($response->object !== null) {
    // handle response
}
```

Error Handling
--------------

[](#error-handling)

Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.

By default an API error will raise a `Errors\APIException` exception, which has the following properties:

PropertyTypeDescription`$message`*string*The error message`$statusCode`*int*The HTTP status code`$rawResponse`*?\\Psr\\Http\\Message\\ResponseInterface*The raw HTTP response`$body`*string*The response contentWhen custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `list` method throws the following exceptions:

Error TypeStatus CodeContent TypeErrors\\ErrorEnvelope400, 401, 403, 404, 409, 422, 429application/jsonErrors\\ErrorEnvelope500application/jsonErrors\\APIException4XX, 5XX\*/\*### Example

[](#example-2)

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Gando\Partner;
use Gando\Partner\Models\Components;
use Gando\Partner\Models\Errors;

$sdk = Partner\Gando::builder()
    ->setSecurity(
        new Components\Security(
            partnerApiKeyAuth: '',
        )
    )
    ->build();

try {
    $response = $sdk->accounts->list(
        page: 1,
        limit: 20

    );

    if ($response->object !== null) {
        // handle response
    }
} catch (Errors\ErrorEnvelopeThrowable $e) {
    // handle $e->$container data
    throw $e;
} catch (Errors\ErrorEnvelopeThrowable $e) {
    // handle $e->$container data
    throw $e;
} catch (Errors\APIException $e) {
    // handle default exception
    throw $e;
}
```

Server Selection
----------------

[](#server-selection)

### Override Server URL Per-Client

[](#override-server-url-per-client)

The default server can be overridden globally using the `setServerUrl(string $serverUrl)` builder method when initializing the SDK client instance. For example:

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Gando\Partner;
use Gando\Partner\Models\Components;

$sdk = Partner\Gando::builder()
    ->setServerURL('http://localhost:3000')
    ->setSecurity(
        new Components\Security(
            partnerApiKeyAuth: '',
        )
    )
    ->build();

$response = $sdk->accounts->list(
    page: 1,
    limit: 20

);

if ($response->object !== null) {
    // handle response
}
```

Webhook signature verification
------------------------------

[](#webhook-signature-verification)

Inbound partner webhooks are signed by Gando. Verify every delivery before processing the JSON payload.

**Headers:** `X-Gando-Signature` (`sha256=`), `X-Gando-Timestamp` (Unix seconds), `X-Gando-Event` (event name).

Use the raw request body (not `json_decode` output). The signing secret is returned once when you [create a webhook endpoint](docs/sdks/webhooks/README.md#create) (`gando_whsec_...`).

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Gando\Partner\Exceptions\WebhookSignatureException;
use Gando\Partner\WebhookVerifier;

$rawBody = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_GANDO_SIGNATURE'] ?? '';
$timestamp = $_SERVER['HTTP_X_GANDO_TIMESTAMP'] ?? '';
$secret = getenv('GANDO_WEBHOOK_SECRET'); // your signing secret

try {
    WebhookVerifier::verify($rawBody, $signature, $timestamp, $secret);
} catch (WebhookSignatureException $e) {
    // $e->getReason() is "invalid" or "expired"
    http_response_code(400);
    exit;
}

$payload = json_decode($rawBody, true, flags: JSON_THROW_ON_ERROR);
// handle $payload...
```

See also [Webhooks SDK docs](docs/sdks/webhooks/README.md) and the recipe snippet at `recipes/snippets/webhooks.verify.php`.

Development
===========

[](#development)

Maturity
--------

[](#maturity)

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions
-------------

[](#contributions)

While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.

### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=gando/partner&utm_campaign=php)

[](#sdk-created-by-speakeasy)

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance98

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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

Total

7

Last Release

8d ago

### Community

Maintainers

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

---

Top Contributors

[![OlivierDevMaster](https://avatars.githubusercontent.com/u/98014033?v=4)](https://github.com/OlivierDevMaster "OlivierDevMaster (27 commits)")

---

Tags

api-clientfintechgandophpsdk

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gando-partner/health.svg)

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

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[laravel/framework

The Laravel Framework.

34.7k532.1M19.2k](/packages/laravel-framework)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

84735.1k](/packages/flow-php-flow)[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M395](/packages/drupal-core-recommended)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

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