Add Stripe billing integration + update free tier to 100 PDFs/mo

This commit is contained in:
DocFast Bot 2026-02-14 13:53:19 +00:00
parent facb8df8f4
commit c12c1176b0
7 changed files with 238 additions and 12 deletions

View file

@ -171,7 +171,7 @@ footer { padding: 40px 0; text-align: center; color: var(--muted); font-size: 0.
<li>All templates</li>
<li>Community support</li>
</ul>
<a href="#" class="btn btn-secondary" style="width:100%">Start Free</a>
<a href="mailto:hello@docfast.dev?subject=Free API Key" class="btn btn-secondary" style="width:100%">Get Free Key</a>
</div>
<div class="price-card featured">
<h3>Pro</h3>
@ -183,7 +183,7 @@ footer { padding: 40px 0; text-align: center; color: var(--muted); font-size: 0.
<li>Priority support</li>
<li>Custom templates</li>
</ul>
<a href="#" class="btn btn-primary" style="width:100%">Get Started</a>
<a href="#" class="btn btn-primary" style="width:100%" onclick="checkout(event)">Get Started</a>
</div>
</div>
</div>
@ -195,5 +195,18 @@ footer { padding: 40px 0; text-align: center; color: var(--muted); font-size: 0.
</div>
</footer>
<script>
async function checkout(e) {
e.preventDefault();
try {
const res = await fetch('/v1/billing/checkout', { method: 'POST' });
const data = await res.json();
if (data.url) window.location.href = data.url;
else alert('Something went wrong. Please try again.');
} catch (err) {
alert('Something went wrong. Please try again.');
}
}
</script>
</body>
</html>