Capital One has agreed to buy Brex , a fintech company known for its stablecoin payment system, in a $5.15 billion deal .