Revenue is the money brought into the organization that comes from sales. In professional services, not having a 100% prepaid contract is fairly common. Conditions, scope, budget, and timing of a project might change, which affects the revenue from the particular client.
Therefore, revenue is what a company thinks it has earned on a project, which might differ from the amount received.
That is why many organizations don't use Cash Accounting (in that case, revenue refers to every payment collected) but Accrual Accounting, in which everything depends on the revenue recognition practice of a company.