Assign programmatically created order to anonymous user I want to create a pre-made order in Drupal Commerce for an anonymous user, and redirect the user to the checkout.

My use-case is that I have two sites: One big Drupal Commerce site (up and running since 2011), and another site that sells a few very specific products. The second site is not a Drupal site.

Ideally I want users on the second site to be able to select a few products, click "checkout" and be redirected to the checkout page on the Drupal site, with an order that contains the products that he/she selected on site two.

Now, selecting products etc. won't be an issue (second site has access to all product data via Services API), but I have no idea how to create the order for the anonymous user in Drupal and make it belong to him/her.

I read this blog entry which could've been of use (send user to page that creates the order and then redirects user to checkout) but apparently that doesn't work for anonymous users.

Any help would be greatly appreciated!
I think you may be thinking about this incorrectly. If I were you, I'd write a custom module that created a new path designed to create a shopping cart for whoever lands on it with the requested products. You can include a token or something in the URL to ensure each one only gets processed once, and you can redirect to /cart or some other route after the order is created to try to reduce duplicate carts.

This means on the secondary site you're just storing in a cookie or the session the product IDs that you'll then use to construct the cart when you pass them to the Drupal site via query parameters or something like that. It isn't really possible to create a remote session for someone and then force assign the session ID to them when they land on your site afaik.