Tessera SDK

Build loyalty into your product.
Skip building the engine.

Tessera runs the loyalty engine: the points ledger, tiers, expiry, refunds and the audit trail behind every balance. You build the experience your customers see, in your own app, site or checkout.

Pre-GA · onboarding developers in small groups
Tessera runs
  • Points ledger with a full audit trail
  • Spendable points and status points, kept apart
  • Tiers, multipliers and expiry
  • Refunds, clawbacks and redemption holds
  • Signed, idempotent event intake
You build
  • Your app, site or checkout
  • Your rewards screen and member pages
  • The events that matter to your business
Three calls

Enrol a member. Send an event. Redeem.

That’s the whole loop. The SDK handles auth, request signing, idempotency, pagination, retries and typed errors. It runs on Node 20+, edge runtimes and Workers, Deno and Bun, with zero dependencies.

npm i @tesseraloyalty/sdk
  1. Enrol a member

    Identify each customer by the ID you already use. Call it again for the same person and you get the same member back, with any new details merged.

    TypeScript SDK
    import { TesseraClient } from '@tesseraloyalty/sdk';
    
    const tessera = new TesseraClient({
      secretKey: process.env.TESSERA_SECRET_KEY,         // server-side only
      signingSecret: process.env.TESSERA_SIGNING_SECRET, // signs events
      environment: 'sandbox',
      channel: 'api',
    });
    
    const member = await tessera.customers.upsert({
      externalId: 'user_8812',
      email: 'ava@example.com',
      name: 'Ava Reyes',
    }); // { customerUuid, channel, externalId, created, updatedAt }
  2. Send an event

    Describe what happened, like a purchase or a booking. Your program’s rules decide what it earns. The idempotency key means a retry never credits twice.

    TypeScript SDK
    const event = await tessera.events.ingest({
      type: 'purchase',
      channel: 'api',
      externalId: 'user_8812',
      sourceRef: 'ord_9001',
      idempotencyKey: 'api:ord_9001-purchase',
      occurredAt: new Date(),
      trigger: 'payment_captured',
      amount: { netOfTaxShipping: 4200, currency: 'USD' }, // minor units
    });
    
    event.status; // 'accepted', or 'duplicate' on a retry
  3. Redeem

    Place a hold on the member’s points while they check out. Finalize it when the order goes through, or release it if they walk away.

    TypeScript SDK
    const member = tessera.member('user_8812');
    const { data: rewards } = await tessera.rewards.list();
    
    const hold = await member.redeem({
      optionId: rewards[0].id,
      requestedPoints: 500,
      cart: { channel: 'api', lines: [{ lineId: 'l1', productId: 'sku_42', quantity: 1, lineSubtotalCents: 4200 }] },
    });
    
    // Order placed:
    await hold.finalize({ sourceChannel: 'api', sourceRef: 'ord_9001' });
    // Or, if the cart is abandoned:
    // await hold.release();

Examples use the sandbox at sandbox.usetessera.io. Production runs at api.usetessera.io/v1. Our team issues keys during onboarding.

Read the SDK reference
What you don’t have to build

The hard parts of loyalty, already built.

A points balance looks simple until refunds, retries, tier resets and support tickets show up. Tessera handles them, so your team doesn’t have to.

An audit trail for every point

Every ledger entry links back to the event that caused it. When a customer asks about their balance, the answer is one lookup away.

Two balances, not one

Spendable points for rewards. Status points for tiers. Spending points never costs a member their tier.

Tiers that run themselves

Set thresholds, multipliers and a status period. Tessera tracks progress, upgrades, grace periods and requalification.

Refunds and returns

Points can stay pending until your return window closes. A refund cancels them, or claws them back if they’ve already landed.

Safe retries

Events and redemptions are idempotent. Send the same one twice and it’s recorded once.

Holds that tidy up

A redemption hold reserves points during checkout. If it’s never finalized or released, it expires on its own.

Data model

One member. Two balances. Every channel.

Everything hangs off a member record. You identify members with your own IDs, and Tessera keeps the books.

  • Members

    Keyed by a channel and your own ID, like api + user_8812. Link a POS ID or a Shopify customer to the same member, and every channel earns into one balance.

  • Spendable points

    What members redeem. Points can sit as pending during a return window before they become spendable.

  • Status points and tiers

    A running total that moves members up your tiers. It’s never spent, so a big redemption doesn’t cost anyone their status.

  • Redemptions

    A hold reserves points, then you finalize or release it. Redeem against available points: spendable, minus open holds and clawbacks.

GET /v1/customers/api/user_8812/balance
{
  "customer_uuid": "c0ffee00-0000-4000-8000-000000000001",
  "points_label": "points",
  "spendable_balance": 4700,
  "pending_spendable": 300,
  "qualifying_balance": 1250,
  "active_holds": 500,
  "clawbacks_outstanding": 0,
  "available": 4200
}
Earn on whatever unit your business counts: money spent, nights booked, kilometres flown.
Works with

Native where it’s built. The API for everything else.

Each integration is labelled by how much is done for you, so you know what you’re getting.

