Nectar
Available
B2B subscription billing owned by the business: customers, versioned prices and meters, subscriptions with approved contract exceptions, usage with stable ids, deterministic rating, approved and numbered invoices, credit notes, payment evidence, ageing and reminders, agent proposals and a previous-biller move-in kit.
Nectar is available as MIT-licensed source for self-hosting. See its public source and release documents for setup. Business can also install and run projects for invited accounts; the app shows whether it offers Nectar before checkout.
Run Nectar on your own computer with one line:
npx -y @runeditrun/rer dev just-every/run-nectar
It clones the public source, installs it, sets up a local owner and starts the app; nothing is deployed. To set up without starting, run npx -y @runeditrun/rer setup just-every/run-nectar. Without Node 22 or later, run curl -fsSL https://runeditrun.com/install.sh | sh -s -- dev just-every/run-nectar.
Or have your agent set it up for a Business: Start a Business with Nectar ticked
For HappyToHelp: Assisted is in early access; Managed is in early access.
- Category
- billing
- Licence
- MIT
- Version
0.1.2- Requirements
- 16 clauses
- Release signature
- Signed by just-every · key
rer-ed25519-5a42fb9c9c4f8acb2b32386e9e40461c· statement - Target release
- v0.1.2 · published
- Publisher’s stage
- first-release-local
Outside services
The services the project declares it sends data to, each with its reason.
cloudflare- Worker hosting and D1 records
Scope and limits
What it will not do
- Payment collection, card custody or payment retries
- Sending invoices or payment reminders
- Merchant-of-record service
- Tax determination or filing beyond one declared US state policy
- Multiple entities or currencies
- Revenue recognition
- Graduated tiers, commitments and prepaid wallets
- Model-generated output in phase one
Declared limits
- Status
- unmeasured
Requirements
All 16 clauses of Nectar’s CONTRACT.md. They say what the project must do; the handover and verification records say what is built and tested.
NEC 16 clauses
NEC-01Set up the business The owner records the legal name, billing address and email, a billing timezone, an invoice number prefix and payment terms, in US dollars only. The owner declares a tax policy for one US state (no sales tax, or one flat rate on taxable lines) with its basis, and reviews it. Invoices cannot be finalized until a declared policy has been reviewed; any later change needs a new review. The timezone cannot change once an invoice is issued. Acceptance evidence: NEC-01 business, currency, timezone and declared tax; finalizing refused until review inNEC-10.NEC-02Keep customers and billing contacts Operators add customers under the business's own external id (the id a CRM or previous biller uses; usage files refer to customers by it), with a billing email, address and an optional tax exemption backed by a certificate reference, and add billing contacts. External ids and contact emails are unique; edits are guarded against concurrent changes. Acceptance evidence: NEC-02 customers and billing contacts with external ids.NEC-03Version the catalog Operators define products, simple meters and prices: flat monthly, per seat monthly, or per unit of a meter. A price is an immutable version; a new price is the next version and earlier versions keep billing the subscriptions that use them. A retired version is unavailable to new subscriptions. Products grant named features. Acceptance evidence: NEC-03 products, immutable price versions and meters.NEC-04Start subscriptions Operators start a subscription with an explicit billing day (1–28), a start date, an optional trial end and one to twenty plan items with seat quantities. Contract exceptions — a discount on fixed and seat charges, a one-time credit, or a contract price for one plan price, each with dates, a note and the quoted clause — are recorded as proposed and bill only after a person approves them. One customer cannot have two live subscriptions rating the same meter. Acceptance evidence: NEC-04 subscriptions with anchor, trial and approved exceptions and NEC-04 a subscription with an end date still holds its meter until it ends.NEC-05Bring in usage Operators upload a CSV, or an application credential posts events, each with a stable event id, customer id, meter, exact quantity and an ISO 8601 time with an explicit offset. An id already recorded with the same values is a duplicate and changes nothing; reused with different values, or with an unknown customer or meter or an unreadable time, it is rejected and reported by row. Each import is one atomic batch with its own report. Acceptance evidence: NEC-05 usage with stable ids and duplicate rejection; credential submission inNEC-14.NEC-06Inspect before rating For any month, a person sees each metered subscription's exact period totals per meter, the period's boundaries in the billing timezone, days with no usage, events that arrived after the period ended, unbilled events from earlier periods and events no price rates. Acceptance evidence: NEC-06 missing and late usage and exact totals before rating (23:30 on 31 July in Los Angeles belongs to July).NEC-07Rate deterministically Fixed and seat charges bill for the days of the period they are in effect, outside any trial; usage sums exact event quantities per price and multiplies once; late usage bills in the next period at the price in effect when it occurred; contract discounts and credits apply as approved. Preparing again from the same inputs yields the same lines and fingerprint. Acceptance evidence: NEC-07 deterministic rating with explicit rounding (Northwind's July invoice totals $2,081.44 line by line).NEC-08Schedule plan and quantity changes Operators prepare a change to one plan item from a date and see the affected period's charges before and after (with proration) and the next full period. A person approves that exact preview; it is refused if the subscription changed since, or if the date falls in a period already invoiced. The bill run charges exactly what the approved preview showed. Acceptance evidence: NEC-08 scheduled changes bill exactly as previewed.NEC-09Draft a bill run and compare it For a month, Nectar drafts one invoice per subscription period that started in it and has ended, lists periods not yet ended and periods already invoiced, compares each draft with the subscription's previous invoice and the run with the previous run, and lists exceptions (missing usage, large change, unrated usage, missing billing email, undeclared tax, credits beyond charges, disagreement with the previous biller). Preparing again replaces the draft. Acceptance evidence: NEC-09 draft bill run comparison and exceptions.NEC-10Approve and finalize numbered invoices A person approves one draft or every clean draft, acknowledging any listed exceptions; blocking exceptions cannot be approved. Finalizing issues approved invoices whose inputs are unchanged with the next sequential number, an invoice date from the end of the period up to today and a due date from the payment terms, marks the billed usage, and keeps the accepted calculation, its fingerprint and rule version with the invoice. Issued invoices never change. Acceptance evidence: NEC-10 approval, source changes and numbered finalisation.NEC-11Credit and record payments A person issues a numbered credit note against an issued invoice for no more than it still owes, with a reason. Operators record payments received outside Nectar with their method, unique reference and evidence, and allocate them to the customer's invoices, never beyond the payment's unallocated amount or the invoice's balance. For every invoice, total = credited + paid + owed. Acceptance evidence: NEC-11 credit notes, payment evidence and allocations.NEC-12Follow up overdue balances Operators see aging (not yet due, 1–30, 31–60, 61–90, over 90 days) per customer and invoice, draft a reminder stating the overdue invoices, balances and recent payments, and a person approves the exact recipient and wording while those balances still hold. The approved reminder downloads as a message to send from the operator's own mail, and approval opens a dated follow-up task that is closed with its outcome. Sending from Nectar itself isAR-001. Acceptance evidence: NEC-12 ageing, reminder drafts and follow-up tasks.NEC-13Leave with the data and explain entitlements Accountants and operators download issued invoices, usage events and subscriptions as CSV, and any bill run as one JSON document with every invoice's lines, calculation inputs, fingerprint, approval and issue events. The whole installation exports withrer exportand restores withrer importinto a fresh installation with every portable row, including the calculation evidence, unchanged. For any customer, feature and date, Nectar explains whether the feature is granted, subscription by subscription, step by step. Acceptance evidence: NEC-13 exports and entitlement explanations; the restore round trip intests/nectar/journey.mjs.NEC-14Let an agent prepare the work The owner issues scoped credentials. Withprepare, an agent reads records and proposes (a) contract terms from a signed agreement, quoting each clause and flagging ambiguity; (b) a new price version for selected subscriptions from an exact date; (c) bill-run usage corrections with their sources; and (d) a collections reminder. Nectar computes the invoice effect of each proposal itself. A person approves or rejects; a proposal whose records changed since it was prepared is refused. Approving a usage correction re-prepares the draft run and approves no invoice. Withusage, a pipeline submits usage events. Credentials are revocable. Acceptance evidence: NEC-14 agent prepares, a person approves.NEC-15Control access The owner invites finance operators and accountants through Base operator sign-in, ends access (ending every session), and is the only one who changes business settings, the tax policy, access, credentials or a move-in cutover. Every page, form, API call and download enforces the role, signed-out requests get nothing, and cross-site form posts are refused. Acceptance evidence: NEC-15 roles are enforced in every handler (crawls every action and every GET door).NEC-16Move in from the previous biller Operators upload owner-captured source API list responses for customers, products, prices, subscriptions, invoices and billing meters with a manifest of counts. Nectar refuses an incomplete capture, previews every record it would create or reject without writing anything, applies the exact reviewed preview as one journaled batch with its original files retained, adds nothing on a repeated apply, and undoes an untouched batch. Moved-in subscriptions arrive in shadow: they are rated and compared with the previous biller's own invoices price by price but can never be approved or issued, until the owner adopts each one from a period the previous biller has not billed. Once its records have been billed on, a move cannot be undone silently. Acceptance evidence: NEC-16 the previous subscription biller move-in with dry run, journal, undo and shadow cutover.
View as agent
Everything on this page is in these files, copied unmodified from the release. An agent evaluating Nectar can read them instead of the page.
seed.json- The manifest: capabilities, outside services, extension points, limits, operating cost and deployment needs.
CONTRACT.md- The requirements on this page, in source form.
AGENTS.md- Instructions for the coding agent that maintains an installation.
README.md- Source setup, available commands and implementation status.
OPERATIONS.md- How the project is set up, operated and deployed.
ACCEPTANCE.md- What the publisher accepts as a finished release.
Every project, with its availability, is in /agents/catalogue.json; the agents page describes the machine-readable files.