---
name: joinorigin-onboarding
description: Use when an agent or its host must create a JoinOrigin account without the product UI — pick the right door, discover the MCP authorization server, register a client with DCR, create a PAID-ONLY non-UI account (plan/interval, pending_payment, 24 h TTL) or a free evidenced human web account, link a master-paid subaccount, verify/sign in, approve the OAuth 2.1 device grant, and complete payment on the real Paddle checkout page. Triggers on "JoinOrigin onboarding", "JoinOrigin account for an agent", "JoinOrigin MCP setup", "paid-only non-UI account", "master-linked subaccount", "subaccount.create", "free web account", "human attestation", "billing.checkout", "/en/agents-onboarding", or "JoinOrigin device grant".
version: 0.1.0
channel: qa
---

# JoinOrigin agent onboarding

This skill is the machine-readable companion to <https://qa.joinorigin.co/en/agents-onboarding>. A host creates the account,
connects an MCP client, and — on the paid non-UI door — hands the real Paddle checkout to the
human. There is **no actor-type permission branching**: provenance (`createdVia`,
`declaredActor`) is recorded for billing/audit only.

## Choose the door first (they are not equivalent)

| Door      | Account / plan                                                                                     | Payment and activation                                                                                                                                                                                                                              | Matrix (E2EE chat)                                                                                   | Human attestation                                                                                                                                       |
| --------- | -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `non_ui` | paid agent account; `POST /onboarding/non-ui` requires `plan` = `plus`/`creator` and `interval`; `pending_payment` with an immutable 24 h TTL | `billing.checkout` creates a server-priced Paddle session → the **human pays** in Paddle → the signed `subscription.activated` webhook is the only thing that activates the plan → provisioning runs → chat is available | **none while pending**; the account cannot create an Origin or chat until activation; Matrix is provisioned after activation | not used                                                                                                                                                 |
| `web`    | free human/dev shortcut; `POST /auth/register` is active-but-unverified until the email is confirmed | **none** — no plan, no checkout, no webhook                                                                                                                                                                                                         | provisioning is enqueued at registration (verification-gated), so the Matrix identity is provisioned and chat works | **required in production/staging**: the human solves the CAPTCHA and accepts the current T&C, the server mints a single-use 10-minute `attestationToken` at `POST /onboarding/human-attestation`, and the host presents it in `POST /auth/register`. Dev/test may run with the human door off |

The rest of this skill documents both, with the paid non-UI door as the primary agent path and the
free web door as the human/dev shortcut.

## Master-linked subaccounts (paid by a master)

A **master-linked subaccount** is a regular JoinOrigin account — its own handle, Matrix identity,
Origins, entitlements, login sessions and delete — whose plan is paid **entirely by one master**. It
is not a seat, membership, profile alias, family/team plan or sponsorship SKU, and no plan is added to
the catalogue.

| Property              | Value                                                                                                                                                                                       |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Identity              | Own handle; login is **by handle only**. The shared email is a routing address, not a login identifier.                                                                                       |
| Email                 | `same_as_master` (default) or `email_less` with all mail routed to the master; verification is inherited from the master.                                                                     |
| Linking               | The master creates the subaccount (`POST /accounts/subaccounts`, state `pending_master`) and binds it by **claim code** (`POST /accounts/subaccounts/claim`) or **exact handle + explicit accept** (`POST /accounts/subaccounts/accept`). No fuzzy search, no suggestions, no email matching. |
| Claim code            | 8 characters, single use, returned **once** at creation, expires after 72 h. Treat it as a secret; never place it in a prompt, log or URL.                                                     |
| Immutability          | `isSubaccount` and `masterAccountId` never change. Exactly one master; no transfer; a subaccount cannot own a subaccount.                                                                     |
| Payment               | The **master pays**. The subaccount has no payment method, checkout, billing portal or card entry. It may only **request** payment; that call always answers `202` and never charges.        |
| Plans                 | Plus or Creator only. Free is never assignable; launch free Plus and the launch backfill exclude subaccounts. A lapsed subaccount is suspended, never downgraded to Free.                      |
| Budget / allowlist    | The master sets a per-subaccount monthly budget (monthly-equivalent basis, `0` freezes new charges) and an allowed-plan/product list. Enforced server-side **before** any provider call.      |
| Over budget / denied  | Hard refusal plus a payment request to the master — never a subaccount-side payment fallback.                                                                                                |
| Provider              | The master's saved method / off-session charge when available; otherwise the guaranteed **one-click master approval** link. No card data in the model and no headless card entry.             |
| Master authority      | **Billing only**: budget, allowlist, spend ledger, invoices, payment approval, soft delete/restore. Never keys, messages, media, membership, backups or impersonation.                         |
| Lifecycle             | `pending_master` expires to soft delete after 72 h; soft delete is restorable indefinitely; master deletion is blocked while a non-soft-deleted subaccount exists.                             |

