The correct answer is: A. who is the beneficiary under the contract can sue.

A third party beneficiary is a person who is not a party to a contract but who is intended to benefit from the contract. Under the Indian Contract Act, a third party beneficiary can sue to enforce a contract if the contract expressly states that the third party is intended to be a beneficiary, or if the contract is for the benefit of the third party and the third party has given consideration for the contract.

Option B is incorrect because a third party who is not a beneficiary under the contract cannot sue to enforce the contract.

Option C is incorrect because a third party who is a beneficiary under the contract can sue to enforce the contract even if the consideration has not proceeded from the third party.

Option D is incorrect because a third party who is a beneficiary under the contract can sue to enforce the contract, even if there is no privity of contract between the third party and the parties to the contract.

The Indian Contract Act does not recognize the doctrine of privity of contract, which means that a third party who is not a party to a contract can sue to enforce the contract if the third party is a beneficiary under the contract.