Whilst I can understand what people are saying that killing a king following a request from an heir, in battle, means that you have in theory achieved your objective, I think the OP just needs to consider the actual task itself, as opposed to saying that it is a bug.

What is your objective here. To kill the requested target, receive the reward, for as little damage to your faction as possible

Why is the heir asking you to kill the king, why doesnt he just launch his own civil war (even tho I dont think this is possible in the game). The obvious answer other than just a game issue, is that if he openly opposed the king then due to the population either supporting the king or the rebels then maybe half the kingdom could be lost for quite a while.

So instead of openly rebelling, the heir asks you to take rid of the King instead. Now I would imagine that the heir would therefore not then expect you to go on the rampage in a bid to solve his problem, as that would stir up the population against yourself, and also once the mission is achieved, how could the heir/new king then make peace with the faction that just killed the old king. If that happened then it would be obvious that the new king had been part of the plot and again the population would be in uproar.

The other point made is if the king attacks you and you kill him, then why shouldnt you get the reward. The only thing I can consider here, is that in those circumstances, you wouldnt actually be doing anything special to kill the king, its just one of those day to day battles against another faction, and hence why should you get paid for it.

Therefore he would expect you to use some discretion and hence use the assasin. If the assasin fails then obviously you take the consequences, however if he succeeds then you get the reward and no one other than the actual plotters knows who is involved.

I'm sure that CA when they introduced this option never considered that using warfare as opposed to deviousness to achieve the objective, and hence the reason that they didnt state in black and white that the mission is to be accomplished by an assasin