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
| Ledger | Currency | Billing mode | Drives |
|---|---|---|---|
| Plan subscription | USD or RUB | Recurring (monthly/annual) | Search capacity, seats, connectors, analytics retention |
| Wallet (AI credits) | micro-USD/kopecks (BigInt minor units) | Pre-paid pay-as-you-go | Knowledge 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:
| Surface | Shows |
|---|---|
/[orgSlug]/settings/billing | Active plan, usage against limits, monthly invoice history, payment method, overage status |
/[orgSlug]/overview | Quota tile (search units used vs. cap, percent used) |
/settings/billing | Personal billing (not yet enabled for most customers — org billing covers everything by default) |
/settings/billing/ai-credits | AI wallet balance, top-up controls, auto-recharge, spending limits |
/settings/billing/invoices | Personal invoice history |
/admin/wallet | Platform-admin wallet ledger across orgs (admins only) |
/admin/billing-analytics | Cross-tenant billing metrics (admins only) |
Plan resolution
The plan that applies right now is resolved by resolveOrgPlan(orgId) in @repo/payments:
- Look up the latest active
Purchase(subscription) for the org. - Map the payment provider's
priceId→planIdusing the matrix inpackages/payments/config.ts. - Cache for 60 seconds (
invalidatePlanCache(orgId)is called on webhooks so changes are picked up promptly). - 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.
Related
- Plans — plan matrix with limits and feature gates.
- Usage units — what counts and how units are emitted.
- Quotas — soft/hard cap behavior and reset schedule.
- Wallet & AI credits — pre-paid wallet, top-ups, auto-recharge, spending limits.
- Invoices — invoice formats, tax IDs, retention.
- Upgrade & downgrade — plan-change timing, proration, data retention.
- Plans & Limits (architecture) — entitlements code paths and the quota enforcement flow.