Installation
Four SDKs, one design — pick the one for your stack. None are on a public package registry yet; each installs from a local checkout or a Git URL until they’re published.
TypeScript
npm install @vectapay/sdk
# or: pnpm add @vectapay/sdk / yarn add @vectapay/sdkRequires Node.js 18+ (for global fetch, FormData, and Web Crypto) or any modern browser
environment — though see Server-side only before using it client-side.
Zero runtime dependencies beyond @vectapay/contracts, bundled into the published package.
Configuring the client
Every option except the API key has a sensible default — most integrations only ever pass that one.
TypeScript
import { VectaPayClient } from "@vectapay/sdk";
const vectapay = new VectaPayClient({
apiKey: process.env.VECTAPAY_API_KEY!,
timeout: 30_000, // default, ms
debug: false, // logs every request/response when true
retryConfig: {
maxRetries: 3, // default — network errors, 429s, and 5xx are retried automatically
initialDelay: 1000,
backoffMultiplier: 2,
maxDelay: 10_000,
},
});Server-side only
Your API key authenticates as your business and can move money — never ship it to a browser or a distributed mobile app. Every example in this site assumes a server environment: a Next.js Route Handler, a Flask/Django view, a Spring/plain-JDK service, an ASP.NET Core endpoint, a queue worker.
This is also why there’s no Flutter/Dart SDK — a mobile app is distributed to end users’ devices and can be decompiled, so an API key embedded in one isn’t actually secret. If you need a payment flow inside a mobile app, drive it from your own backend using one of these four SDKs and expose only the specific actions your app needs through your own API.