Brazil: the fuel index
Built: 2026-11-03. Written for operators in Brazil and whoever maintains the code.
When Petrobras raises the price of fuel, a driver's costs go up overnight. Uber and 99 publicly raise driver pay when that happens, and drivers protest where an app does not (Curitiba, 2022). 99Negocia states its rule outright: for each R$1 rise in the litre price, the driver gets R$0.10 more per km.
RideKit applies the same rule automatically.
How it works
The operator keeps a reference price and the current price per litre:
- one for the whole market;
- one for any city or state area that needs its own.
Each trip adds a fuel line per km for the rise, in proportion. With the default rule of R$0.10/km for each R$1:
Reference Current Adds R$ 5,99 R$ 6,49 R$ 0,05/km R$ 5,99 R$ 6,99 R$ 0,10/km R$ 5,99 R$ 7,09 R$ 0,11/km R$ 5,99 R$ 5,79 nothing The fuel line is the driver's, whole:
- It is not surged.
- It comes on top of the minimum fare.
- It carries no commission and no fleet share.
- It is part of the fare for tax (it pays for the driver's service; it is not a reimbursement like a toll).
It only ever adds. At or below the reference price, nothing changes, and driver pay never falls with the index.
Which price applies is decided at the pickup: the smallest city or state area with its own price, else the market default. The rider's quote includes the line. On a metered trip, the line is recalculated on the km actually driven. On a locked fare it is fixed at booking, and any km past the reroute threshold add their share.
Where people see it
| Who | Where |
|---|---|
| Operator | Configuration → Fuel index: the rule, the litre prices with what each adds per km, and every change with who made it and a note. |
| Operator | Trips → a trip → Money: a line "Fuel adjustment (driver)" in the quoted-to-final breakdown. |
| Driver | Earnings: a card showing what fuel adds per km where they are, the price and the reference. The per-trip commission rate is stated on the fare without tolls or the fuel line. |
| Rider | The receipt shows a "Fuel adjustment" line. |
Every price change is written to the audit log (fuel_price.set,
fuel_price.remove).
Setting it up
- In Zones, draw the cities or states that need their own price, with the type Region. Skip this step if one national price is enough.
- In Fuel index, choose Add a price:
- the market default first;
- then each city that needs its own price.
- The note field is for the source, for example "ANP weekly survey".
- Each time prices move, open the price, change Current and save. New trips use it within 30 seconds.
The rule is on by default in Brazil, at R$0.10/km for each R$1.00. Change both numbers on the page, or turn the rule off. Elsewhere it is off.
For the code
| What | Where |
|---|---|
| Rule, price choice, rate | backend/src/pricing/fuel-index.ts |
| Prices, history, admin and driver API | backend/src/pricing/fuel-index.service.ts (/admin/fuel-index, /driver/fuel-index) |
| In the fare | pricing.service.ts (breakdown.fuelMinor, rates.fuelPerKmMinor); fare-finalize.ts (fuelPerKmMinor, fuelMinor, quotedFuelMinor) |
| To the driver | geo/airport-rules.ts PassThrough.fuelMinor; dispatch.service.ts (settlement, commission preview) |
| Storage | migration 175: fuel_prices, fuel_price_changes, rides.fuel_minor, rides.fuel_index |
| Apps | admin app/(dashboard)/fuel-index, TripMoney line; driver FuelIndexCard; rider receipt line |
Check before launch. The R$0.10/km per R$1 rule copies 99Negocia's public rule. Confirm with your accountant how your contracts with drivers describe this payment.