I see, so this is specifically you have a physical, eg, loyalty card that has a barcode, and you want to use the Apple Wallet?
but on apple wallet u can't create your own a pass from a simple scan. creatign the ".pkpass" need a signature from a apple developer account.