The virtual currency balances for the player, as well as their recharge times are returned as part of the player inventory: https://api.playfab.com/Documentation/Client/method/GetUserInventory.
According to that page, it returns a VirtualCurrencyRechargeTime object with 3 properties. 2 of which are:
/// <summary> /// Time remaining (in seconds) before the next recharge increment of the virtual currency. /// </summary>
public int SecondsToRecharge;
/// <summary> /// Server timestamp in UTC indicating the next time the virtual currency will be incremented. /// </summary>
public DateTime RechargeTime;
But I'd like to know how long it takes for a currency to recharge 1 unit and not the time remaining until it recharges 1 unit.
Ah, I see - so you want to be able to query the definition of the virtual currency, similar to the Admin API call ListVirtualCurrencyTypes. Right now, you would need to put that info in Title Data, as the currency definition isn't exposed via the Client or Server API. I'll add a backlog item to have it added to the Server API, so that you can query it in Cloud Script.
OK I see. Btw, is the Recharge Maximum on a Virtual Currency is a daily maximum?
2 People are following this question.