Apple Wallet QR Code Pass API: generate a .pkpass file from your backend
How to create an Apple Wallet QR code pass (.pkpass), ship it to users with an Add to Apple Wallet button, and avoid common pkpass pitfalls.
If you’re searching for an Apple Wallet QR code pass, you usually want a scannable membership card, ticket, or coupon that your users can add to Apple Wallet, without building the entire .pkpass signing pipeline first.
This guide is written for developers who want a pragmatic path: understand the moving parts, then generate a working .pkpass file from a backend or automation.
Apple Wallet QR code pass: what you are actually building
Apple Wallet doesn’t give you a single “Apple Wallet pass API” to create passes on your server.
What you build (or buy) is a system that:
- creates a
pass.jsonpayload - bundles it into a
.pkpasszip - signs it correctly (the part that usually burns time)
- serves it as a downloadable
.pkpassfile so users can tap Add to Apple Wallet
What is a .pkpass file (Apple Wallet pass format)?
A .pkpass file is a signed ZIP bundle that Apple Wallet trusts. At minimum it includes:
pass.jsonmanifest.jsonsignature- images like
icon.png(and sometimeslogo.png)
Apple Wallet pass API options: build it yourself vs use a .pkpass generator API
You have two realistic options:
- Build: you manage Pass Type IDs, certificates, signing, updates, and all the edge cases.
- Buy/Use an API: you send JSON, you get a valid
.pkpassback.
If your goal is “issue QR passes fast”, an Apple Wallet pass generator API is often the fastest route to something shippable.
How to create an Apple Wallet QR code pass (.pkpass) with one API call
This is the minimal request you need for a QR-based pass:
barcodeValue: the string your scanner expects (member ID, ticket token, etc.)barcodeFormat: usuallyQRtitle: the label users will recognize in Wallet
cURL: Apple Wallet pass API example (JSON in, .pkpass out)
curl -X POST https://api.walletwallet.dev/api/pkpass \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ww_live_<your_key>" \
-d '{
"barcodeValue": "MEMBER-12345",
"barcodeFormat": "QR",
"title": "Membership Card"
}' \
-o membership.pkpass
JavaScript: create a .pkpass file with fetch
const res = await fetch('https://api.walletwallet.dev/api/pkpass', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ww_live_<your_key>',
},
body: JSON.stringify({
barcodeValue: 'TICKET-789',
barcodeFormat: 'QR',
title: 'Event Ticket',
}),
});
if (!res.ok) throw new Error(await res.text());
// In Node.js, write Buffer.from(await res.arrayBuffer()) to a .pkpass file.
How to add a .pkpass file to Apple Wallet (Add to Apple Wallet button)
To ship the “Add to Apple Wallet” experience, you typically:
- host the
.pkpassfile behind a normal HTTPS download URL - put that link behind Apple’s official Add to Apple Wallet badge on your web page/email
Test and debug: open a .pkpass file on iPhone and macOS
- On macOS: double-click the
.pkpassfile to preview. - On iPhone: open the link/file in Safari/Mail/Messages and tap Add.
Common issues when you create a pkpass file (signature, images, identifiers)
If you’re building your own .pkpass generator, the most common failure modes are:
- invalid or expired signing certificates
- missing WWDR intermediate cert
pass.jsonidentifiers not matching your Pass Type ID- image size/format issues (
.png, correct dimensions,@2xvariants) - barcode data that works in tests but fails on real scanners
FAQ: Apple Wallet API, pkpass API, Apple Wallet pass generator API
Is there an Apple Wallet API for servers?
Not a single “create pass” endpoint from Apple. In practice, people mean an API that returns a signed .pkpass file.
What is a “pkpass API”?
Usually: JSON in, .pkpass out (plus optional features like images, updates, and templates).
Want a second opinion?
Tell me what you’re building and what constraints you have, and I’ll recommend a sensible path.