Except for what has been public about the agreement, the exact motivations and bargaining involved will likely remain secret.
I don't think China had to "offer" anything beyond mediation and a capacity to punish any shirking by either party through lessened trade.
Here's Carnegie's view of it:
Iran
President Ebrahim Raisi’s February 2023 visit to China appeared to have paved the way for the trilateral announcement. During talks with Chinese leader Xi Jinping, “constructive ideas for the region were discussed & now they bear fruit,” Mohammad Jamshidi, Raisi’s deputy chief of staff for political affairs, tweeted on March 10. Amid rising tensions with Western powers, Raisi and Xi had pledged to strengthen security and economic cooperation. Raisi was the first Iranian leader to make a formal state visit to Beijing in more than 20 years.
The agreement also may yield some domestic reprieve. The Islamic Republic and the Gulf kingdom affirmed their respect for the “sovereignty of states” and “non-interference in internal affairs.” Saudi Arabia reportedly committed to pushing for less disparaging coverage of Iran by Iran International, a Persian-language satellite news channel, officials from both countries told The Wall Street Journal. For years, Tehran has accused Saudi Arabia of fomenting unrest through the channel. Iran International has maintained that it is independent, although Saudi businesspeople and individuals linked to the royal court have reportedly funded it.
The agreement was also a welcome economic boost, at least in the short term. By March 2023, the rial had lost about half of its value against the U.S. dollar since nationwide protests broke out in September 2022 after the death of Mahsa Amini in police detention. Within two days of the announcement on rapprochement, the rial surged 12 percent against the dollar. By March 12, one dollar was trading for 438,000 rials on the open market.
And Saudi's:
Saudi Arabia needs to wind-down its military intervention in Yemen, stop attacks from Iran-backed Houthis, protect its border and investment climate, focus on a positive agenda — like its Vision 2030 — and engage Iran through dialogue and de-escalation instead of following the same old path of tension and conflict.
Now, Foreign Policy also has a paywalled article that I've read that adds another motivation, for Iran. From memory:
Iran sees a historic opportunity in the context of the war in Ukraine to join an anti-US alliance. Its supreme religious leader Khamenei is a true believer in opposing the West at every opportunity. By supporting Putin and getting closer to China he is moving Iran in that direction.
So, basically both parties had good reasons to de-escalate and semi-normalize relations and are likely to benefit from it. China had the clout to mediate, cajole and punish shirkers, but it did not really need to bribe.