Square Inc., a digital payments company, announced it had agreed to purchase Afterpay, which offers merchants a “buy now and pay later” option. The all-stock deal is valued at around $29 billion.

Square allows merchants to accept credit card transactions via devices that can be connected to smartphones or tablets. According to the company, Afterpay will be integrated into its services by the San Francisco-based company. This will allow merchants to provide customers with an option to pay later on without having to use a credit card. Afterpay customers will be able manage their installment payments in Square’s cash app.

Square CEO Jack Dorsey stated in a statement that Afterpay and Square have a common purpose.

Square’s cash app is used by more than 70 million people. Afterpay served more than 16,000,000 users and almost 100,000 merchants as of June 30, according to the company.

Retailers love installment plans because they encourage customers spend more. Installment plans allow customers who have insufficient credit or funds to purchase an item to leave a store with it. The payments are made over multiple installments and are free of interest, unless the customer is late. In that case, additional fees or interest might be charged.

In a joint press release, the companies stated that Afterpay was deeply committed to helping consumers spend responsibly and not incurring service charges for those who pay on-time.

Square announced that it had agreed to purchase all shares of the Australian company. Afterpay shareholders will receive 0.375 shares Square Class A common stock per share, which is 31% more than the closing price on Friday.

The transaction is expected close by early 2022.