"Growing rapidly over the last few years, and especially through the pandemic, we hired ahead of the revenue required to support the size of the team," Affirm's Chief Executive Max Levchin wrote in a letter to shareholders.

BNPL services, which allow consumers to split purchase payments into installments, exploded in popularity as Americans turned to online shopping during the pandemic.

The sector has lately been under pressure due to rising funding costs and lower consumer spending during soaring inflation.

Affirm's move follows those by several U.S. companies, including Goldman Sachs Group Inc and Alphabet Inc, which are laying off thousands of employees this year amid higher costs and a looming recession.

The company, which was founded in 2012, also said that it would sunset several initiatives such as Affirm Crypto.

San Francisco, California-based Affirm expects to incur about $35 million to $39 million in total restructuring costs.

(Reporting by Nathan Gomes in Bengaluru; Editing by Shailesh Kuber)