From 1 May to 31 December 2020, Google Cloud put a ceiling on the exchange rate it used for eight currencies. Its exchange-rate page lists them, the Australian dollar, Brazilian real, Indonesian rupiah, Indian rupee, Mexican peso, Norwegian krone, Russian rouble and Turkish lira, each with a cap "based on the 'Currency to USD' rate used by Google Cloud in January 2020": in any month when the market rate came out above it, "the rate listed below will be used instead." In 2021 the ceiling became a speed limit, with the increase in each rate held to "a maximum of 2% in any month-to-month period", and one more line: "There is no limit to rate decreases." Brazil got its own rule for 2022, a rate changed only at the start of each quarter and by no more than 2% when it did, and the page notes that the real's rate already includes "the 13.83% surcharge to account for the direct operating cost of providing services locally in Brazil."

None of those rules touches a dollar price; Google's rate card didn't change for any of these customers. Each one changed what a customer in Jakarta or São Paulo paid, a price decision made in a table of exchange rates. The earlier posts in this series each took one decision a usage pipeline has to make about the meter. A customer who pays in another currency adds a decision that has nothing to do with the meter: which rate converts the price, and on which day.

Two answers to "when"

Google's own pricing pages say "Prices are listed in US Dollars (USD). If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply." The Cloud Billing currency page explains where those local prices come from: Google converts "from USD into the applicable local currency pursuant to the conversion rates published by leading financial institutions", and "the exchange rates are set at the beginning of every month." A billing account "operates in a single currency, which you can't change after you create your Cloud Billing account", so the setup guide warns customers to choose the country "carefully". The SKU list adds the clause that matters for anyone budgeting in rupees: "We will not notify you for increases in non-USD prices that are due to currency conversion fluctuations."

AWS answers the same question the other way round. Its knowledge-centre article says that "by default, all AWS customers are billed in US dollars", and that a customer who picks another currency gets a finalised monthly bill in it, with a different clock: "Rates can change daily. The exchange rate applied to your invoice is determined when your invoice is created." The currency can be changed at any time, "but after an invoice is finalized, the invoice must be paid in that currency."

So Google fixes the rate before the month's usage happens, and AWS fixes it after. A Google customer knows on the 2nd what a unit will cost in their currency on the 28th, and Google carries whatever the market does in between. An AWS customer's usage is priced in dollars all month and converted once, at a rate nobody knows until the invoice exists. Neither is the obvious choice, and each one sets a date on the conversion that the rest of the pipeline has to respect. Usage that arrives late showed MongoDB processing 31 October's usage in November; under a monthly rate, that usage could be converted at November's rate unless the event keeps the date it happened.

Google, at least, leaves the trail in the data. Its billing export carries a currency_conversion_rate on every row, described as "the exchange rate from US dollars to the local currency. That is, cost ÷ currency_conversion_rate is the cost in US dollars." A finance team can take any line on a local-currency bill and recover the dollar price behind it, which is the kind of check Someone else's price argued a customer needs when part of a price is set by a third party, here a published market rate.

Modelling it, on paper

As in the rest of the series, this is a thought experiment that maps published pricing onto Revenue Cloud Usage Management; it isn't a claim about how either company bills. The platform behaviours below come from a public build repository, rlm-base-dev, whose scripts and validators document what its author found, not something I've run.

The first thing the repo establishes is where a rate's currency lives. A multi-currency validator explains that "a usage rate is denominated by its RateUnitOfMeasure -- a unit in the CURRENCY UnitOfMeasureClass -- not by a CurrencyIsoCode field", and that there is "NO runtime conversion from the USD entry, so a non-USD quote cannot rate at all unless its own currency's RateCardEntry exists." In that model, conversion happens when the rate card is built, not when usage is rated: a GBP customer needs GBP rows.

That is Google's shape, a local price list derived from the dollar one, and the repo has a script that does the derivation: it generates each currency's RateCardEntry rows from the USD base using the org's CurrencyType.ConversionRate. Its docstring is blunt about the cost of letting those rows drift. Every non-base row is rebuilt from the base by default, because "preserving old rows silently ships stale rates the moment CurrencyType.ConversionRate changes", and the test suite requires each non-base rate to equal the derived value exactly. Google's first-of-the-month reset becomes, in this model, a monthly regeneration of the rate card with effective dates, and a rule like the 2020 ceiling becomes a line of logic in that regeneration step rather than anything the rating engine knows about. AWS's shape, by contrast, would keep every customer on the dollar card and push the conversion out of rating altogether, into billing, which moves the date question to whenever the invoice is created.

What a conversion must not touch

The same script lists what it converts and what it leaves alone, and the second list is the more instructive one. Rate and override adjustments are money and get converted. Percentage adjustments are "currency-neutral" and are copied. And LowerBound / UpperBound, the edges of each pricing tier, "are consumption quantities (minutes, TB, tokens), not money", so they're copied as they are. Running a 1,000-minute tier boundary through the yen rate is the kind of mistake that rates without error and bills wrongly, and the rule only exists because the tier table holds money and quantities in adjacent columns.

Rounding is the other trap. The script rounds whole-unit currencies such as the yen to a whole unit, but notes that a rate "is often sub-unit (¥0.65/minute). Rounding those to a whole yen would flatten every tier of a tiered rate onto the same value and destroy the tiering", so rates below one keep two decimals, and "a non-zero rate never rounds down to zero." Token-denominated entries are skipped entirely, as "not currency-specific", which is an argument for the credit as a unit: a credit priced once per currency at purchase leaves the meter, and everything What are you counting? said about it, in a single unit everywhere.

Google's 2020 ceiling and its 2021 speed limit were, in effect, a rule about which month's rate a customer was entitled to, written down on a public page. Most usage contracts say nothing of the kind: they quote a price in one currency and leave the conversion to a clause about "applicable rates". When a customer's bill goes up 8% in a month their usage was flat, is the answer in the meter, in the rate card or in the exchange-rate table, and which of the three did their contract actually promise them?