Skip to main content
Sources & SDKs

Server SDK setup

Overview

Server SDKs are ideal for payments, refunds, and CRM changes that should never rely on browser availability. They sign requests with API keys, attach richer payloads, and support idempotent retries at the edge.

Steps

  1. Create a server-scoped key with rotation reminders enabled.
  2. Install the Node, Go, or Python package from the developer docs mirror.
  3. Instantiate a client pointed at the correct regional base URL.
import { TrackLayer } from "@tracklayer/node";
 
const client = new TrackLayer({ apiKey: process.env.TRACKLAYER_SERVER_KEY!, region: "eu" });
 
await client.track({
  event: "SubscriptionRenewed",
  userId: "usr_991",
  properties: { mrr: 120, plan: "pro" },
  idempotencyKey: "sub_renew_20260505_991",
});
  1. Log request_id from responses for support correlation.

Troubleshooting

  • Region mismatch (401/403): regenerate the key in the same region you target.
  • Clock skew beyond five minutes breaks signature helpers—sync NTP on workers.
  • If batches fail halfway, split by logical partition; the API returns per-item errors inside the batch envelope.

Still need help?

Reach the team for onboarding, technical escalation, and privacy workflows.

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.