Back to Engineering Blog
Architecture6 min read

Pricing a Build in Credits

How build minutes become a credit cost, why the number lives in one config file, and what happens when an account runs out mid-deploy.

Glacro · Published July 16, 2026

Builds are billed in credits rather than by the minute. A plan grants a monthly allowance, a deploy consumes some of it, and when the balance is gone the deploy is refused before it starts rather than failing halfway.

What a build costs

typescript
export function calculateDeployCreditCost(buildMinutes: number): number {
  return Math.ceil(5 + buildMinutes * 2);
}

A flat component covers the fixed cost of provisioning a runner and moving the output into storage; the per-minute component covers the build itself. A small static site lands near the floor, which is the intent — the common case should be cheap and predictable.

One source of truth

Plan prices, credit allowances and per-action costs all live in a single config module. Nothing reads a price from a component. This sounds fussy until you find an admin dashboard computing a revenue figure from prices that were changed months earlier — ours was using ₹299 for a plan that had been ₹599 since a margin review, understating every paid account by more than half.

Key Takeaway
Checkout takes an amount in rupees and converts to paise at the boundary, in one place. Currency-unit conversions scattered across call sites are how a customer eventually gets charged a hundred times the intended amount.

Related Articles

Product Updates

What Glacro Actually Runs, and What It Doesn't

August 26, 2026 · 6 min read
Tutorials

Deploying a Next.js 14 Static Export

August 20, 2026 · 7 min read