Download the PHP package gando/partner without Composer
On this page you can find all versions of the php package gando/partner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gando/partner
More information about gando/partner
Files in gando/partner
Package partner
Short Description Official PHP SDK for the Gando Partner API
License MIT
Informations about the package partner
gando/partner
Developer-friendly & type-safe Php SDK specifically catered to leverage gando/partner API.
[!IMPORTANT] This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your workspace. Delete this section before > publishing to a package manager.
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
- gando/partner
- SDK Installation
- Two credentials, two classes
- SDK Example Usage
- Authentication
- Available Resources and Operations
- Default retry policy
- Retries
- Error Handling
- Server Selection
- Webhook signature verification
- Development
- Maturity
- Contributions
SDK Installation
The SDK relies on Composer to manage its dependencies.
To install the SDK and add it as a dependency to an existing composer.json file:
Two credentials, two classes
Gando Partner integrations use two different secrets depending on what you are doing.
| Secret | Prefix | Class | Use |
|---|---|---|---|
| Partner API key | gando_pk_ |
Gando\Partner\Api\Client |
Call /api/partner/* |
| Connect secret | gando_cs_ |
Gando\Partner\Connect\UrlBuilder |
Build signed /register URLs |
| Webhook secret | gando_whsec_ |
Gando\Partner\WebhookVerifier |
Verify inbound webhooks |
Example
PSR injection (enterprise/Symfony)
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
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
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
Example
Authentication
Per-Client Security Schemes
This SDK supports the following security schemes globally:
| Name | Type | Scheme |
|---|---|---|
partnerApiKeyAuth |
apiKey | API key |
partnerBearerAuth |
http | HTTP Bearer |
You 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:
Available Resources and Operations
Available methods
### [Accounts](docs/sdks/accounts/README.md) * [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) * [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) * [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) * [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 deliveriesDefault 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.
| Setting | Value |
|---|---|
| Strategy | Exponential backoff (initialInterval 500 ms, maxInterval 60 s, exponent 1.5) |
| Max elapsed time | 30 s |
| Status codes | 429, 5xx (server errors) |
| Connection errors | Retried when enabled |
| Attempts | Up to 3 (1 initial + 2 retries) within the elapsed window |
The SDK respects a Retry-After response header when present. Override globally via Gando::builder()->setRetryConfig(...) or per call via Utils\Options (see below).
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:
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:
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:
| Property | Type | Description |
|---|---|---|
$message |
string | The error message |
$statusCode |
int | The HTTP status code |
$rawResponse |
?\Psr\Http\Message\ResponseInterface | The raw HTTP response |
$body |
string | The response content |
When 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 Type | Status Code | Content Type |
|---|---|---|
| Errors\ErrorEnvelope | 400, 401, 403, 404, 409, 422, 429 | application/json |
| Errors\ErrorEnvelope | 500 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Example
Server Selection
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:
Webhook signature verification
Inbound partner webhooks are signed by Gando. Verify every delivery before processing the JSON payload.
Headers: X-Gando-Signature (sha256=<hex>), 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 (gando_whsec_...).
See also Webhooks SDK docs and the recipe snippet at recipes/snippets/webhooks.verify.php.
Development
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
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
All versions of partner with dependencies
brick/date-time Version >=0.7.0
brick/math Version >=0.12.1
galbar/jsonpath Version >=3.0
guzzlehttp/guzzle Version ^7.0
php-http/discovery Version ^1.20
phpdocumentor/type-resolver Version >=1.8
psr/event-dispatcher Version ^1.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/log Version ^1.1 || ^2.0 || ^3.0
psr/simple-cache Version ^1.0 || ^2.0 || ^3.0
speakeasy/serializer Version ^4.0.3