> For the complete documentation index, see [llms.txt](https://developer.paddle.com/llms.txt).

# Node.js SDK

Install, authenticate, and make your first request with the official Paddle Node.js SDK for server-side JavaScript and TypeScript.

---

The Paddle Node.js SDK integrates Paddle Billing with server-side JavaScript and TypeScript apps. It ships with TypeScript definitions, iterator-based pagination, and helpers for webhook signature verification.

{% version-badge sdk="paddle-node" /%}

{% card-group cols=3 %}
{% card title="GitHub" icon="carbon:logo-github" url="https://github.com/PaddleHQ/paddle-node-sdk" %}
View source code and report issues on GitHub.
{% /card %}
{% card title="npm package" icon="devicon-plain:npm" url="https://www.npmjs.com/package/@paddle/paddle-node-sdk" %}
View and install on npm.
{% /card %}
{% card title="Changelog" icon="carbon:bullhorn" url="https://github.com/PaddleHQ/paddle-node-sdk/blob/main/CHANGELOG.md" %}
See recent releases and changes.
{% /card %}
{% /card-group %}

To open checkouts, pricing pages, and integrate Retain on the client-side, use [Paddle.js](https://developer.paddle.com/paddle-js/overview.md) or the [Paddle.js wrapper](https://developer.paddle.com/sdks/libraries/paddle-js-wrapper.md).

## Requirements

Node.js 18 or later.

## Install

{% code-group sync="js-package-manager" %}

```bash {% title="pnpm" %}
pnpm add @paddle/paddle-node-sdk
```

```bash {% title="yarn" %}
yarn add @paddle/paddle-node-sdk
```

```bash {% title="npm" %}
npm install @paddle/paddle-node-sdk
```

{% /code-group %}

## Authenticate

Create an API key in **Paddle > Developer tools > Authentication**, then pass it when you instantiate the client.

API keys are environment-specific. Use a sandbox key for sandbox, a live key for production.

```typescript
import { Paddle, Environment } from '@paddle/paddle-node-sdk';

const paddle = new Paddle(process.env.PADDLE_API_KEY!, {
  environment: Environment.sandbox,
});
```

Omit the `environment` option, or set it to `Environment.production`, to use the live API.

## Make your first request

List the first page of products in your catalog:

```typescript
import { Paddle, Environment } from '@paddle/paddle-node-sdk';

const paddle = new Paddle(process.env.PADDLE_API_KEY!, {
  environment: Environment.sandbox,
});

const products = paddle.products.list();
const firstPage = await products.next();

for (const product of firstPage) {
  console.log(product.id, product.name);
}
```

`paddle.products.list()` returns an iterator. Call `next()` to fetch the first page, check `products.hasMore` to see whether more pages are available, or use `for await (const product of paddle.products.list())` to iterate every product across all pages.

## Naming conventions

The Paddle API uses `snake_case`. The Node.js SDK uses `camelCase` to match JavaScript conventions. Field names on requests and responses are `camelCase`. For example, `customData` rather than `custom_data`.

## Next steps

- Understand [shared patterns](https://developer.paddle.com/sdks/libraries.md) for pagination, idempotency, retries, and error handling across SDKs.
- Browse the [API reference](https://developer.paddle.com/api-reference/overview.md) for every resource and operation the SDK exposes.
- Work against [sandbox](https://developer.paddle.com/sdks/sandbox.md) while you build, then follow the [go-live checklist](https://developer.paddle.com/build/onboarding/go-live-checklist.md) to switch environments.