In a post on the social network Truth Social, Mr. Trump wrote: Israel has accepted my terms. It is time for Hamas to accept, he warned, warning that Hamas would face unpredictable consequences if it did not accept.
This is my last warning, there will be no more one, President Trump said.
In a statement afterwards, Hamas said it had received some ideas from the US through intermediaries to reach a ceasefire in Gaza.
The Iran-backed force said it was discussing with intermediaries how to develop those ideas, but did not provide specific details.
Hamas also reiterated its readiness to negotiate to release all hostages in exchange for a "clear statement of an end to the war" and a complete withdrawal of Israeli forces from Gaza.

In response to Hamas' request to comment on the statement, Mr. Trump said that "there will be an agreement on Gaza very soon", but did not provide any further details related.
In an interview before returning to Washington D.C from New York, the US leader declared that all hostages would be returned, whether they were alive or dead. "I think we will get them all back," Trump said.
Previously, on September 6, a source familiar with the matter revealed that the US side had also made a new ceasefire proposal to Hamas and Israel.
Under the deal, Hamas will release all 48 remaining hostages on the first day of the ceasefire in exchange for thousands of Palestinian prisoners being held in Israel and negotiate a ceasefire in the land.
Meanwhile, an Israeli official said Israel was "seriously considering" Mr Trump's proposal but did not specify the details.