Open Source Pass Converter for Mobile Wallets

Posted by Stephen McDonald, Developer Programs Engineer, and Nick Alteen, Technical Writer, Engineering, Wallet Each of the mobile wallet apps implement their own technical specification for passes that can be saved to the wallet. Pass structure a…


This content originally appeared on Google Developers Blog and was authored by Google Developers

Posted by Stephen McDonald, Developer Programs Engineer, and Nick Alteen, Technical Writer, Engineering, Wallet

Each of the mobile wallet apps implement their own technical specification for passes that can be saved to the wallet. Pass structure and configuration varies by both the wallet application and the specific type of pass, meaning developers have to build and maintain code bases for each platform.

As part of Developer Relations for Google Wallet, our goal is to make life easier for those who want to integrate passes into their mobile or web applications. Today, we're excited to release the open-source Pass Converter project. The Pass Converter lets you take existing passes for one wallet application, convert them, and make them available in your mobile or web application for another wallet platform.

Moving image of Pass Converter successfully converting an external pkpass file to a Google Wallet pass

The Pass Converter launches with support for Google Wallet and Apple Wallet apps, with plans to add support for others in the future. For example, if you build an event ticket pass for one wallet, you can use the converter to automatically create a pass for another wallet. The following list of pass types are supported for their respective platforms:

  • Event tickets
  • Generic passes
  • Loyalty/Store cards
  • Offers/Coupons
  • Flight/Boarding passes
  • Other transit passes

We designed the Pass Converter with flexibility in mind. The following features provide additional customization to your needs.

  • hints.json file can be provided to the Pass Converter to map Google Wallet pass properties to custom properties in other passes.
  • For pass types that require certificate signatures, you can simply generate the pass structure and hand it off to your existing signing process
  • Since images in Google Wallet passes are referenced by URLs, the Pass Converter can host the images itself, store them in Google Cloud Storage, or send them to another image host you manage.

If you want to quickly test converting different passes, the Pass Converter includes a demo mode where you can load a simple webpage to test converting passes. Later, you can run the tool via the command line to convert existing passes you manage. When you’re ready to automate pass conversion, the tool can be run as a web service within your environment.

The following command provides a demo web page on http://localhost:3000 to test converting passes.

node app.js demo

The next command converts passes locally. If the output path is omitted, the Pass Converter will output JSON to the terminal (for PKPass files, this will be the contents of pass.json).

node app.js <pass input path> <pass output path>

Lastly, the following command runs the Pass Converter as a web service. This service accepts POST requests to the root URL (e.g. https://localhost:3000/) with multipart/form-data encoding. The request body should include a single pass file.

node app.js


Ready to get started? Check out the GitHub repository where you can try converting your own passes. We welcome contributions back to the project as well!


This content originally appeared on Google Developers Blog and was authored by Google Developers


Print Share Comment Cite Upload Translate Updates
APA

Google Developers | Sciencx (2022-11-09T17:19:00+00:00) Open Source Pass Converter for Mobile Wallets. Retrieved from https://www.scien.cx/2022/11/09/open-source-pass-converter-for-mobile-wallets/

MLA
" » Open Source Pass Converter for Mobile Wallets." Google Developers | Sciencx - Wednesday November 9, 2022, https://www.scien.cx/2022/11/09/open-source-pass-converter-for-mobile-wallets/
HARVARD
Google Developers | Sciencx Wednesday November 9, 2022 » Open Source Pass Converter for Mobile Wallets., viewed ,<https://www.scien.cx/2022/11/09/open-source-pass-converter-for-mobile-wallets/>
VANCOUVER
Google Developers | Sciencx - » Open Source Pass Converter for Mobile Wallets. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/11/09/open-source-pass-converter-for-mobile-wallets/
CHICAGO
" » Open Source Pass Converter for Mobile Wallets." Google Developers | Sciencx - Accessed . https://www.scien.cx/2022/11/09/open-source-pass-converter-for-mobile-wallets/
IEEE
" » Open Source Pass Converter for Mobile Wallets." Google Developers | Sciencx [Online]. Available: https://www.scien.cx/2022/11/09/open-source-pass-converter-for-mobile-wallets/. [Accessed: ]
rf:citation
» Open Source Pass Converter for Mobile Wallets | Google Developers | Sciencx | https://www.scien.cx/2022/11/09/open-source-pass-converter-for-mobile-wallets/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.