> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFInventoryPurchaseInventoryItemsAsync

> Purchase an item or bundle. Up to 10,000 stacks of items can be added to a single inventory collection. Stack size is uncapped.

Purchase an item or bundle. Up to 10,000 stacks of items can be added to a single inventory collection. Stack size is uncapped.

## Syntax

```cpp theme={null}
HRESULT PFInventoryPurchaseInventoryItemsAsync(  
    PFEntityHandle entityHandle,  
    const PFInventoryPurchaseInventoryItemsRequest* request,  
    XAsyncBlock* async  
)  
```

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle to use for authentication.

**`request`**   [PFInventoryPurchaseInventoryItemsRequest\*](/services/playfab/api-references/c/pfinventorytypes/structs/pfinventorypurchaseinventoryitemsrequest)

Populated request object.

**`async`**   XAsyncBlock\*<br />*Inout*

XAsyncBlock for the async operation.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

This API is available on all platforms. Purchase a single item or bundle, paying the associated price. When the asynchronous task is complete, call [PFInventoryPurchaseInventoryItemsGetResultSize](/services/playfab/api-references/c/pfinventory/functions/pfinventorypurchaseinventoryitemsgetresultsize) and [PFInventoryPurchaseInventoryItemsGetResult](/services/playfab/api-references/c/pfinventory/functions/pfinventorypurchaseinventoryitemsgetresult) to get the result.

## Requirements

**Header:** PFInventory.h

## See also

[PFInventory members](/services/playfab/api-references/c/pfinventory/pfinventory_members)


## Related topics

- [PFInventoryPurchaseInventoryItemsGetResult](/services/playfab/api-references/c/pfinventory/functions/pfinventorypurchaseinventoryitemsgetresult.md)
- [Services C API overview - PFInventory.h](/services/playfab/api-references/c/pfinventory/pfinventory_members.md)
- [PFInventoryPurchaseInventoryItemsRequest](/services/playfab/api-references/c/pfinventorytypes/structs/pfinventorypurchaseinventoryitemsrequest.md)
- [PFInventoryPurchaseInventoryItemsResponse](/services/playfab/api-references/c/pfinventorytypes/structs/pfinventorypurchaseinventoryitemsresponse.md)
- [PFInventoryPurchaseInventoryItemsOperation](/services/playfab/api-references/c/pfinventorytypes/structs/pfinventorypurchaseinventoryitemsoperation.md)
