そうなの? is used when you don't know the fact.
So it's like "Oh really??''
Or under certain situation, that means the same as そうなんだ.
It depends that you ppu"?'' or not.
And そうなんだ is used when you know the fact.
So it's like "Oh I see.''
I hope this would help you!!