Stow Cards Wallet passes

Developers

Webhooks

Signed, retried HTTP callbacks for everything that happens on your loyalty programs: enrollments, points, redemptions and wallet lifecycle. Full data schemas for every event also live in the API reference under the OpenAPI webhooks section.

Receiving webhooks

Create a subscription with POST /merchants/me/webhooks, pointing at an HTTPS endpoint you control. Stow Cards POSTs one JSON envelope per event, with these headers:

HeaderValue
X-Stow-Webhook-Eventthe event type, e.g. points.changed
X-Stow-Webhook-TimestampISO-8601 timestamp of the delivery attempt
X-Stow-Webhook-Subscriptionthe subscription id
X-Stow-Webhook-Signaturesha256= + HMAC-SHA256 signature (present when the subscription has a secret)
User-Agentstow-cards-webhook/1.0

Respond with any 2xx within the subscription's timeoutMs. Non-2xx or timeouts are retried up to retryPolicy.maxAttempts with backoffMs between attempts. Deliveries (payload, status, attempts) are inspectable at GET /merchants/me/webhooks/delivery-logs, and any logged delivery can be re-sent with POST /merchants/me/webhooks/delivery-logs/{logId}/replay.

Idempotency on your side: deliveries are at-least-once. Dedupe on eventId: it identifies one occurrence of the event, and retries and replays of that occurrence reuse it. A new occurrence gets a new eventId, even when it looks the same: a customer who removes a pass and adds it again on the same phone produces a second pass.installed with its own eventId.

Verifying the signature

The signature is HMAC-SHA256(secret, "{timestamp}.{rawBody}"), hex-encoded, prefixed with sha256=. The {timestamp} is the value of the X-Stow-Webhook-Timestamp header. Checking it also protects you from replays (reject deliveries older than, say, 5 minutes).

Node.js

import crypto from 'node:crypto';

function verifyStowWebhook(req, secret, toleranceMs = 5 * 60 * 1000) {
  const timestamp = req.headers['x-stow-webhook-timestamp'];
  const received = req.headers['x-stow-webhook-signature'] || '';
  if (!timestamp || !received.startsWith('sha256=')) return false;
  if (Math.abs(Date.now() - Date.parse(timestamp)) > toleranceMs) return false;

  const expected = 'sha256=' + crypto
    .createHmac('sha256', secret)
    .update(`${timestamp}.${req.rawBody}`)   // rawBody: the exact bytes received
    .digest('hex');
  // timingSafeEqual throws on buffers of different lengths, so check first.
  if (Buffer.byteLength(received) !== Buffer.byteLength(expected)) return false;
  return crypto.timingSafeEqual(Buffer.from(received), Buffer.from(expected));
}

Python

import hashlib, hmac, time
from datetime import datetime, timezone

