In British English this would be called a 'Collecting Tin' As per Collins Dictionary:
a tin for donations of money for charity or another particular purpose
He found a coin in his pocket and slipped it into her collecting tin, helping himself to a scarlet poppy.
You will note that it covers collections being made for non-charitable purposes as well as charitable.
Additionally, the terminology can still be used even if the collecting tin is plastic, as a google image search for 'collecting tin' demonstrates.
However, someone 'busking', playing their guitar or other instrument on the street for money would be unlikely to use a tin. Traditionally they would use an upturned hat, but many musicians will leave their instrument case open for donations or have a small box or plastic bucket so that people can drop money in as they pass rather than having to push it through a slot. Such a box or bucket might still be metaphorically referred to as a 'hat', as in the phrase 'put out the hat'.