Party City is expanding beyond the strip mall.

The party favors store is the latest to decide that it makes more sense to join Amazon than fight it.

Party City announced Thursday that it will try selling Halloween costumes on the giant online retailer. If it's successful, the company will expand to Christmas and New Year's decorations.

Not everything Party City (PRTY) sells, like its balloons and themed paper plates, will be available on Amazon. But CEO James Harrison says the limited partnership will help his company target millennials.

Related: Party City debuts line of Ramadan decorations

More companies are entering partnerships with Amazon as its power grows.

Sears announced in May that customers can buy tires on Amazon and have them installed in Sears stores. Last year, the two paired to sell Kenmore appliances online. Best Buy and Nike also sell products on Amazon.

In a sort of reverse partnership, Amazon has opened showrooms for Kindle and other electronics at some Kohl's stores. Customers can also return stuff they bought at Amazon at Kohl's.

For Party City, the risk is that customers will start thinking Amazon is the top destination for party supplies — and stop shopping elsewhere.

"Party City needs to tread carefully when partnering with Amazon," said Cooper Smith, who leads Amazon research at the research firm Gartner L2.

Party City's stock was up 3% Thursday.