Billing and credits
The Motionworks billing contract — how credits are deducted, when usage posts to your invoice, and what we do when the audit log and the bill disagree.
The contract
We charge what we deducted. Missing audit-log rows are bugs we page on, not billing principles.
Every billable API call deducts credits from your organization wallet
at the moment the call succeeds. That deduction is the canonical
billing event. The audit log we write alongside it (usage_logs)
is observability — it tells you what was called, when, by which key,
against which endpoint. If a usage_logs row is missing for
a call we deducted, that is a bug on our side and we page on it. It is
never an excuse to charge you for a call we can't explain.
How a call becomes an invoice line
- You make a billable API call. Your wallet is decremented atomically inside Postgres.
- The deduction is recorded in our meter outbox
(
billing_meter_outbox) with a unique correlation id. - A dispatcher worker reports the meter event to Stripe every 60 seconds, using that correlation id for idempotency. Stripe is the source of truth for what you owe.
- An audit row is written to
usage_logswith the same correlation id, so you and we can answer "what did this call cost, when, and against which endpoint?" - A nightly reconciliation worker checks that the three numbers — your wallet deductions, the outbox totals, and what Stripe received — agree to within $1 per organization per day. Any drift pages our on-call.
When does usage show up on my invoice?
Stripe meter events post on a 60-second cadence. In practice your usage is visible in your Stripe dashboard within a few minutes of the call. The "Billed through:" line on your /console/billing/ page tells you the last fully settled day. Today's usage finishes settling after midnight ET.
What if a call is in flight when I check?
The /console/billing/ card shows a small "X calls reconciling" pill when meter events for the current period are still in flight. That's normal — they'll settle within the next 60 seconds. If you see a "Y calls not billed (we're investigating)" pill, an exception fired on our side and our on-call has been paged; reach out to support and we'll walk through it with you.
Retention
- Raw audit log (
usage_logs) — 90 days, daily partitions. - Daily rollup (
usage_daily_summary) — perpetual. - Stripe meter events — per Stripe's retention policy on your account.
What this contract does NOT do
- It does not make
usage_logspart of the billing path. A failed audit-log write does not refund a deduction. We page on the missing row, find the call in the outbox, reconcile the audit log, and tell you. - It does not change the cadence. We don't batch-charge once a day. Every billable call deducts in real time and meters to Stripe within 60 seconds.
If anything on this page surprises you when you compare a Stripe invoice to your /console/billing/ page, that's a bug — email support@mworks.com with the date range and we'll trace it end to end.
See also
- Credits & quotas reference — per-endpoint credit costs, rate limits, free-tier grant
- /console/billing/ — your current usage, period boundary, and reconciliation status
- API reference — full endpoint surface