Tasks
Tasks
Monthly Billing Cycle
M-1 + M-4: monthly invoice generation with weekend/holiday adjustment.
BILLING_RULES.md Section 3:
- Invoice date: 26th of M+1 calendar-basis
- Weekend/holiday adjustment: next business day
The Cloud Scheduler job runs DAILY (cron under our control). Each run:
- Calls invoice_date_for_billing_cycle(today) to decide whether today is the canonical invoice date (M-4 logic encapsulated there).
- If not the invoice day, no-ops and returns success.
- If it IS the invoice day, calls InvoiceGenerator.generate_monthly_invoices(today).
Idempotent: the generator skips any attribution row already invoiced. Two firings on the same canonical day will not double-charge.
post/api/tasks/monthly-billing-cycle
Headers
x-cloudscheduler-secretstring nullable
x-scheduler-secretstring nullable
authorizationstring nullable
Response
Successful Response
{"stackTrail":"paths:/api/tasks/monthly-billing-cycle:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}
Changes
No recorded changes to this endpoint across all 1 revision of this API.