# 08C Frontend billing/auth UX integration — aieditorrsp.net

- Date: 2026-05-29
- Task: t_a584f43c
- Decision: GO by host recovery after worker budget exhaustion

## What changed

- Wired visible auth/payment CTAs to live routes:
  - Login/Open Editor -> `/api/auth/login?return_to=/ai-photo-prompt-editor` or `/ai-photo-prompt-editor`
  - Pro monthly -> `/api/checkout/stripe?plan=monthly`
  - Pro yearly -> `/api/checkout/stripe?plan=yearly`
  - Credit pack -> `/api/checkout/stripe?plan=credit_pack`
- Added credit account UI panel that reads `/api/credits` and shows authenticated/free/paid credit state.
- Removed stale preview/paid-disabled launch copy from rendered design transformations.
- Preserved SEO structure: no SEO-after-footer regression, rendered image alt remains clean.
- Kept pricing capped: Free 2/day, Pro $12/month with 200 credits/month, annual $96/year, credit pack $6/100 credits.

## Commits

- `79ea69f` — `feat: wire billing auth ux`
- `07a4952` — `fix: remove preview mode CTA`
- `89e92ed` — `fix: remove paid disabled copy`

All pushed to `origin/main`.

## Deployment

- Deployed with `npm run deploy`.
- Current Cloudflare Worker version: `21846b6c-1d2b-4d99-a22d-7fce8bb3b7f5`.
- Domain: `https://aieditorrsp.net`.

## Verification

- `npm run verify`: passed, `ok=true`, `routes=11`, `forbiddenCopy=0`.
- `npm run build`: passed.
- `npm run seo:audit`: passed, no failures, rendered image missing alt count remains 0.
- Production HTTP checks:
  - `/` -> 200
  - `/pricing` -> 200
  - `/ai-photo-prompt-editor` -> 200
  - `/api/credits` -> 200
  - `/api/auth/me` -> 200
- Production `/api/credits` anonymous response confirms:
  - `paid_enabled: true`
  - `daily_limit: 2`
  - checkout links for monthly/yearly/credit_pack present.
- Production copy scan on `/` + `/pricing` no longer finds:
  - `Preview Mode`
  - `Join Waitlist`
  - `paid credits remain disabled`
  - `paid checkout ... disabled`
  - `unlimited`

## Downstream

08D paid-launch compliance recheck may proceed. It must recheck Stripe Checkout flags from 08A/08B:

```ts
automatic_tax: { enabled: true }
billing_address_collection: 'required'
tax_id_collection: { enabled: true }
```

Also verify order/ledger tax split fields remain present: subtotal, tax, total, tax_payable.
