An old movie, “The Mouse That Roared”, was about that. A fictitious tiny European country was broke after WWII. They declared war on USA and made a small attack. An immediate surrender put them on the losing side and demanded money to rebuild their country after the war.