Is it amount of health or the % of building process?
I mean if you build it to 90% and cancel then you will have 10% of resoures back, am i right?
This applies to all buildings, but they all start with 100% health. It's not like other games where the amount of health you have is dependent on how much of the building process is done. So even if you cancel it at 90%, you will get 100% of your resources back if it was at 100% health. Just look at the health bar of the building(that's building

) to see how much HP it has.
The only thing that matters in the building process is how much damage it took and how much of its health decreased; which determines the amount of resources you get back proportionate to that when cancelling.