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

# Connect components

> The connect sheet, the withdraw sheet, and the inline panel.

Load `https://js.easner.com/v1/connect.js`. The sheet is an Easner page over yours. It does not use cookies.

## Text above the link button

You write the words on your page. The button only opens the sheet. The QR code and the 8-character code stay inside that dialog.

**Not connected yet.** Show this above **Get paid with Easner**. Use your platform's name where the example says Kora Music.

> Kora Music pays you in US dollars into your own Easner account. Download the Easner app at [easner.com/app](https://www.easner.com/app), complete account verification, then connect your account with the button below.

**Connected.** “Kora Music pays withdrawals in US dollars into your Easner account.” The button is **Withdraw**.

**Connect again.** Use this only when the previous link is gone. Show the same download-and-verify sentence. The button is **Connect Easner account**. A first link uses **Get paid with Easner**.

```html theme={null}
<script src="https://js.easner.com/v1/connect.js"></script>
<button id="connect">Get paid with Easner</button>
<script>
  document.getElementById("connect").onclick = function () {
    EasnerConnect.connect({
      clientSecret: CLIENT_SECRET,
      onReady: function () {},
      onLinked: function () {},
      onPaid: function () {},
      onClose: function () {},
      onError: function (error) {}
    })
  }
</script>
```

`EasnerConnect.withdraw({ clientSecret })` pays a balance or a fixed amount. A fixed amount is set by you and cannot be edited in the sheet.

The **connect and withdraw sheets** resize with their content (the frame posts `easner_connect_sheet_height`; the parent caps height at 92vh). You do not set iframe height. The **inline panel** uses `easner_connect_panel_height` the same way.

The **connect sheet**, **withdraw sheet**, and **inline panel** show your verified logo, business name and **brand colour** from **Settings → Payments** (same as Checkout). You do not pass logo or colour in `EasnerConnect.connect`, `.withdraw` or `.panel`: Easner resolves them from the business behind the `client_secret`. Easner applies the colour to the logo well and primary buttons only when it passes contrast checks; otherwise it uses Easner blue, like hosted checkout.

On a **computer** (the platform page is at least 640px wide), the connect sheet shows a QR code and an 8-character code to type in the Easner app. On a **phone**, it shows **Open Easner** instead. Use a `client_secret` from `POST /v1/link_sessions` with `.connect`, and from `POST /v1/payout_sessions` with `.withdraw`.

`EasnerConnect.button("#slot", { clientSecret, kind: "connect" })` draws the button for you.

## Panel

`EasnerConnect.panel(element, options)` mounts a small panel in your page: whether the person is connected, what is ready to withdraw (and what is on hold), whether the tax form is on file, and their last ten payments from you. It uses the same Easner frame and the same allowed-website check as the sheets. It only reads: **Withdraw** and **Get paid with Easner** tell your page, and your page opens the sheet.

```html theme={null}
<div id="easner"></div>
<script>
  EasnerConnect.panel("#easner", {
    // A string, or a function that returns one (or a promise): the panel asks again when the session ends.
    clientSecret: function () { return fetch("/easner/session", { method: "POST" }).then(r => r.json()).then(s => s.client_secret) },
    onConnect: function () { /* open EasnerConnect.connect({ clientSecret }) */ },
    onWithdraw: function () { /* open EasnerConnect.withdraw({ clientSecret }) */ },
    onError: function (error) {}
  })
</script>
```

Create the secret on your server the same way as for the sheets, from a payee: a payout session for a withdrawal flow, or a connect session if the person is not connected yet. A payout session ends after 15 minutes and a connect session after 60, so pass a function to keep a long-lived page fresh. The panel shows payments from your platform only, never a withholding figure, and nothing from other platforms.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.