This is an expression used in my country and many Spanish-speaking countries in Central America and the Caribbean.
It means to surrender, to ask for a truce, or to ask for somebody’s mercy. The chronicler Gonzalo Fernández de Oviedo in its General and natural history of the Indies (Book 42, Chapter XI) writes that a cacique was beating some young men.
They wanted to prove that they were strong and ready for war. After this ritual, the cacique offered them cacao beans to recognize their value.
The historian Eduardo Pérez Valle claims that the expression comes from this ancient tradition.
Do you ask for cocoa beans after a long day at work?