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

# Install & initialize

> Install @pulsebyshiga/node and construct the client once — the server-only component that holds your API key.

`@pulsebyshiga/node` is the **server component** of Pulse. It runs only on your backend,
holds your API key, and talks to the Pulse engine over HTTPS. Every method returns
typed data directly and **throws** a typed error on failure — you wrap each call in
your own service method, exactly as you would any other vendor.

Its job in one line: turn your API key into the things the browser component needs —
a `cs_` session token and a rate — without the key ever leaving the server.

## Install

<CodeGroup>
  ```bash npm theme={null}
  npm install @pulsebyshiga/node
  ```

  ```bash pnpm theme={null}
  pnpm add @pulsebyshiga/node
  ```

  ```bash yarn theme={null}
  yarn add @pulsebyshiga/node
  ```
</CodeGroup>

## Construct it once

```ts theme={null}
import Pulse, { useApiKey } from '@pulsebyshiga/node';

export const pulse = new Pulse(useApiKey(process.env.PULSE_API_KEY!), {
  // Needed only if you verify webhooks. Can also be passed per call.
  webhookSecret: process.env.PULSE_WEBHOOK_SECRET,
});
```

`useApiKey(...)` is the server credential. Constructing with an API key in a
browser throws `PulseAccessError` — on the client you use `useSession(cs_…)`
instead. See [Create a session](/backend/create-session) for how that
`session_token` is minted, and [Render the payment moment](/render/choose-a-model)
for how the client consumes it.

<Note>
  Your secret key (`sk_…`) and any user identity (BVN/NIN) stay **only** between
  your backend and Pulse. The browser only ever holds a single short-lived client
  session token (`cs_…`) scoped to one order — never the secret key.
</Note>
