Accepting credit card payments?

Okay so my question is so you sign a contract that says that you will do a haram action (riba) after you are late on the deadline. I understand that this is haram. BUT for someone in eccomerce wouldnt they have to decline the credit card payments, because it is helping someone in doing haram. And how would you know if its a credit card payment. You wouldn’t but there are still ways that you can decline credit cards, however it would result in bad bussiness. So would it be haram for a merchant to accept credit cards?