Define virtual currencies as catalog items of type 'Currency' in the Economy v2 catalog, each with a unique friendly ID
Grant currency server-side only via AddInventoryItems or as part of bundle/store grants; never trust client-reported amounts
Implement a server-authoritative spend flow: validate player balance with GetInventoryItems, then call PurchaseInventoryItems or SubtractInventoryItems with an IdempotencyId to prevent double-spends on retry
Enable PlayFab's fraud prevention rules in the Economy settings to flag anomalous grant rates or balance thresholds
Audit all currency mutations via PlayFab's transaction history (GetTransactionHistory) to detect unusual patterns
Known gotchas
SubtractInventoryItems throws an error if the requested amount exceeds the current balance rather than going negative; always check balance before subtracting in high-throughput flows
IdempotencyId must be a client-generated UUID sent with each mutation call; reusing the same IdempotencyId for genuinely different transactions causes the second call to be silently ignored
PlayFab Economy v2 virtual currencies are inventory items, not the legacy 'Virtual Currency' tab in v1; mixing v1 and v2 currency APIs on the same title leads to split balance views
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp