Skip to content

docs(billing): price capacity by the queue-hour in Stripe, not the minute - #362

Merged
artempartos merged 2 commits into
developfrom
docs/stripe-price-per-queue-hour
Sep 30, 2026
Merged

artempartos merged 2 commits into
developfrom
docs/stripe-price-per-queue-hour

Conversation

@artempartos

Copy link
Copy Markdown
Contributor

Stripe Checkout quoted our metered price as $0.083333333333 per unit — PRICING_QUEUE_HOURLY_RATE ÷ 60, printed to every decimal place Stripe keeps. Correct, and unreadable as "$5 an hour".

The price now buys queue-minutes sixty at a time (transform_quantity: {divide_by: 60, round: "down"}) at $5.00 a package, so the same page reads "$5.00 per 60 queue-minutes".

before after
Checkout line 0,08333333333333 $ за единицу 5,00 $ за 60 queue-minute
Unit amount $0.083333333333 × 1 $5.00 × 60

No code changes. The meter still counts queue-minutes exact to the second, Billing::Meter::Stripe still sends one event per company per hour, and STRIPE_PRICE_ID is the only thing that moves — in the infra repo (aixle-infra#51), because a price id is deployment config.

The one consequence for money: an invoice now lands on a whole queue-hour and the remainder rounds down, so a part hour left at the end of a billing period is never charged for. Under $5 either way, and down is the direction that cannot start an argument. Said in the customer-facing Plans & limits page as well as the runbook, because it is the kind of thing a customer checks.

What this touches

  • docs/operations/stripe-setup.md — the package-pricing section, the curl that creates such a price (the dashboard has no field for the transformation), the recorded test-mode ids, and the live-mode checklist
  • docs/product/self-serve-signup.md, docs/reference/configuration.md — the unit is no longer "the rate ÷ 60"
  • app/frontend/pages/Docs/data/pages/plans-and-limits.md — one paragraph telling customers the rounding direction

Verified in the Stripe sandbox before opening this: price created, Checkout driven against it with the staging app's own parameters, currency still USD with Adaptive Pricing off.

🤖 Generated with Claude Code

artempartos and others added 2 commits September 30, 2026 11:58
…nute

Checkout quoted the metered price as $0.083333333333 per unit, which is
PRICING_QUEUE_HOURLY_RATE ÷ 60 printed to every decimal place Stripe
keeps. The number was right and nobody would read it as $5 an hour.

Package pricing buys the minutes sixty at a time instead, so the page
reads "$5.00 per 60 queue-minutes" and the unit amount is the rate
itself. Nothing about the measurement moves: the meter still counts
queue-minutes exact to the second, and the application still sends one
event per company per hour.

The one consequence for money is that an invoice now lands on a whole
queue-hour, rounding down, so a part hour left at the end of a period is
not charged for. Said in the customer docs as well as the runbook,
because it is the kind of thing a customer checks.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
ConfigurationReferenceTest pins app/frontend/pages/Docs/data/pages/
config-schema.md byte-for-byte to docs/reference/configuration.md, and
the STRIPE_PRICE_ID row was changed in one of them only.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
@artempartos
artempartos merged commit 09e14ed into develop Sep 30, 2026
7 checks passed
artempartos added a commit that referenced this pull request Dec 2, 2026
* build(dev): run local Temporal on the CLI dev server image

temporalio/auto-setup was discontinued after 1.29.7 and carries 64
critical/high CVEs (one in CISA KEV). Replace the compose temporal
service with temporalio/temporal 1.10.1 `server start-dev`, persisted
to SQLite on the temporal_data volume. Service name, port 7233, the
default namespace and the healthcheck contract stay, so worker,
temporal-ui and config/settings.yml are unchanged.

Refs #362

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Aixle Flow <[email protected]>
Signed-off-by: Evgeny Agafonov <[email protected]>

* build(dev): restart the worker when Temporal is recreated

The worker syncs the schedules only on start. Switching a running stack
to the dev server with `docker compose up -d` recreated `temporal` on an
empty temporal_data volume and left the worker running, so every cron
schedule was missing until someone restarted the worker by hand.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

---------

Signed-off-by: Aixle Flow <[email protected]>
Signed-off-by: Evgeny Agafonov <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Co-authored-by: Aixle Flow <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Artem Petrov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant