I've seen several designs like this, but they all required either too large or too weak of a magnet. This one prints roughly the same size as an actual push pin.
Uses (1x) 6x3mm neodymium magnet.
I picked up 100 of them for around $12
For best results, print with the magnet cavity facing up.
I've printed a fair number of these now- some hold the magnets very securely on their own, while others will require a small drop of super glue.