An investment arm of insurer Prudential Financial will buy up to $500 million of consumer loans from technology-backed consumer lender Affirm Holdings for a period of three years. Most of the loans come due in six months and Affirm will be able to re-lend the investment throughout the life of the deal, allowing it to finance $3 billion of buy-now-pay-later loans. The deal is part of a growing wave of transactions pairing a handful of large private-credit investors with financial technology companies that are replacing banks as go-to lenders for the American public.