Honestly - don’t.
Beyond the technical challenges, have you considered:
- All the little tax issues for various countries/states
- Security in processing payments, avoiding fraud and protecting customer data
- Integrating payment processing for credit card companies, Payp et al. and NOT having to deal with constant “account freezes” due to stolen credit card payments, customer complaints etc.
For selling software, I user Fastspri and not having to deal with all those things made a huge difference. We still had our fair share of annoying problems, but if you start digging around what other “self-hosted” businesses have to deal with...
In a sense, we had a more complicated case as the product keys were generated upon purchase and sent immediately - hence there was no manual/physical interaction from our end with orders...
You can also put stuff on Amaz and use their infrastructure