AACsearch
Billing

Billing Overview

How AACsearch bills you — plans, usage units, quotas, AI credits, invoices, and the upgrade/downgrade flow.

AACsearch bills two things, in two different ways:

  • Plan subscription — a flat monthly or annual fee that unlocks a tier of capacity (indexed documents, search requests, seats, analytics retention, connector syncs).
  • AI usage — a pre-paid wallet of credits consumed pay-as-you-go for AI features (Knowledge / RAG, embeddings, summarization, AI rerank).

Plan subscriptions are billed through Stripe (default), Lemon Squeezy, Polar, Creem, DodoPayments, or — for Russia-based customers — Tochka. AI usage runs on a separate wallet ledger billed in micro-USD (or kopecks for RUB), drawn down by usage events.

This section explains every piece of that picture. Start with the pages that match what you're trying to do:

  • Buying or upgrading? Read Plans for the plan matrix, then Upgrade & downgrade for the timing rules.
  • Estimating cost before signing up? Read Usage units and Quotas — they explain what counts and how soft/hard limits behave.
  • Setting up AI features? Read Wallet & AI credits — the wallet is independent of your plan and needs at least one top-up before AI calls succeed.
  • Working with finance? Read Invoices for tax IDs, billing contacts, receipts, and audit retention.

Two ledgers, one workspace

LedgerCurrencyBilling modeDrives
Plan subscriptionUSD or RUBRecurring (monthly/annual)Search capacity, seats, connectors, analytics retention
Wallet (AI credits)micro-USD/kopecks (BigInt minor units)Pre-paid pay-as-you-goKnowledge module, embeddings, AI rerank, summarization

Both ledgers are scoped to the organization, not the user. A user in two organizations sees two wallets and two plan summaries.

Why two ledgers? Plan revenue is predictable and prepaid. AI cost varies wildly per query (a 4k-token prompt costs ~50× more than a 100-token prompt) and is metered post-hoc. Mixing them in one bill makes both worse — so they run side by side, and your finance team gets one invoice per cycle (plan) plus one receipt per top-up (wallet).

Where to find what

Inside the dashboard:

SurfaceShows
/[orgSlug]/settings/billingActive plan, usage against limits, monthly invoice history, payment method, overage status
/[orgSlug]/overviewQuota tile (search units used vs. cap, percent used)
/settings/billingPersonal billing (not yet enabled for most customers — org billing covers everything by default)
/settings/billing/ai-creditsAI wallet balance, top-up controls, auto-recharge, spending limits
/settings/billing/invoicesPersonal invoice history
/admin/walletPlatform-admin wallet ledger across orgs (admins only)
/admin/billing-analyticsCross-tenant billing metrics (admins only)

Plan resolution

The plan that applies right now is resolved by resolveOrgPlan(orgId) in @repo/payments:

  1. Look up the latest active Purchase (subscription) for the org.
  2. Map the payment provider's priceIdplanId using the matrix in packages/payments/config.ts.
  3. Cache for 60 seconds (invalidatePlanCache(orgId) is called on webhooks so changes are picked up promptly).
  4. Fail open — if the payment provider is unreachable, fall back to Free plan limits rather than blocking traffic.

Plan changes apply on the next request after the provider webhook lands. There is no nightly batch — entitlements are live.

Money representation

A note for engineers integrating with the API: every monetary value is a BigInt in minor units (kopecks for RUB, cents for USD, or micro-USD for high-precision wallet drawdowns). Over oRPC these are transformed to strings (.transform(v => v.toString())) so JSON serialization never loses precision.

Display conversion happens at the UI and email surface only. You will never see a decimal 19.99 in the database — it lives as BigInt("1999") for USD cents or BigInt("1999000000") for micro-USD.

Tax, VAT, and receipts

VAT and sales-tax handling is provider-dependent. Stripe Tax is enabled for EU/UK/US customers; Lemon Squeezy is a merchant of record (it remits tax for you); Tochka is the path for RUB-denominated customers and follows Russian tax rules.

See Invoices for the full matrix of which provider handles tax automatically and where you supply a VAT ID manually.

Refunds and disputes

Refunds are processed through the payment provider (Stripe dashboard, Lemon Squeezy console, etc.). AACsearch does not adjust subscriptions independently of the provider. For wallet top-ups, refunds reverse both the payment and the ledger entry atomically.

Open a support ticket from /settings/billing for refund or dispute help.

On this page