That question seems to be the crux of the play. Like the question regarding whether Portia cheats in the casket scheme to prompt Bassanio to choose the right casket by playing a song rhyming with "lead," this question centers on what justice is.
In a strict sense, justice would meet out reward and punishment according to one's due. Because Shylock gives audiences reason to sympathize with his humanity, it is harder to argue that he deserves having to make a Christian who stole his daughter his heir and to convert to a faith he doesn't respect. Did he go too far in asking for a pound of flesh? Yes, almost certainly. Did he have reason to plot against Antonio after years of indignity and scorn and then the merciless taunting Antonio's friends deliver? Probably. But these are hard matters to weigh in the scales of strict justice.
However, according to Portia's logic, justice alone is not sufficient. She argues for mercy which she claims is
It blesseth him that gives and him that takes
(The entire section contains 2 answers and 550 words.)