Send Billing Sample Emails
POST/api/email-templates/billing/send-samples
QA helper: simulate a Stripe webhook arrival for the target tenant.
For Stripe-shaped events (payload_type == "stripe_event"), the
payload is dispatched through StripeWebhookProcessor.simulate_event,
which runs the SAME handler chain production uses after signature
verification. This means DB writes (subscription state, billing logs)
AND email sends happen — same as a real Stripe webhook arrival.
Signature verification is skipped because the payload comes from our
own UI, not Stripe.
For internal events (LOW_BALANCE_WARNING, INSUFFICIENT_FUNDS,
PAYMENT_METHOD_EXPIRING), there is no Stripe webhook to simulate, so
we route them directly through SystemEmailService.emit() — same path
WalletService.deduct_balance would take in production.
When event is provided, only that single event fires (with the
optional context body field overriding the auto-built sample).
When event is omitted, every sample fires.
Request
Responses
- 200
- 422
Successful Response
Validation Error