Cornelius Vanderbilt doesn't retake control of the Accessory Transit Company, thus William Walker manages to hang on to power in Nicaragua for a few years longer. When the ACW breaks out, Walker petitions for annexation to the CSA, which the Confederate Congress accepts.
The Union doesn't particularly bother with Nicaragua, having more important things to do with the federal army than send it to die of malaria. The USN does blockade Bluefields, however, after CS privateers are found using it as a port of call. This cripples the already weak Nicaraguan economy, and that coupled with Walker's increasingly authoritarian rule leads to a coup in 1862, followed by a hasty peace with Washington....So hasty, in fact, that they didn't have time to change the stationery, and thus historians later realize that the treaty was signed by "Tomas Martinez, Governor of the Confederate State of Nicaragua".
Thus, strictly speaking, the Confederacy won the U.S. Civil War, as the U.S. recognized the independence of a Confederate state.