It's not unethical at all and it's actually something that is very common. Why would you be concerned about the ethics of it? You're getting some money to build something they want and they're presumably getting some sort of discount, favorable licensing terms, etc...
To your earlier comment - I also don't think you should be worried about other possible customers being concerned about a "financial investment" from your initial customers. They ARE NOT partners - they're paying for a product just like any other customer. Instead, they're getting a discount for taking on a risk.