When a user deletes his or her WhatsApp account, the information of that person is no longer retained on its servers, the company claimed before the Delhi High Court.
Also, no third party can read the messages due to its end-to-end encryption, it told the court.
It said that if the message is undelivered even after 30 days, it is deleted.
Senior advocate Pratibha M Singh, who was appearing for petitioners Karmanya Singh Sareen and Shreya Sethi, opposed the contention, saying WhatsApp was not giving "any choice at all" to the users so that their information is not shared on Facebook.
"They (WhatsApp) should give a full opt-out option to the users from their information being shared with Facebook and they should not be allowed to use the information for any purpose without the consent of the user," she said.
Singh also sought that the information of such users, who completely opt out of WhatsApp, should be deleted from the servers.
"What will happen if a user completely deletes WhatsApp," the bench asked senior advocate Siddharth Luthra, appearing for WhatsApp.
"We are only concerned about the users who will opt out saying they do not want to accept the terms and conditions of the new policy. We do not want to go into other issues," the bench told Luthra.
Responding to this, Luthra said, "No data will be shared if the user opts out. When you (user) will delete WhatsApp account, the undelivered messages will be deleted. We will retain nothing."
The bench said it would pass appropriate order on September 23 on the PIL against the recent WhatsApp decision to share user data with parent company Facebook.
During the hearing, the petitioners told the bench that there was a "stark contrast" in the contentions advanced by WhatsApp as it has claimed that it does not retain messages, but on the other hand, they were saying they can keep messages for a longer period of time to improve performance.
They also opposed WhatsApp's claim that nothing would be shared with Facebook.
In its affidavit filed in the court, WhatsApp has said, "To improve performance and deliver media messages more efficiently, such as when many people are sharing a popular photo or video, WhatsApp may retain that content on its servers for a longer period of time."
Regarding end-to-end encryption, it has said that neither WhatsApp, nor any third party can read the users messages and the only person who can read it is the recipient to whom the message is sent.
"When a user deletes his/her WhatsApp account, his/her undelivered messages are deleted from WhatsApp's servers as well as any of the user's other information. WhatsApp no longer needs to operate and provide the WhatsApp services," the messaging platform has said in its affidavit.
The plea has also sought a direction to prohibit WhatsApp, Facebook Inc and Facebook India Online Pvt Ltd from sharing, in any manner, details and data of every kind of subscribers with any entity including Facebook or its family of companies.