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-sdkTrack 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?
| SDK | Requirements | Notes |
|---|---|---|
| Node.js | Node 20+ | Uses the built-in fetch, no dependencies. |
| PHP | PHP 8.1+, ext-curl | No dependencies beyond curl. |
| Go | Go 1.21+ | Standard library only. |
| Python | Python 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.