[Solved] [IAP] [Network] Purchasing for multiple clients question

Hi All!
I am currently working on dedicated server (using Unity Networking), where all purchases will be handled (using Unity IAP: ) ). And when I initiate purchase I want to supply connection ID of current “client”. Question is… how do I do it?
I tried using payload input variable in InitiatePurchase method, but I can’t find any reference, or way to get it back in ProcessPurchase method. Maybe there is some other way I can hold on connection ID through IAP process?? Or I should go with linking connection IDs to user profile in Apple Store/Google Play Services and send them to my server?

Hi @Paradisss ,

Can you please elaborate on what you are trying to accomplish? After a player has made an in app purchase, are you trying to record the connection id with the purchase made on your server? Are you trying to manage in app purchases from your server host or on the connected client devices?

Hi @mpinol ,

I want to somehow associate concrete buyer with purchase. When client makes purchase attempt - I send request to the server which then goes through all phases of purchasing (full Unity IAP process), then I want to send data with purchase details to client. I am trying to manage app purchases from server.

Or am I going in wrong direction?
Should I try to just send request to server, and then just ask server if current client has some updates on their account?
OR
Make purchases on client device and just send receipts to server for validation, and after validation give player items (consumables/non-consumables/etc.)?

Hey @Paradisss ,

I believe your second suggestion would be the better approach. To first make the purchases on the client device and then send something like the product purchased along with the receipt for validation to determine which items to give to players.