EBay has beaten second-quarter earnings estimates as the e-commerce company's focus on selling luxury products tempered the hit from a slowdown in consumer spending and weakness in some European markets.

The company forecast a fall in current-quarter revenue but the figure still came in above Wall Street targets.

It maintained annual sales estimates at $9.6 billion to $9.9 billion.

US retailers from Walmart to Target had warned of a downturn in discretionary purchases as inflation-hit Americans save their dollars for gas, food and other essentials.

But a rise in spending by enthusiasts on high-value collectibles, runners and watches helped eBay.

"We are seeing significant outperformance in focus categories globally," eBay's chief executive Jamie Iannone said in a post-earnings conference call.

A string of consumer companies from spirits group Diageo to Birkin bag maker Hermes have also reported cashing in on their most expensive products and expect to continue to do so.

For the current quarter, eBay forecast revenue between $2.29 billion and $2.37 billion, compared with analysts' estimates of $2.30 billion, according to Refinitiv IBES.

However, the company lowered its full-year guidance for gross merchandise value (GMV) to between $72.7 billion and $74.7 billion, from $73.2 billion to $75.2 billion earlier.

GMV, a key industry gauge, is the total value of goods sold on the marketplace.

In the reporting quarter, eBay said its revenue declined 9% to $2.42 billion, but beat estimates of $2.37 billion.

Excluding items, the company earned 99 cents per share, higher than expectations of 89 cents.