Skip to main content

Installation

Quick Start

Configuration

Client Options

Runtime Configuration

Services

Every service is accessed as a property on SmartbillsClient. All methods accept an optional RequestOptions parameter to override businessId, locale, or pass an AbortSignal.

Expenses

Upload Expenses

Presigned Upload (S3)

Bulk Operations

Export & Download

Split

Expense Reports

Lifecycle

Timeline & Audit

Accounting

Bills

Bill Status Workflow

Bulk Bill Operations

Vendors

Vendor Business Operations

Batch & Import

Businesses

All Available Services

Error Handling

Error Types

Type Guards

Pagination

All list endpoints return a standard paginated response:

Sorting

Common Types

File Uploads

Direct FormData Upload

TypeScript Support

The SDK is written in TypeScript and ships with full type definitions. All entity types, request types, and response types are exported:

Examples

Express.js Integration

Next.js Server Action

Use environment variables — Never hardcode access tokens in your source code.
Handle errors gracefully — Always wrap API calls in try-catch blocks and use the type guards to handle specific error types.
Use TypeScript — Take advantage of full type safety for better developer experience and catch issues at compile time.