I'm not a student of history, so please forgive me if this question has an obvious answer. I'm aware that many countries fought to be free from the empire that owned them. Are there any examples of countries/territories simply buying their freedom instead, with minimal or no military activity?
This may not be directly what you're looking for, but Nepal reached an accommodation with the British Empire that allowed it to basically maintain independence. In exchange for contributing a certain amount of Gorkha soldiers to the British military every year (a practice that continues to this day) and giving deference to Britain in some areas of foreign policy, Nepal maintained control over its domestic affairs (and some foreign matters as well). This was a result of several battles between the nascent Nepali empire and, first, the British East India Company, and later the British empire itself. No side was able to clearly defeat the other, though the British came out ahead on balance, capturing some lands held by Nepal at the time. The ceding of control of India from the East India Company to the British Crown caused considerable consternation in Nepal and induced the Nepali state to seek terms. An added incentive was the Rana takeover of Nepal several years prior (the Rana family, while keeping the emperor as a token figurehead, established a hereditary rule by killing off their rivals in the Game of Thrones-esque Kot Massacre). The Ranas pragmatically used British support to bolster their own domestic control, and occasionally were able to play the British off the Tibetans and Chinese when they wanted space for foreign policy initiatives.
So this isn't quite a "Nepal bought independence with cash from Britain" so much as "Nepal negotiated a contract for maintaining independence with Britain." It's kinda interesting still, as most countries facing a colonial empire weren't so fortunate.
Sources:
East India Company, British, COLUMBIA ELECTRONIC ENCYCLOPEDIA, 6th Edition 1. Academic Search Premier, EBSCOhost (2013)
Nepal, ENCYCLOPAEDIA BRITANNICA ONLINE ACADEMIC EDITION (MAR. 23, 2014), http://www.britannica.com/EBchecked/topic/409152/Nepal
Rajeev Ranjan Chaturvedy, & David M. Malone, A Yam between Two Boulders: Nepal’s Foreign Policy Caught between India and China, in NEPAL IN TRANSITION: FROM PEOPLE’S WAR TO FRAGILE PEACE 287, 288 (Sebastian von Einsiedel, David M. Malone, & Suman Pradhan, eds., 2012)
Well, there was the slave revolution of Haiti... When the Haitian people revolted and won their independence , the French sued them for lost profits and those poor people had to pay restitution well into the late 20th century. That's one of the reasons why Haiti is in such a poor state now (that and the brutal Duvalier dictatorships - father and son). Not directly as you asked, but related I guess. One of the horrible injustices of colonialism of history.
Edit: source http://en.m.wikipedia.org/wiki/Haitian_Revolution