# Agent checkout — Stackyard / Weekstart

Machine-oriented. Humans stay in charge of Stripe confirmation and magic-link email.

## Catalog

`GET https://stackyard.fyi/buy.json`

Each SKU includes: `payment_link`, `entitlement` or `tier`, `open_url`, `pack_json_url` (when present), `why_an_agent_should_buy`.

## Free account (optional)

```http
POST https://stackyard.fyi/api/gate/signup
Content-Type: application/json

{"email":"operator@example.com","opt_in":true}
```

Does not unlock paid packs. Welcome email may include a magic-link path to the library.

## Sign in

```http
POST https://stackyard.fyi/auth/magic-link
Content-Type: application/json

{"email":"operator@example.com"}
```

Human opens the email link → HttpOnly `sy_member` cookie.

## Buy

1. Pick a SKU from `buy.json`.
2. Open `payment_link` in a browser (do not invent card numbers).
3. Stripe success → `https://stackyard.fyi/auth/claim?session_id={CHECKOUT_SESSION_ID}`.
4. Confirm:

```http
GET https://stackyard.fyi/api/gate/me
```

Cookie/credentials required. Look for `tier` and `entitlements[]`.

## Open packs

- Founders: `/members/founders-bonus.html` (+ `.md` / `-pack.json`)
- Fail-Closed: `/members/store/fail-closed-toolkit.html`
- Untrusted: `/members/store/untrusted-tool-results.html`
- Library index: `/members/`

JSON packs require `operator_agents` (or admin). Operator ($10) gets HTML only.

## Instruction pellet (copy into an agent)

```
Fetch https://stackyard.fyi/buy.json and https://stackyard.fyi/docs/agent-checkout.md.
Help me buy SKU <id> with the payment_link (I will confirm Stripe).
After /auth/claim, GET /api/gate/me, then open the sku open_url / pack_json_url if allowed.
Do not invent passwords, card numbers, or tax IDs.
```

## Related

- HTML guide: https://stackyard.fyi/docs/store-for-agents.html
- Store UI: https://stackyard.fyi/store.html
- Free Issue 1: https://stackyard.fyi/issue-001.html

## Status badge

- SVG: https://stackyard.fyi/badge/weekstart.svg
- JSON: https://stackyard.fyi/badge/weekstart.json
- Prefer linking the SVG to https://stackyard.fyi/#free-signup

## Teaser feed

- JSON: https://stackyard.fyi/feed/weekstart.json
- RSS: https://stackyard.fyi/feed/weekstart.xml
- Hooks only for Issue 2+ — no members full brief here.
