Create Order: how store_key affects StoreItem visibility and why "StoreItem not found" can happen
Last updated: May 26, 2026
Create Order: how store_key affects StoreItem visibility and why StoreItem not found can happen
When you create an order with POST /s2s/v1/orders, the request may return 404 Not Found with {"detail":"StoreItem not found"} even if the SKU exists and is active in sandbox or live.
A common cause is that the request includes store_key for an item that belongs to a Store with availability conditions. In that case, Aghanim evaluates the StoreItem in the context of that Store. If the player does not satisfy the StoreItem conditions, the item is treated as unavailable and the order creation can fail with StoreItem not found.
When this happens
- The SKU exists and is active.
- The item is available in a specific Store, for example
store_key: "default". - The StoreItem has conditions such as purchase-based visibility.
- The tested
player_iddoes not match those conditions.
Example
If a StoreItem is configured with a condition like Player(Purchases) Contains "Rio Coins XXXL x2", then only players who already bought that product will see that SKU in that Store. For other players, creating an order with that SKU and the Store's store_key may return StoreItem not found.
How to troubleshoot
- Check whether the request includes
store_keyinsideitems. - Open the StoreItem in Dashboard and review its availability conditions.
- Verify the exact
player_idused in the request. - Test with a player that satisfies the conditions.
How to make in-game orders ignore Store conditions
If you want Hub/Store visibility rules to stay enabled in Aghanim, but you do not want those rules applied to in-game order creation, omit store_key from the item in the create_order request.
Without store_key, StoreItem conditions are not checked during order creation, while Hub behavior continues to use the Store configuration.
Examples
Order creation that checks StoreItem conditions:
{
"player_id": "player-123",
"items": [
{
"sku": "sku-coin-0-575-rio-coins",
"store_key": "default"
}
]
}Order creation that does not check StoreItem conditions:
{
"player_id": "player-123",
"items": [
{
"sku": "sku-coin-0-575-rio-coins"
}
]
}Recommended guidance
- Use
store_keywhen you intentionally want Store availability rules applied to API order creation. - Omit
store_keywhen the game should be able to sell the SKU regardless of Hub storefront conditions. - If you get
StoreItem not found, check player segmentation and StoreItem conditions before assuming the SKU is missing.