Trials → payment failed → grace → revoke · v1.0.0
Results appear here.
POST /api/checkout — subscription Checkout with trial_period_daysGET /api/subscription?email= — status, trial_end, past_due_since, entitlementPOST /api/portal — Billing Portal (update payment method)POST /api/webhook — SubtleCrypto; checkout, subscription.*, invoice.payment_failed|paid, trial_will_endPOST /api/dunning/run — apply grace expiry (X-Admin-Secret; cron-friendly)GET /api/health — JSON health (secret flags only)GET /api/admin/dunning_events — recent events (X-Admin-Secret)Grace: on invoice.payment_failed mark past_due; still entitled for 3 days; then /api/dunning/run cancels/revokes. Add-on to Billflare spine ($99).