Skip to content
REST API Reference & SDKs

Passinstance Developer Documentation

Build high-volume Apple Wallet (.pkpass) and Google Wallet integrations. Issue, update, scan, and broadcast real-time lockscreen notifications via production-grade REST APIs.

Get API Keys
Live docs workbench — snippets update as you type
Jump to section:Objects & Schemas3
Overview

Introduction — API Overview

The Passinstance API enables developers to dynamically issue, distribute, update, and validate digital passes for Apple Wallet (iOS) and Google Wallet (Android). All API requests must be made over HTTPS and return a standardized API response envelope with machine-readable status codes.

Production Base URL
Active
https://api.passinstance.com/api/v1
Staging Sandbox Base URL
https://staging-api.passinstance.com/api/v1
Request & Response Formatapplication/json (UTF-8) standard response envelope
Backend Server TimezoneEurope/Berlin (ISO 8601 timestamps)
Security

Authentication — API Keys & Authorization

Use X-API-Key: <key> or Authorization: ApiKey <key> for API-key-enabled endpoints. Bearer is reserved for access JWTs. Keep credentials on the server.

Production Keys (Live)
Authorization: ApiKey pi_live_xxxxxxxxxxxxxxxxxxxxxxxx
Sandbox Keys (Test)
Authorization: ApiKey pi_test_xxxxxxxxxxxxxxxxxxxxxxxx
Hardware Scanner Keys
x-scanner-key: scan_key_77a8b9c0d1e2f3a4...
Security Invariant:Server-to-server only. Never embed secret keys in frontend bundles.
Quick Start

Quick Start — First API Request

Create your first usable pass in under 5 minutes. Set your API key header, call POST /api/v1/passes with a valid templateId, and deliver the returned passAccessUrl to your end-user.

Step 1: Set Key
export PASSINSTANCE_API_KEY="pi_test_..."
Step 2: Issue Pass

POST /api/v1/passes with templateId and serialNumber

Step 3: Get URL

Extract response.data.passAccessUrl from 201 Created payload

Step 4: Distribute

Deliver URL via SMS/Email; user taps "Add to Apple/Google Wallet"

Resources

Postman Collection — Import & Test API Requests

Import the Passinstance OpenAPI 3.0 specification (/api/docs/openapi.json) directly into Postman, Insomnia, or Bruno to test endpoints, inspect schemas, and generate typed HTTP clients.

Open OpenAPI 3.0 JSON Spec
1. OpenAPI 3.0 Spec URL
https://passinstance.com/api/docs/openapi.json
2. Import into Postman / Bruno

Click Import in Postman, Insomnia, or Bruno and paste /api/docs/openapi.json to load all routes

3. Configure Environment

Set baseUrl = https://api.passinstance.com and PASSINSTANCE_API_KEY = pi_test_...

4. Verify Connectivity

Run GET /api/v1/templates with X-API-Key: to test your workspace

Operations

FAQ — Frequently Asked Questions & Error Handling

Every response uses the standard API response envelope. Fix 4xx before retrying; back off on 5xx and 429 using Retry-After.

200 OK / 201 CreatedSuccess
{
  "success": true,
  "data": { ... },
  "errors": [],
  "statusCode": 200
}
Core Concepts

Architecture & Pass Lifecycle

Pass management follows a 6-stage lifecycle: 1. Template (visual blueprint) → 2. Pass (cryptographically signed record) → 3. Distribution (secure passAccessUrl) → 4. Wallet Registration (device enrolls with APNs / Google Push) → 5. Live Updates (real-time lockscreen notifications) → 6. Scan & Redemption Telemetry (barcode validation & webhook stream).

1. TemplatePOST /api/v1/templates

Master layout, barcode type, branding colors, and schema fields

Platform Guides

Apple Wallet vs. Google Wallet Matrix

Passinstance automatically signs .pkpass bundles for iOS and generates signed JWT objects for Google Wallet. Assets, barcodes, and lockscreen triggers adapt seamlessly across both operating systems.

Apple WalletiOS · .pkpass
Apple Wallet Signing

Cryptographic PKCS#7 signature using Apple Pass Type ID certificate

Google WalletAndroid · JWT
Google Wallet Issuer

Google Cloud Service Account REST JWT payload

Cross-platform parity (single REST call)iOS + Android
Hero / Strip ArtworkApple: 375×123 px (3:1) | Google: 1032×336 px (approx 3:1)
Universal BarcodesQR Code and PDF417 supported natively on both mobile platforms
Core Concepts

Pass Mechanics & Loyalty Solutions Engine

Attach stateful business mechanics to templates across 8 turnkey solutions (Loyalty, Stamp Cards, Coupons, Gift/Prepaid Cards, Event Tickets, Memberships, Employee IDs, VIP Cards). Rules execute atomically on scan or API call.

LOYALTY_PROGRAM

LOYALTY_PROGRAM & Tiers

Points accrual per scan (defaultChangeValue) with automated tier upgrade progression

STAMP_CARD_ADD / STAMP_CARD_DEDUCT

STAMP_CARD_ADD / DEDUCT

Tracks stamp positions (0..maximumValue) with onCap ('noop' | 'reset') and rewardClaimBehavior

PREPAID_CARD

PREPAID_CARD Ledger

ISO 4217 minor-unit prepaid ledger accounting with disallowNegativeBalance enforcement

VALID_ONCE_PER_DAY / RENEW_EXPIRATION

VALID_ONCE_PER_DAY & RENEW

Timezone-aware daily check-in limits and automatic expirationDate extension on scan

Objects & Data Structures

3 objects

Canonical request and response objects for this API domain. Expand any nested object or array property to inspect every field, allowed enum value, and validation constraint.

ApiResponse

Object5 properties

Every standard JSON response is wrapped in this envelope.

Object Properties5 required
successboolean
Required

true when the operation succeeded, false for every error response.

dataobject | array | null
Required

Resource payload. null on errors.

descriptionstring
Required

Human-readable summary of the result.

errorsstring[]
Required

Error messages. Empty array on success.

statusCodenumber
Required

HTTP status code mirrored in the body.

PaginatedApiResponse

Object10 properties

Paginated list endpoints extend the envelope with a pagination block.

Object Properties6 required
successboolean
Required

true when the operation succeeded, false for every error response.

dataobject | array | null
Required

Resource payload. null on errors.

descriptionstring
Required

Human-readable summary of the result.

errorsstring[]
Required

Error messages. Empty array on success.

statusCodenumber
Required

HTTP status code mirrored in the body.

paginationobject
Required

Pagination metadata.

ApiErrorResponse

Object5 properties

Error payload returned on validation, authorization, conflict, and rate-limit failures.

Object Properties5 required
successboolean
Required

Always false on 4xx and 5xx error responses.

Example: false
datanullnullable
Required

Always null on error responses.

Example: null
descriptionstring
Required

Short error summary matching the HTTP status.

Example: Bad Request
errorsstring[]
Required

Array of actionable validation or authorization error messages.

statusCodenumber
Required

HTTP status code (400, 401, 403, 404, 409, 422, 429, 500).

Example: 400