> ## 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.

# XStoreGetUserPurchaseIdResult

> XStoreGetUserPurchaseIdResult

# XStoreGetUserPurchaseIdResult

Gets the result of a call to [XStoreGetUserPurchaseIdAsync](/reference/system/xstore/functions/xstoregetuserpurchaseidasync).

## Syntax

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

### Parameters

*async*   \_Inout\_\
Type: [XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

The XAsyncBlock passed to [XStoreGetUserPurchaseIdAsync](/reference/system/xstore/functions/xstoregetuserpurchaseidasync). The [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) can be used to poll for the call's status and retrieve call results. See [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) 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](/reference/system/xstore/functions/xstoregetuserpurchaseidasync), as well as the purchase ID that was called for if the execution was successful. As such, this function should be called after [XStoreGetUserPurchaseIdAsync](/reference/system/xstore/functions/xstoregetuserpurchaseidasync) has been called, usually in the context of a callback function.

See [XStoreGetUserPurchaseIdAsync](/reference/system/xstore/functions/xstoregetuserpurchaseidasync) 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](/reference/system/xstore/xstore_members)\
[XStoreGetUserPurchaseIdAsync](/reference/system/xstore/functions/xstoregetuserpurchaseidasync)\
[XStoreGetUSerPurchaseIdResultSize](/reference/system/xstore/functions/xstoregetuserpurchaseidresultsize)


## Related topics

- [XStoreGetUserPurchaseIdResultSize](/reference/system/xstore/functions/xstoregetuserpurchaseidresultsize.md)
- [XStoreGetUserPurchaseIdAsync](/reference/system/xstore/functions/xstoregetuserpurchaseidasync.md)
- [XStore](/reference/system/xstore/xstore_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [Request a User Store ID for service-to-service auth](/publishing/xstore-commerce/xstore-requesting-userstoreid.md)
