I checked the history of medieval battles between Italian communes, becouse i thought that if common soldiers were ever ransomed it could have happened in Italy, since there are testimony of not so fierce fighting, in certain conditions.
However I considered "common soldiers" only the footsoldiers and not the non-nobles who were still rich enough to have the same equipment of the nobleman.
Anyway every time the footsoldiers of the losing side are mentioned in the accounts, cited by the book "rapine, assedi e battaglie" of Aldo A. Settima (that talks about many aspects of medieval battles and even the life of the soldiers, so I considered it appropriate to check out for this question) is always to say how many were killed during their retreat.
The only case I found were maybe (since is not that clear) some footsoldiers were captured and ransomed and not killed is the battle of Palosco in 1156 between the communes of Bergamo and Brescia. It is told that Bergamo only had footsoldiers and at the end of the battle about 100 of the few who kept fighting and did not flee were captured. It does not say anything about their ransom but I think it is likely that they were ransomed by their municipality, since the only reason to have prisoners during that time and in the context of Italian communes was to earn thanks to their ransom.
So we could say that, at least between Italian communes it almost never happened and we could have a doubt just fot that battle. I don't have decent books about medieval battles in the rest of Europe, so maybe you will find that aonere else footsoldiers were ransomed, but I consider it very unlikely because in a context like a reign a foot soldiers is even less valuable than a footsoldier that is a citizen of a small commune.