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

# Browser SDK

> Optional checkout-side device signals with clm_pub_* publishable keys

The browser SDK collects **device and session signals** on checkout pages. It does **not** replace server-side [assess](/guides/realtime-assessment) — your backend must still call `POST /api/v1/assess` before capture unless you use a partner middleware that does so.

## Load the script

**Production:**

```html theme={null}
<script src="https://dashboard.clausum.ai/clausum-sdk.js" defer></script>
```

**Sandbox** (when provisioned):

```html theme={null}
<script src="https://sandbox.clausum.ai/clausum-sdk.js" defer></script>
```

## Initialize

Use a **publishable** key (`clm_pub_*`) from **Conexiones → Claves API** — never embed `clm_sk_*` in the browser.

```html theme={null}
<div id="checkout-form">
  <!-- your form -->
</div>

<script>
  document.addEventListener("DOMContentLoaded", function () {
    Clausum.init({
      publishableKey: "clm_pub_xxxxxxxx",
      apiUrl: "https://dashboard.clausum.ai"
    });
  });
</script>
```

### Data attribute alternative

```html theme={null}
<script
  src="https://dashboard.clausum.ai/clausum-sdk.js"
  data-clausum-publishable-key="clm_pub_xxxxxxxx"
  data-clausum-api-url="https://dashboard.clausum.ai"
  defer
></script>
```

## Pass fingerprint to assess

When submitting payment on your server, include the SDK fingerprint in the assess payload:

```json theme={null}
{
  "device": {
    "fingerprint": "<from Clausum.getFingerprint() or session>"
  }
}
```

Exact helper names are shown in **Dashboard → Conexiones → Prevención (SDK)** with copy-ready snippets for your locale.

## CSP

Allow script load from your Clausum host in `script-src` if you use a strict Content-Security-Policy.

## Related

* [Real-time assessment](/guides/realtime-assessment)
* [API keys](/concepts/api-keys)
