A Cloudflare Workers product for risk-free trials: track trials, buy portfolio credits, refund with structured
feedback, and (owner-gated) connect merchant Stripe accounts for refund intelligence.
Stack
Runtime: Cloudflare Workers + static ASSETS binding for marketing pages.
Data: D1 (AUTH_DB for merchant tables; shared domains DB for portfolio credit ledger).
Billing: Portfolio billing service binding so leaf domains checkout without hub bot-fight POSTs.
Auth: Clerk / OpenAuth session paths for dashboard and merchant API.
API dual-cover:
/api/merchant/intelligence/preview (public demo JSON) and auth-gated
/api/merchant/* routes.
What is intentionally not “done” without the owner
Stripe Connect app registration, automation-credit price IDs, and flipping
MERCHANT_CONNECT_ENABLED=true are owner console steps. The code paths exist; go-live is not a waitlist
and is not auto-marked complete by the platform.