Stow Cards Wallet passes

Developers

Build on the Stow Cards API

Enroll members, adjust points and redeem rewards from your own systems with a REST API, and hear about new members, points, redemptions, scans and pass updates through signed webhooks. Points and reward changes rebuild the customer’s wallet pass and push it to their phone.

Sign in to the Stow Cards console and open API Keys, under Administration in the sidebar. A key is shown once when you create it, so store it somewhere safe.

Quickstart

Your first call

Send the key in an X-API-Key header. This call adds 25 points to a member. The reply gives the old and new balance and how many of the member’s iPhones accepted the update push.

  • REST and JSON over HTTPS, through the same gateway as the console
  • Each key is bound to your merchant and carries only the roles you give it
  • An Idempotency-Key on points and redemptions, so a retry within 24 hours never applies twice
  • Example clients in Python, PHP, Ruby, Java, .NET and Go run the same calls end to end, and the Node.js SDK wraps them
# Add points to a member and push the update to their wallet
curl -X PATCH https://api.stow.cards/api/v1/merchants/me/members/MEMBER_UUID/points \
  -H "X-API-Key: $STOW_API_KEY" \
  -H "Idempotency-Key: 018f3c2e-9d41-7c3a-b5e6-2f8d5b6a7c3d" \
  -H "Content-Type: application/json" \
  -d '{ "delta": 25, "changeMessage": "Thanks for your purchase!" }'

# 200 OK (abridged)
{
  "success": true,
  "data": {
    "member": { "id": "MEMBER_UUID", "memberCode": "7K2Q9FMRDC" },
    "previous": 265,
    "current": 290,
    "passUpdate": { "apple": { "devicesNotified": 1 } }
  }
}

MEMBER_UUID is the id the API returns when you enroll a member or search for their Member ID. It is not the Member ID printed on the pass.

Node.js SDK

The official Node.js SDK

@stowcards/sdk wraps the same API in a typed client for Node.js 22 and later. It retries failed calls safely, adds an Idempotency-Key to every points, redemption and status change, walks paginated lists for you and verifies webhook signatures.

  • Types for every request, response and webhook event
  • ESM and CommonJS builds, with no runtime dependencies
  • Typed errors that carry the request id for support
# Install
npm install @stowcards/sdk

// Enroll a customer, then award points
import { StowClient } from '@stowcards/sdk';

const stow = new StowClient(); // reads STOW_API_KEY

const member = await stow.members.enroll({
  programId: 'PROGRAM_ID',
  firstName: 'Ada',
  lastName: 'Lovelace',
  email: 'ada@example.com',
});

await stow.members.adjustPoints(
  member.id,
  { delta: 25, changeMessage: 'Thanks for your purchase!' },
  { idempotencyKey: 'order-1042' },
);

PROGRAM_ID is a program’s _id from stow.programs.list(). Keep the key on your server: the SDK refuses to run in a browser.

Ready to connect your systems?