AWS Marketplace subscriptions arrive with an x-amzn-marketplace-token. The backend exchanges it for a customer identifier tied to billing. Hourly jobs can aggregate document counts in Postgres and call BatchMeterUsage so usage lines up with entitlements.
Pair structured logs from workers with SSE timelines in the UI so operators can correlate user-visible delays with backend stage latency.