def verify_stow_webhook(headers, raw_body: bytes, secret: str, tolerance_s=300):
    timestamp = headers.get("X-Stow-Webhook-Timestamp", "")
    received = headers.get("X-Stow-Webhook-Signature", "")
    if not timestamp or not received.startswith("sha256="):
        return False
    sent = datetime.fromisoformat(timestamp.replace("Z", "+00:00"))
    if abs(time.time() - sent.timestamp()) > tolerance_s:
        return False
    expected = "sha256=" + hmac.new(
        secret.encode(), f"{timestamp}.".encode() + raw_body, hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(received, expected)

Compute the HMAC over the raw request bytes, not a re-serialized JSON object, because key order matters.

Choosing events

Subscribe to specific events or * for every event documented here (and any added later); every delivery carries data. Test any subscription with POST /merchants/me/webhooks/{id}/test. It queues a real, signed delivery named after the subscription's first event type other than * (member.updated for a *-only subscription), but its data is only { "test": true, "subscriptionId": "…", "sentAt": "…" }, never that event's fields. Check data.test before reading event fields.

Rotating the secret

POST /merchants/me/webhooks/{id}/rotate-secret takes effect at once: new deliveries are signed with the new secret, and your receiver rejects them until it has it. Keep that window short (have the receiver read its secrets from a store you update straight after rotating), accept both secrets in the meantime (retries signed before the rotation still carry the old one), then resend anything that failed with GET /merchants/me/webhooks/delivery-logs?success=false and POST /merchants/me/webhooks/delivery-logs/{logId}/replay.

Event catalog

#

member.created

A member enrolled (any channel)

Fired by enrollment for both public-page and API enrollments.

data payload

PropertyTypeDescription
memberIdstring
memberCodestring
programIdstring
merchantIdstring
emailstring
firstNamestring
lastNamestring
sourcestring

Enrollment channel (public page, console, API, import).

attributionobject
passIssuanceobject
properties
PropertyTypeDescription
appleboolean
googleboolean

Delivery payload

{
  "specversion": "1.0",
  "id": "string",
  "type": "cards.stow.member.created",
  "time": "2026-07-02T10:00:00.000Z",
  "event": "member.created",
  "eventId": "string",
  "occurredAt": "2026-07-02T10:00:00.000Z",
  "tenantId": "string",
  "sourceService": "string",
  "data": {
    "memberId": "string",
    "memberCode": "string",
    "programId": "string",
    "merchantId": "string",
    "email": "string",
    "firstName": "string",
    "lastName": "string",
    "source": "string",
    "attribution": {},
    "passIssuance": {
      "apple": true,
      "google": true
    }
  }
}
#

member.updated

Member fields changed

data payload

object

Event-specific payload (see per-event schemas).

Delivery payload

{
  "specversion": "1.0",
  "id": "string",
  "type": "cards.stow.member.updated",
  "time": "2026-07-02T10:00:00.000Z",
  "event": "member.updated",
  "eventId": "string",
  "occurredAt": "2026-07-02T10:00:00.000Z",
  "tenantId": "string",
  "sourceService": "string",
  "data": {}
}
#

points.changed

Points balance changed

Fired on every balance adjustment (console, API, reader scan).

data payload

PropertyTypeDescription
memberIdstring
memberCodestring
programIdstring
merchantIdstring
fieldstring

The fieldValues key that changed.

previousinteger
currentinteger
deltainteger
tierstring

Tiered programs only.

previousTierstring
tierUpgradedboolean
changeMessagestring
passUpdateobject | null

What happened to the wallet pass after the change. null when the pass service did not confirm the update; the balance change itself is already saved.

properties
PropertyTypeDescription
serialNumberstring

The pass serial (a UUID). Not the Member ID.

lastUpdateTagstring

Timestamp of the latest pass version. Apple devices compare it to decide whether to fetch the pass again.

rebuiltboolean

True when the signed pass file was rebuilt (real mode only).

appleobject
properties
PropertyTypeDescription
devicesNotifiedinteger

Apple devices that accepted the push.

devicesAttemptedinteger

Apple devices registered for this pass.

modeenum

stub when Apple credentials are missing or do not match, or when the program's push messages are off.

one of real, stub
googleobject
properties
PropertyTypeDescription
objectPatchedboolean

True when the Google Wallet pass was updated. Only a pass the customer saved to Google Wallet is updated, and only in real mode.

modeenum
one of real, stub

Delivery payload

{
  "specversion": "1.0",
  "id": "string",
  "type": "cards.stow.points.changed",
  "time": "2026-07-02T10:00:00.000Z",
  "event": "points.changed",
  "eventId": "string",
  "occurredAt": "2026-07-02T10:00:00.000Z",
  "tenantId": "string",
  "sourceService": "string",
  "data": {
    "memberId": "string",
    "memberCode": "string",
    "programId": "string",
    "merchantId": "string",
    "field": "string",
    "previous": 0,
    "current": 0,
    "delta": 0,
    "tier": "string",
    "previousTier": "string",
    "tierUpgraded": true,
    "changeMessage": "string",
    "passUpdate": {
      "serialNumber": "string",
      "lastUpdateTag": "string",
      "rebuilt": true,
      "apple": {
        "devicesNotified": 0,
        "devicesAttempted": 0,
        "mode": "real"
      },
      "google": {
        "objectPatched": true,
        "mode": "real"
      }
    }
  }
}
#

reward.redeemed

A reward was redeemed

data payload

PropertyTypeDescription
memberIdstring
memberCodestring
programIdstring
merchantIdstring
fieldstring
previousinteger
currentinteger

Post-redeem balance: 0 for a stamp card, the balance minus the reward target for points.

goalinteger

The stamp goal or points reward target the redemption took.

changeMessagestring
passUpdateobject | null

What happened to the wallet pass after the change. null when the pass service did not confirm the update; the balance change itself is already saved.

properties
PropertyTypeDescription
serialNumberstring

The pass serial (a UUID). Not the Member ID.

lastUpdateTagstring

Timestamp of the latest pass version. Apple devices compare it to decide whether to fetch the pass again.

rebuiltboolean

True when the signed pass file was rebuilt (real mode only).

appleobject
properties
PropertyTypeDescription
devicesNotifiedinteger

Apple devices that accepted the push.

devicesAttemptedinteger

Apple devices registered for this pass.

modeenum

stub when Apple credentials are missing or do not match, or when the program's push messages are off.

one of real, stub
googleobject
properties
PropertyTypeDescription
objectPatchedboolean

True when the Google Wallet pass was updated. Only a pass the customer saved to Google Wallet is updated, and only in real mode.

modeenum
one of real, stub

Delivery payload

{
  "specversion": "1.0",
  "id": "string",
  "type": "cards.stow.reward.redeemed",
  "time": "2026-07-02T10:00:00.000Z",
  "event": "reward.redeemed",
  "eventId": "string",
  "occurredAt": "2026-07-02T10:00:00.000Z",
  "tenantId": "string",
  "sourceService": "string",
  "data": {
    "memberId": "string",
    "memberCode": "string",
    "programId": "string",
    "merchantId": "string",
    "field": "string",
    "previous": 0,
    "current": 0,
    "goal": 0,
    "changeMessage": "string",
    "passUpdate": {
      "serialNumber": "string",
      "lastUpdateTag": "string",
      "rebuilt": true,
      "apple": {
        "devicesNotified": 0,
        "devicesAttempted": 0,
        "mode": "real"
      },
      "google": {
        "objectPatched": true,
        "mode": "real"
      }
    }
  }
}
#

pass.created

A wallet pass was built

data payload

object

Event-specific payload (see per-event schemas).

Delivery payload

{
  "specversion": "1.0",
  "id": "string",
  "type": "cards.stow.pass.created",
  "time": "2026-07-02T10:00:00.000Z",
  "event": "pass.created",
  "eventId": "string",
  "occurredAt": "2026-07-02T10:00:00.000Z",
  "tenantId": "string",
  "sourceService": "string",
  "data": {}
}
#

pass.installed

Pass added to a wallet

Fired by the wallet web service when a device registers the pass.

data payload

PropertyTypeDescription
memberIdstring
memberCodestring
serialNumberstring
programIdstring
platformenum
one of apple, google

Delivery payload

{
  "specversion": "1.0",
  "id": "string",
  "type": "cards.stow.pass.installed",
  "time": "2026-07-02T10:00:00.000Z",
  "event": "pass.installed",
  "eventId": "string",
  "occurredAt": "2026-07-02T10:00:00.000Z",
  "tenantId": "string",
  "sourceService": "string",
  "data": {
    "memberId": "string",
    "memberCode": "string",
    "serialNumber": "string",
    "programId": "string",
    "platform": "apple"
  }
}
#

pass.updated

Pass content pushed/refreshed

data payload

PropertyTypeDescription
memberIdstring
memberCodestring
serialNumberstring
programIdstring
lastUpdateTagstring

Timestamp of the new pass version.

devicesNotifiedinteger

Apple devices that accepted the push.

googlePatchedboolean

Whether the Google Wallet pass was updated.

redeemboolean

Whether the update came from a reward redemption.

Delivery payload

{
  "specversion": "1.0",
  "id": "string",
  "type": "cards.stow.pass.updated",
  "time": "2026-07-02T10:00:00.000Z",
  "event": "pass.updated",
  "eventId": "string",
  "occurredAt": "2026-07-02T10:00:00.000Z",
  "tenantId": "string",
  "sourceService": "string",
  "data": {
    "memberId": "string",
    "memberCode": "string",
    "serialNumber": "string",
    "programId": "string",
    "lastUpdateTag": "string",
    "devicesNotified": 0,
    "googlePatched": true,
    "redeem": true
  }
}
#

pass.removed

Pass removed from a wallet

data payload

PropertyTypeDescription
memberIdstring
memberCodestring
serialNumberstring
programIdstring
platformenum
one of apple, google

Delivery payload

{
  "specversion": "1.0",
  "id": "string",
  "type": "cards.stow.pass.removed",
  "time": "2026-07-02T10:00:00.000Z",
  "event": "pass.removed",
  "eventId": "string",
  "occurredAt": "2026-07-02T10:00:00.000Z",
  "tenantId": "string",
  "sourceService": "string",
  "data": {
    "memberId": "string",
    "memberCode": "string",
    "serialNumber": "string",
    "programId": "string",
    "platform": "apple"
  }
}
#

pass.scanned

Pass scanned at the till

data payload

object

Event-specific payload (see per-event schemas).

Delivery payload

{
  "specversion": "1.0",
  "id": "string",
  "type": "cards.stow.pass.scanned",
  "time": "2026-07-02T10:00:00.000Z",
  "event": "pass.scanned",
  "eventId": "string",
  "occurredAt": "2026-07-02T10:00:00.000Z",
  "tenantId": "string",
  "sourceService": "string",
  "data": {}
}
#

campaign.sent

A campaign finished sending

data payload

object

Event-specific payload (see per-event schemas).

Delivery payload

{
  "specversion": "1.0",
  "id": "string",
  "type": "cards.stow.campaign.sent",
  "time": "2026-07-02T10:00:00.000Z",
  "event": "campaign.sent",
  "eventId": "string",
  "occurredAt": "2026-07-02T10:00:00.000Z",
  "tenantId": "string",
  "sourceService": "string",
  "data": {}
}
#

batch.completed

A batch job completed

Fired when an import job finishes and at least one row was created or no row failed (GET /merchants/me/members/import-jobs/{jobId} then shows status: completed). data.batchJobId is the import job's id; read the rows with GET /merchants/me/members/import-jobs/{jobId}/rows. CSV imports started in the web console fire it too.

data payload

PropertyTypeDescription
batchJobIdstring

The import job's id (GET /merchants/me/members/import-jobs/{jobId}).

typestring

The job type: member_import for a CSV import.

successRowsinteger

Rows that enrolled a new member (createdRows).

skippedRowsinteger

Rows deduped against an existing member (dedupedRows).

failedRowsinteger
processedRowsinteger

Delivery payload

{
  "specversion": "1.0",
  "id": "string",
  "type": "cards.stow.batch.completed",
  "time": "2026-07-02T10:00:00.000Z",
  "event": "batch.completed",
  "eventId": "string",
  "occurredAt": "2026-07-02T10:00:00.000Z",
  "tenantId": "string",
  "sourceService": "string",
  "data": {
    "batchJobId": "string",
    "type": "member_import",
    "successRows": 0,
    "skippedRows": 0,
    "failedRows": 0,
    "processedRows": 0
  }
}
#

batch.failed

A batch job failed

Fired when an import job finishes with at least one failed row and no row created (status: failed). data.batchJobId is the import job's id; list the failed rows with GET /merchants/me/members/import-jobs/{jobId}/rows?status=failed. CSV imports started in the web console fire it too.

data payload

PropertyTypeDescription
batchJobIdstring

The import job's id (GET /merchants/me/members/import-jobs/{jobId}).

typestring

The job type: member_import for a CSV import.

successRowsinteger

Rows that enrolled a new member (createdRows).

skippedRowsinteger

Rows deduped against an existing member (dedupedRows).

failedRowsinteger
processedRowsinteger

Delivery payload

{
  "specversion": "1.0",
  "id": "string",
  "type": "cards.stow.batch.failed",
  "time": "2026-07-02T10:00:00.000Z",
  "event": "batch.failed",
  "eventId": "string",
  "occurredAt": "2026-07-02T10:00:00.000Z",
  "tenantId": "string",
  "sourceService": "string",
  "data": {
    "batchJobId": "string",
    "type": "member_import",
    "successRows": 0,
    "skippedRows": 0,
    "failedRows": 0,
    "processedRows": 0
  }
}