Product
One SDK. One API key. Auth, events, analytics, error tracking, and payments — all in one place.
Full user auth with JWT tokens. Register, login, verify tokens, manage users and metadata. Bcrypt password hashing included.
const { user, token } = await syntro.login('john', 'pass123');
const { valid } = await syntro.verifyToken(token);Track any business event with optional metadata. View analytics in real-time from your dashboard.
await syntro.event('CUSTOM', 'purchase', 'User purchased item', {
productId: 'prod_123', amount: 999
});Catch and log errors in real-time. See frequency, last occurrence, stack traces, and metadata.
await syntro.sendError('api_timeout', 'Payment API timed out', {
endpoint: '/checkout', timeout: 5000
});Create payment sessions with one function. Webhooks are handled automatically — transactions recorded to your dashboard.
const { url } = await syntro.createPayment('Pro Plan', 999, {
successUrl: 'https://app.com/success'
});
window.location.href = url;Store arbitrary JSON metadata on any user. Merge-update with one call. Perfect for feature flags, preferences, roles.
await syntro.updateMetadata(userId, { plan: 'pro', role: 'admin' });
const meta = await syntro.getMetadata(userId);Verify JWT tokens server-side. Get the associated user in one call. Perfect for protecting API routes.
const { valid, user } = await syntro.verifyToken(headerToken);
if (!valid) return res.status(401).send('Unauthorized');