Hook up Stripe billing.
Rootquill uses Stripe for subscriptions. You create Products + Prices in Stripe, add one webhook endpoint pointing at Rootquill, and we handle checkout, trials, cancellations and failed-payment retries automatically.
1 Create the plans in Stripe
In your Stripe dashboard, create one Product called Rootquill with four recurring Prices:
| Plan | Amount | Interval | Note |
|---|---|---|---|
| Founder monthly | $60.00 | month | default new-subscription offer |
| Founder yearly | $600.00 | year | 2 months free vs. monthly |
| Studio monthly | $150.00 | month | 3 sites, priority backlinks |
| Studio yearly | $1,500.00 | year | 2 months free vs. monthly |
Copy each Price ID (looks like price_1Q8J...) — you'll paste them into Rootquill's env on step 3.
2 Register the webhook endpoint
Stripe → Developers → Webhooks → Add endpoint.
- Endpoint URL:
https://api.rootquill.com/stripe/webhook - Events to send:
| Event | What Rootquill does |
|---|---|
checkout.session.completed | Provisions account, mints API key, emails onboarding link |
customer.subscription.created | Sets account plan |
customer.subscription.updated | Plan changes, upgrades/downgrades |
customer.subscription.deleted | Marks account cancelled (keeps data 30 days) |
invoice.payment_succeeded | Reactivates past-due account to active |
invoice.payment_failed | Marks account past-due, emails customer |
payment_intent.succeeded | One-off payments (if any) |
Hit Add endpoint. Stripe shows you a Signing secret (whsec_…) — reveal it, you'll paste it next.
3 Paste keys into the server env
SSH into the VPS and add three lines to /opt/rootquill/.env:
sudo nano /opt/rootquill/.env # add these three lines (use test keys first — sk_test_... and whsec_... from test mode): STRIPE_SECRET_KEY=sk_test_... STRIPE_WEBHOOK_SECRET=whsec_... STRIPE_PRICE_FOUNDER_MONTHLY=price_... STRIPE_PRICE_FOUNDER_YEARLY=price_... STRIPE_PRICE_STUDIO_MONTHLY=price_... STRIPE_PRICE_STUDIO_YEARLY=price_... # save, then restart the API: sudo systemctl restart rootquill-api curl -s https://api.rootquill.com/ | jq .ai # should also show stripe enabled in logs sudo journalctl -u rootquill-api -n 3 --no-pager
Journal should no longer say stripe: disabled.
4 Verify end-to-end
In Stripe dashboard → your webhook → Send test webhook, pick checkout.session.completed, Send. You should see:
- Stripe shows 200 OK on the test event
- In your Rootquill dashboard → Admin → Recent activity → a new
paymentitem appears /v1/admin/metricsshowsstripe_events_24h ≥ 1
https://rootquill.com/stripe/webhook: the webhook URL must be the api. subdomain, not the apex. Fix: edit the endpoint in Stripe and change the host to api.rootquill.com.5 Going live
- Flip Stripe dashboard from Test mode → Live mode.
- Re-create the Products / Prices under Live mode (they don't carry over).
- Add the Live webhook endpoint, grab its new
whsec_…. - Swap
sk_test_→sk_live_and the whsec in/opt/rootquill/.env, restart the API. - Place one real $0.50 test charge on your own card to verify. Refund it.