In neither case will you need to pay anything at the time of the visit by the technician to your home. The inspection fee will be charged to your supply company so it can include it on your next gas bill.
You can find our inspection fees in the attached files. As you can see, the cost of the inspection is regulated and controlled by each regional government of Spain. If you opt for an installation company, you will need to agree the cost with them.