If a developer owns multiple mobile applications, website applications, public accounts (including Mini Program), and WeChat Stores, the UnionID can be used to identify unique users. This is because for any mobile application, website application, public account (including Mini Program), or WeChat Store under the same WeChat Open Platform account, the user's UnionID remains consistent.
In other words, for the same user across different applications under the same WeChat Open Platform, the UnionID will be the same.
Ways to Obtain UnionID
For WeChat Mini Programs linked to a developer account, the UnionID will be returned simultaneously with openid when calling APIs that support it. Currently available for order details retrieval and after-sales order retrieval.
Process of Binding a WeChat Mini Program to the WeChat Open Platform
Log in to WeChat Open Platform — Management Center — WeChat Mini Program — Bind Mini Program