The master-side MCP tools are `subaccount.create`, `subaccount.claim`, `subaccount.accept`,
`subaccount.list`, `subaccount.billing.get`, `subaccount.billing.update`, `subaccount.subscribe`,
`subaccount.cancel`, `subaccount.payment_request`, `subaccount.delete` and `subaccount.restore`
(master-only, `write` class, same services and rate-limit evaluator as the REST surface). A
subaccount can call `subaccount.payment_request` to signal its master; it has no payment tool. The
CLI signup path for the subaccount itself carries a `--subaccount` flag, which starts the link in
`pending_master` until the master claims or accepts it.

Entitlements and rate limits stay **per account** (`accountId`, own plan). The master's plan grants
the subaccount nothing and pools nothing; the billing budget gates a new charge, never a request.

## Install

This skill is published on the **qa** channel as
`joinorigin-onboarding@0.1.0`. Fetch it from
<https://qa.joinorigin.co/skills/joinorigin-onboarding/SKILL.md>.

### Install the host

### Preferred: `joinorigin-mcp` is already on PATH

```bash
joinorigin-mcp setup --env qa --write --onboard --door web
```

### Otherwise: the signed, lane-hosted installer

Install the exact pinned host version
(`0.1.0`) from this lane's signed bundle. The checksum is mandatory and the
minisign signature is required; no npm install runs. `--base-url` tells the installer which
lane hosts the artifacts:

```bash
curl -fsSL https://qa.joinorigin.co/downloads/joinorigin-mcp/install.sh \
  | bash -s -- --env qa --base-url https://qa.joinorigin.co --version 0.1.0 \
      --pubkey https://qa.joinorigin.co/downloads/joinorigin-mcp/joinorigin-mcp.pub \
      --require-signature
```

Then run `joinorigin-mcp setup --env qa --write --onboard --door web` (or
`--door non_ui --plan plus --interval monthly` for the paid agent door).

Both channels resolve from a lane domain or a binary already on `PATH`; this skill never names a
checkout, repository or workspace directory.

## The one rule that matters

**The HOST holds every credential and every payment detail. The model never sees them.**

| Value                                                                       | Held by                           | May cross into the model context?                           |
| --------------------------------------------------------------------------- | --------------------------------- | ----------------------------------------------------------- |
| Operator password                                                           | host secret store                 | **No**                                                      |
| Product `accessToken` / `refreshToken`                                      | host secret store                 | **No**                                                      |
| Device `device_code`                                                        | host                              | **No** (only `user_code` + `verification_uri` may be shown) |
| MCP `access_token` / `refresh_token`                                        | host OAuth client                 | **No**                                                      |
| Paddle client token (`NEXT_PUBLIC_PADDLE_CLIENT_TOKEN`)                     | web build env                     | **No** (never put it in a prompt or tool call)              |
| Card number / expiry / CVV                                                  | the human, inside Paddle's iframe | **No**                                                      |
| `client_id`, `account.id`, `state`, `user_code`, checkout URL for the human | non-secret                        | Yes                                                         |

Other hard rules:

- Never log, echo, screenshot, or place a secret in a URL, analytics event, tool result, or commit.
- Never ask the model to type a password or card. The human enters both.
- JoinOrigin has **no server-side card API**. The card form is Paddle's hosted iframe; a success
  URL never activates a plan.
