{"id":50397718,"url":"https://github.com/seventwo-studio/expo-passkite","last_synced_at":"2026-05-30T21:31:25.957Z","repository":{"id":356053253,"uuid":"961586087","full_name":"seventwo-studio/expo-passkite","owner":"seventwo-studio","description":"Expo module for generating Apple Wallet and Google Wallet passes from React Native","archived":false,"fork":false,"pushed_at":"2026-05-25T01:01:01.000Z","size":1224,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-25T02:34:40.239Z","etag":null,"topics":["apple-wallet","expo","expo-module","google-wallet","passkit","pkpass","react-native","typescript","wallet"],"latest_commit_sha":null,"homepage":"https://seventwo-studio.github.io/expo-passkite/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seventwo-studio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"lucasilverentand"}},"created_at":"2025-04-06T20:12:58.000Z","updated_at":"2026-05-25T01:00:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/seventwo-studio/expo-passkite","commit_stats":null,"previous_names":["seventwo-studio/expo-passkite"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/seventwo-studio/expo-passkite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seventwo-studio%2Fexpo-passkite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seventwo-studio%2Fexpo-passkite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seventwo-studio%2Fexpo-passkite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seventwo-studio%2Fexpo-passkite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seventwo-studio","download_url":"https://codeload.github.com/seventwo-studio/expo-passkite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seventwo-studio%2Fexpo-passkite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33711018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple-wallet","expo","expo-module","google-wallet","passkit","pkpass","react-native","typescript","wallet"],"created_at":"2026-05-30T21:31:20.888Z","updated_at":"2026-05-30T21:31:25.950Z","avatar_url":"https://github.com/seventwo-studio.png","language":"TypeScript","funding_links":["https://github.com/sponsors/lucasilverentand"],"categories":[],"sub_categories":[],"readme":"# expo-passkite\n\nGenerate Apple Wallet passes (`.pkpass`), add them to iOS Wallet, and save Google Wallet JWTs on Android.\n\n**[Documentation](https://seventwo-studio.github.io/expo-passkite/)** | **[API Reference](https://seventwo-studio.github.io/expo-passkite/reference/api/)** | **[Setup Guide](https://seventwo-studio.github.io/expo-passkite/guides/setup-credentials/)**\n\n## Installation\n\n```bash\nnpx expo install expo-passkite\n```\n\n## Configuration\n\nAdd the config plugin to your `app.json` or `app.config.js`:\n\n```json\n{\n  \"expo\": {\n    \"plugins\": [\n      [\"expo-passkite\", {\n        \"passTypeIdentifiers\": [\"$(TeamIdentifierPrefix)pass.com.example.myapp\"]\n      }]\n    ]\n  }\n}\n```\n\nThen run prebuild:\n\n```bash\nnpx expo prebuild\n```\n\n## Usage\n\nThe package ships two entry points so React Native bundles never pull in Node-only signing code:\n\n| Entry point | Use it for | Runs in |\n| --- | --- | --- |\n| `expo-passkite` | Adding passes to Apple Wallet, querying state, listening to events, types/enums | React Native, web |\n| `expo-passkite/server` | Building, signing, and packaging `.pkpass` files (`Pass`, `PassBuilder`, credential helpers, certificates) | Node, Bun, your backend |\n\nThe server entry depends on `node-forge`, `jszip`, and `node:fs`. Importing it from a React Native runtime will fail — generate passes on a server and ship the resulting `.pkpass` (or its base64 form) to the device.\n\n### Creating a Pass (server)\n\n```typescript\nimport {\n  createPassBuilder,\n  createPass,\n  PassType,\n  BarcodeFormat,\n  PassImageType,\n} from 'expo-passkite/server';\n\n// Build pass data\nconst builder = createPassBuilder()\n  .setIdentifiers({\n    passTypeIdentifier: 'pass.com.example.myapp',\n    serialNumber: 'E5982H-I2',\n    teamIdentifier: 'A93A5CM278',\n  })\n  .setOrganization({\n    organizationName: 'Example Inc.',\n    description: 'Example Store Card',\n    logoText: 'Example',\n  })\n  .setPassType(PassType.StoreCard)\n  .setColors({\n    backgroundColor: 'rgb(206, 140, 53)',\n    foregroundColor: 'rgb(255, 255, 255)',\n  })\n  .addPrimaryField({\n    key: 'balance',\n    label: 'Balance',\n    value: '$50.00',\n  })\n  .addBarcode({\n    format: BarcodeFormat.QR,\n    message: 'https://example.com/card/E5982H-I2',\n    altText: 'E5982H-I2',\n  });\n\nconst { passData, images } = builder.build();\n\n// Create the pass\nconst pass = createPass(passData, images);\n\n// Set signing credentials (required for valid passes)\npass.setSigningCredentials({\n  wwdrCertificate: wwdrCertPem,\n  signerCertificate: signerCertPem,\n  signerKey: signerKeyPem,\n  signerKeyPassphrase: 'password', // if key is encrypted\n});\n\n// Generate .pkpass file\nconst pkpassBuffer = await pass.generate();\n\n// Or generate as base64 for sending to native module\nconst pkpassBase64 = await pass.generateBase64();\n```\n\n### Adding to Wallet\n\n```typescript\nimport {\n  addPassToWallet,\n  canAddPasses,\n  isPassLibraryAvailable,\n  containsPass,\n} from 'expo-passkite';\n\n// Check if wallet is available\nconst available = await isPassLibraryAvailable();\nconst canAdd = await canAddPasses();\n\nif (canAdd) {\n  // Generate pass as base64\n  const passBase64 = await pass.generateBase64();\n\n  // Add to Apple Wallet on iOS\n  const result = await addPassToWallet(passBase64);\n\n  if (result.success) {\n    console.log('Pass added successfully!');\n  } else {\n    console.error('Failed to add pass:', result.error);\n  }\n}\n\n// Check if a specific pass exists\nconst exists = await containsPass('pass.com.example.myapp', 'E5982H-I2');\n```\n\n### Listening to Events\n\n```typescript\nimport { onPassAdded, onPassRemoved } from 'expo-passkite';\n\n// Subscribe to pass added events\nconst addedSubscription = onPassAdded((event) =\u003e {\n  console.log('Pass added:', event.passTypeIdentifier, event.serialNumber);\n});\n\n// Subscribe to pass removed events\nconst removedSubscription = onPassRemoved((event) =\u003e {\n  console.log('Pass removed:', event.passTypeIdentifier, event.serialNumber);\n});\n\n// Clean up\naddedSubscription.remove();\nremovedSubscription.remove();\n```\n\n## Pass Types\n\n- `PassType.BoardingPass` - Airline, train, bus, boat boarding passes\n- `PassType.Coupon` - Coupons and offers\n- `PassType.EventTicket` - Concert, movie, sports event tickets\n- `PassType.StoreCard` - Loyalty and membership cards\n- `PassType.Generic` - General purpose passes\n\n## Signing Passes\n\nTo create valid passes that can be added to Apple Wallet, you need:\n\n1. **Apple Developer Account** with Pass Type ID capability\n2. **Pass Type ID** registered in Apple Developer Portal\n3. **Pass Type ID Certificate** (.p12 or .pem)\n4. **Apple WWDR Certificate** (Worldwide Developer Relations)\n\n### Obtaining Certificates\n\n1. Log in to [Apple Developer Portal](https://developer.apple.com)\n2. Go to Certificates, Identifiers \u0026 Profiles\n3. Create a Pass Type ID under Identifiers\n4. Create a Pass Type ID Certificate under Certificates\n5. Download the WWDR certificate from Apple\n\n### Converting Certificates\n\n```bash\n# Convert .p12 to PEM files\nopenssl pkcs12 -in pass.p12 -out signerCert.pem -clcerts -nokeys\nopenssl pkcs12 -in pass.p12 -out signerKey.pem -nocerts -nodes\n```\n\n## Android / Google Wallet\n\nAndroid cannot add Apple `.pkpass` files directly. Use an explicit Google Wallet JWT API instead:\n\n1. Set up a Google Wallet API account\n2. Create pass classes and objects via the Google Wallet API\n3. Generate a signed JWT token server-side\n4. Pass the JWT to `addGoogleWalletJwt(jwt)` or `addPassToWallet({ type: 'google-wallet', jwt })`\n\n```typescript\nimport { addGoogleWalletJwt, addPassToWallet } from 'expo-passkite';\n\nconst jwt = await fetchGoogleWalletJwt(userId);\n\nawait addGoogleWalletJwt(jwt);\n\n// Or use the discriminated wallet payload:\nawait addPassToWallet({ type: 'google-wallet', jwt });\n```\n\nSee [Google Wallet API documentation](https://developers.google.com/wallet) for details.\n\n## Documentation\n\nFor complete documentation, visit **[seventwo-studio.github.io/expo-passkite](https://seventwo-studio.github.io/expo-passkite/)**\n\n- [Getting Started](https://seventwo-studio.github.io/expo-passkite/getting-started/introduction/)\n- [Setup Credentials](https://seventwo-studio.github.io/expo-passkite/guides/setup-credentials/)\n- [Creating Passes](https://seventwo-studio.github.io/expo-passkite/guides/creating-passes/)\n- [Pass Types](https://seventwo-studio.github.io/expo-passkite/guides/pass-types/)\n- [Wallet Integration](https://seventwo-studio.github.io/expo-passkite/guides/wallet-integration/)\n- [API Reference](https://seventwo-studio.github.io/expo-passkite/reference/api/)\n- [TypeScript Types](https://seventwo-studio.github.io/expo-passkite/reference/types/)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseventwo-studio%2Fexpo-passkite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseventwo-studio%2Fexpo-passkite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseventwo-studio%2Fexpo-passkite/lists"}