question

edwardbarbu avatar image
edwardbarbu asked

Strange EconomyV2 PurchaseInventoryItemsAsync error

Hello,

I'm trying to call EconomyV2 PurchaseInventoryItemsAsync. X-EntityToken header key is filled in correctly, authentication is working, ruled that out as a problem (I think) The request is below. The server replies with http error 400 Error: Item cannot be purchased. No Description. What is the issue? (Id's XXX-ed out below, they are correct, I quadruple-checked them).

Thank you!

 {
     "Amount": 1,
     "AuthenticationContext": null,
     "CollectionId": null,
     "CustomTags": null,
     "DeleteEmptyStacks": true,
     "DurationInSeconds": null,
     "Entity": {
         "Id": "1XXXXX25733",
         "Type": "title_player_account"
     },
     "ETag": null,
     "IdempotencyId": null,
     "Item": {
         "AlternateId": null,
         "Id": "09XXXXXX-XXXX-XXXX-XXXX-XXXXac117",
         "StackId": ""
     },
     "NewStackValues": null,
     "PriceAmounts": [
         {
             "Amount": 1,
             "ItemId": "09XXXXXX-XXXX-XXXX-XXXX-XXXXac117",
             "StackId": null
         }
     ],
     "StoreId": "bf36XXXX-XXXX-XXXX-XXXX-XXXX26233"
 }
apisIn-Game EconomyPlayer Inventory
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.

edwardbarbu avatar image edwardbarbu commented ·

Small Addendum: I also checked the store setup, the item is indeed in the store with the given id in the request. Below images of the store setup and the item that is in the store https://imgur.com/a/6YtBHF0

0 Likes 0 ·
edwardbarbu avatar image edwardbarbu commented ·

Please delete this, it's not relevant

0 Likes 0 ·

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

According to the image you attach, the price for the item “TestItem Title” is not set properly. The “Price 1” doesn’t contain a valid value, it should be like the image below. Are you creating this store with API? If so, please give us the request so we can have a look.

5947-image.png


image.png (17.0 KiB)
1 comment
10 |1200

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

edwardbarbu avatar image edwardbarbu commented ·

that was indeed the issue, thank you. Store was manually created, I just didn't fully configure the price correctly like you pointed out

0 Likes 0 ·

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.