- Only the Paddle **signature-verified webhook** may activate a plan or change `planId`.
- The non-UI door is **paid-only** (`plus` or `creator`); `free` is rejected. An unpaid account is
  purged at its 24-hour deadline. There is no Free fallback on `non_ui`.
- The `web` door is the **free human/dev shortcut**: no plan, no checkout, Matrix provisioned at
  registration. In production/staging it requires the server-minted human attestation; a bare
  token-less `POST /auth/register` is refused there and accepted only when the human door is off
  (dev/test or an explicit `ACCOUNT_HUMAN_DOOR=off`).

## Base URLs

| Surface                                  | Origin       |
| ---------------------------------------- | ------------ |
| API                                      | `https://api-qa.joinorigin.co`    |
| MCP authorization server (`$MCP_ISSUER`) | `https://auth-qa.joinorigin.co`   |
| MCP resource server (`$MCP_RESOURCE`)    | `https://mcp-qa.joinorigin.co`    |
| Matrix homeserver                        | `https://matrix-qa.joinorigin.co` |
| Marketing web                            | `https://qa.joinorigin.co`    |

The MCP RS and AS are **different origins in every lane** — never collapse
them onto the API origin.

Read `/.well-known/oauth-authorization-server` at runtime; do not hardcode endpoints beyond these
origins.

## Scopes

| Scope         | Use                                                           |
| ------------- | ------------------------------------------------------------- |
| `mcp.account` | own account state, onboarding tools, session introspection    |
| `mcp.billing` | plans, subscription, checkout creation (no card data)         |
| `mcp.read`    | read product resources                                        |
| `mcp.write`   | write product resources — **refused while `pending_payment`** |

## Step 0 — read the current legal versions

```bash
curl -sS "$API/onboarding/config"
# { "termsVersion": "YYYY-MM-DD", "privacyVersion": "YYYY-MM-DD", ... }
```

Use those exact versions in step 2. A stale version is rejected.

## Step 1 — discover

```bash
curl -sS "$MCP_RESOURCE/.well-known/oauth-protected-resource"
curl -sS "$MCP_ISSUER/.well-known/oauth-authorization-server"
curl -sS "$MCP_ISSUER/.well-known/jwks.json"
```

Expected AS metadata (abridged):

```json
{
  "issuer": "https://auth-qa.joinorigin.co",
  "device_authorization_endpoint": "https://auth-qa.joinorigin.co/oauth/device_authorization",
  "token_endpoint": "https://auth-qa.joinorigin.co/oauth/token",
  "registration_endpoint": "https://auth-qa.joinorigin.co/oauth/register",
  "jwks_uri": "https://auth-qa.joinorigin.co/.well-known/jwks.json",
  "grant_types_supported": [
    "authorization_code",
    "urn:ietf:params:oauth:grant-type:device_code",
    "refresh_token"
  ]
}
```

## Step 2 — register a public client (DCR)

```bash
curl -sS -X POST "$MCP_ISSUER/oauth/register" \
  -H 'content-type: application/json' \
  -d '{
    "client_name": "my-agent-host",
    "redirect_uris": ["http://127.0.0.1:8765/callback"],
    "grant_types": [
      "urn:ietf:params:oauth:grant-type:device_code",
      "refresh_token"
    ],
    "token_endpoint_auth_method": "none",
    "scope": "mcp.account mcp.billing mcp.read mcp.write"
  }'
```

Response: `{ "client_id": "mcp_client_…", … }`. There is no client secret. Store `client_id` on the
host. Both `POST /oauth/register` and `POST /oauth/device_authorization` are unauthenticated; the
host may run them without operator interaction.

## Step 3 — create the PAID-ONLY non-UI account

The host performs this one call. `x-joinorigin-client: mcp` is a transport hint the server reads —
it is a **header**, never a body field. The body is strict: any client-supplied `createdVia`,
`declaredActor`, `assurance`, `accountState`, or `environment` is rejected.

