The Old Bailey, London, heard that Brooks, then editor of the Sun and known as Rebekah Wade, was asked for her opinion on paying a member of the Armed Forces for the story.
Less than 10 minutes after she was sent an email by a Sun news editor saying the military contact who was offering the picture wanted £4000, she responded by saying "OK", the jury heard.
It led to a page seven exclusive in The Sun in September 2006 with a mocked-up picture of the prince wearing a green swimsuit and Hawaiian-style flowers. The article also said his girlfriend Kate Middleton dressed in a wetsuit.
The court heard that a payment dated June 16, 2006 and headed "Prince William wearing a bikini exclusive" for the amount of £4000, to be collected by the wife of the member of the Armed Forces, was made at a Thomas Cook branch in Slough, Berkshire.
The Sun reporter who was working on the story told his superior in the email later forwarded to Brooks that the picture had come via his "best contact at Sandhurst".
Brooks, 45, of Churchill, Oxfordshire, denies two counts of conspiring with others to commit misconduct in public office linked to the alleged inappropriate payments to public officials.