Having done it on occassion, you do not need to clear customs, but it must be at a propper international airport - that is international at the time you arrive!
So for example, flying from Canada to Iceland with a tech stop in Greenland, you don't go land side clear customs, clear back out and go. You just stay airside and pay your bill.
IO540 had the experience of trying to tech stop in an airport that is customs by PN and was refused landing due to lack of customs (even though it was only a tech stop).