The below inclusive script will help you quickly generate a QR code so that your phone can scan.
This is no magic here. Apple uses the simple URL to add a gift card to your phone’s wallet. The syntax is below
9999999999999 is the card number
AAAAAAAAAAAA is the PIN