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

# Installation

> Install the GoPay SDK (npm package gopay-sdk) and prepare your environment.

# Installation

<Tip>
  Prefer **sandbox** (`gw.sandbox.gopay.com`) until you are ready to process real charges — same SDK, different `gatewayUrl`.
</Tip>

## Requirements

* Node.js `>=18`
* A package manager: npm, Yarn, or pnpm
* GoPay merchant credentials (`goid`, `clientId`, `clientSecret`)

## Install from npm

Use the package manager you already use in your app:

<CodeGroup>
  ```bash npm theme={null}
  npm install gopay-sdk
  ```

  ```bash yarn theme={null}
  yarn add gopay-sdk
  ```

  ```bash pnpm theme={null}
  pnpm add gopay-sdk
  ```
</CodeGroup>

## Choose environment URLs

| Environment    | `gatewayUrl`                       |
| -------------- | ---------------------------------- |
| **Sandbox**    | `https://gw.sandbox.gopay.com/api` |
| **Production** | `https://gate.gopay.cz/api`        |

<Note>
  The SDK **normalizes** `gatewayUrl` (including trailing `/api`), so values like `https://gw.sandbox.gopay.com` are accepted.
</Note>

## Verify the dependency

```bash theme={null}
npm ls gopay-sdk
```

<Check>
  You should see `gopay-sdk@…` with no extraneous dependency warnings for a clean install.
</Check>

## First import check

```ts theme={null}
import { createGoPayClient } from 'gopay-sdk';

const client = createGoPayClient({
  goid: 8123456789,
  clientId: 'client-id',
  clientSecret: 'client-secret',
  gatewayUrl: 'https://gw.sandbox.gopay.com/api',
});

console.log(typeof client.createPayment); // function
```

## Changelog

Version history ships with every release. After install, open `node_modules/gopay-sdk/CHANGELOG.md`, or view the published file: [`CHANGELOG.md`](https://unpkg.com/gopay-sdk@latest/CHANGELOG.md).
