Ebay has posted a 13% rise in quarterly revenue, as better-than-expected results from its fast-growing PayPal division helped the online retailer overcome increasing competition from Amazon.com and a well-publicised cyber attack.
Investors had been braced for a tough quarter.
Ebay's stock has fallen more than 8% since April, hurt by the cyber attack disclosed in May that compromised data for some 145 million customers, the departure of highly regarded PayPal chief David Marcus, and intensifying competition from both online and offline rivals.
The auction site was also hurt by a change in Google's algorithm, which pushed Ebay results lower in search rankings, slowing traffic.
That slowdown was seen in June in a measure of transactions across Ebay's core Marketplaces platform, known as gross merchandise value, with the growth rate falling to 7% from around a double-digit pace in previous months.
"We had a challenging first half of the year with several distractions," Bob Swan, the chief financial officer, told analysts on a conference call, noting that the cyber attack and the Google search engine changes "had an immediate and dramatic impact."
Executives said Ebay will spend more on measures to entice users back, including coupons, seller incentives and increased marketing.
Several investment brokerages had downgraded their forecasts ahead of the results.
The second-quarter results and Ebay's revenue outlook were roughly in line with those tempered expectations.
Revenue rose to $4.37 billion for the quarter, compared with $3.88 billion a year ago; Wall Street had forecast revenue of $4.38 billion, on average.
Payment volume leaped a better-than-expected 29%. Gross merchandise value grew 12%, in line with or slightly better than analysts' forecasts.
Going forward, Ebay will have to grapple with stiffening competition across its businesses.
Mr Marcus departed for Facebook's messaging team in June.
The payments service faces a growing challenge from the likes of Amazon, which launched a recurring payments program in June. Google is also expected to delve further into this field.
Brick-and-mortar retailers are investing to boost their online presence. Ebay also has to fend off a growing coterie of fast-growing retail upstarts that focus on specific categories such as home and apparel.
Longer term, industry analysts speculate that Chinese e-commerce giant Alibaba Group Holdings, which is going public this year in what could be the largest-ever tech IPO, is preparing to leverage its US investments into a play for the US retail arena, the world's largest.
Ebay forecast third-quarter revenue of $4.3bn to $4.4bn, compared with expectations for $4.4bn, according to Thomson Reuters IBES.
For the second quarter, it posted non-GAAP earnings per share of 69 cents, a penny better than forecasts for 68 cents.
Shares in Ebay rose slightly to $50.94 after hours, from a close at $50.70 on the Nasdaq.