> ## 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.

# Subpath imports

> Optional deep imports for errors, HTTP transport, auth, and config types.

# Subpath imports

<Tip>
  Prefer the main **`gopay-sdk`** import for most apps. Subpaths help when you want **narrower imports** (e.g. only errors + HTTP types) or clearer dependency boundaries in larger codebases.
</Tip>

The SDK exposes the main entrypoint (`gopay-sdk`) for typical usage. For advanced cases (custom `HttpTransport`, tree-shaking, or smaller bundles), you can import from subpaths:

| Subpath            | Contents                                                                       |
| ------------------ | ------------------------------------------------------------------------------ |
| `gopay-sdk/errors` | `GoPayApiError`, `GoPayConfigError`                                            |
| `gopay-sdk/http`   | `HttpTransport`, HTTP types (`HttpMethod`, `HttpHeaders`, …)                   |
| `gopay-sdk/auth`   | `TokenCache`, `InMemoryTokenCache`                                             |
| `gopay-sdk/config` | `CreateGoPayClientConfig`, `GoPayClientOptions`, `NormalizedGoPayClientConfig` |

## Examples

```ts theme={null}
import { GoPayApiError } from 'gopay-sdk/errors';
import type { HttpTransport } from 'gopay-sdk/http';
import { InMemoryTokenCache } from 'gopay-sdk/auth';
import type { CreateGoPayClientConfig } from 'gopay-sdk/config';
```

The main `gopay-sdk` export still re-exports these symbols; subpaths are optional.
