Skip to main content
The C API is the native foundation that every other SDK is built on. It’s a shared library (libste.so / libste.dylib / ste.dll) with a header, ste/src/ste.h, that is the authoritative source for signatures. This quickstart runs a federal + California state calculation for one employee using the modern STE2-style configuration.
STE2-style configures every tax through ste_set_jurisdiction_data(...) + ste_set_jurisdiction_misc_parms(...) using a uniqueTaxID. Prefer it over the legacy per-tax setters (ste_set_federal, ste_set_state, …).

Prerequisites

1

Get the library, header, and tax database

You need ste.h, the native library for your platform, and an STE home directory containing the tax database. These come with your STE license.
2

Link against the library

Linking differs per platform (rpath on macOS, ldconfig/LD_LIBRARY_PATH on Linux, import lib on Windows). See Linking the native library.

Calculate

ste.h is the authoritative signature reference. The exact out-parameter list of retrieval functions can vary by version — check your header. Functions that return heap-allocated strings (ste_json, ste_xml, ste_get_schema) must be freed with ste_free_ptr().

What each step does

Most functions return uint16_t where 0 means success. On a non-zero return, read the code with ste_get_errno_ext(ste) and the message with ste_get_strerror(code).

Handles, threads, and pooling

ste_handle* is opaque and not thread-safe — one handle per thread. For high volume, use the pool API (ste_pool_init / ste_pool_checkout / ste_pool_checkin / ste_pool_quit) to pay initialization cost once. See Handles & pooling.

Prefer JSON on-premise?

You don’t have to use the C setters directly. The same native library exposes ste_json(), which accepts the exact PayCalcRequest payload from the Hosted API quickstart — letting you keep one payload format across hosted and on-premise deployments.

Next steps

Full calculation walkthrough

Install the interface and run a complete, realistic pay calc end to end.

Configuring a calculation

Wages, jurisdictions, benefits, and engine options in depth.

Linking the native library

Per-platform linking and runtime load paths.