Server SDKs

Server SDKs

Lightweight clients for tracking events from your own backend, one per language, all built around the same trackEvent call and the same retry behavior on 429 and 5xx responses.

Install

npm i @solary/node-sdk

Track an event

Every SDK wraps the same call: pass an eventType, the shopper's email (or an internal userId if you already know it), and how many pointsEarned to award. See the Events API reference for the full field list.

import { EventsClient } from '@solary/node-sdk';

const client = new EventsClient({ apiKey: process.env.API_KEY! });

const res = await client.trackEvent({
  eventType: 'purchase_completed',
  email: 'shopper@example.com',
  pointsEarned: 2000,
});

Which language should I use?

SDKRequirementsNotes
Node.jsNode 20+Uses the built-in fetch, no dependencies.
PHPPHP 8.1+, ext-curlNo dependencies beyond curl.
GoGo 1.21+Standard library only.
PythonPython 3.9+Uses urllib, no third-party dependencies.

Server-side only

These SDKs send your API key on every request, so they're meant to run on your backend, not in a browser or mobile app bundle where the key could be extracted. If you need to track events from a storefront directly, proxy the call through your own server first.