Skip to content
PreviewFix

Account · Licence credits & top-ups

Prepaid credits for metered runs.

Plugins and API clients open this route (topUpUrl) when checking or replenishing engine credits on PreviewFix. Local plugin features and validation endpoints always use 0 credits; server-side builds and AI operations deduct fixed unit counts from an append-only ledger with zero surprise overages.

Metering safeguardsNo surprise bills
  • 0 credits for validation & local tools: Schema checks, QR generation and 10-row PDF previews never deduct units.
  • Hard stop at zero balance: Calls exceeding available credits return HTTP 402 (insufficient_credits) before any work runs.
  • BYOK charges 1 base unit: Supplying your own Anthropic, OpenAI or Gemini key runs AI models on your account.
  • Portal-managed licences: No payment form is hosted on this reference page; inspect active keys in /portal/licences.

1 · Credit mechanics

Metered cleanly before work runs.

Every marketplace plugin and bearer API key shares the same ledger rules, idempotency guarantees and Bring Your Own Key (BYOK) tariff.

0 units

On-device & validation calls cost zero

Editor-only plugin tools run locally inside your host platform without touching the credit ledger. On the server, every validation and preview operation — pdf.preview, einvoice.validate, dpp.qr, dpp.validate, vat.validate, omnibus.lowest-price and llms.validate — is permanently rated at 0 units so malformed data is caught before a paid build executes.

7 micro-API endpoints rated at 0 units

Row-locked ledger

Atomic pre-check & idempotency

Metered deterministic and AI endpoints lock the licence row inside a database transaction and check Idempotency-Key before running. Retrying the same key within 24 hours replays the stored response at zero extra charge. If a request exceeds your remaining balance, the server returns HTTP 402 (insufficient_credits) immediately — never invoking an engine or generating an unexpected overage invoice.

Unique per (licence_id, idempotency_key)

BYOK = 1 unit

Bring Your Own Key (BYOK) on AI calls

AI-assisted operations (tenders.readiness, alt-text.generate, translate.batch, plus plugin actions prefixed llm. or ai.) accept your own anthropic, openai or gemini API key in the byok field. Model tokens are billed directly by your provider while PreviewFix deducts only 1 base unit (BYOK_BASE_UNITS = 1) for sanitised prompt framing and schema validation.

Keys execute single-call & are never logged

2 · Unit tariffs & reference packs

Fixed unit costs and pack tiers.

Unit prices are defined in the engine micro-API contract so plugins, workflow nodes and custom scripts spend from the same predictable tariff.

Representative engine operation unit costs

All endpoints respond at POST /api/v1/engines/<path>; live catalogue available via GET /api/v1/engines.

docs/MICRO_API.md §3
Representative micro-API operation credit unit tariffs and BYOK base unit rates
OperationsExecution modeStandard rateWith BYOKWhat is metered

Stateless checks & local previews

pdf.previeweinvoice.validatedpp.qrdpp.validatevat.validateomnibus.lowest-pricellms.validate
Validation & preview0 unitsNot applicableFirst-10-row PDF previews, EN 16931 XML rule checks, GS1 Digital Link QR rendering, VIES syntax/registry lookups and llms.txt linting.

Single-pass deterministic builds & checks

einvoice.builddpp.builddmarc.analyseemail.verifywcag.statementtenders.searchstack.fingerprint
Deterministic1 unitNot applicablePeppol BIS 3.0 / XRechnung / ZUGFeRD / VeriFactu / KSeF XML generation, Digital Product Passport JSON-LD builds, DNS SPF/DKIM/DMARC inspection and MX verification.

Browser inspection & snapshot diffing

wcag.scanjsonld.buildpricing.diffplanning.searchtrademark.watch
Deterministic2 unitsNot applicableHeadless WCAG 2.2 Level AA audits across mobile or desktop viewports, structured Schema.org JSON-LD graph generation and pricing snapshot comparison.

Accessible media description

alt-text.generate
AI2 units1 unitContext-aware image alt-text generation in the requested language; drops to the single orchestration unit when called with your own model key.

Platform patch diffs & site compilation

wcag.patchllms.compile
Deterministic3 unitsNot applicablePlatform-targeted accessibility patch diffs (Shopify, WordPress, Wix, Webflow, Shopware or raw HTML) and multi-page llms.txt + llms-full.txt compilation.

Procurement gate & rubric review

tenders.readiness
AI4 units1 unitExtracts mandatory pass/fail gates, scoring rubrics and an editable response outline from public tender notices for human bid review.

Structured string & HTML localisation

translate.batch
AI1 unit / 1,000 chars1 unitBatch translation preserving HTML tags and placeholders across target locales; capped at the single base unit per call when BYOK is supplied.

Multi-target document extraction

pdf.convert
Deterministic5 unitsNot applicableFull supplier invoice or price-list PDF extraction into validated Shopify, WooCommerce, Xero, NetSuite, XLSX or JSON files delivered via signed URLs.

Reference prepaid credit pack tiers

VAT-inclusive display prices with no card or PayPal surcharges. Tied to an active plugin licence once store listings go live.

