When you add a game to the deltaDNA platform a single currency is chosen for displaying all your revenue charts. 


When a transaction event containing a realCurrency object is received it is automatically converted to your nominated currency using the current conversion rate. The conversion rate is updated multiple times each day.


"productsSpent": {
    "realCurrency": {
        "realCurrencyType": "USD",
        "realCurrencyAmount": 499
    }
}

 

- The realCurrencyType parameter should contain the ISO 4217 three character currency code for currency that is spent by the player. 

- The realCurrencyAmount should contain the amount spent in the minor currency unit, expressed as an integer. The above snippet is from a purchase for $4.99 


In our SDK's we provide a helper method to convert a decimal value into the integer value in that currency in line with the ISO standard.

For example in Unity this can be done as follows:

    Transaction transaction = new Transaction(
        "Weapon type 11 manual repair",
        "PURCHASE",
        new Product()
            .AddItem("WeaponsMaxConditionRepair:11", "WeaponMaxConditionRepair", 5)
            .AddVirtualCurrency("Credit", "PREMIUM", 710),
        new Product().SetRealCurrency("USD", Product.ConvertCurrency("USD", 12.34m))) // $12.34
       .SetTransactorId("2.212.91.84:15116")
       .SetProductId("4019")
       .AddParam("paymentCountry", "US");





Whilst your dashboard charts will display all revenue in your nominated currency, it is also possible to see the source currency and amounts in the Analyze tools. The converted currency amount will always be stored in the convertedProductAmount field on transaction events.