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

# Introduction and Installation

> Overview and installation of the official @pagfinance/sdk, the framework-agnostic client for integrating your application with the PagFinance API.

**`@pagfinance/sdk`** is the framework-agnostic client SDK for integrating external applications with the PagFinance API (crypto payments converted to PIX, boleto, or gift card, KYC verification, and price quotes).

<Info>
  Official package reference: [**@pagfinance/sdk on npm**](https://www.npmjs.com/package/@pagfinance/sdk). This documentation is based on the README and the public contract of that package.
</Info>

## Why use the SDK

The SDK was designed to be pluggable into any application and to never contain secrets, keys, or cryptography logic. Everything sensitive stays in the host application, protecting PagFinance's intellectual property and security.

<CardGroup cols={2}>
  <Card title="Broad compatibility" icon="laptop-code">
    Works on Node 18+, browsers, and modern bundlers.
  </Card>

  <Card title="No embedded secrets" icon="shield-check">
    No private key or signing logic lives in the client.
  </Card>

  <Card title="Web3 authentication" icon="wallet">
    Challenge-response login (SIWS style), orchestrated by the SDK.
  </Card>

  <Card title="Framework-agnostic" icon="puzzle-piece">
    Independent of any specific UI framework or backend.
  </Card>
</CardGroup>

## Requirements

<ParamField path="Node.js" type="18+">
  Node 18 or later, a modern browser, or a bundler.
</ParamField>

<ParamField path="JWT token" type="optional">
  For authenticated endpoints, provide a JWT token obtained through the login flow. Public endpoints do not require a token.
</ParamField>

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @pagfinance/sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @pagfinance/sdk
  ```
</CodeGroup>

## Getting started

Instantiate the client pointing to the API host and start calling public endpoints, which require no authentication:

```ts theme={null}
import { PagFinanceClient } from '@pagfinance/sdk';

const client = new PagFinanceClient({
  baseUrl: 'https://app.pag.finance', // API host (Next.js proxy)
  clientId: 'my-app',
  appMeta: { name: 'my-app', version: '1.0.0', domain: 'myapp.com' },
  defaultBlockchain: 'solana',
});

// Public endpoint (no auth)
const config = await client.assets.acceptedCryptos();
```

<Tip>
  Continue with [Authentication and Configuration](/en/sdks/authentication) to set up the client and the login, then see [Usage and Examples](/en/sdks/usage-examples) for end-to-end flows.
</Tip>

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication and Configuration" icon="key" href="/en/sdks/authentication">
    Client options, tokens, and challenge-response login.
  </Card>

  <Card title="Usage and Examples" icon="code" href="/en/sdks/usage-examples">
    Complete quote, creation, and receipt flows.
  </Card>

  <Card title="Method Reference" icon="list" href="/en/sdks/method-reference">
    All available resources and methods.
  </Card>

  <Card title="API Reference" icon="server" href="/en/api-reference/overview">
    REST endpoints underlying the SDK.
  </Card>
</CardGroup>
