All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
Some scholars underlined that it is disliked to do so. The Maaliki scholar Al-Qaadhi ‘Ulaysh was asked, "What is the ruling on the action of people in some countries where the husband and the bride's Wali (legal guardian) agree on a dowry of forty Riyals, for instance, but announce before people that it is one thousand? Is this permissible? What should they do in case of a future dispute? Is the husband obliged to pay the amount agreed upon secretly or that which was announced before the people?"
He answered, "This is disliked because it leads to future dispute. In case of a dispute, the husband is bound by the dowry specified in the secret agreement if he brings forth evidence that the announced amount is not true. Upon that, the wife's claim of canceling the secret agreement has no weight..."
Hence, if you agreed to this action, then you are obliged only to abide by the dowry agreed upon in secret.
Allah knows best.