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

ActiveSdk[API Development](/categories/api)

clyde/clyde-sdk
===============

PHP SDK for Clyde insurance marketplace.

013[3 PRs](https://github.com/clyde-dev/php-sdk/pulls)PHP

Since Apr 25Pushed 3y ago8 watchersCompare

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

READMEChangelogDependenciesVersions (11)Used By (0)

Clyde API
=========

[](#clyde-api)

A PHP library for the Clyde API. Head to  for full documentation.

Install
-------

[](#install)

```
$ composer require "clyde-sdk"
```

Getting started
---------------

[](#getting-started)

The framework supports all Clyde API Endpoints. For complete information about the API, head to the [docs](https://api.joinclyde.com/docs).

All endpoints require a valid `clientKey` and `clientSecret`.

```
// Instantiate a Clyde object. First paramater is the key,
// second parameter the secret, and last is isLive (defaults to false).
$clyde = new Clyde('ck_your_key', 'sk_your_secret', true);
```

When testing, Set `isLive` to `false` (third arguement on the class contructor), and use test keys instead of live keys. This will allow you to test without creating active customers or contracts. When you are done testing, set `isLive` to `true` and use your live keys. **Note that at this point all contract orders are considered live and valid.**

Methods
-------

[](#methods)

**All methods will return an associative array. See full [documentation](https://api.joinclyde.com/docs) for the array structures returned with each call.**

### Create Product

[](#create-product)

Create a product. Please see [documentation](https://api.joinclyde.com/docs) for available properties.

```
$newProduct = $clyde.createProduct($productOptions);
```

### Update Product

[](#update-product)

Update your product. First parameter is the product SKU; second is an associative array with the product updates. See [documentation](https://api.joinclyde.com/docs) for a full list of options and return structure.

```
$updatedProduct = $clyde.updateProduct($sku, $productOptions);
```

### Get One Product

[](#get-one-product)

Get only one product. Product SKU is the first parameter; there is an optional second parameter of an IP address for geo-sensitive queries.

```
$product = $clyde.getProduct($sku);
```

### Get Many Products

[](#get-many-products)

Get all products associated with your store. Optionally, you may pass in an `opts` associative array with a `page` key and / or a `sku` key as an array of SKUs to retrieve a particular page or a subset of SKUs, as well as an IP address for geo-sensitive queries.

```
$products = $clyde.getProducts($optionalOpts, $optionalIp);
```

### Get Contracts for a Product

[](#get-contracts-for-a-product)

Get all available contracts for a product. Product SKU is the first parameter; there is an optional second parameter of anIP address for geo-sensitive queries.

```
$contracts = $clyde.getContractsForProduct($sku, $optionalIp);
```

### Create Order

[](#create-order)

Create an order. Use this to create a contract sale or report line items of insurable products for later sales. First parameter is your internal ID for the order; second is an associative array with the parameters of your order. Please see our [documentation](https://api.joinclyde.com/docs) for available options.

```
$order = $clyde.createOrder($id, $orderOpts);
```

### Get Order

[](#get-order)

Get an order that has already been placed. The order ID from your system is the first and only parameter.

```
$order = $clyde.getOrder($id);
```

### Cancel Order

[](#cancel-order)

Cancel an order you have already placed. Use this to cancel all contract sales, or generally remove from our system all line items associated with an order. The order ID from your system is the first and only parameter.

```
$order = $clyde.cancelOrder($id);
```

### Get Contract Sale

[](#get-contract-sale)

Get a previously sold contract sale. The ID returned from the original sale is the first and only parameter.

```
$contractSale = $clyde.getContractSale($clydeId);
```

### Cancel Contract Sale

[](#cancel-contract-sale)

Cancel a previously sold contract sale. The ID returned from the original sale is the first and only parameter.

```
$contractSale = $clyde.cancelContractSale($clydeId);
```

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

[](#error-handling)

When an error occurs `clyde-sdk` will throw that error. Use `try / catch` to handle errors.

```
try {
  $newProduct = $clyde.createProduct($productOptions);
} catch(Exception $e) {
  // Handle the exception
}
```

License
-------

[](#license)

MIT

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/43aaa61fe6ccb56c07bca7db909f4ac5a6ec0ceb7cb6773f67a1d9a3cee806ae?d=identicon)[edclyde](/maintainers/edclyde)

---

Top Contributors

[![edclyde](https://avatars.githubusercontent.com/u/48366941?v=4)](https://github.com/edclyde "edclyde (4 commits)")[![jps-clyde](https://avatars.githubusercontent.com/u/47042441?v=4)](https://github.com/jps-clyde "jps-clyde (3 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M478](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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