> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shoppex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs & Libraries

> Official and community SDKs for the Shoppex API

## Official SDKs

<CardGroup cols={3}>
  <Card title="Developer API SDK (JS/TS)" icon="js" href="https://github.com/ShoppexIO/sdk-js">
    Official JavaScript/TypeScript SDK for `/dev/v1/*`.

    ```bash theme={"system"}
    npm install @shoppexio/sdk
    ```
  </Card>

  <Card title="Storefront SDK" icon="window-maximize" href="/sdk/introduction">
    JavaScript storefront SDK for products, carts, and hosted checkout.

    ```bash theme={"system"}
    npm install @shoppexio/storefront
    ```
  </Card>

  <Card title="Python + PHP" icon="code" href="https://github.com/ShoppexIO/sdk-python">
    Matching Developer API packages for backend integrations.

    ```bash theme={"system"}
    pip install shoppexio
    composer require shoppexio/shoppex-php
    ```
  </Card>
</CardGroup>

***

## Which SDK should you use?

| What you're building                   | SDK                                                      |
| -------------------------------------- | -------------------------------------------------------- |
| Node/Bun backend calling `/dev/v1/*`   | `@shoppexio/sdk`                                         |
| Python worker syncing customers        | `shoppexio`                                              |
| Laravel/PHP backend integration        | `shoppexio/shoppex-php`                                  |
| Frontend with products, cart, checkout | `@shoppexio/storefront`                                  |
| Language without an official SDK       | Raw HTTP with the [OpenAPI spec](#openapi-specification) |

`@shoppexio/sdk` is the server-side Developer API SDK. It has no CDN or browser global build and must not be bundled into customer-facing frontend code because it uses API keys. Browser storefronts use `@shoppexio/storefront` or the Storefront SDK CDN instead.

## Quick Examples

<CodeGroup>
  ```typescript JavaScript / TypeScript theme={"system"}
  import { ShoppexClient } from '@shoppexio/sdk';

  const client = new ShoppexClient({
    apiKey: process.env.SHOPPEX_API_KEY!,
  });

  const products = await client.products.list();
  console.log(products.data[0]?.title);

  await client.resellerProgram.update({
    is_enabled: true,
    default_mode: 'BOTH',
    default_commission_percent: 25,
  });

  await client.invoices.issueReplacement('019c525f-3333-7333-8333-333333333333', {
    quantity: 1,
    product_id: 'prod_1',
    reason: 'previous replacement failed',
    override_remaining_quantity: true,
  }, {
    idempotencyKey: 'replacement-019c525f-3333-7333-8333-333333333333-1',
  });
  ```

  ```python Python theme={"system"}
  from shoppexio import ShoppexClient

  client = ShoppexClient(api_key="shx_your_api_key")
  products = client.products.list()
  print(products.data[0].title if products.data else "No products")
  ```

  ```php PHP theme={"system"}
  <?php

  use Shoppex\ShoppexClient;

  $client = new ShoppexClient(['apiKey' => 'shx_your_api_key']);
  $products = $client->products()->list();

  echo $products->data[0]->title ?? 'No products';
  ```
</CodeGroup>

## Public Repositories

* JavaScript Developer API SDK: [ShoppexIO/sdk-js](https://github.com/ShoppexIO/sdk-js)
* JavaScript Storefront SDK: [ShoppexIO/storefront-js](https://github.com/ShoppexIO/storefront-js)
* Python SDK: [ShoppexIO/sdk-python](https://github.com/ShoppexIO/sdk-python)
* PHP SDK: [ShoppexIO/sdk-php](https://github.com/ShoppexIO/sdk-php)

***

## REST API

No SDK required - use the REST API directly with any HTTP client. Every endpoint in the [API Reference](/api-reference/introduction) includes auto-generated code examples for **cURL**, **Python**, **JavaScript**, **PHP**, **Go**, **Java**, and **Ruby**.

***

## OpenAPI Specification

Generate your own client using our OpenAPI spec:

```
https://docs.shoppex.io/openapi.json
```

Use tools like:

* [openapi-generator](https://openapi-generator.tech/) — generate clients for 50+ languages
* [Postman](https://www.postman.com/) — import for API testing and exploration

***

## Webhooks

For webhook integration, see our [Webhooks Guide](/guides/webhooks) which covers:

* Setting up webhook endpoints
* Verifying signatures
* Handling events
* Retry logic

<Card title="Webhook Events Reference" icon="webhook" href="/api-reference/webhooks/events">
  Complete list of webhook events and payloads
</Card>
