Skip to main content
POST
Purchase Inventory Items

Authorizations

X-EntityToken
string
header
required

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Body

application/json

Purchase a single item or bundle, paying the associated price.

Purchase a single item or bundle, paying the associated price.

DeleteEmptyStacks
boolean
required

Indicates whether stacks reduced to an amount of 0 during the request should be deleted from the inventory. (Default=false)

Amount
number

The amount to purchase.

CollectionId
string

The id of the entity's collection to perform this action on. (Default="default"). The number of inventory collections is unlimited.

CustomTags
object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

DurationInSeconds
number

The duration to purchase.

Entity
object

The entity to perform this action on.

ETag
string

ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags

IdempotencyId
string

The Idempotency ID for this request. Idempotency IDs can be used to prevent operation replay in the medium term but will be garbage collected eventually.

Item
object

The inventory item the request applies to.

NewStackValues
object

The values to apply to a stack newly created by this request.

PriceAmounts
object[]

The per-item price the item is expected to be purchased at. This must match a value configured in the Catalog or specified Store.

StoreId
string

The id of the Store to purchase the item from.

Response

code
integer

The Http status code. If X-ReportErrorAsSuccess header is set to true, this will report the actual http error code.

status
string

The Http status code as a string.

data
object
Example:
Last modified on October 1, 2026