how to say It's a deal When you make an agreement with someone, how do you say, both formally and informally, "it's a deal."?

Like, formally "Do you agree to the contract?" "Yes. It's a deal."

Informally, "I'll make you food if you teach me Chinese." "Fine. It's a deal!"

Thanks
Oops, just remembered.

一言为定。 Yī yán wéi dìng