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

# SDK installation

> Install the TapAce Node.js SDK, check runtime requirements, and choose a starting point for issuing passes, updating wallets, and handling webhooks.

Use `@tapace/node` in your server application to call the TapAce API with typed methods. The SDK handles authentication headers, request retries and error classes, and verifies incoming webhook signatures.

This guide documents SDK version `0.1.0`. Your server calls the SDK, the SDK sends requests to `https://api.tapace.lk/v1`, and the API returns results described by the SDK's TypeScript types. Your application remains responsible for saving operation results and delivering pass links to holders.

## Install

Use Node.js 20 or newer. The package exports ES modules, includes TypeScript declarations and has no runtime dependencies.

```bash theme={null}
npm install @tapace/node
```

Version `0.1.0` is available from the public npm registry. To pin that version, use `npm install @tapace/node@0.1.0`.

You can also use `pnpm add @tapace/node` or `yarn add @tapace/node`.

## Create a client

Keep the API key in your server's environment. Never expose it in a browser bundle or mobile application.

```typescript theme={null}
import { TapAce } from "@tapace/node";

const apiKey = process.env.TAPACE_API_KEY;
if (!apiKey) throw new Error("Set TAPACE_API_KEY");

const tapace = new TapAce({ apiKey });
const account = await tapace.me.retrieve();
console.log(account.organizationId, account.environment);
```

The constructor accepts keys starting with `tapace_test_` or `tapace_live_`. This prefix check does not verify the key with the server; `me.retrieve()` does. `createClient(options)` is an alternative to `new TapAce(options)`.

## Choose your next step

* [Quickstart](https://tapace.lk/docs/sdk/node/quickstart.md): issue a test pass and update it.
* [Configuration](https://tapace.lk/docs/sdk/node/configuration.md): configure request options.
* [Resource methods](https://tapace.lk/docs/sdk/node/resources.md): find a method and its result.
* [Errors and retries](https://tapace.lk/docs/sdk/node/reliability.md): handle failures and stable keys.
* [Webhook verification](https://tapace.lk/docs/sdk/node/webhooks.md): verify incoming events.
* [Troubleshooting](https://tapace.lk/docs/sdk/node/troubleshooting.md): check common integration issues.

Read the existing [test and live guide](https://tapace.lk/docs/environments.md) before switching keys. Passes belong to an environment; templates, assets and event details are shared across test and live. Signing assignments are selected for the key's environment.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.