{% extends "base.html" %} {% block title %}Stripe Setup Wizard — DocuElevate Admin{% endblock %} {% block content %}

Stripe Setup Wizard

Configure Stripe billing for DocuElevate in three steps.

Back to Plans

Checking Stripe status…

Step 1 — Verify Stripe API Keys

Set your Stripe keys in your environment (or .env file) then click Check Connection to verify.

STRIPE_SECRET_KEY=sk_test_…

STRIPE_PUBLISHABLE_KEY=pk_test_…

STRIPE_WEBHOOK_SECRET=whsec_…

Connected to Stripe .

Step 2 — Sync Plans to Stripe

DocuElevate can auto-create Stripe Products and Prices for each paid plan. Free plans are skipped. Plans that already have a Stripe price ID are left unchanged.

Plan sync status
Plan Monthly Price ID Yearly Price ID Status

Step 3 — Configure Stripe Webhook

Webhooks let Stripe notify DocuElevate of subscription changes in real time. Add the endpoint below in your Stripe Dashboard → Developers → Webhooks .

Subscribe to these events:

  • checkout.session.completed
  • customer.subscription.updated
  • customer.subscription.deleted
  • invoice.payment_failed
After adding the endpoint, copy the Signing secret from Stripe and set STRIPE_WEBHOOK_SECRET=whsec_… in your environment. This protects against spoofed webhook events.
STRIPE_WEBHOOK_SECRET is configured. Webhook signatures are verified.
Local testing with Stripe CLI
# Install Stripe CLI and log in
stripe login

# Forward webhooks to your local server
stripe listen --forward-to http://localhost:8000/api/billing/webhook

# Trigger test events
stripe trigger checkout.session.completed
stripe trigger customer.subscription.updated
stripe trigger customer.subscription.deleted
{% endblock %}