British Airways said on Thursday that it is investigating a customer data breach on its website and mobile app.

Around 380,000 card payments were compromised by the breach, the airline told CNBC.

The breach occurred from Aug. 21 to Sept. 5 and is now resolved, according to the airline. British Airways said that the stolen data did not include travel or passport details.

While the airline said it is in contact with affected customers, it also advised anyone who thinks they may have been affected to "contact their banks or credit card providers and follow their recommended advice."

"We are deeply sorry for the disruption that this criminal activity has caused. We take the protection of our customers' data very seriously," said CEO Alex Cruz.

The airline said it had notified the police about the breach and "will provide further updates when appropriate."

— CNBC's Leslie Josephs contributed to this report.