Documentation Index
Fetch the complete documentation index at: https://docs.aspfox.com/llms.txt
Use this file to discover all available pages before exploring further.
Changing plan prices
No code changes required. Update prices entirely in Stripe:- Stripe Dashboard → Products → click on Pro
- Click Edit on the pricing section
- Stripe does not allow editing existing price amounts. Create a new price instead:
- Click Add another price
- Set the new amount and billing interval
- Archive the old price
- Copy the new Price ID → update
STRIPE_PRO_PRICE_IDin your environment variables - Restart the API (or redeploy)
Adding a fourth plan
Step 1: Create the plan in Stripe Dashboard and copy the Price ID. Step 2: Add a new environment variable:STRIPE_ENTERPRISE_PRICE_ID=price_…
Step 3: Add the plan to the Plan enum in Domain:
StripeService.GetPriceIdForPlan():
PLANS constant:
Testing the full billing flow locally
Prerequisites: Stripe CLI installed,stripe listen running, API started.
Complete a test checkout:
- Log in to the frontend at
http://localhost:5173 - Navigate to Billing → click Upgrade to Pro
- You are redirected to Stripe’s test checkout
- Use test card:
4242 4242 4242 4242, any future expiry, any CVC - Click Subscribe
- You are redirected back to
/billing?success=true - The Billing page now shows the Pro plan
Stripe test card numbers
| Scenario | Card number |
|---|---|
| Successful payment | 4242 4242 4242 4242 |
| Card declined | 4000 0000 0000 0002 |
| Requires 3DS authentication | 4000 0027 6000 3184 |
| Insufficient funds | 4000 0000 0000 9995 |
| Expired card | 4000 0000 0000 0069 |
Triggering specific webhook events manually
stripe trigger uses Stripe’s test fixture data. The tenantId in the metadata may not match a real tenant in your local database. Webhook handlers that look up a tenant by the metadata tenantId will log a warning and return 200 without updating local state. This is expected behavior — the trigger is useful for testing the webhook parsing and signature verification, not the full business logic.Recovering from a missed webhook
TheSubscriptionSyncJob runs every 2 hours and reconciles all tenant subscriptions with Stripe. If a webhook was missed, the sync job corrects local state within 2 hours automatically.
To correct immediately:
- Go to the Hangfire dashboard:
http://localhost:5000/hangfire - Click Recurring Jobs
- Find
subscription-sync - Click Trigger now