AbsoluteJS

QuickBooks

@absolutejs/quickbooksv0.2.0betaCommerce & Growth

Typed QuickBooks Online accounting adapter with bounded transport and explicit uncertain-write outcomes.

#Installation

BASH
bun add @absolutejs/quickbooks

#Capabilities

Overview

A typed QuickBooks Online adapter for company information, paginated vendors/accounts/customers, and USD account-based vendor bills. MIT licensed; no application-specific approval or construction workflow.

company(), catalog(entity, start?), reference(entity, id), createBill(input, requestId) and getBill(id) accept an optional final AbortSignal. Catalog pages contain at most 100 records and an explicit next offset. Tokens are supplied by the caller, allowing Citra and AbsoluteJS linked-provider grants to manage OAuth independently.

Transport uses fixed Intuit origins, refuses redirects, limits responses to 2 MB, and applies a 20-second request timeout. Errors contain bounded codes, never provider response bodies. No automatic retries occur. A QuickBooksError with outcome: 'unknown' means a write may have succeeded: persist that state and reconcile against the provider before any new write. Request IDs alone are not a replacement for a durable execution record. Read failures cannot create bills; invalid bill receipts are conservatively classified as unknown.

Show 4 more

This initial version supports positive decimal USD expense lines (up to 100), an optional customer reference, and no tax mapping. It does not create payments, authorize users, store credentials, approve invoices, or schedule work. Those policies belong to the host application. Explicitly select sandbox or production; the adapter never infers this from NODE_ENV.

Run bun install, bun run typecheck, bun test, and bun run build. Tests use synthetic responses and require no provider credentials.

API reference: https://developer.intuit.com/app/developer/qbo/docs/develop/basic-implementations/basic-billing-implementation

getBillState(id, signal?) reads the current balance as a decimal string, bill date, expense lines and linked transaction IDs/types. A zero balance means the bill is settled; it is not proof of a cash payment (credits and adjustments can also settle it). The host application must compare the returned bill with its frozen export, authorize access, and retain observation history. No payment creation API is exposed.

Outcomes

What you can build

Overview

A typed QuickBooks Online adapter for company information, paginated vendors/accounts/customers, and USD account-based vendor bills. MIT licensed; no application-specific approval or construction workflow.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/quickbooks version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical @absolutejs/quickbooks example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#@absolutejs/quickbooks quick start

Partial snippet

# @absolutejs/quickbooks

TS
import { createQuickBooksClient } from '@absolutejs/quickbooks';

const quickbooks = createQuickBooksClient({
  environment: 'sandbox',
  realmId: 'YOUR_NUMERIC_COMPANY_ID',
  accessToken: async () => obtainAccessToken(),
});
const vendors = await quickbooks.catalog('Vendor');
// Persist a stable operation ID and the intended payload before this call.
const receipt = await quickbooks.createBill({
  vendorId: '56', documentNumber: 'INV-001', date: '2026-10-07',
  currency: 'USD', note: 'Your stable export reference',
  lines: [{ amount: '26.23', description: 'Materials', accountId: '7' }],
}, 'your-stable-operation-id');

#Public entry points

Supported entry points declared by this project’s package manifest. Internal dist paths are not part of the package contract.

@absolutejs/quickbooksPublic package entry point declared in package.json.

#Package commands

Scripts declared by this project’s package manifest.

bun run buildbun build src/index.ts --outdir dist --target=bun && tsc -p tsconfig.build.json
bun run testbun test
bun run typechecktsc --noEmit

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

9 symbols
QuickBooksEnvironmenttypePermalink
TS
type QuickBooksEnvironment = "sandbox" | "production";
Exported from @absolutejs/quickbooks