While I am testing my cloud server scripts, I used higher amount than player has with SubtractUserVirtualCurrency to test and virtual currency went negative. In my cloud script, I am checking current balance after SubtractUserVirtualCurrency, and there is no error.
Here are last 3 calls' returns I made. These called one by one to test.
{"PlayFabId":"1F9422E87DF811FB","VirtualCurrency":"GM","BalanceChange":-300,"Balance":-206}" }
{"PlayFabId":"1F9422E87DF811FB","VirtualCurrency":"GM","BalanceChange":-300,"Balance":-506}" }
{"PlayFabId":"1F9422E87DF811FB","VirtualCurrency":"GM","BalanceChange":-3,"Balance":-509}" }
I was checking player's Balance to continue progress in my code but apparently I can't trust that.
Unless checking player's current currency value and than verifying does he has enough currency to spend, It seems there isn't other solution, like when SubtractUserVirtualCurrency called, given error if player doesn't have sufficient virtual currency.