The invention discloses a method for verifying the authorization code of a terminal decoding library of a POS machine. The method includes firstly, an external tool obtains the unique hardware identification code of the POS machine, encrypts the unique hardware identification code into a 256-byte license file, and The license file is written into the hardware information storage read-only partition. Secondly, when the POS machine is turned on, the system communication module obtains the unique hardware identification code from the hardware information storage read-only partition, and writes the unique hardware identification code into the system hardware identification code registry. And specify the system hardware identification code registry as a read-only attribute, again, the system communication module reads the license file in the hardware information storage read-only partition, writes the license file into the system installation information directory, and writes the system communication module to the system installation information directory The license file below is set to read-only attribute. Finally, start the POS card swiping program, and the card swiping program checks the license file in the system installation information directory and the unique hardware identification code in the system hardware identification code registry.