God gave Peter supernatural knowledge (1 Cor 12:8) of what Ananias had done. They sold the possession and gave only a portion while implying that they had sacrificially given it all. It could’ve been their plan to give all but they changed their mind. They came expecting praise and recognition for his spectacular gift, but were rebuked instead. In the rebuke, however, Peter gave them a chance to repent.