... "the "fine" is typically whatever amount you can produce."

In the US the word bribe has such a negative connotation. In poorer nations they don't see it as corruption or usurious. Police and other officials are not well paid. 'Fines', 'donations' and 'user fees' are how these people live. The deal is they, these officials, are given a position and a nominal salary. They are expected to carry out the majority of the concerns of the office but to also make what they will of the leverage the office gives. Generally the law, and the way the law is handled, is that as long as the 'fees' are not excessive, usually judged on a sliding scale, with Yankees being assumed to be rich, they are free to extract value from their office.

Local police are often seen as doing their jobs if the local crimes are kept to a dull roar. And not all crimes are equal. Local punks, high spirited and enterprising youths, stealing anything not bolted down and shaking down people for the content of their wallets is seen as relatively harmless. Within certain limits.

Punks know not to hassle people with connections to the local community. Also to avoid the main streets of the tourist areas. And to limit any violence to a roughing people up.

In one case the break-ins to hotel rooms, rental cars, pickpocketing and muggings were a regular event. Usually it happens away from the main tourist areas and to people who were drunk or stupid. But it could happen to anyone. Generally the police would document the crime and only the stupidest criminals ever charged. Things changed when a punk stabbed someone during a robbery. Suddenly the local police were very effective. The perpetrator was found, confessed, evidently with a little help, and apologies and goods returned.

Shaking the tourists down is OK as long as it is done discreetly and they stay within the norms of behavior. Stabbing them crossed the line. This was clearly bad for business. The correction was swift and sure.

Note that the standard is a sliding scale. Remote areas with desperately deep poverty and boom/bust, sex trade and drug economies are still dangerous. You can be kidnapped, maimed or killed. Ironically extremely remote areas with pastoral and agricultural economies can be much safer than cities and tourist areas.

What I'm relating here is that crime here is seen as outside society. Over there certain types and levels of crime are seen as business as usual, part of the local ecosystem. Street thugs are essentially businessmen. They have a symbiotic relationship with the police and everyone works in the local industry, usually tourism, seen as extracting money from rich tourists without causing so much trauma that the tourists stop coming.

A policeman can't live on his pay. He sees his job as performing a service keeping the worse of crime, particularly violent crime, under control. He sees rich tourist as the primary beneficiaries of his efforts. So he considers it entirely right that the tourists should pay a user fee for his efforts to keep them relatively safe, if not entirely unmolested.

It pays to have many pockets and to have many small wads of money. Memorize what you have where. A five and five ones folded flat with a rubber band is a handy packet. This arrangement allows you to extract a 'donation' without exposing more than what you want to give.

Attitude also counts. Smile. Play the game. Be complimentary. If pulled for a traffic infraction you might comment that many, lesser, policeman might have missed the infraction. Comment on how official and respectable he looks in his uniform. Treat him with respect and acknowledge his authority without cloying. You need to be firm without challenging him.

Remember that he likely doesn't see this as a bribe or anything wrong. You are traveling in his territory. An area he works hard to make relatively safe for you. But for his efforts the local thugs might slit your throat and take everything you have. Donating to him is a small price to pay for his services.