DEV3 Technologies home

DEV3 Cyclestrand – Subscription Billing Software for SaaS with Proration, Usage Billing & Dunning (Next.js)

Self-hosted subscription billing on Next.js 16 and MongoDB: plans and metered usage, proration, invoices and credit notes, dunning, hosted checkout and customer portal, revenue metrics and a REST API. Setup wizard and demo data included. No mobile apps.
by DEV3 TechnologiesVerified Author(0) 0 sales 8 viewsUpdated 13 Nov 2026

Video tour. Pick a section below to browse 34 screenshots in 9 sections.

App & phone tours

Tap play to watch each app. Nothing downloads until you do.

  • Mobile web0:05

Cyclestrand is subscription billing software that you host yourself, built by DEV3 Technologies on Next.js 16, React 19, TypeScript, Tailwind 4 and MongoDB. Each customer is a billing workspace. Inside it you define products and prices, sign up your own customers, bill them every cycle, chase failed payments and read your revenue numbers. You, the operator, sell plans to workspaces and watch the whole platform from an operator panel. The demo shows fictional workspaces such as an analytics SaaS, a design tool and an API product.

No live demo: 34 grouped screenshots and two video tours show the marketing site, the dashboards, hosted checkout, the customer portal, the developer pages and the operator panel. Install it with the demo data to try every role on your own server. This product is a web application: there are no mobile apps.

For people who run billing

  • Catalogue: flat, per seat, graduated, volume, package and four metered models (sum, max, last, unique count), in as many currencies as you need, with monthly, yearly or custom intervals and a quote calculator.
  • Subscriptions: trials, coupons (percent or amount; once, repeating or forever), add-ons, billing anchors that clamp to month ends, pause and resume. Quantity and plan changes are prorated to the second, with a preview of every credit and debit line before you apply it.
  • Invoices: gapless numbering per workspace, tax per line (inclusive or exclusive, reverse charge for B2B), PDFs, one-off invoices and credit notes that refund the card or add to the customer balance.
  • Usage billing: send events with idempotency keys; hourly rollups are recomputed from raw events, so retries and late events never double count. An explorer shows raw events and rollups.
  • Dunning: retries on the schedule you set, customer emails, a link to update the card and a final action, with a recovery board of open invoices.
  • Revenue analytics: MRR movements (new, expansion, contraction, churn, reactivation), ARR, churn, ARPA, LTV, failed-payment recovery and a cohort retention grid.

For your customers

  • Hosted checkout and a customer portal with your branding: change plan with a cost preview, change seats, update the card, see invoices and PDFs, answer a 3-D Secure request, cancel with a reason.
  • A JavaScript snippet (cyclestrand.js, under 8 KB gzipped) opens checkout or the portal from your own app after your server mints a session.

For developers

  • A REST API with 48 operations, scoped secret keys, publishable keys for session creation from allowed origins, idempotency keys and an OpenAPI 3.1 document.
  • Signed webhooks for 26 event types, with retries, backoff and automatic disabling of a failing endpoint. Outbound requests are DNS-pinned and refuse private addresses.

Safe by design

  • Workspaces are isolated by a query plugin that fails closed, with a test that scans for violations. Gateway secrets are encrypted at rest (AES-256-GCM); only gateway tokens are stored, never card data.
  • Invoice finalisation, payments, renewals and usage ingestion are conditional updates guarded by unique indexes, and race tests run against a real MongoDB.
  • 426 app tests and 49 core tests pass; the first-load JavaScript on the login page is about 198 KB gzipped.

Good to know

  • Payments are simulated until you connect a gateway. Stripe and Razorpay adapters sit behind a live-call lock: nothing leaves the server until you add keys and explicitly allow live calls.
  • You are responsible for tax registration and filing. Cyclestrand applies the rates you enter; it is not a merchant of record and has no tax-engine API.
  • No revenue recognition schedules, no accounting ledger, no quotes or CPQ.
  • A Node.js process, MongoDB 6+ (a replica set is recommended) and a cron for scheduled jobs. There is no separate worker process. Tested for concurrent writes; the build notes list the measured limits.
  • The demo data is fictional; the demo workspace refuses to mint real API keys.

What you get

The application source with the shared DEV3 core vendored under packages/next-core, a setup wizard, demo data, .env.example, scheduled-job scripts, tests, the buyer documentation, START-HERE.txt and the licence. Setup wizard and demo data included. No mobile apps.

How it's built

Architecture, stack, key decisions and the quality gates DEV3 Cyclestrand passed before release.

The engineering behind Cyclestrand: proration maths that credits only paid time, invoice finalisation as one conditional update, idempotent payments and usage, and a dunning schedule, with the known limits written down.

The problem it solves

Billing code looks simple until two things happen at once. A renewal job and a customer pressing pay hit the same invoice. A usage event is retried by a flaky client. A seat change lands in the middle of a period with a coupon and a tax rate. Each of these must end in one clear state: one invoice number, one charge, one credit, with totals that add up to the cent. MongoDB on a single node gives no multi-document transactions to lean on, so the design has to make every money step safe by itself.

