Skip to content
Payments docs are in beta — the OpenAPI contract is the source of truth.API reference
VortexPayments
Esc
↑↓navigate↵open⌘Jpreview
On this page

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-After honored. Disable with retry: { 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: readVortexError narrows the { error } result into a VortexApiError carrying status, code, requestId, and docsUrl — 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-ts plus the Vortex transport layer

Regenerate with pnpm run sdk:generate.

Last updated on September 24, 2026

Was this page helpful?