The premise is inverted: Mexico ceded territory to the US; the US paid Mexico—not the reverse.
Following the Mexican-American War (1846-48), the Treaty of Guadalupe Hidalgo transferred:
~1.36 million km² (55% of pre-war Mexican territory).
Gadsden Purchase (1854): US paid $10M more for southern Arizona/New Mexico strip (railroad route).
Mexican perspective: Coerced cession under military occupation; loss of half national territory. US perspective: Manifest Destiny fulfillment, continental expansion.
The territory became the states of California (1850), Nevada (1864), Colorado (1876), and parts of others—core to US Pacific power.