Architecture and approach

Cyclestrand is a Next.js 16 application on MongoDB with a shared DEV3 core for auth, tenancy and operator billing. Workspaces are the merchants: a Mongoose plugin scopes every query by an immutable workspace id and fails closed, and cross-tenant code lives only in the platform folder and scripts.

Finalising an invoice once

An invoice moves from draft to open through a single conditional update that also takes its number from an atomic counter. Eight concurrent finalisers produce one winner and one number, and numbering stays gapless across drafts. A reconcile job repairs a sequence that stopped halfway.

Proration you can explain

Changes are prorated to the second, and credit is given only for time that was actually paid for. A preview returns the same lines the real change will create, so the number a customer sees is the number they are billed. Rounding uses one half-up helper shared by every total, and a suite of vectors guards it.

Payments and usage that survive retries

Every payment attempt carries a unique idempotency key, so a retry job and a pay-now click racing each other produce one charge. Usage events have a unique key per workspace; hourly rollups are recomputed from the raw events, and late events move into the open period instead of reopening a closed one.

Dunning

Failed payments follow a retry schedule you configure, with emails, a portal link to fix the card and a final action. A subscription whose first invoice fails stays incomplete and is not retried; paying the invoice activates it.

Quality gates and results

The app has 426 tests plus 49 for the core, including race groups run against a real MongoDB: finalise, pay, renew, duplicate usage and concurrent seat changes. The seeded demo reconciles to the cent with a built-in check command. Known limits are written down: payments are simulated until you connect a gateway, tax filing is yours, and there is no revenue recognition or ledger.

Tech stack

Area Technologies
Application Next.js 16 App Router, React 19, Tailwind CSS 4, Hosted checkout and portal pages
Billing engine Proration and money maths, Conditional-update invoice finalisation, Idempotent payments and usage, Cron-run scheduled jobs
Data and security MongoDB 6+, Fail-closed tenant plugin, AES-256-GCM vault, DNS-pinned outbound requests, Zod validation
Quality Vitest unit and race tests, Headless smoke tests, Secret scan of the zip

Inside the build

Subscription billing: Plans, proration, usage and dunning on a calm ring diagram with a live proration card. Subscription billing — Plans, proration, usage and dunning on a calm ring diagram with a live proration card.

Proration: Seat changes and upgrades prorated to the second with a preview before you apply them. Proration — Seat changes and upgrades prorated to the second with a preview before you apply them.

Guides & articles

Practical guides and engineering write-ups for DEV3 Cyclestrand.

Subscription billing software: 7 things to check before you build or buy

Last updated
Subscription billing software: 7 things to check before you build or buy: DEV3 Cyclestrand

Billing is easy to demo and hard to get right. The questions that matter come after the first invoice is sent. Here are seven things to check before you build or buy, with DEV3 Cyclestrand as the worked example.

The revenue overview with MRR, ARR and the Strand Rings

1. Does it cover your pricing models?

List how you charge today: flat, per seat, tiers, packages, usage. Cyclestrand supports nine models in as many currencies, with a quote calculator so you can check a price before you publish it.

The catalogue and the price editor

Video: a tour of the Cyclestrand site, dashboard and developer pages

2. How does proration work?

Upgrades and seat changes mid-period are where billing disputes start. Look for second-level proration, credit only for time that was paid for, and a preview of every line before anything is billed.

A plan change with a proration preview

3. Are invoices and tax handled properly?

You want gapless numbers, tax per line, inclusive and exclusive prices, PDFs and credit notes. Check who is responsible for registration: Cyclestrand applies the rates you enter, and filing stays with you.

An invoice with lines, tax and payment attempts

4. Can it bill usage without double counting?

Events need idempotency keys, and late events need a rule. Cyclestrand recomputes hourly rollups from raw events, so a retried request never counts twice.

The usage explorer

5. What happens when a card fails?

Look for a retry schedule, customer emails, a link to fix the card and a final action, plus a board that shows what is at risk.

The dunning board

6. Do your customers get a portal?

A hosted checkout and a portal save you weeks. Customers should change plan with a cost preview, update the card and download invoices.

The customer portal

7. What are the limits?

Ask what is not there. Cyclestrand simulates payments until you connect a gateway, leaves tax filing to you, and has no revenue recognition, ledger or quotes. It runs as one Node process with MongoDB and a cron.

If you want to try these checks yourself, install the demo data and open the workspace as an owner.

Frequently asked questions

The complete source code (version 1.0.0) as a download from your account, with the setup and usage guides shown on this page. You can modify the code to suit your product.

Questions about this product (0)

Answers from the DEV3 team and the community.

Ask a question

No questions yet.

Wondering about setup, licensing or customisation? Ask, and the DEV3 team will help.

More from this author

View all

Related in Enterprise SaaS Starters

View all