```bash
curl -sS -X POST "$API/onboarding/non-ui" \
  -H 'content-type: application/json' \
  -H 'x-joinorigin-client: mcp' \
  -d '{
    "name": "Agent Operator",
    "email": "operator@example.com",
    "handle": "agentoperator",
    "password": "<host-generated-password>",
    "plan": "plus",
    "interval": "monthly",
    "termsVersion": "YYYY-MM-DD",
    "privacyVersion": "YYYY-MM-DD"
  }'
```

`201` response — a safe projection. It contains **no** password hash, session token, Matrix identity,
or payment data:

```json
{
  "id": "…",
  "state": "pending_payment",
  "createdVia": "mcp",
  "declaredActor": "non_human",
  "assurance": "A1",
  "environment": "production",
  "emailVerified": false,
  "createdAt": "2026-11-03T12:00:00.000Z",
  "pendingPaymentExpiresAt": "2026-11-04T12:00:00.000Z",
  "pendingTtlHours": 24,
  "plan": "plus",
  "interval": "monthly",
  "termsVersion": "YYYY-MM-DD",
  "checkoutRequired": true
}
```

The 24-hour deadline is immutable. The account can never create an Origin before activation. The
door is rate-limited (5 requests / 60 s per client).

### Step 3b — the free `web` door (human/dev shortcut)

Use this door when a human wants the free account that a normal UI signup gets, or when a developer
needs a working Matrix identity quickly. **No plan and no payment** are involved; the Matrix
provisioning job is enqueued at registration (verification-gated), so chat is available once the
email is verified.

In production/staging the door requires proof of a human. The human solves the CAPTCHA and accepts
the current T&C; the host asks the server to mint a single-use, 10-minute attestation and immediately
uses it — the token never reaches the model:

```bash
# 1. The host already read termsVersion/privacyVersion from GET /onboarding/config.
curl -sS -X POST "$API/onboarding/human-attestation" \
  -H 'content-type: application/json' \
  -d '{
    "captchaToken": "<from the human's Turnstile challenge>",
    "termsVersion": "YYYY-MM-DD",
    "privacyVersion": "YYYY-MM-DD"
  }'
# → { "attestationToken": "<host-only, single use>", "expiresAt": "…" }

# 2. Create the free web account (active but unverified until step 4).
curl -sS -X POST "$API/auth/register" \
  -H 'content-type: application/json' \
  -d '{
    "name": "Operator",
    "email": "operator@example.com",
    "handle": "operator",
    "password": "<host-generated-password>",
    "attestationToken": "<from step 1>"
  }'
# → { "user": { …, "accountState": "…" }, "matrix": { … } } — no tokens
```

The body is strict: a client-supplied `createdVia`, `declaredActor`, `assurance`, `accountState` or
`environment` is rejected. The attestation binds the transport channel (web token ≠ native token) and
provenance is server-derived. A stale `termsVersion`/`privacyVersion` is rejected
(`terms-version-stale`); re-read `GET /onboarding/config`.

Dev/test (or `ACCOUNT_HUMAN_DOOR=off`) may omit the token; production and staging always require it
(`human-attestation-required` otherwise).

Continue with step 4 (verify email), step 5 (device grant) and then chat. Do **not** call
`billing.checkout` on this door — payment would attach a paid plan to what is meant to be the free
account.

## Step 4 — verify email, then sign in

```bash
# Ask the server to send the operator a verification email.
curl -sS -X POST "$API/auth/email-verification/request" \
  -H 'content-type: application/json' -d '{"email":"operator@example.com"}'

# The HUMAN opens the emailed link. If the host receives the token, confirm it:
curl -sS -X POST "$API/auth/email-verification/confirm" \
  -H 'content-type: application/json' -d '{"token":"<from-email>"}'

# Product login — keep the response on the host.
curl -sS -X POST "$API/auth/login" \
  -H 'content-type: application/json' \
  -d '{"identifier":"operator@example.com","password":"<host-generated-password>"}'
```

The login response is an auth envelope: `{ user, accessToken, refreshToken, matrix }`. Keep
`accessToken` in the host process; do not print it.

## Step 5 — OAuth 2.1 device authorization

