Go live
The checklist
A sandbox never issues a real pass, so going live happens in your organization, not here. Work through this list in your sandbox first, then repeat the last two items against the real organization.
Check your sandbox code
- Your key comes from
PASSBOOK_KEY, never from source or a browser. A key sent with browser headers is refused with403 KEY_IN_BROWSER. - Every create sends an
Idempotency-Key: see issue on purchase. - Every update sends
If-Matchand handles412 VERSION_CONFLICT: see update a pass. - Errors are read by
code, not by message. Retry only what the error entry marks retryable, with backoff, and honourRetry-Afteron429. - Webhook handlers verify the raw body, dedupe on event
idand answer fast: see react to events.
Check what your key can do
curl -X GET "https://passbook.mobile/api/v1/api-keys/me" \ -H "Authorization: Bearer $PASSBOOK_KEY"import { PassBook } from '@passbook/sdk';const pb = new PassBook({ apiKey: process.env.PASSBOOK_KEY ?? '' });const key = await pb.apiKeys.retrieveCurrent();console.log(key.mode, key.scopes);The scopes should be what your code needs and no more.
Rotate a webhook secret
Rotate before you launch and when a secret leaks. For overlapHours (0, 24 or 72, default 24) both secrets sign each request, one v1= each. Deploy the new secret inside that window; a verifier that accepts any matching v1= never drops an event.
Use your sandbox's capture endpoint: get its id first.
{ "eventTypes": ["pass.issued"] }Then rotate. Paste the endpoint id into the path.
{ "overlapHours": 24 }The new secret is shown once.
In your real organization
- Create a Live key with only the scopes you use. See API keys.
- Use your own Apple identity for passes you issue, so they carry your name. This is set in the admin, not the API.
- Make a webhook endpoint with your real URL, and check its first delivery.
Result
GET /api-keys/me on your sandbox shows mode: test. The same call with your Live key shows mode: live, your scopes and your organization.