> For the complete documentation index, see [llms.txt](https://docs.liquidcommerce.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.liquidcommerce.cloud/cloud-sdk/overview.md).

# Overview

The LiquidCommerce Cloud SDK provides an easy way to interact with our APIs through a server-side SDK for Node.js and Web JS script.

**GitHub Repository**: For the latest source code, issues, and contribution guidelines, visit our [GitHub repository](https://github.com/liquidcommerce/cloud-sdk). Star the repo to stay updated with the latest changes.

### Table of Contents

* [Installation](#installation)
* [Authentication](#authentication)
* [Cloud SDK Demo](#cloud-sdk-demo)
* [Usage](/cloud-sdk/methods-and-usage.md#configuration)
* [Response Types](/cloud-sdk/methods-and-usage.md#response-types)
* [Methods ](/cloud-sdk/methods-and-usage.md#methods)
  * [Address](/cloud-sdk/methods-and-usage.md#address)
  * [Catalog](/cloud-sdk/methods-and-usage.md#catalog)
  * [Cart](/cloud-sdk/methods-and-usage.md#cart)
  * [User](/cloud-sdk/methods-and-usage.md#user)
  * [<mark style="color:blue;">Payment Element</mark>](/cloud-sdk/methods-and-usage.md#payment-element)
  * [<mark style="color:blue;">Legacy Payment Element</mark>](/cloud-sdk/methods-and-usage.md#legacy-payment)
  * [Checkout](/cloud-sdk/methods-and-usage.md#checkout)
  * [<mark style="color:blue;">Orders</mark>](/cloud-sdk/methods-and-usage.md#orders)
* [Price Type](/cloud-sdk/methods-and-usage.md#price-handling)
* [Documentation](https://docs.liquidcommerce.cloud/)

### Installation

```
npm install @liquidcommerce/cloud-sdk
# or
yarn add @liquidcommerce/cloud-sdk
```

### Authentication

The LiquidCommerce Cloud SDK uses API keys to authenticate requests. You can request your keys from your Partnerships liaison.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

All API requests in production must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

### Cloud SDK Demo

We've included a comprehensive demo application to help you quickly understand how to implement the LiquidCommerce Cloud SDK in real-world scenarios.

#### Running the Demo

1. Clone the repository:

```bash
git clone https://github.com/liquidcommerce/cloud-sdk.git
```

2. Navigate to the demo directory

```
cd cloud-sdk/demo
```

3. Add your API keys to the demo:

   * Open the demo directory in a code editor
   * Locate and edit the `index.html` file
   * Replace the placeholder values with your actual API keys:

     ```javascript
     const API_KEY = 'YOUR_LIQUIDCOMMERCE_API_KEY';
     const GOOGLE_PLACES_API_KEY = 'PUT_YOUR_KEY_HERE';

     // For Orders
     const ORDER_API_USER = 'YOUR_ORDER_API_USER';
     const ORDER_API_PASSWORD = 'YOUR_ORDER_API_PASSWORD';
     ```
   * Save the file

   ⚠️ **Note**: Keep your API keys secure and never commit them to public repositories.
4. Start the development server by either:

* Running `pnpm run dev`  and opening `http://localhost:3000/`&#x20;
* Opening the file directly in your browser

This browser-based demo demonstrates client-side implementation of the LiquidCommerce Cloud SDK including:

* SDK initialization in the browser
* API authentication flow
* Address validation&#x20;
* Catalog browsing and product search
* Shopping cart integration
* User account management and session handling
* Payment integration
* Interactive checkout process
* Orders
  * Authentication
  * Webhook Testing
  * Fetch By ID

The demo uses vanilla JavaScript to ensure compatibility and clear understanding of SDK implementation without framework-specific code.\
\
👉 [View Demo Source Code](https://github.com/liquidcommerce/cloud-sdk/blob/main/demo/index.html)