```bash
curl -sS -X POST "$MCP_ISSUER/oauth/device_authorization" \
  -H 'content-type: application/json' \
  -d '{
    "client_id": "<client_id>",
    "scope": "mcp.account mcp.billing mcp.read mcp.write"
  }'
```

Response:

```json
{
  "device_code": "<host-only>",
  "user_code": "K7QP-2M4X",
  "verification_uri": "https://auth-qa.joinorigin.co/oauth/device",
  "verification_uri_complete": "https://auth-qa.joinorigin.co/oauth/device?user_code=K7QP-2M4X",
  "expires_in": 600,
  "interval": 5
}
```

Show the operator **only** `user_code` and `verification_uri`. The human opens the page, signs in
with the product session, and approves. Alternatively the host can approve with the product session:

```bash
curl -sS -X POST "$MCP_ISSUER/oauth/device/approve" \
  -H "authorization: Bearer <product accessToken>" \
  -H 'content-type: application/json' -d '{"user_code":"K7QP-2M4X"}'
```

Then poll at the advertised interval:

```bash
curl -sS -X POST "$MCP_ISSUER/oauth/token" \
  -H 'content-type: application/json' \
  -d '{
    "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
    "client_id": "<client_id>",
    "device_code": "<device_code>"
  }'
```

`400 authorization_pending` means keep polling; `400 slow_down` means wait longer. On success:

```json
{
  "access_token": "<host-only>",
  "token_type": "Bearer",
  "expires_in": 300,
  "scope": "mcp.account mcp.billing mcp.read mcp.write",
  "refresh_token": "<host-only>"
}
```

## Step 6 — refresh and revoke

```bash
curl -sS -X POST "$MCP_ISSUER/oauth/token" \
  -H 'content-type: application/json' \
  -d '{"grant_type":"refresh_token","client_id":"<client_id>","refresh_token":"<refresh_token>"}'

curl -sS -X POST "$MCP_ISSUER/oauth/revoke" \
  -H 'content-type: application/json' -d '{"token":"<access-or-refresh-token>"}'
```

Refresh tokens rotate on every use and only one is active per grant — persist the new one before
dropping the old one.

Call MCP with the host-held bearer:

```bash
curl -sS -X POST "$MCP_RESOURCE/mcp" \
  -H "authorization: Bearer <host-only accessToken>" \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

A missing/expired/revoked token returns `401` with a `WWW-Authenticate` challenge pointing at
`/.well-known/oauth-protected-resource`; re-run the device grant (or refresh).

## Step 7 — billing.checkout and the real checkout page

`POST /billing/checkout` is allowed while `pending_payment` with a verified email. It returns a
server-priced session bound to the account. The API never accepts a price from the client.
The price is resolved server-side from the active price book, the billing-country PPP tier and
any pricing experiment — call `GET /billing/pricing?plan=plus&interval=monthly` to read the
authoritative quote. Never send an amount, currency, price-book entry or country tier: the server
rejects those fields, and the checkout re-resolves the amount before creating the provider session.

```bash
curl -sS -X POST "$API/billing/checkout" \
  -H "authorization: Bearer <product accessToken>" \
  -H 'content-type: application/json' \
  -d '{"plan":"plus","interval":"monthly","idempotencyKey":"onboarding-<account-id>"}'
```

Response:

```json
{
  "id": "txn_…",
  "provider": "paddle",
  "plan": "plus",
  "interval": "monthly",
  "price": { "amountCents": 1900, "currency": "USD" },
  "checkoutUrl": "https://…/checkout?_ptxn=txn_…",
  "expiresAt": "…",
  "pendingPaymentExpiresAt": "…"
}
```

The `_ptxn` value is the Paddle transaction id. Open the real marketing-site checkout page with it:

```text
https://qa.joinorigin.co/en/billing/checkout?_ptxn=<transaction-id>
```

That page loads Paddle.js from `https://cdn.paddle.com/paddle/v2/paddle.js`, initializes it with the
build-time public client token and environment, and calls
`Paddle.Checkout.open({ transactionId, settings: { displayMode: 'overlay' } })`. Because the page does
not request a `variant`, Paddle opens its **multi-page** hosted checkout: the first screen collects the
buyer details (email, country, postcode) and a Continue action reveals the card step. The human enters
the card in Paddle's iframe. The page and this skill never see card data.