Reference only · No checkout on this page
Reference prepaid credit pack tiers and VAT-inclusive display prices across marketplace plugin suites
Pack tierPrepaid creditsList price (VAT-inc.)Applicable plugin suitesRepresentative run capacity
credits-100100 credits$9.00Framer & Webflow AEO suitesUp to 33 llms.compile runs, 50 jsonld.build runs, or 100 BYOK AI calls.
credits-500500 credits$19.00 – $39.00$19.00 on Stripe & Chrome suites · $39.00 on Framer & Webflow AEO500 Peppol/VeriFactu e-invoice builds, 166 wcag.patch diffs, or 100 full pdf.convert runs.
credits-20002,000 credits$59.00Stripe e-invoicing & Chrome extension suites2,000 e-invoice builds, 1,000 WCAG 2.2 scans, or 400 multi-target PDF conversions.

Marketplace plugin suites are currently marked Coming soon while store listings are prepared; self-serve pack top-ups attach to an active licence in /portal/licences at launch. Need a one-off audit or file conversion right now? Every standalone service has a free browser preview on /tools.

Email support@previewfix.com

3 · Deterministic ledger specimen

Append-only accounting with automatic refunds.

Every credit grant, consumption and compensating refund is an immutable row in usage_credits, serialised per licence under a PostgreSQL row lock.

Illustrative specimen · usage_credits ledger & wire payloads

Balance check, idempotent debit & compensating failure refund

Illustration · sample keyNet balance: 199 units
1 · Check balance · POST /api/v1/licenses/balanceHTTP 200
// Request
{
  "key": "AG-DEMO-7K4P-9M2X-Q8WN",
  "sku": "stripe-einvoice"
}

// Response
{
  "ok": true,
  "balance": 200,
  "byok": false,
  "topUpUrl": "https://previewfix.com/account/licenses/credits"
}
2 · Idempotent consume · POST /api/v1/licenses/consumeIdempotency-Key
// Request (row-locked on plugin_licenses)
{
  "key": "AG-DEMO-7K4P-9M2X-Q8WN",
  "sku": "stripe-einvoice",
  "fingerprint": "acct_1SampleWorkspace",
  "operation": "einvoice.build",
  "units": 1,
  "idempotencyKey": "inv-2026-0042-peppol"
}

// First call → charged: 1, replayed: false
// Retry with same idempotencyKey → charged: 1, balance: 199, replayed: true

Append-only ledger trace · SELECT SUM(delta) FROM usage_credits

Compensating refund verified

Illustrative append-only usage_credits ledger rows showing a grant, consumption and compensating refund
RowReasonOperationIdempotency keyDeltaBalanceLedger event
L-1041grantplan.monthlysub_period_2026_11+200200Monthly allowance credited on active stripe-einvoice subscription.
L-1042consumeeinvoice.buildeng:9f3a8c12…#0-1199Row-locked pre-flight debit before Peppol BIS 3.0 XML generation.
L-1043consumepdf.converteng:4d71b0e8…#0-5194Reserved 5 units prior to supplier PDF conversion attempt.
L-1044refundpdf.converteng:4d71b0e8…#0:refund+5199Automatic compensating credit appended after upstream timeout.

5 · Frequently asked questions

Common questions on engine credits.

Straight answers on plan allowances, failure refunds, CLI balance checks and how licence billing is structured.

How do monthly plan allowances differ from prepaid top-up credits?
Every credit movement is recorded in an append-only ledger (usage_credits) where your live balance equals SUM(delta) across plan grants, top-up purchases, consumptions, refunds and expiries. Subscription SKUs that include a monthly or annual allowance grant those baseline units for the billing cycle, whereas prepaid top-up packs append purchase credits tied to your licence so metered runs can continue beyond the plan allowance without changing subscription tiers.
What happens if an engine run fails mid-flight or returns demonstration data?
You are not charged for failed runs. Although the runner reserves units under a row lock before invoking an engine, any unhandled upstream exception, crashed attempt exceeding the 15-minute stale-run threshold without a stored result, or sandbox fixture response automatically writes an idempotent +units compensating row (reason: "refund", keyed to <chargeKey>:refund) to restore your balance.
How do I check my remaining credit balance from a plugin, script or CLI?
Sign in to /portal/licences to view your balance in the browser, or send POST /api/v1/licenses/balance with { "key", "sku" } to receive { "ok": true, "balance", "byok", "topUpUrl" }. Every metered call to POST /api/v1/engines/<path> also returns a usage block containing the units charged and your updated balance.
Why is there no payment or card checkout form on this page?
Prepaid credit packs can only be credited to an active plugin licence ledger, and our 20 marketplace plugin suites are currently in pre-release (Coming soon on /plugins). Rather than showing an unattached checkout form, this utility route documents exact operation tariffs and pack prices for plugins linking to topUpUrl. Existing licence holders can inspect balances in /portal/licences or email support@previewfix.com for manual credit allocation or invoice enquiries.

Already have an issued licence key (AG-…)?

Sign in to the customer portal to check your current credit balance, trial window and active site fingerprints, or email support@previewfix.com for billing support.