Billing · setup

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:

PlanAmountIntervalNote
Founder monthly$60.00monthdefault new-subscription offer
Founder yearly$600.00year2 months free vs. monthly
Studio monthly$150.00month3 sites, priority backlinks
Studio yearly$1,500.00year2 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.

EventWhat Rootquill does
checkout.session.completedProvisions account, mints API key, emails onboarding link
customer.subscription.createdSets account plan
customer.subscription.updatedPlan changes, upgrades/downgrades
customer.subscription.deletedMarks account cancelled (keeps data 30 days)
invoice.payment_succeededReactivates past-due account to active
invoice.payment_failedMarks account past-due, emails customer
payment_intent.succeededOne-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:

bash
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:

If you see 404 on 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

  1. Flip Stripe dashboard from Test mode → Live mode.
  2. Re-create the Products / Prices under Live mode (they don't carry over).
  3. Add the Live webhook endpoint, grab its new whsec_….
  4. Swap sk_test_ → sk_live_ and the whsec in /opt/rootquill/.env, restart the API.
  5. Place one real $0.50 test charge on your own card to verify. Refund it.