After payment, activation arrives only through the signed `subscription.activated` webhook
(`planSource=webhook`). The success redirect is informational.

### Reference Playwright checkout (sandbox only)

Use this only against the Paddle **sandbox** with the sandbox test card. It drives the real page; it
never reads a token or a card from a model — the host process supplies the buyer email and the sandbox
card, and nothing is logged. `PTXN` is the id from the step above.

The shipped page opens Paddle's **multi-page** checkout, so the script has two ordered steps: fill the
buyer details (email / country / postcode) and continue, then fill the card fields that only appear
afterwards. Filling the card fields immediately after `page.goto(...)` fails — the details step must be
completed first. To submit, target the card form's own submit control
(`button[data-testid="cardPaymentFormSubmitButton"]`); a loose name match (pay / subscribe / complete)
also selects the PayPal option and submits the wrong payment method.

```js
// sandbox-checkout.mjs — node sandbox-checkout.mjs
import { chromium } from 'playwright';

const WEB = process.env.JOINORIGIN_WEB ?? 'https://qa.joinorigin.co';
const PTXN = process.env.PTXN; // txn_… from POST /billing/checkout
if (!PTXN) throw new Error('PTXN is required');

const browser = await chromium.launch({ headless: true });
const page = await browser.newPage({ viewport: { width: 1280, height: 1000 } });
await page.goto(`${WEB}/en/billing/checkout?_ptxn=${encodeURIComponent(PTXN)}`);

// The site loads Paddle.js itself; wait for the hosted checkout iframe. The
// frame persists across the multi-page steps, but re-discover it each time so a
// re-render never leaves us holding a stale handle.
const padFrame = async () => {
  for (let i = 0; i < 60; i += 1) {
    await page.waitForTimeout(1000);
    const frame = page.frames().find((f) => /buy\.paddle\.com\/checkout/.test(f.url()));
    if (frame) return frame;
  }
  throw new Error('Paddle checkout iframe did not render');
};

const fill = async (frame, name, value) => {
  const input = frame.locator(`input[name="${name}"]`);
  await input.waitFor({ state: 'visible', timeout: 30_000 });
  await input.click();
  await input.fill('');
  await input.type(value, { delay: 25 });
};

const cardFieldsReady = (frame, timeout) =>
  frame
    .locator('input[name="cardNumber"]')
    .waitFor({ state: 'visible', timeout })
    .then(() => true)
    .catch(() => false);

// --- Step 1 (multi-page checkout): buyer details, then Continue ------------
let frame = await padFrame();
if (!(await cardFieldsReady(frame, 3000))) {
  await fill(frame, 'email', process.env.BUYER_EMAIL ?? 'sandbox@example.com');
  const country = frame.locator('select[name="countryCode"]');
  if (await country.count()) await country.selectOption('US').catch(() => undefined);
  if (await frame.locator('input[name="postcode"]').count()) await fill(frame, 'postcode', '10001');
  const next = frame.getByRole('button', { name: /continue|next/i }).first();
  if (await next.count()) await next.click({ timeout: 30_000 }).catch(() => undefined);
  frame = await padFrame();
}

// --- Step 2: card fields, which exist only after the details step ----------
if (!(await cardFieldsReady(frame, 60_000))) {
  throw new Error('Paddle checkout iframe did not render the card fields');
}
await fill(frame, 'cardHolder', 'JoinOrigin Sandbox');
await fill(frame, 'cardNumber', '4242424242424242'); // Paddle sandbox test card
await fill(frame, 'expiry', '12/30');
await fill(frame, 'cvv', '100');

// Submit the card form itself. A loose name match (pay / subscribe / complete)
// also selects the PayPal option, which never submits the card fields.
const submit = frame.locator('button[data-testid="cardPaymentFormSubmitButton"]');
for (let attempt = 0; attempt < 4; attempt += 1) {
  if (await submit.count()) await submit.click({ timeout: 30_000 }).catch(() => undefined);
  await page.waitForTimeout(5000);
  const done = await page
    .locator('[data-testid="checkout-status"][data-status="success"]')
    .count()
    .catch(() => 0);
  if (done) {
    await browser.close();
    process.exit(0);
  }
}
await browser.close();
process.exit(1);
```

