Skip to main content
The TaxMaxi JavaScript SDK wraps the TaxMaxi REST API in a fully-typed TypeScript client. It ships two interfaces side by side: a standard Promise-based API that works in any JavaScript environment, and an advanced Effect-based API for teams already using the Effect ecosystem. You pick the one that fits your stack — both surfaces are exposed on every TaxMaxi instance.

Authentication modes

The SDK supports three ways to authenticate, each suited to a different runtime:

Quick example

The following example installs the package, creates an API-key client, lists your sources, and computes a German tax summary for 2024.
1

Install the package

2

Create a client

3

List sources and calculate tax

Two API surfaces

Every TaxMaxi instance exposes the same operations through two namespaces:
  • Promise-based (client.sources, client.auth) — the default interface. Methods return standard Promise values. Use this for most applications.
  • Effect-based (client.effect.sources, client.effect.auth) — an advanced interface that returns Effect values instead of Promises. Use this if you are already composing Effect pipelines.
The Effect interface is intended for advanced use cases. If you are new to TaxMaxi or to Effect, start with the Promise-based interface.

Next steps

Installation

Install the package and configure your client for API key, browser session, or SSR usage.

Sources

List sources, run sync jobs, and compute tax summaries using the SDK.

Error handling

Catch and inspect TaxMaxiError values with typed status codes and field errors.

API reference

Browse the full REST API that the SDK wraps.