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

# XStoreGetUserPurchaseIdResult

> XStoreGetUserPurchaseIdResult

Gets the result of a call to [XStoreGetUserPurchaseIdAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoregetuserpurchaseidasync.md).

## Syntax

```cpp theme={null}
HRESULT XStoreGetUserPurchaseIdResult(  
         XAsyncBlock* async,  
         size_t size,  
         char* result  
)  
```

### Parameters

*async*   \_Inout\_\
Type: [XAsyncBlock\*](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md)

The XAsyncBlock passed to [XStoreGetUserPurchaseIdAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoregetuserpurchaseidasync.md). The [XAsyncBlock](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md) can be used to poll for the call's status and retrieve call results. See [XAsyncBlock](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md) for more information.

*size*   \_In\_\
Type: size\_t

The size of the array passed into **result**.

*result*   \_Out\_writes\_z\_(size)\
Type: char\*

On success contains the retrieved purchase ID.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

This result function allows you to retrieve the execution results of [XStoreGetUserPurchaseIdAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoregetuserpurchaseidasync.md), as well as the purchase ID that was called for if the execution was successful. As such, this function should be called after [XStoreGetUserPurchaseIdAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoregetuserpurchaseidasync.md) has been called, usually in the context of a callback function.

See [XStoreGetUserPurchaseIdAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoregetuserpurchaseidasync.md) for a usage example.

## Requirements

**Header:** XStore.h (included in XGameRuntime.h)

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[XStore](https://docs.xbox.com/reference/system/xstore/xstore_members.md)\
[XStoreGetUserPurchaseIdAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoregetuserpurchaseidasync.md)\
[XStoreGetUSerPurchaseIdResultSize](https://docs.xbox.com/reference/system/xstore/functions/xstoregetuserpurchaseidresultsize.md)


## Related topics

- [XStoreGetUserPurchaseIdResultSize](https://docs.xbox.com/reference/system/xstore/functions/xstoregetuserpurchaseidresultsize.md)
- [XStoreGetUserPurchaseIdAsync](https://docs.xbox.com/reference/system/xstore/functions/xstoregetuserpurchaseidasync.md)
- [XStore (API contents)](https://docs.xbox.com/reference/system/xstore/xstore_members.md)
- [Using C# wrappers for GDK APIs in your Unity project](https://docs.xbox.com/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [Requesting a User Store ID for service-to-service authentication](https://docs.xbox.com/publishing/xstore-commerce/xstore-requesting-userstoreid.md)
