Six events, all in sj-crm-stripe/sj-crm-stripe.php → handle_webhook():
- checkout.session.completed — provisions tenant site
- invoice.paid — extends subscription period
- invoice.payment_failed — sends dunning email, flags account
- customer.subscription.updated — syncs plan changes
- customer.subscription.deleted — deactivates tenant (does not delete data)
- checkout.session.expired — cleans up unfinished signups
Webhook signing secret is in wp_options → sj_crm_stripe_webhook_secret.
Policy: 30-day money-back guarantee. After 30 days, refunds are case-by-case and discouraged unless we caused the problem (downtime, data loss, missing feature we promised).
Process:
- Verify the request is within 30 days of first payment (Stripe customer page).
- Confirm by email that the customer wants to cancel + refund.
- Stripe Dashboard → Payments → find charge → Refund.
- Cancel the subscription in Stripe.
- Reply to customer with confirmation.
- Mark the tenant subsite for deletion after 30 days.
- Log in SJ Journal.