Skip to content
Back to blog

Wallet Pass API integration guide: end-to-end architecture

Comprehensive technical guide for integrating Apple Wallet and Google Wallet pass generation, webhooks, and push updates into your SaaS or enterprise backend.

Passinstance Team
Passinstance Team

Wallet pass platform team

2026-02-012 min read
Cover image for Wallet Pass API integration guide: end-to-end architecture

Integrating mobile wallet passes into your product architecture enables automated issuance, platform-supported wallet update notifications, and programmatic pass lifecycle management directly from your backend, CRM, or POS system.

This guide provides an end-to-end technical overview of integrating Passinstance REST APIs, our TypeScript SDK, authentication, idempotency, and webhook event processing.


1. System Architecture & High-Level Data Flow

SYSTEM ARCHITECTURE FLOW
INTERACTIVE ARCHITECTURE
SYSTEM ARCHITECTURE FLOW
STAGE 01 Your Application / Backend
STAGE 02 Passinstance API Engine
Compiles PKCS#7 signed .pkpass for Apple Wallet
Generates signed JWT Save Link for Google Wallet
STAGE 03 Customer Device (iOS / Android)
STAGE 04 Passinstance Webhook Gateway
4. POST/webhooks/pass-installedYour Backend

2. Authentication & Environment Credentials

Passinstance supports API key authentication (X-API-Key) for server-to-server requests (alongside Bearer JWT session tokens) over HTTPS/TLS. API keys are generated in the dashboard with distinct environment scopes:

  • pi_test_... — Sandbox environment for testing template design, test pass generation, and webhook triggers.
  • pi_live_... — Production environment for issuing live, signed Apple Wallet and Google Wallet passes.
BASH
curl -X GET https://api.passinstance.com/api/v1/templates \
  -H "X-API-Key: pi_live_99481203948123"

3. Creating & Issuing Passes Programmatically

Use the official @passinstance/sdk (Node.js / TypeScript) or raw HTTP REST calls to issue passes from your backend:

TS
import { Passinstance } from "@passinstance/sdk";

const client = new Passinstance({
  apiKey: process.env.PASSINSTANCE_API_KEY!,
});

export async function handleCustomerSignup(user: { id: string; email: string; name: string }) {
  const pass = await client.passes.create({
    templateId: "tpl_membership_gold",
    externalId: user.id, // Idempotency & database cross-reference
    data: {
      memberName: user.name,
      memberId: `MEM-${user.id.slice(0, 8)}`,
      joinDate: new Date().toISOString().split("T")[0],
      status: "Active",
    },
  });

  return {
    appleUrl: pass.appleWalletUrl,
    googleUrl: pass.googleWalletUrl,
    qrCodeImageUrl: pass.qrCodeUrl,
  };
}

4. Pushing Real-Time Lock-Screen Updates

To update pass data (e.g. points balance increase, tier promotion, or event gate change), send a update request:

TS
await client.passes.update("pass_9842011", {
  data: {
    pointsBalance: 2500,
    tier: "Platinum",
  },
  pushNotification: {
    message: "Congratulations! You have been upgraded to Platinum Tier 🎉",
  },
});

This single API call triggers both APNs lock-screen push updates for Apple Wallet and Google Wallet REST API state updates for Android simultaneously.


5. Listening to Webhook Events

Passinstance delivers real-time webhooks for key pass lifecycle events so your database stays synchronized without polling.

Supported Event Types:

  • pass.created — Pass payload was compiled.
  • pass.installed — User added pass to Apple Wallet or Google Wallet.
  • pass.updated — Pass fields were updated.
  • pass.scanned — Scanner app validated the pass barcode at POS/entry.
  • pass.removed — User deleted pass from device wallet.

Verifying Webhook Signatures:

TS
import { verifyWebhookSignature } from "@passinstance/sdk/crypto";

export async function handleWebhookRequest(req: Request) {
  const signature = req.headers.get("x-passinstance-signature")!;
  const payload = await req.text();

  const isValid = verifyWebhookSignature({
    payload,
    signature,
    secret: process.env.PASSINSTANCE_WEBHOOK_SECRET!,
  });

  if (!isValid) {
    return new Response("Invalid signature", { status: 401 });
  }

  const event = JSON.parse(payload);
  if (event.type === "pass.installed") {
    console.log(`Pass ${event.data.passId} installed on ${event.data.platform}`);
  }

  return new Response("OK", { status: 200 });
}

6. Enterprise Multi-Tenancy & Custom Domains

For SaaS platforms embedding pass issuance into their software:

  • Use /v1/admin/tenants to programmatically provision sub-organizations.
  • Configure custom domain CNAME records (e.g. wallet.your-saas.com) for distribution URLs.
  • Segment webhooks and API credentials per tenant workspace.
Interactive Live Demo
Apple Wallet & Google Wallet

Test a Real Wallet Pass on Your Phone

Experience how digital passes work firsthand. Scan with your smartphone camera or tap below to add this verified pass directly into Apple Wallet or Google Wallet.

Artisan RoastersCafé & F&B
Test QR code for Artisan Roasters

Scan with Phone Camera

Related in this topic

API and integrations

Open topic hub

Ready to launch your wallet pass program?

Create your account, design your pass template, and test real passes directly in Apple Wallet and Google Wallet.

Grand Palazzo
Elite
BALANCE1,200 pts
MEMBER NO.GP-84920
HOLDER
VALID UNTIL12/2027
GP-2026-84920