question

rusildo avatar image
rusildo asked

Problem with two events 'player_vc_item_purchased' and 'player_inventory_item_added'

player_vc_item_purchased - not triggered. After purchase I see only 3 events: 'player_started_purchase', 'player_paid_for_purchase' and 'player_virtual_currency_balance_changed'. How can I catch 'player_vc_item_purchased' event?

player_inventory_item_added - called only once for stackable items.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

What API calls are you using? The player_vc_item_purchased event is always generated (along with player_virtual_currency_balance_changed) when you purchase an item from the game catalog using the Client/PurchaseItem API call.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rusildo avatar image rusildo commented ·

>What API calls are you using?
StartPurchase -> PayForPurchase -> ConfirmPurchase

0 Likes 0 ·
brendan avatar image brendan rusildo commented ·

That would be the problem, then. You'll want to use PurchaseItem for VC purchases, if you want to get the player_vc_item_purchased event, as that's the code path that generates it. We have a backlog item to add that event to the StartPurchase flow as well, but that's not currently available.

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.