No, the barcode is for retailer use only. Contact Microsoft and give them the card information (typically the barcode number above the barcode and/or the remaining 12 letters).
You should train your dog to "sit and stay" when someone is entering the home. If you are expecting company, walk to the door with your dog when they arrive...