One fundamental problem with implementing payments is that F-Droid is designed from the grounds up to be anonymous. It doesn’t actively try to be anonymous by, for example, connecting through Tor by default, but it does eschew having accounts, analytics or even any sort of unique identifiers.
Would it be possible to add it? Certainly, open source code can be modified in every conceivable way. Would it be an ideal starting point? No, because of what I said. Would it be easy? No, because especially if payments are involved (which means the possibility of fraud, in either direction, has to be considered), adding secure user accounts together with a payment system is a major undertaking.
Not to mention the payment system wouldn’t be a standalone thing, but would have to be integrated with one of (but most likely several) various actual payment systems: in other words you’d need code to talk to PayPal and code to talk to Bitcoin and code to talk to Steam… and/or whatever payment system you want to support in the real world.