Skip to main content
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.
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.
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

Read the existing test and live guide 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.