Square Inc., the digital-payments platform led by Twitter Inc. founder Jack Dorsey, has agreed to buy Australian buy-now, pay-later company Afterpay Ltd. for $29 billion in its largest-ever acquisition.

The all-stock offer values Afterpay shares at A$126.21 each, 31% higher than Friday’s closing price of A$96.66, the companies said in a statement. Still, that’s less than Afterpay’s February high of A$158.47. The stock jumped as much as 29% to A$125 in Sydney trading Monday.

Square said the buy-now, pay-later concept represents a chance to capitalize on a shift away from traditional credit, especially among younger consumers. The plan is for Square to integrate Afterpay into both its consumer Cash App, and its Seller product for small businesses, Chief Financial Officer Amrita Ahuja said in an interview.

“It’s very different from the traditional consumer-financing business model,” Ahuja said, describing “buy now, pay later” as an “alternative” to traditional credit. “Since our founding days we have seen it as a key priority for our customers, whether merchants or consumers, to get fast access to funds,” she added, but declined to say whether Square would offer other traditional finance options, like a credit card.

Afterpay lets consumers purchase items on credit and pay later with a series of installments. It’s particularly popular with younger consumers — who may not have a credit card — to buy clothes, beauty products and homewares. There are no fees or interest on the loan as long as people pay on time, according to Afterpay’s website.

The deal should also help boost Cash App’s total user base by adding Afterpay’s 16 million users to Cash App’s existing user base of 70 million annual users, Ahuja said.

Larger competitors have pushed into the market recently, adding to the challenges for Afterpay and its peers. Apple Inc. is teaming up with Goldman Sachs Group Inc. on a buy now, pay later service that would be tied with Apple Pay, Bloomberg News reported in July. Afterpay shares fell 10% the day following the report.

Afterpay shareholders may reject the proposed Square offer, Bloomberg Intelligence analysts Matt Ingram and Regan Burrows wrote. They pointed out the offer is below the stock’s peak earlier this year and its growth is much faster than the U.S. company.

Under the proposed agreement, Afterpay co-founders and co-CEOs Anthony Eisen and Nick Molnar would join Square and help lead Afterpay’s merchant and consumer businesses as part of Square’s Seller and Cash App division.

The acquisition would be easily the biggest deal for an Australian company, eclipsing the $16.6 billion a group of pension funds last month bid for Sydney Airport, only to have the offer rejected as too low.

Square recently launched its banking operations, including checking and savings accounts for small businesses, and offers loans. The addition of Afterpay also gives the digital payments company a chance to expand into consumer lending, which it doesn’t currently offer.

“Square and Afterpay have a shared purpose,” Dorsey said in the statement. “We built our business to make the financial system more fair, accessible, and inclusive, and Afterpay has built a trusted brand aligned with those principles.”

Square also reported second-quarter gross profit of $1.14 billion, up 91% year-over-year. Gross payment volume, or the total amount of payments processed on Square’s platform, increased 88% to $42.8 billion, the company said in a statement. Analysts, on average, projected $36.8 billion, according to data compiled by Bloomberg. Square had been scheduled to release earnings Thursday.

Total revenue, including Bitcoin, was $4.68 billion. Bitcoin revenue alone was $2.72 billion, below the $3.4 billion estimate by analysts. Square said Bitcoin revenue declined because of “relative stability in the price of Bitcoin, which affected trading activity compared to prior quarters.”

Afterpay was founded in 2015 and now has more than 1,300 employees globally, according to Molnar. The board of Melbourne-based Afterpay unanimously recommended shareholders accept the deal, which the company said is expected to close in the first quarter of 2022.