I tried but it says item not found.
The PurchaseItem API is used to purchase Economy V1 items, and the ugc item belongs to Economy V2. You should use PurchaseInventoryItems to purchase ugc item. For more info, please refer to Player Inventory Quickstart - PlayFab | Microsoft Learn.
Is the UGC item published and in an 'Approved' moderation state (only set-able on published UGC items)?
36 People are following this question.