QUICKSTART·5 min read

Getting started

Passyn provides the access infrastructure layer for temporary passes: physical turnstiles, coworking spaces, edge paywalls, and exam windows. Customers purchase time windows, and your infrastructure verifies entry with a single sub-15ms API call.

OpenAPI 3.0 SpecLaunch API Playground

Overview & Core Primitives

Passyn manages duration clocks, usage counters, and signed cryptographic payloads centrally. Your client applications never need to maintain manual date calculations or synchronization loops.

Pass Definition

Preconfigured SKU with duration (e.g. 24h, 7 days), pricing, and usage constraints.

Access Credential

An active token or dynamic QR code tied to a verified user with cryptographic signature.

Edge Verification

Sub-15ms evaluation enforcing validity, time expiry, and decrements usage count atomically.

1

Obtain sandbox credentials

Create a free developer account, open the developer console, and generate a test-mode API key. Test keys carry full API semantics with zero financial settlement.

.env
# 1. Create a developer account and grab your sandbox key
# Dashboard → Developers → API Keys → Create key
PASSYN_API_KEY=pk_test_9f82a1c0b3d4e5f6
2

Install the client SDK

Install the zero-dependency TypeScript SDK for Node 18+ or run raw REST HTTP requests in any language.

pnpm add @passyn/node
hello-passyn.ts
import Passyn from "@passyn/node";
const passyn = new Passyn(process.env.PASSYN_API_KEY);
// Sanity check — inspect the caller context and active scopes
const me = await passyn.users.me();
console.log("Connected to Passyn:", me.context, me.permissions);
3

Issue and verify passes

The canonical access loop involves three simple operations: register the customer, activate a pass instance upon checkout, and verify credentials upon entry.

access-lifecycle.ts
// 1. Provision a subscriber or link your existing identity
const user = await passyn.users.create({
name: "Ada Lovelace",
});
// 2. Issue a pass programmatically (or trigger hosted Stripe checkout)
const access = await passyn.access.activate({
userId: user.id,
passId: "pass_day_gym_24h",
});
// 3. Verify on entry at turnstile, door scanner, or digital paywall:
const { valid, remainingUses, expiresAt } = await passyn.access.verify({
userId: user.id,
passId: "pass_day_gym_24h",
consume: true, // decrements 1 entry from limited-use pass
});
console.log({ valid, remainingUses, expiresAt });
// => { valid: true, remainingUses: 2, expiresAt: "2026-11-03T00:00:00Z" }
4

Subscribe to webhook events

Passyn delivers cryptographically signed webhook notifications for state transitions across your entire pass fleet.

pass.purchased

Customer completed checkout and pass was created.

pass.activated

Access started and the countdown clock is ticking.

pass.expired

Validity window elapsed or all uses consumed.

pass.revoked

Manual revocation or dispute resolved by merchant.

Lifecycle Architecture

How Passyn handles credential verification under the hood:

AUser presents QR/Token
→
BEdge Scanner calls Verify
→
CAccess Granted / Gate Opened

Next steps

Ready to test live requests?

Open your free sandbox account to create keys, inspect event logs, and test turnstile simulations.