RideKit
Docs/Reference/An all-electric ride type ("Eléctrico")

An all-electric ride type ("Eléctrico")

Built: 2026-11-03. Written for operators (Mexico first, any market) and whoever maintains the code.

Uber sells Comfort Electric in Mexico City, and DiDi and local fleets run electric cars there. Riders who want one pick it like any other ride type, at its own price. RideKit already had "Electric only", a free option on any ride. A ride type can now itself be all-electric.

Setting it up

Admin → Pricing → + Vehicle Type: in Mexico, Start from a template → Eléctrico fills these suggestions (MXN, check them before saving):

Suggested
Base fare MX$16.00
Per km MX$7.50
Per minute MX$2.00
Minimum fare MX$65.00
Oldest car 6 years
Electric cars only On

Any type can be made all-electric with the Electric cars only switch. The type list shows it with an ⚡ Electric chip.

What it does

  • Riders see the type marked "⚡ Electric" on the booking screen.
  • Matching: its rides are offered only to cars recorded as electric (vehicles.fuel_type). A car whose type changed under it while online is still not offered the ride.
  • Going online: a driver whose car is on this type but not recorded as electric is refused, with "Eléctrico takes only electric cars…" in their language. Support can correct the fuel type in Admin → Vehicles.

This sits next to the existing rules, which still apply:

  • the rider's free "Electric only" option on any ride type;
  • a city's rule making one type electric-only in that region only (Zones → region rules).

The Mexican templates also gain a Moto, Económico, Comfort and XL ladder in MXN, in place of the generic one.

Code

  • backend/src/fleet/entities/vehicle-type.entity.ts: electricOnly;
  • migration 1700000161000-ElectricOnlyType;
  • rides/dispatch.service.ts: the matching filter;
  • drivers/drivers.service.ts: the go-online check (vehicle_not_electric_for_type);
  • pricing/pricing.service.ts: electric: true on estimates;
  • fleet/ride-type-templates.ts: the MX templates;
  • admin: pricing/page.tsx;
  • rider app: the badge in confirm.tsx;
  • driver app: the error message.
source: docs/electric-ride-type.md (ships identically in the product zip)