Skip to content
main-compute

Account

Billing

Enterprise contract gates, EUR wallet, DKK reference and VAT.

Updated 2026-10-27 · MainAI Compute docs

Billing exists only inside the Enterprise plan. KYC and a contract precede wallet access. All money moves through an append-only ledger in EUR cents; DKK is shown as a fixed display reference and is never ledgered.

PacksLink to this section

starter

Price
€25
Best for
First call and small tests

builder

Price
€100
Best for
Small production integration

scale

Price
€500
Best for
Ongoing team usage

enterprise

Price
€2,500
Best for
Invoice or fixed monthly commitment
EUR, excluding VAT. DKK reference at 7.46: €25 = DKK 186.50. No expiry while active.

Checkout is a hosted Stripe session. MainAI creates the ledger top-up only when the signed webhook arrives, so a browser redirect alone does not fund the wallet.

Prepaid versus invoiceLink to this section

Spend limit

Prepaid
Wallet balance
Invoice
Approved creditLimitCents

At the limit

Prepaid
Traffic stops
Invoice
Traffic stops at the credit limit

Payment

Prepaid
Card at checkout
Invoice
Invoice after the period

Identity check

Prepaid
Approved KYC + contract
Invoice
Approved KYC + contract

Invoice mode is available only under an active contract. Setting an invoice commitment opens one fixed monthly Stripe subscription; later saves update that subscription instead of adding another. Usage invoices remain staff-issued. POST /api/portal/billing/credit-limit changes the allowance for an invoice organization, up to €1,000,000. Subscription updates never change the Enterprise access plan or the contract gate.

Usage is priced from reported token counts and settled in whole euro cents. Each billed request has a €0.01 minimum; failed requests are not billed but remain in request counts for observability. A very small request therefore costs €0.01 even when its token arithmetic is below one cent.

Wallet and ledgerLink to this section

GET /api/portal/wallet returns the current balance, currency and pending amount. GET /api/portal/wallet/ledger?cursor=… returns entries newest first. Balance is always derived from the ledger in a locked transaction during a debit.

  • Ledger entries never change after insert.
  • A correction is a new adjustment entry, not an edit.
  • Usage debits come from server-side usage events, never from a client-submitted token count.
  • Zero balance stops prepaid inference even if a key still has budget.

Buy creditsLink to this section

POST /api/portal/billing/checkout
curl -s https://cloud.mainai.dk/api/portal/billing/checkout \
  -H "Content-Type: application/json" \
  -H "Origin: https://cloud.mainai.dk" \
  -H "Cookie: $PORTAL_COOKIE" \
  -d '{ "packId": "starter" }'

The response is { "url": "https://checkout.stripe.com/…" }. Redirect the current tab. On return, wait for the webhook before showing a funded balance; poll the wallet briefly if the UI has not updated.

Plan and contractLink to this section

There is exactly one commercial plan: enterprise. New organizations begin on the internal free pre-contract state. KYC approval does not change the plan; staff switch it only when they record a signed contract reference. Nothing is bought self-serve.

enterprise plan + contract reference

Recorded by
MainAI staff after KYC
Effect
Portal, keys, wallet and inference unlock

Billing mode

Recorded by
Owner, admin or billing role under the contract
Effect
prepaid wallet or invoice terms; staff can override

The invoice credit limit is a negative-balance allowance, not a second plan. A billing user can set it up to €1,000,000; staff can override it in the console. Either mode permits prepaid top-ups once the gates pass.

Invoices and VATLink to this section

  • Prices are shown excluding VAT.
  • Stripe Tax determines VAT at card checkout from the billing address and any validated VAT ID. The account must have Stripe Tax enabled for Denmark. Danish VAT is 25%; a valid EU business VAT ID can reverse-charge.
  • Invoice organizations receive staff-issued invoices in Billing and at the billing email.
  • Stripe hosts card data; MainAI stores customer, subscription, invoice and event mirrors.
  • The stripe webhook is signature-checked against the raw body and deduplicated by event ID.

Failed paymentsLink to this section

A failed card charge leaves the wallet unchanged. The checkout URL can be retried. For invoice organizations, a failed invoice does not immediately revoke keys; the organization can be suspended on policy grounds, which does block inference.

RolesLink to this section

Only owner, admin and billing can buy credits or open the payment portal. Developers can create keys but cannot move money. See Team.

Payment portalLink to this section

POST /api/portal/billing/portal returns a Stripe-hosted customer portal URL for payment methods and invoices. The URL is short-lived; generate it on demand rather than storing it.