recoder-site/public/pricing.html
caelum0x 65bf2849ae feat(RCD-MON): fix recoder.xyz payment path -- checkout, webhook, entitlement
- POST /api/checkout creates a live Dodo checkout session from an allowlisted
  product slug (weekly/monthly/pro/pro_annual/team), never a client-supplied
  product id.
- POST /api/webhooks/dodo verifies the Standard Webhooks signature
  (webhook-id.webhook-timestamp.body, 5-min replay window) against a secret
  stored only as a Worker secret, records each delivery idempotently by
  webhook-id in D1, and upserts a per-customer entitlement row on
  subscription lifecycle events.
- GET /api/entitlement is an internal-only lookup gated by a shared-secret
  header, for Recoder's app / Rithub to check a customer's billing state.
- GET /api/portal resolves a checkout session's email, looks up the Dodo
  customer id from our own entitlements table, and redirects into Dodo's
  hosted customer portal -- no bespoke billing UI.
- New /thanks page with a "Manage subscription" link; pricing cards now
  trigger checkout via one click (no form -- Dodo's hosted page collects
  email/card).
- New D1 database recoder-billing (webhook_events + entitlements tables).

This re-points recoder.xyz at a real backend: the live Dodo webhook
(ep_3L0eElSCHnxNsth2aIBRdObJJzT) was 404ing against the old pure-static
site. Verified live: bad signature -> 401, correctly-signed test event ->
200 + D1 row + idempotent replay, all 5 live checkout URLs return 200 on
Dodo's hosted page, pricing/thanks screenshot clean at 1440 and 390 with
no console errors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-12-01 16:14:37 +03:00

138 lines
5.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pricing — Recoder</title>
<meta name="description" content="Recoder plans: Weekly $10, Monthly $20, Pro $29/mo, Pro Annual $290/yr, Team $99/mo. Billed by Dodo Payments.">
<link rel="canonical" href="https://recoder.xyz/pricing">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="/styles.css">
</head>
<body>
<header class="site">
<div class="wrap bar">
<a href="/" class="logo">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><polyline points="8 5 2 12 8 19"></polyline><polyline points="16 5 22 12 16 19"></polyline></svg>
Recoder
</a>
<nav class="site-nav">
<a href="/pricing">Pricing</a>
<a href="/contact">Contact</a>
<a href="https://rithub.dev" class="btn btn-accent" target="_blank" rel="noopener">Open Rithub</a>
</nav>
</div>
</header>
<main>
<section class="hero" style="padding-top:64px;padding-bottom:40px;">
<div class="wrap">
<h1 style="font-size:48px;">Pricing</h1>
<p class="sub">Five plans. No hidden seats, no usage surprises. Billed securely by Dodo Payments.</p>
</div>
</section>
<section class="band">
<div class="wrap">
<div class="pricing-grid">
<div class="plan-card">
<div class="name">Weekly</div>
<div class="price">$10<span>/week</span></div>
<div class="desc">Try Recoder for a week.</div>
<button class="btn btn-plain checkout-btn" data-product="weekly" type="button">Start</button>
</div>
<div class="plan-card">
<div class="name">Monthly</div>
<div class="price">$20<span>/month</span></div>
<div class="desc">For solo use, billed monthly.</div>
<button class="btn btn-plain checkout-btn" data-product="monthly" type="button">Start</button>
</div>
<div class="plan-card featured">
<div class="name">Pro</div>
<div class="price">$29<span>/month</span></div>
<div class="desc">Higher usage limits.</div>
<button class="btn btn-accent checkout-btn" data-product="pro" type="button">Start</button>
</div>
<div class="plan-card">
<div class="name">Pro Annual</div>
<div class="price">$290<span>/year</span></div>
<div class="desc">Pro, billed yearly — two months free.</div>
<button class="btn btn-plain checkout-btn" data-product="pro_annual" type="button">Start</button>
</div>
<div class="plan-card">
<div class="name">Team</div>
<div class="price">$99<span>/month</span></div>
<div class="desc">Shared billing for a team.</div>
<button class="btn btn-plain checkout-btn" data-product="team" type="button">Start</button>
</div>
</div>
<div class="includes">
<h3>Every plan includes</h3>
<ul>
<li>Parallel agents, each on its own branch</li>
<li>The approval gate before any push lands</li>
<li>Automatic pull requests once work is approved</li>
<li>Pull request reviews and repo question answering</li>
</ul>
</div>
<p class="checkout-error" id="checkout-error">Checkout is unavailable right now. Try again in a moment, or <a href="/contact">contact us</a>.</p>
<p style="color:var(--muted);font-size:15px;margin-top:28px;text-align:center;">
Checkout and billing are handled by Dodo Payments, our merchant of record.
See the <a href="/refund">refund policy</a> for cancellations and refunds.
</p>
</div>
</section>
</main>
<script>
(function () {
var errorEl = document.getElementById("checkout-error");
document.querySelectorAll(".checkout-btn").forEach(function (btn) {
btn.addEventListener("click", function () {
var product = btn.getAttribute("data-product");
btn.disabled = true;
var original = btn.textContent;
btn.textContent = "Loading…";
if (errorEl) errorEl.classList.remove("visible");
fetch("/api/checkout", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ product: product }),
})
.then(function (res) {
if (!res.ok) throw new Error("checkout failed");
return res.json();
})
.then(function (data) {
if (!data.checkout_url) throw new Error("no checkout url");
window.location.href = data.checkout_url;
})
.catch(function () {
btn.disabled = false;
btn.textContent = original;
if (errorEl) errorEl.classList.add("visible");
});
});
});
})();
</script>
<footer class="site">
<div class="wrap bar">
<nav>
<a href="/pricing">Pricing</a>
<a href="/terms">Terms</a>
<a href="/privacy">Privacy</a>
<a href="/refund">Refund policy</a>
<a href="/contact">Contact</a>
</nav>
<div class="copy">&copy; 2026 Erebos Labs</div>
</div>
</footer>
</body>
</html>