Getting Started
Installation
Install the Owostack SDK
Installation
Install the Owostack SDK in your Node.js project. This guide covers SDK setup; provider configuration happens in the dashboard.
Package Manager
npm i @owostack/coreConfiguration
Initialize the SDK with your API key:
import { Owostack } from "@owostack/core";
const owo = new Owostack({
secretKey: process.env.OWOSTACK_SECRET_KEY,
// Optional: override the API URL (for self-hosted)
// apiUrl: "https://api.owostack.com"
});in .env
OWOSTACK_SECRET_KEY=owo_sk_your_api_key_hereTypeScript
The SDK is written in TypeScript and includes full type definitions. No additional @types/* packages are needed.
import {
Owostack,
AttachResult,
CheckResult,
TrackResult,
} from "@owostack/core";
const owo = new Owostack({ secretKey: "..." });
// All methods are fully typed
const result: AttachResult = await owo.attach({
customer: "user_123",
product: "pro",
});