US payment processing giant Vantiv has agreed to merge with Worldpay in a deal which values its UK rival at £9.3bn ($12.1bn; 10.3bn euros).
It comes after the firms announced an initial agreement last month.
Vantiv shareholders will own a majority 57% of the combined group, while Worldpay investors hold the other 43%.
"The combination of scale and presence the merger will bring is an exciting step in the creation of a truly global leader in payments," said Worldpay.
Worldpay processes millions of payments a day in stores, online and on mobile phones.
It operates worldwide, but with strength in the UK and US markets.
Vantiv is largely focused on the US, helping merchants, banks and credit unions accept card payments, as well as gift cards and online payments.
The combined company's global and corporate headquarters will be in Cincinnati, Ohio, and London will become its "international headquarters".
Vantiv will pay 397p for each share in Worldpay, or £8bn, plus £1.3bn to cover debts.
The combined company will be led by Charles Drucker as executive chairman and joint chief executive.
Reporting to Mr Drucker will be Philip Jansen as co-chief executive and Stephanie Ferris as chief finance officer.
Additional members of the new executive team will be announced at a later date.
The UK company's chairman Sir Michael Rake and his counterpart at Vantiv, Jeffrey Stiefler, will remain on the board as non-executive directors.
The board will consist of four Worldpay and seven Vantiv directors.