The order API contains no reference to a license ID, and conversely the license API contains no reference to an order ID. This makes it impossible to programmatically link a license to its corresponding order, or vise versa.
I fact, I'm not sure if this is even possible to do manually via the creator dashboard.
In cases where a user has only purchased a single copy of a product it's possible to deduce the order:license link by enumerating all orders and all licenses and filtering to that customer ID, but this workaround doesn't scale well to stores with large numbers of orders.
