The “SpeedyShop” project was launched by Swiss Federal Railways (SBB), Swiss Post and Migros, Switzerland's largest retailer.
The new service allows a customer while travelling in the train to order and pay for items with a credit card online using a mobile phone, tablet or laptop, SBB announced.
The client can then pick up the order 30 minutes later at the Zurich main station at one of two MyPost24 terminals operated there by Swiss Post.
To access the post box, the customer receives a code by email plus information about which of the terminals the order will be delivered to.
A touch screen allows users to pick up their order by scanning the code and opening the post box.
The service is available for shoppers who are either arriving in the station or departing from it, SBB said.
So it could be used by someone working in Zurich but living outside the city who wants to save time by not having to shop in a supermarket after or before a commute home.
The three partners in the project say it responds in a simple way to the needs of people who want to save time and shop independently of a place and at any hour.
Migros is selling 1,000 of its products online in the pilot project, which is set to run for nine months.
If successful, the service will be introduced elsewhere in the country and SBB is already talking of adding other retailers as partners.