# Embedding

Show the verification inside your page instead of sending the person away. First list your site under Settings → Branding → "Websites that may embed the flow" (for example `https://www.example.com`). Pages on other sites cannot frame the flow, and it sends its events only to your site.

```js
<script src="https://verify.secuveri.com/sdk/v1/secuveri.js"></script>
<script>
  // url: the `url` your backend got from POST /v1/sessions
  const flow = Secuveri.open({
    url,
    mode: "modal", // or "inline" with container: document.getElementById("verify")
    onComplete(result) {
      // { session_id, verification_id, status }: for your UI only.
      // Confirm the outcome with the webhook or the signed result.
    },
    onClose(reason) {
      // "done" after the person finished, "cancelled" if they closed it
    },
  });
</script>
```

| Event | When |
| --- | --- |
| `secuveri:ready` | The flow has loaded (`onReady`). |
| `secuveri:step` | The person moved to another step; on a computer `HANDOFF`, then `ON_PHONE` (`onStep`). |
| `secuveri:completed` | The verification was submitted (`onComplete`). |
| `secuveri:close` | The person pressed Done (`onClose("done")`). |

On a computer the frame shows a QR code; the person continues on their phone and the frame follows along, then reports completion. `Secuveri.createFrame(url)` gives you a ready iframe (with camera permission) if you place it yourself. In an embed the flow does not redirect to `callback_url`; your page decides what comes next. The same script also offers `Secuveri.start`, the API of the `@secuveri/web` package (see SDKs).
