Mobile payment processor Square delivered strong sales for the second quarter, but it is also preparing its investors for future declines as Starbucks leaves the Square family for another payment processor.

Square’s net loss for the quarter was $27 million, or 8 cents a diluted share, an improvement over last year’s loss of $30 million, or 20 cents a diluted share. The Capital IQ estimate was for a loss of 12 cents a share in the second quarter. The stock is up more than 8 percent, to $11.31, in after-hours trading.

Total net revenue, including Starbucks, increased 41 percent, to $439 million; without Starbucks, revenue increased 54 percent, to $171 million. The Starbucks agreement was set to expire in the third quarter, but Square is negotiating with the company to extend that expiration, as its transition is taking longer than planned.

Gross payment volumes for the second quarter were $12.5 billion, an increase of 42 percent year-over-year. Square said that new seller growth made up a majority of its GPV increase

Square has also extended 34,000 business loans, totaling $189 million, for an increase of 123 percent year-over-year and 23 percent sequentially. Square has connections to millions of sellers as a pool for potential loan customers. It then sells most of those loans to a third party for a fee and an ongoing servicing fee.

The company launched several new products during the second quarter, including Scheduled Invoices, Recurring Invoices and Card on File, allowing a seller to retain a buyer’s card on file for future purchases.

Looking ahead, Square is projecting net revenue for the year in the range of $1.63 billion to $1.67 billion. The company warned that revenue growth will decline as Starbucks transitions to a new payment processor.

The projections for the third quarter are in the range of $410 million to $420 million, but removing Starbucks brings that down to a range of $167 million to $171 million. Square also pointed out that historically the third quarter tends to deliver only a modest sequential improvement over the second quarter