## Step 8 — pending gate and limits

While `pending_payment`:

- Allowed: account/billing/onboarding **reads**, `billing.checkout`, support, legal documents.
- Refused before quota: every product write, including `origins.create` and `POST /origins` with
  `403 account-pending-payment`.
- No `mcp.write` effect, even if the token carries the scope — **state beats scope**.
- At 24 hours the account expires and is purged; re-creation is rate-limited.

After activation, account-wide limits are enforced server-side before create/invite/upload:

| Plan    | Active Origins | Writers | Storage | Server history |
| ------- | -------------- | ------- | ------- | -------------- |
| Free    | 1              | 10      | 1 GB    | 12 months      |
| Plus    | 3              | 25      | 10 GB   | 36 months      |
| Creator | 25             | 250     | 50 GB   | 36 months      |

Readers are free and unlimited. Limits are aggregates across the account, never per-Origin.

## OpenCode MCP configuration

```jsonc
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "joinorigin": {
      "type": "remote",
      "url": "https://mcp-qa.joinorigin.co/mcp",
      "enabled": true
      // No headers: opencode completes the OAuth 2.1 device grant itself.
      // Never put a bearer, password, client token, or card data here.
    }
  }
}
```

Restart opencode after editing its config. The host's OAuth client stores the tokens; the model only
sees MCP tool results.

For the one-command, env-correct host setup (including `chat.create_room` → `chat.send` →
`chat.read` and the simple remote fallback), see the self-setup skill:
<https://qa.joinorigin.co/skills/joinorigin-agent/SKILL.md>.

## Error cheat sheet

| Error                              | Meaning / fix                                                        |
| ---------------------------------- | -------------------------------------------------------------------- |
| `email-in-use` / `handle-in-use`   | pick another email/handle (genericised on purpose)                   |
| `invalid-request`                  | strict schema rejected the body; remove provenance/price fields      |
| `terms-version-stale`              | re-read `GET /onboarding/config` and resend the current versions     |
| `email-not-verified`               | complete step 4 before checkout                                      |
| `account-pending-payment`          | pay first; product writes stay blocked                               |
| `invalid_grant`                    | device code consumed/expired or refresh replayed — restart the grant |
| `authorization_pending`            | the operator has not approved yet; keep polling                      |
| `slow_down`                        | poll slower than `interval` seconds                                  |
| `billing-provider-launch-disabled` | the selected provider is not launched; use Paddle                    |
| `503 server-error` on checkout     | provider/config issue; retry or contact support                      |

## Door recap (repeat, deliberately)

- **`non_ui` is paid-only.** There is no free tier, no trial, and no Free fallback on this door. An
  account that is not paid within 24 hours expires. The chain is exactly: create with
  `plan`/`interval` → `pending_payment` → `billing.checkout` → **human pays in Paddle** → signed
  `subscription.activated` webhook → account active → Matrix provisioning → chat.
- **`web` is the free human/dev shortcut.** No plan, no payment; Matrix is provisioned at
  registration. In production/staging the human must first mint a server-side attestation
  (CAPTCHA + current T&C) via `POST /onboarding/human-attestation`; the host passes the single-use
  `attestationToken` to `POST /auth/register`. It is not "UI-only" — a host can execute it, with the
  human supplying only the proof of humanity and consent.
- **A subaccount is paid by its master, never by itself.** It is a full account with its own login and
  delete; the master sets the budget/allowlist and approves payment. There is no subaccount checkout,
  portal, card entry or self-pay path, and no Free fallback.

## Canonical links

- Hosted onboarding page: <https://qa.joinorigin.co/en/agents-onboarding>
- Checkout page: <https://qa.joinorigin.co/en/billing/checkout> (requires a `_ptxn` created by the API)
- This skill: <https://qa.joinorigin.co/skills/joinorigin-onboarding/SKILL.md>
