TypeScript SDK
The generated TypeScript SDK — dated imports, auto-retry, client idempotency, typed errors.
TypeScript SDK
Current API surface: 2026-08 — the version in the reference header, in your import path, and in the SDK’s dated entry are the same greppable string. New surfaces ship as new dated entries; existing ones never change under you.
pnpm add @vortex-api/vortex
import {
createVortex,
getMerchantAccountSettlements,
} from "@vortex-api/vortex/2026-08";
const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY });
const { data, error } = await getMerchantAccountSettlements({
client: vortex,
path: { merchantAccountId: "ma_..." },
query: { environment: "sandbox" },
});
The key IS the environment (vp_test_ = sandbox, vp_live_ = production) —
there is no environment option to misconfigure.
Built into the transport
- Auto-retry on 408/429/5xx and network failures — bounded attempts,
exponential backoff,
Retry-Afterhonored. Disable withretry: { maxAttempts: 1 }. - Client idempotency: mutating calls carry a generated
Idempotency-Key, constant across retries, unless you set your own — retries are safe by construction. - Errors that identify themselves:
readVortexErrornarrows the{ error }result into aVortexApiErrorcarryingstatus,code,requestId, anddocsUrl— a pasted message alone is enough to debug. - Pagination:
for await (const s of paginate((o) => getMerchantAccountSettlements({ client: vortex, ...o }), params))walks cursor pages until the server reports the end.
Local source
- Generated package:
sdks/typescript— name@vortex-api/vortex - Generator:
@hey-api/openapi-tsplus the Vortex transport layer
Regenerate with pnpm run sdk:generate.