# CFX::LOAD_PLAYER_COMMERCE_DATA_EXT

- **Hash:** `0x7995539E`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `LoadPlayerCommerceDataExt`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** described with examples
- **URL:** https://natives.borderlinerp.com/natives/CFX/LOAD_PLAYER_COMMERCE_DATA_EXT

## Signature

```c
void LOAD_PLAYER_COMMERCE_DATA_EXT(char* playerSrc);
```

## Parameters

- `playerSrc` (`char*`) — The player handle

## Returns

`void`

## Description

*Source: Cfx.re native reference*

Requests the commerce data from Tebex for the specified player, including the owned SKUs.

Use [`IS_PLAYER_COMMERCE_INFO_LOADED_EXT`](#\_0x1D14F4FE) to check if it has loaded.

This will not automatically update whenever a client purchases a package, if you want to fetch new purchases you will need to call this native again.

This native will temporarily cache the players commerce data for 10 seconds, a call to this native after 10 seconds will re-fetch the players commerce data.

## Usage

### Lua

```lua
LoadPlayerCommerceDataExt(playerSrc)

-- always available, by hash
Citizen.InvokeNative(0x7995539e, playerSrc)
```

### JavaScript

```js
LoadPlayerCommerceDataExt(playerSrc);

// by hash
Citizen.invokeNative('0x7995539e', playerSrc);
```

### C#

```csharp
Function.Call((Hash)0x7995539e, playerSrc);
```

## Examples

*Source: Cfx.re native reference*

```lua
RegisterNetEvent("doesOwnPackage", function(packageIdSku)
	-- source isn't valid across waits, so we localize it
	local source = source

	-- input isn't right
	if type(packageIdSku) ~= "number" then
		return
	end

	-- The native will cache the results
	LoadPlayerCommerceDataExt(source)
	-- Wait for the players data to load
	while not IsPlayerCommerceInfoLoadedExt(source) do
		Wait(0)
	end

	-- Tell the client if they own the package or not
	TriggerClientEvent("doesOwnPackage", source, DoesPlayerOwnSkuExt(source, packageIdSku))
end)
```

*Sources: Cfx.re native reference.*
