# 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), `job` (one-line subtitle), `why_an_agent_should_buy`.

### Pack job lines

| Pack | Job |
|------|-----|
| You Bought the Smoke Alarm | Spend & permission freeze kit |
| Fail-Closed Toolkit | Who may call |
| Untrusted Tool Results | What may steer after the call |
| Token Defrag | Same work, fewer tokens |

## 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`) — job: Spend & permission freeze kit
- Fail-Closed: `/members/store/fail-closed-toolkit.html` — job: Who may call
- Untrusted: `/members/store/untrusted-tool-results.html` — job: What may steer after the call
- Token Defrag: `/members/store/token-defrag.html` — job: Same work, fewer tokens
- 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
- Issue 9 teaser (this week): https://stackyard.fyi/issue-009-teaser.html
- Issue 8 teaser (last week): https://stackyard.fyi/issue-008-teaser.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.
