(Reuters) - Western Union Co (>> The Western Union Company), the world's largest money-transfer company, reported a 27 percent decline in quarterly profit after cutting prices and spending more on its online business to compete with more nimble rivals.

Revenue fell 3 percent to $1.38 billion in the second quarter as the company earned less from remittances, by far the largest part of its business.

Western Union has been cutting prices to beat smaller rival MoneyGram International Inc (>> Moneygram International Inc) and investing heavily in its online and mobile business to compete with Boom Financial Inc and Xoom Corp (>> Xoom Corp).

"(The) company has made a series of pricing investments to recapture market share," said Macquarie Research analyst Kevin McVeigh.

Net income fell to $198.6 million, or 36 cents per share, in the quarter ended June 30 from $271.2 million, or 44 cents per share, a year earlier.

Overall remittances worldwide rose 5.3 percent to $401 billion in 2012. Remittance flows are expected to grow at an average annual rate of 8.8 percent to reach about $515 billion in 2015, the World Bank says. (http://link.reuters.com/vuk99t)

Englewood, Colorado-based Western Union's transaction volumes rose 3 percent to more than 60 million in the second quarter, although transaction fees fell 4 percent to $1.01 billion.

Total expenses rose 3 percent to $1.10 billion.

Western Union's shares, which have gained about 16 percent since the company's last quarterly results, closed at $16.98 on the New York Stock Exchange on Monday.

(Reporting by Neha Dimri in Bangalore; Editing by Joyjeet Das and Robin Paxton)

By Neha Dimri