Use this library to generate passes, coupons, event tickets, store cards and generic passes:
(if you have an apple phone the .pkPass file will be automatically opened by your wallet; if you don't install an app that is able to read .pkPass files, such as "Pass2U Wallet", and the app will automatically open these files for you)
All fields are documented and you can read additional documention on the fields and the generated .pkpass package here.
There are specific rules and renderings for each pass type. To understand how the fields will be rendered according to your passType, read the documentation here.