Purchase Item
NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for version 2. Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, as well as what the client believes the price to be. This lets the server fail the purchase if the price has changed.
Error codes
This operation may return the following PlayFab errors:
| Error | Code |
|---|---|
| CharacterNotFound | 1135 |
| InsufficientFunds | 1059 |
| InvalidVirtualCurrency | 1051 |
| ItemNotFound | 1047 |
| OperationNotSupportedForPlatform | 1219 |
| ProductDisabledForTitle | 1609 |
| StoreNotFound | 1221 |
| WrongPrice | 1053 |
| WrongVirtualCurrency | 1052 |
Authorizations
This API requires a client session ticket, available from any Client Login function.
Body
Please note that the processing time for inventory grants and purchases increases fractionally the more items are in the inventory, and the more items are in the grant/purchase operation (with each item in a bundle being a distinct add).
Please note that the processing time for inventory grants and purchases increases fractionally the more items are in the inventory, and the more items are in the grant/purchase operation (with each item in a bundle being a distinct add).
Unique identifier of the item to purchase.
Price the client expects to pay for the item (in case a new catalog or store was uploaded, with new prices).
Virtual currency to use to purchase the item.
Catalog version for the items to be purchased (defaults to most recent version.
Unique PlayFab assigned ID for a specific character owned by a user
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
Store to buy this item through. If not set, prices default to those in the catalog.
