Back to Blog Series
Part 12: Billing & EntitlementsStep 12 of 15BillingPolarSaaS

Subscription & Billing Architecture with Polar

How I implemented tiered limits, billing-owner context, seat synchronization, and entitlement enforcement across Fluxo's entire product surface.

Why this part is here in the storyline

See how limits and billing rules are enforced across UI, APIs, and runtime paths.

Artem Moshnin, Lead Software EngineerFebruary 2, 202613 min
Series Progress12/15

Billing is not a checkout page. In a platform like Fluxo, billing is entitlement infrastructure. It determines what the product is allowed to do, and it has to be enforced everywhere: UI, APIs, background jobs, and the execution runtime itself.

If entitlements are soft, you get confusing behavior and support debt. Fluxo treats billing as a strict backend contract so plan behavior is predictable.

Section 1

Tier model and limits

#tier-model-and-limits

Fluxo defines explicit tier limits for:

  • monthly executions
  • per-org and total workflow counts
  • credential counts
  • node count limits
  • feature flags (AI nodes, premium triggers/actions, white-label, domains)

These limits are enforced server-side in create, execute, and configuration flows. They are not “UI hints”.

Section 2

Billing owner context

#billing-owner-context

Organizations bill through the creator account. That matters because requests can come from multiple contexts: a participant editing a workflow, a schedule trigger dispatching runs, or an API key calling the review endpoint.

Fluxo uses a billing-context resolver that maps any request to the correct billing owner. This keeps usage and limits consistent across:

  • personal workspaces
  • organization-scoped resources
  • workflow-triggered runtime calls
Section 3

Seat-aware subscriptions

#seat-aware-subscriptions

For team and enterprise tiers, Fluxo synchronizes seat counts against membership state. Seat changes are pushed to Polar subscription updates with proration behavior.

This keeps pricing, invite permissions, and org growth aligned.

Section 4

Polar integration details

#polar-integration-details

I integrated:

  • customer provisioning
  • checkout sessions per tier and interval
  • portal session management
  • subscription status mapping
  • fallback pricing cache strategy when live retrieval fails

I also maintain robust tier detection from product metadata, slug, and amount signatures because provider payloads evolve.

Section 5

Usage tracking pipeline

#usage-tracking-pipeline

Fluxo stores usage snapshots and monthly records and resets execution counters on schedule. Because usage data drives both UI and enforcement, it must be durable and queryable.

Section 6

Why I built this strictly

#why-i-built-this-strictly

Soft entitlement checks create support debt and trust issues. I chose strict backend enforcement so plan behavior is predictable for every user and every organization.