Starbucks addicts, rejoice. Soon, you may be able to get your iced skinny mocha delivered to your front door or office desk.

Starbucks is announcing today that it is introducing two pilot tests in the second half of this year to deliver its food, coffee and other beverages. One test, which will be based in Seattle, will allow customers to order and pay for delivery through the Starbucks mobile app in a partnership with Postmates, a delivery startup that uses a network of contract delivery people to ferry goods from stores to people’s homes or offices. There will be a flat delivery fee whether the order is for one item or 10, though Starbucks is not yet disclosing the price.

The second test, taking place in the Empire State Building in Manhattan, will consist of a Starbucks employee bringing an order from a Starbucks location in the building up to a customer’s office. This test, dubbed Green Apron, will also include a yet-to-be-disclosed delivery fee. Both pilots are being announced today at the company’s annual shareholder meeting in Seattle.

Starbucks customers have long asked for delivery, but the time for testing is now right — thanks in part to the success of Starbucks’ mobile app and to early success with a new pickup ordering feature in the app, Chief Digital Officer Adam Brotman told Re/code in an interview at the company’s Seattle headquarters on Tuesday. Starbucks is open to the possibility that both types of delivery programs may work long-term.

“The truth is we’re not sure exactly how it will play out,” Brotman said. “Is one the national approach and one for dense urban environments only? We are truly in learning mode right now but we’re excited about them both.”

For Postmates, its first giant delivery partnership is a big coup, but a risky one. While Postmates couriers have previously delivered Starbucks orders without Starbucks cooperating, the startup now has expectations from Starbucks CEO Howard Schultz, Brotman and company that things will go right. The Postmates network is traditionally busiest during lunch and dinner times, when it delivers meals from local eateries to customers, so it should be able to accommodate the Starbucks onslaught during the morning and early afternoon coffee rush hours, CEO Bastian Lehmann said. But can it keep hot coffee hot on arrival?

“Speed is the number one thing,” Lehmann told Re/code in a phone interview. “We’re actually working with Starbucks on trying to figure out what the best delivery containers are. Is there a packaging that we can develop together? Is there a cup that’s a better to-go cup?”

The other way Starbucks has recently tried to make patronizing Starbucks easier for customers is by introducing an order-ahead feature to its mobile app. The feature lets customers place an order — and pay — for any Starbucks food or beverage from their mobile app and then pick it up at a nearby store a few minutes later. The company announced that it has expanded the rollout of this feature to all Starbucks stores in the Pacific Northwest. All company-owned Starbucks stores in the U.S. will accept mobile order-ahead orders by the end of the year, Brotman said.

The order-ahead capability is also being rolled out in Canada by the end of the year and will be piloted in the United Kingdom. Right now, it is only available in the Starbucks iPhone app, but it will arrive in the Android app within a few months, Brotman said.

Both the delivery feature and pickup feature are built on Starbucks’ previous success in mobile payments that is far and away the most impressive right now of any U.S. retailer. Brotman will announce today that the percentage of total Starbucks transactions made in stores through the company’s mobile app has now reached 18 percent.

Why is this number important? Starbucks customers who pay with the Starbucks app are members of its loyalty program and they spend three times as much as non-loyalty member customers do, Brotman said.