It's Tuesday morning, and a QA engineer we'll call Dana opens Wallet on her personal iPhone. Between her boarding pass and her coffee card sits a concert ticket for "Test Event 47, Row ZZ, Seat 999." It carries your logo. It was issued in March by your staging server. It will sit there until she deletes it, and so will the 300 others like it on phones across the company.
Nothing has broken yet. But that ticket is signed with the same certificate as every real ticket you have ever sold, and the private key behind it lives on a staging box, three laptops and a CI runner.
This post explains why Wallet passes are so easy to test badly, what "burning" a production certificate looks like, and two ways to keep testing out of production: a second Pass Type ID you run yourself, or a test mode that keeps your certificate out of the loop entirely.
Apple gives you no sandbox for passes
If you have built push notifications for an iOS app, you are used to two worlds. Development builds talk to the APNs sandbox. Production builds talk to production. Wallet passes have no such split, and nothing in the tooling warns you.
A signed pass is a real pass. There is no test key in pass.json and no flag in the signature. Wallet checks that the manifest hashes match and that the signature chains back to Apple. If both hold, the pass installs and behaves exactly like one you sold. Wallet has no idea which of your servers made it.
Pass updates skip the sandbox. In July 2024, an Apple DTS engineer told a developer on the Apple Developer Forums that a push notification for a pass update works only in the production environment, and that the sandbox will not deliver notifications of this type. So even your staging server's pushes travel through production APNs, to real devices.
The pass remembers where it came from. Every pass you sign bakes in a webServiceURL and an authenticationToken. Once a device installs it, that device keeps calling the URL it was given, whether or not that server still exists or still knows the serial number.
Put those together and the only isolation you get is the isolation you build. Which certificate signs, which Pass Type ID it belongs to, and which web service the pass points at: those three decisions are your whole test environment.
Three ways a production certificate gets burned
"Burning" a certificate rarely means one dramatic mistake. It usually means testing slowly spreads the certificate and its passes into places they were never meant to go.
Copies. The quickest way to get a staging server signing passes is to copy the production .p12 onto it. Then a second developer needs it locally. Then CI needs it for an integration test. Each copy is another place for the key to leak. Apple's certificate support page is blunt about what happens next: if your certificate is revoked, your passes will no longer function properly. That means every live pass under that Pass Type ID, and not only the test ones. Our guide to storing a signing certificate safely covers where the key should live instead.
Ghost passes. A test pass signed under your real Pass Type ID looks identical to a customer's pass. You can't recall it. You can only update or void it while your web service still recognises it. When staging's database is reset, those devices keep registering and asking for updates with serial numbers nobody knows. If the pass pointed at your production web service, that noise lands in your production logs.
Crossed wires. This one is quieter and worse. A common shortcut is to restore a production database snapshot into staging so testers have realistic data. That snapshot can include real device push tokens. Staging then edits a pass, fires an update through production APNs, and a real customer's ticket changes to whatever QA typed. We haven't seen a public post-mortem on this, but the mechanics leave nothing to stop it.
A code review of your pass generator won't catch any of these, because the generator is fine. The trouble is where it runs and which key it holds.
The do-it-yourself fix: a second Pass Type ID
If you run your own signing, the clean answer is a separate identity for everything that isn't production. Register a second Pass Type ID in your Apple Developer account, something like pass.com.acme.tickets.staging, and create its own certificate.
Then make staging passes impossible to mistake for real ones:
- Their own identifier. A device treats a different Pass Type ID as a different pass, so a staging ticket can never overwrite or impersonate a live one.
- Their own web service. Point
webServiceURLat a staging host, so registrations and update requests from test devices never touch production. - A visible label. Append
[STAGING]toorganizationNameand use a background colour no real pass uses. Dana should know at a glance what she's holding. - No production push tokens. Strip device registrations from any snapshot you restore into staging.
The config that picks between them is small. The useful part is the guard at the bottom, which refuses to boot if a non-production environment is about to sign with production credentials:
type PassEnv = "production" | "staging"
interface SigningConfig {
passTypeIdentifier: string
certificateSecret: string
webServiceURL: string
organizationName: string
}
const configs: Record<PassEnv, SigningConfig> = {
production: {
passTypeIdentifier: "pass.com.acme.tickets",
certificateSecret: "wallet/prod/pass-cert",
webServiceURL: "https://passes.acme.com/wallet",
organizationName: "Acme Tickets",
},
staging: {
passTypeIdentifier: "pass.com.acme.tickets.staging",
certificateSecret: "wallet/staging/pass-cert",
webServiceURL: "https://passes.staging.acme.com/wallet",
organizationName: "Acme Tickets [STAGING]",
},
}
const env: PassEnv = process.env.PASS_ENV === "production" ? "production" : "staging"
export const signing = configs[env]
if (env !== "production" && signing.passTypeIdentifier === configs.production.passTypeIdentifier) {
throw new Error("Refusing to sign non-production passes with the production Pass Type ID")
}Note the default. An unset PASS_ENV falls back to staging, so a forgotten variable costs you a watermarked pass rather than a real one.
It's a sound setup. The price is a second certificate to renew every year, a second set of secrets to store and rotate, and a second web service to keep running. And it only covers Apple. Google brings its own version of the problem.
Google already has a sandbox, and it bites the other way
Google Wallet is the opposite of Apple here. It has a built-in sandbox, and the sandbox is strict enough to confuse people.
Every new Google Wallet issuer account starts in demo mode. According to Google's publishing access documentation, a demo-mode issuer can only issue passes to Google accounts that hold the Admin or Developer role on that issuer, or that were added as test accounts in the Google Pay & Wallet Console. Those passes carry a "[TEST ONLY]" annotation until Google approves publishing access.
So the failure mode flips. On Apple, the risk is that a test pass works too well and lands somewhere real. On Google, the usual report is that a test pass doesn't work at all. A colleague taps the save link, Google shows an error, and someone spends an afternoon debugging a JWT that was fine. The pass is valid. Their account just isn't on the tester list.
Getting out of demo mode takes a review. You complete a business profile in the console, then request publishing access, and the Google Wallet team reviews the account and emails you when it's approved. Our post on moving from demo mode to publishing access walks through what that review looks at.
Once your issuer is approved, you face Apple's problem again. Passes from a publishing issuer save for anyone, so test passes from it are real passes. Approval converts the issuer you had, so if you want a sandbox after launch, one option is a second issuer account that stays in demo mode and keeps the "[TEST ONLY]" label working for you.
How Passmint splits test and live
Passmint builds the separation into the API key, so there is no environment flag for you to forget.
The key prefix is the mode. A key beginning pmk_test_ always works in test mode. A key beginning pmk_live_ always works in live mode. There's no request parameter or account switch to get wrong. Your code is identical in both environments, and only the secret changes:
import { Passmint } from "@passmint/node"
// pmk_test_… in development and CI, pmk_live_… in production only
const passmint = new Passmint({
apiKey: process.env.PASSMINT_API_KEY!,
})
const pass = await passmint.passes.create({
templateId: "tmpl_xxx",
holderEmail: "dana@example.com",
holderName: "Dana Test",
fieldValues: { seatNumber: "ZZ-999" },
})Test passes never touch your certificate. In test mode, Passmint signs Apple passes with its own shared certificate and Google passes through a shared test issuer. Your .p12 only has to exist where live passes are made. You can still install a test pass on a real iPhone and push updates to it, so the whole flow gets rehearsed without your credentials leaving production.
Test passes are labelled. Every test pass shows [TEST] on the organization name. Dana's ticket would announce itself the moment she opened Wallet.
The data doesn't mix. A test key can't read, update or void a live pass, and a live key can't see test passes. A test pass also can't be promoted to live. When you're ready, you issue again with a live key.
Testing is free but not unlimited. Test passes never count toward your plan's active-pass limit or appear on an invoice. They are throttled per hour, so a runaway loop in CI gets a 429 instead of quietly filling storage.
The same Google rule from the previous section still applies to the shared test issuer. A colleague who can't save a test-mode Google pass needs to be added as a tester, and the pass is fine.
What test and live still share
Passes are split cleanly. Three other things cross the line.
Templates are shared. A template's design is the same object in test and live. If you edit a template while testing, live passes issued from it afterwards get the edit too. That's deliberate, because you want to test the real design. But it means template changes deserve the same care as a deploy. Passmint's MCP server enforces this for AI assistants: on a test key, an assistant can create templates but is refused when it tries to edit or archive one.
Webhook endpoints receive both modes. You register an endpoint once, and it gets events for test and live passes alike. Every event carries a livemode boolean, and your handler should check it before it writes anything that matters:
const event = passmint.webhooks.constructEvent(
rawBody,
request.headers["passmint-signature"]!,
process.env.PASSMINT_WEBHOOK_SECRET!,
)
if (!event.livemode) {
// Test traffic: log it, but never touch production records
return new Response(null, { status: 200 })
}Return a 200 for test events rather than an error, or the delivery will be retried. The webhooks docs cover signatures and the retry schedule.
Going live needs your own credentials. Live Apple passes must be signed with a certificate your organization owns, because Apple's terms tie each pass to the brand issuing it. If a template has no certificate connected, live Apple issuance is skipped and the response says so. Live Google passes need your own connected issuer in the same way. Live API keys also need a paid plan, though you can issue live passes from the dashboard on any plan. Our signing certificate guide covers getting the Apple side set up.
Keep testing boring
Wallet passes give you no help separating testing from production. Apple has no sandbox for passes, and Google's sandbox only covers you until your issuer goes live. Whatever wall stands between Dana's phone and your customers' tickets, you have to put it there.
The point of that wall is that switching to live becomes boring. Before you swap the key, check four things:
- Your live key lives only in production secrets, never in
.env.example, CI or a laptop. - Your Apple certificate and Google issuer are connected, and a single live pass installs on a real iPhone and a real Android phone.
- Your webhook handler branches on
livemode, and you've watched it ignore a test event. - Nobody plans to edit a template mid-launch without knowing that live passes will follow.
You can build that wall yourself, with a second Pass Type ID, a second web service and a guard in your config. Or you can let the key decide. Passmint's test keys sign with a shared certificate, label every pass and keep test data out of live, so your production certificate never has to leave production. Start with a test key in the quickstart and you'll have a watermarked pass on your phone in a few minutes.
Primary sources
Common questions
Technical content writer, Passmint
Julio is a technical content writer at Passmint. He writes about Apple PassKit, the Google Wallet API, and what breaks when wallet passes meet production traffic.
More from Julio Song →