J.K. Rowling will donate royalties from her latest novel after winning a legal battle against a man, woman, and firm who revealed her pseudonym.

According to AceShowBiz Rowling will donate royalties from The Cuckoo's Calling, the novel she published under pen name Robert Galbraith, for three years after July 14, 2013. Her pen name was revealed to public on that date by Chris Gossage, a partner at Russells Solicitors, and his friend, Judith Callegari.

Gossage, Callegari and Russells Solicitors apologized to Rowling and the firm agreed to pay the author's legal costs. It also agreed to make a payment, by way of damages, to The Soldiers' Charity, formerly known as the Army Benevolent Fund. BBC reported that Rowlings had "always intended" to give the charity "a donation out of Robert's royalties" but "had not anticipated him making the bestseller list a mere three months after publication."

The Cuckoo’s Calling is a crime novel about a soldier turned private investigator who looks into the murder of a model. According to LATimes Rowling said, "This donation is being made to The Soldiers' Charity partly as a thank you to the Army people who helped me with research, but also because writing a hero who is a veteran has given me an even greater appreciation and understanding of exactly how much this charity does for ex-servicemen and their families, and how much that support is needed.”

Image courtesy Tumblr