You're not directly asking this, but I'm assuming what you're getting at is when do I owe the taxes upon receiving that pre-payment. This depends on your corporate structure as to how you can realize taxes. If you are DBA, LLC, or S-Corp you pay taxes based on your personal income at the end of the year as all earnings go to the owners because the business can't hold onto those. So if you receive those funds in Dec (assuming Dec is the end of your fiscal year), and you haven't delivered your service it doesn't matter you pay on the pre-payment funds which will really hurt you if you have to spend some of that pre-payment to deliver the service.
If you are a C-Corp you can defer those taxes until you deliver the service as you can mark that revenue for the next year and several years as you deliver the service. What matters is how you declare your C-Corp's accounting practices for reporting your revenue to the IRS. What you want to do is be an accrual model. That will let you pay for things like salaries, COGS, etc before you know how much you made, and only pay taxes on the earnings at the tax rate of the corporation. Of course if you do this you would do this only if you want to keep that money in the corp to conduct business.
You wouldn't want to pay corporate tax then pay personal income tax if you're the owner. So you'd want to pay out any earnings to yourself as a distribution (ie to all owners) or bonus (to individuals) to avoid the double taxation.
Keep in mind I'm not an accountant, tax lawyer, but a guy who has been through exactly what you're asking. Consult professionals as needed because you'll be up your eye balls in contracts to build such a business and you'll need their help anyway.