Here's BBC's report;
"The details of the deal are sketchy. Our sources don’t want to be named and their version of events is hard to confirm, but they say the men were high-level Boko Haram bomb-makers, and that they were accompanied by two million euros in cash.
Paying a ransom as well as swapping prisoners was a sticking point that almost unravelled the whole deal, one source tells us. President Buhari has not revealed if a ransom was paid
It should have happened sooner, but the president was hesitating about freeing the five – and especially about the money,” says the person with detailed knowledge of the deal.
Persuading him was “very, very difficult. It was the most difficult part of the whole negotiation. He didn’t want to pay any money.
The ransom was two million euros. Boko Haram asked for euros. They chose the suspects and they gave us the list of girls who would be freed.”Governments rarely admit to paying a ransom, and this claim could not be independently verified."
Reaching that point took a lot of time and there were many setbacks, but trust was gradually built on both sides. The Nigerian army’s surge of military success helped strengthen the government’s hand."