Almost, but you can't define the price in virtual currency.
The solution I came up with is to make a cloud script that purchases and then immediately sells a user item. The user item has a buyPrice and a sellPrice which effectively does the currency conversion.