That event is referenced in Harivamsha Parva of Mahabharata in 3.84 where Kailasha is described:
यत्र लेभे हरिश्चक्रमुपास्य बहुभिर्दिनैः ।
पुष्करैः शतपत्रैश्च नेत्रेण च जगत्पतिम् ॥ 3.84.11
That place where (Kailash) Hari obtained the Chakra by worshiping for several days the Jagatpati (Shiva), by lotus flowers and by his eye.
The detailed story can be found in Linga Purana 1.98. There Lord Vishnu recites Shiva Sahasranama and while offering flowers Lord Shiva makes one flower to disappear, then Lord Vishnu offers his eye (as his eye are like lotus):
In this way, lord Vishnu, reciting a thousand names of Shiva, worshipped the bull bannered lord. Then lord Visnu, bathed lord Siva and adored with him the lotus flowers. In order to test the devotion of Visnu, lord Siva, concealed one of the lotus flowers. With the disappearing of the lotus flower, Visnu thought- “How has it happened?" Finding the disappearing of a lotus, Visnu (who is known as having lotus like eyes) took out one of his eyes and then worshipped lord Siva who is the refuge of all, besides being the preceptor of the universe. He worshipped the lord uttering his last name. (Linga Purana 1.98)