@vortex-api/vortex
v0.3.1
Published
Generated TypeScript SDK for the Vortex Payments public API.
Downloads
417
Readme
@vortex-api/vortex
Generated TypeScript SDK for the Vortex Payments public API.
This package is generated from docs/openapi/vortex-public.openapi.json by pnpm run sdk:generate.
It is MIT-licensed and published to the public npm registry.
pnpm add @vortex-api/vorteximport { createVortex } from "@vortex-api/vortex/2026-08";
// The key IS the environment: vp_test_ keys hit sandbox (https://api.sandbox.vortex.nyc),
// vp_live_ keys hit production (https://api.vortex.nyc). Nothing else to configure.
const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY! });The version in the import path is the API version. @vortex-api/vortex
(no version) always aliases the newest surface; pinning the dated path keeps
your serialized shapes stable across SDK upgrades.
Webhooks
Verify deliveries with the raw body before parsing — never re-serialize:
import { handleVortexWebhookRequest } from "@vortex-api/vortex";
const response = await handleVortexWebhookRequest({
request, // the incoming Request (raw body is read internally)
secret: process.env.VORTEX_WEBHOOK_SECRET!, // the whsec_ shown at endpoint creation
onEvent: async (event) => {
// event.type is narrowed against the generated VORTEX_EVENT_TYPES catalog
},
});verifyVortexWebhook is the lower-level verify-only helper.
generateVortexWebhookTestHeader signs deliveries for testing your own
receiver, and VORTEX_WEBHOOK_VECTORS ships the canonical cross-language
fixtures — assert your port accepts every positive vector and rejects
every negative one.
