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

# Checkout SDK

> Embed Lynq hosted Checkout in a browser page.

# Checkout SDK

`@lynqpay/checkout-sdk` embeds Lynq's hosted payment form in a browser page.

```bash theme={null}
npm install @lynqpay/checkout-sdk
```

For a no-build integration, use the version-pinned browser bundle:

```html theme={null}
<script src="https://unpkg.com/@lynqpay/checkout-sdk@1.0.0/dist/lynq.js"></script>
```

The classic script exposes `window.Lynq`.

```ts theme={null}
const checkout = new Checkout({
  publicKey: "pk_test_...",
  clientSecret: paymentIntent.clientSecret,
  locale: "en",
  labelStyle: "floating",
});
```

| Option         | Required | Default      |
| -------------- | -------- | ------------ |
| `publicKey`    | Yes      | —            |
| `clientSecret` | Yes      | —            |
| `environment`  | No       | `production` |
| `locale`       | No       | `en`         |
| `debug`        | No       | `false`      |
| `labelStyle`   | No       | `floating`   |

`mount()` begins asynchronous initialization. `unmount()` removes the iframe and lets the instance be mounted again. `destroy()` permanently removes it and all listeners.

## Server-rendered applications

The SDK is browser-only. In SSR applications, construct and mount Checkout in client-side code after hydration. Constructing it on the server throws `ConfigError`.


## Related topics

- [Release notes](/resources/release-notes.md)
- [Checkout SDK reference](/reference/checkout-sdk.md)
- [Payment Intents](/build/payment-intents.md)
- [Quickstart](/start/quickstart.md)
- [Checkout events and errors](/build/checkout-events.md)
