I need to add a cash discount for a payment method (called "Vorkasse" in German - advance payment is the word in English I guess). The total cart value (excluding shipping costs) should have a discount of 2%.
I found this already here: how to add fee to order totals in magento2
But it is a fixed rate for all payment methods...