San Francisco-based ThredUp has stitched together two deals to put its consignment clothing on the racks at two of the nation’s largest department stores.

In separate announcements this week, JCPenney and Macy’s each said they would establish sections in a select number of stores to offer women’s handbags and clothing from ThredUp. Macy’s said its pilot program would involve 40 stores, while JCPenney will establish ThredUp departments in 30 of its stores.

ThredUp has made a name for itself as one of the best-known online outlets for better-quality and premium-brand secondhand clothing. The company allows customers to shop for individual items, as well as order packages of clothing based on preferred styles, brands and sizes. Customers then pay only for the items wish to keep. The company also lets people send in secondhand clothing that it sells on consignment if it meets ThredUp’s quality standards.

JCPenney announced its deal with ThredUp on Thursday. In a statement, Michelle Wlazlo, JCPenney’s executive vice president and chief merchant, said the retailer believes ThredUp will give the retailer an opportunity to reach a new type of customer.

“With the rise of online resale markets, there’s no doubt that demand for great value on quality brands is at an all-time high,” she said. “While there are more secondhand shoppers than ever before, we’ll continue to test and evaluate how this resonates with customers.”

JCPenney made the announcement about ThredUp at the same time it delivered disappointing second-quarter results: JCPenney reported a loss of $48 million and said that sales fell 9.2% from the same period a year ago.

Macy’s also made its partnership with ThredUp public Wednesday; that day, it reported second-quarter results that failed to meet expectations. Macy’s said it earned 28 cents a share, on $5.5 billion in revenue, and cut its earnings outlook for all of 2019.

Macy’s CEO Jeff Gennette said on a conference call that partnering with ThredUp “gives us the opportunity to reach a new customer and keep them coming back to shop an ever-changing selection of styles, and brands, that we don’t typically carry.”

ThredUp didn’t return a request for comment about its new retail deals.