I tried to do the same thing and realized that like most things that should be simple, convenient, and easy to do - it's not so on my iphone.
I discovered, like most solutions dealing with ios, that I would need to search the interenet/app store and take a chance finding a 3rd party app that MIGHT be able to do what my iphone in 2020 should be able to do 'out of the box'. On my Samsung phone with android, I could use the Samsung Pay app to add ANY type of card with ANY type of barcode I wanted via scanning it or adding it manually.
It's truly shocking what you can't do with iphone/ios... don't get me started with finding out how to format email signatures or add/customize keyboard for actually typing and not sending bloody emojis !