# C_AccountStore: World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/C_AccountStore

## Functions

### C_AccountStore.BeginPurchase

```lua
purchaseStarted = C_AccountStore.BeginPurchase(itemID)
```

Arguments:
- `itemID`: number

Returns:
- `purchaseStarted`: bool

### C_AccountStore.GetCategories

```lua
categories = C_AccountStore.GetCategories(storeFrontID)
```

Arguments:
- `storeFrontID`: number

Returns:
- `categories`: number[]

### C_AccountStore.GetCategoryInfo

```lua
info = C_AccountStore.GetCategoryInfo(categoryID)
```

Arguments:
- `categoryID`: number

Returns:
- `info`: AccountStoreCategoryInfo

### C_AccountStore.GetCategoryItems

```lua
itemIDs = C_AccountStore.GetCategoryItems(categoryID)
```

Arguments:
- `categoryID`: number

Returns:
- `itemIDs`: number[]

### C_AccountStore.GetCurrencyAvailable

```lua
amount = C_AccountStore.GetCurrencyAvailable(currencyID)
```

Arguments:
- `currencyID`: number

Returns:
- `amount`: number

### C_AccountStore.GetCurrencyIDForStore

```lua
currencyID = C_AccountStore.GetCurrencyIDForStore(storeFrontID)
```

Arguments:
- `storeFrontID`: number

Returns:
- `currencyID`: number, may be nil

### C_AccountStore.GetCurrencyInfo

```lua
info = C_AccountStore.GetCurrencyInfo(currencyID)
```

Arguments:
- `currencyID`: number

Returns:
- `info`: AccountStoreCurrencyInfo

### C_AccountStore.GetItemInfo

```lua
info = C_AccountStore.GetItemInfo(itemID)
```

Arguments:
- `itemID`: number

Returns:
- `info`: AccountStoreItemInfo, may be nil

### C_AccountStore.GetStoreFrontState

```lua
state = C_AccountStore.GetStoreFrontState(storeFrontID)
```

Arguments:
- `storeFrontID`: number

Returns:
- `state`: AccountStoreState

### C_AccountStore.RefundItem

```lua
refundStarted = C_AccountStore.RefundItem(itemID)
```

Arguments:
- `itemID`: number

Returns:
- `refundStarted`: bool

### C_AccountStore.RequestStoreFrontInfoUpdate

```lua
C_AccountStore.RequestStoreFrontInfoUpdate(storeFrontID)
```

Arguments:
- `storeFrontID`: number

## Events

### ACCOUNT_STORE_CURRENCY_AVAILABLE_UPDATED

Payload, after the event's name:
- `currencyID`: number

### ACCOUNT_STORE_FRONT_UPDATED

Payload, after the event's name:
- `storeFrontID`: number

### ACCOUNT_STORE_ITEM_INFO_UPDATED

Payload, after the event's name:
- `itemID`: number

### ACCOUNT_STORE_TRANSACTION_ERROR

Payload, after the event's name:
- `result`: AccountStoreTransactionResult

### STORE_FRONT_STATE_UPDATED

Payload, after the event's name:
- `storeFrontID`: number

## Tables

### AccountStoreCategoryInfo (structure)

- `id`: number
- `name`: cstring
- `type`: AccountStoreCategoryType
- `icon`: fileID

### AccountStoreCurrencyInfo (structure)

- `id`: number
- `amount`: number
- `maxQuantity`: number, may be nil
- `name`: cstring
- `icon`: fileID

### AccountStoreItemInfo (structure)

- `id`: number
- `status`: AccountStoreItemStatus
- `mode`: AccountStoreItemMode
- `currencyID`: number
- `flags`: AccountStoreItemFlag
- `customUIModelSceneID`: number, may be nil
- `name`: cstring
- `description`: cstring, may be nil
- `price`: number
- `nonrefundable`: bool
- `creatureDisplayID`: number, may be nil
- `transmogSetID`: number, may be nil
- `displayIcon`: fileID, may be nil
- `refundSecondsRemaining`: time_t, may be nil

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