Native
Built in and maintained by us. Connect it and it runs.
Guide
A pattern you build with the SDK, using our docs.
Via API
Anything that can make an HTTPS request.
  • Shopify

    Native

    The Tessera app syncs purchases, refunds and customers, and turns points into a discount that’s already in the cart.

    How it works on Shopify
  • Klaviyo

    Native

    Keeps points, tier and progress on Klaviyo profiles, and sends Points Earned, Points Redeemed and Tier Changed events for your flows. One way, from Tessera to Klaviyo.

    Read the Klaviyo guide
  • Hydrogen

    Guide

    Headless Shopify storefronts use the SDK for balances, rewards and checkout redemptions. Our live pilot runs on Hydrogen.

    Read the SDK docs
  • Your backend

    Via API

    Node, Python, Go or anything else that speaks HTTPS. The TypeScript SDK is the quickest path, and the REST API works from any language.

    Get started
  • Mobile apps

    Via API

    Call Tessera from your server, then show balances and rewards in your iOS or Android app. Secret keys never ship inside the app.

  • POS and booking systems

    Via API

    Send visits, bookings or sales as events. Link the POS customer ID to the same member as their online account.

Worked example · Kestrel Air

An airline with no cart and no checkout.

Kestrel Air is a concept airline built on Tessera in a three-hour hackathon. Its program, Kestrel Club, earns on kilometres flown. There’s no Shopify and no order total, just a member and an event.

  • Earn on distance

    Each flown sector sends one fact: its distance in kilometres. The program pays 0.5 points per km, and 5 status points for every full 100 km.

  • Four tiers

    Blue, Silver, Gold and Platinum, with earn multipliers from 1× to 2× and a calendar-year status period.

  • Change a rate without a deploy

    The site sends the fact, not the points. Change a rate in the program and the next flight earns at the new rate.

5,540 km
London to New York
2,770
Kestrel points to spend
275
Status points toward tier
credit-sector.ts
export async function creditSector(memberNo: string, bookingRef: string, sector: Sector) {
  const sourceRef = `${bookingRef}-S${sector.seq}`;
  return kestrel.events.ingest({
    type: 'purchase',
    channel: 'kestrel',
    externalId: memberNo,
    sourceRef,
    idempotencyKey: `kestrel:${sourceRef}:purchase`, // a retry is a dedupe, never a double credit
    occurredAt: new Date(),
    trigger: 'order_placed',
    units: [{ unit: 'km', value: sector.km }], // the fact; the program owns the arithmetic
  });
}
From the Kestrel Air example in the docs.
AI and MCP

Ask your loyalty data a question.

Tessera has a read-only remote MCP server, in preview, for Claude and other AI clients that support MCP. Look up a member’s balance, tier and history, browse the rewards catalogue, or find your top members. Access is through OAuth, and you can revoke it at any time.

Pricing

Pay for members, not API calls.

An active member is someone who earned or redeemed points in the last 12 months. Sign-ups and imported members are free until they earn or redeem.

Every feature is included at every size, including the API, the SDK and the integrations. The price moves up or down with your member count each month.

Request API access
100active members free
No credit card required.
1plan
Every feature, at every size.
Developer FAQ

Questions developers ask

Is there a sandbox?

Yes. Every account gets a sandbox at sandbox.usetessera.io, with its own data and its own sk_test and pk_test keys. Production runs at api.usetessera.io. The SDK refuses to send a test key to production, or a live key to the sandbox.

How do I get API keys?

We issue them when you’re onboarded: one key pair for the sandbox and one for production. Secret keys are server-side only and never belong in a browser or a mobile app. Publishable keys can read your rewards, tiers and program details from the client, and nothing else.

What about rate limits and retries?

Every event carries an idempotency key and every redemption needs one, so retrying is always safe. The SDK retries network errors, 5xx responses and 429s with backoff, and honours Retry-After. Redemptions have a per-member velocity limit. The docs don’t list fixed request limits yet, so tell us your expected volume when you apply.

Is there an SLA?

Not yet. Tessera is pre-GA and we’re onboarding in small groups, so there’s no formal SLA. The /v1 API only changes in additive ways, and breaking changes ship as a new version. The SDK is on 0.x until a 1.0 release marks its surface stable.

Do I need Shopify?

No. Tessera works for any business that can name a member and describe an event. Shopify is where the native app runs and where points become a discount in the checkout. Everything else connects through the API and SDK.

Which languages can I use?

The SDK is TypeScript and runs on Node 20+, edge runtimes and Workers, Deno and Bun. From any other language, call the REST API directly: bearer auth and JSON, plus an HMAC signature on events.

Can members earn on something other than money?

Yes. Earn on any unit your program counts, like kilometres flown, nights booked or classes attended. Spendable points and status points can follow different rules from the same event.

Request API access

Build with Tessera.

We’re onboarding developers in small groups. Tell us what you’re building on and we’ll be in touch when your spot opens.

  • Sandbox and production keys, issued by our team
  • TypeScript SDK and a versioned REST API
  • Free up to 100 active members, every feature included

Request API access

I'm a…
Optional — helps us prioritise outreach

We only use your email to contact you about access. See our privacy notice.