> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Passcreator plugin

> Passcreator is a wallet pass platform for Apple Wallet and Google Wallet. This plugin creates and updates passes from templates with personalised properties, delivers passes by email, pushes notifications to pass holders, reads pass statistics, copies templates, moves passes between templates (API v2), and manages webhook subscriptions whose deliveries carry verifiable ECDSA signatures.

Use **Passcreator** through Corsair: one client, typed API calls, and incoming webhooks.

Authenticate with the API key from the Passcreator app (Account > API); the plugin sends it as the raw value of the Authorization header, without a Bearer prefix, exactly as the API expects. Pass identifiers accept the pass UID, the barcode value or a user-provided ID.
Pass properties are keyed by the template's property names or property IDs; call templates.fields to list what a template expects before creating or updating passes. Marking a pass voided is done with passes.update and the voided flag. API v3 (query language, bulk operations), pass bundles and the validate-passes endpoints are documented by Passcreator but not part of this plugin.
Webhook subscriptions are managed through the API (webhooks.subscribe). Deliveries carry a `signedData` string and a hex ECDSA `signature` over it; verify them with the PEM public key from webhooks.getPublicKey (store it with keys.set\_webhook\_signature or set it as the plugin's webhookSecret). That key is the same for every Passcreator account, so webhooks.subscribe also adds a `corsair_token` query parameter to the target URL, derived from the account's API key; the handler refuses deliveries whose URL lacks this account's token. Create subscriptions through webhooks.subscribe (not the Passcreator dashboard), and create them again after rotating the API key.
Every operation is described in the official docs: [https://developer.passcreator.com/en](https://developer.passcreator.com/en)

**What you get:**

* 21 typed API operations
* 1 incoming webhook event types

## Setup

**1. Install**

```bash npm theme={null}
npm install corsair @corsair-dev/passcreator better-sqlite3
npm install --save-dev @types/better-sqlite3
```

```bash yarn theme={null}
yarn add corsair @corsair-dev/passcreator better-sqlite3
yarn add --dev @types/better-sqlite3
```

```bash pnpm theme={null}
pnpm install corsair @corsair-dev/passcreator better-sqlite3
pnpm install --save-dev @types/better-sqlite3
```

```bash bun theme={null}
bun add corsair @corsair-dev/passcreator better-sqlite3
bun add --dev @types/better-sqlite3
```

**2. Add the plugin**

```ts corsair.ts theme={null}
import Database from 'better-sqlite3';
import { createCorsair } from 'corsair';
import { passcreator } from '@corsair-dev/passcreator';

export const corsair = createCorsair({
	plugins: [
		passcreator(),
	],
	database: new Database('corsair.db'),
	kek: process.env.CORSAIR_KEK!,
	multiTenancy: true,
	hub: {
		projectApiKey: process.env.CORSAIR_API_KEY!,
		signingSecret: process.env.CORSAIR_SIGNING_SECRET!,
	},
});
```

With `multiTenancy: true`, scope calls with `corsair.withTenant(id)`. See [Quick start](https://docs.corsair.dev/quick-start.md) for KEK + Hub keys, and [Multi-tenancy](https://docs.corsair.dev/concepts/multi-tenancy.md) for account isolation.

**3. Choose authentication**

> [tab] API Key (Recommended)
>
> Store the Passcreator API key before the first call: `pnpm corsair setup --plugin=passcreator --tenant=acme api_key=<your-key>` (leave out `--tenant` without `multiTenancy`), or pass it as `key` in the plugin options. With Hub, each tenant enters their own key on the connect page. See [API key auth](https://docs.corsair.dev/concepts/api-key).
>
> ```ts theme={null}
> passcreator()
> ```
>
> More: [API Key](https://docs.corsair.dev/concepts/api-key)

**4. Connect a tenant**

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see [Connect / OAuth](https://docs.corsair.dev/management/connect).

```ts theme={null}
const { connectUrl } = await corsair.manage.connect.createLink({
	plugin: 'passcreator',
	tenantId: 'acme',
});
// redirect the user's browser to connectUrl
```

## Example API calls

**Read a pass**

```ts theme={null}
const tenant = corsair.withTenant('acme');
await tenant.passcreator.api.passes.get({ passUid: '54b4d891-4454-435d-b07f-308d01b187d3' });
```

**Create a pass from a template**

```ts theme={null}
const tenant = corsair.withTenant('acme');
await tenant.passcreator.api.passes.create({
	passtemplate: '6d03a4a9-cf92-4e36-80b4-a8994546e2f',
	properties: { firstname: 'John' },
});
```

See the full list on the [API](https://docs.corsair.dev/plugins/passcreator/api.md) page.

## Webhooks

This plugin registers **1** webhook event type. Configure the provider to POST to your Corsair HTTP handler, then use `webhookHooks` on the plugin factory.

See [Webhooks](https://docs.corsair.dev/plugins/passcreator/webhooks.md) for every event path and payload shape, and [Webhooks concept](https://docs.corsair.dev/concepts/webhooks.md) for routing.

## What's next

> [card] [API reference](https://docs.corsair.dev/plugins/passcreator/api.md)
>
> Every `passcreator.api.*` operation with input and output types.

> [card] [Webhooks](https://docs.corsair.dev/plugins/passcreator/webhooks.md)
>
> Event paths, payloads, and `webhookHooks` examples.

> [card] [Connect / OAuth](https://docs.corsair.dev/management/connect)
>
> createLink, Hub delivery, and tenant connect flows.

> [card] [Use with agents](https://docs.corsair.dev/mcp-adapters/mcp-adapters)
>
> Expose this plugin's operations as MCP tools.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.