RideKit
Docs/Reference/Fleets: rent-to-own, and reminders for a car's papers

Fleets: rent-to-own, and reminders for a car's papers

Built: 2026-11-03. Written for fleet owners and operators (Mexico, India, Brazil), and for whoever maintains the code.

Fleet drivers in Mexico usually rent the car by the week, often with a deal that the car becomes theirs after enough weeks. Fleet owners with many cars also lose track of insurance and inspection dates. Both are now in the partner app.

Rent-to-own

Partner app → Drivers → a fixed-rent driver → Rent-to-own → Set up:

  • Car price: what the car is sold for;
  • Counting from: the day the rent starts counting toward it. Leave it blank for today.

From then on:

  • every rent charge since that day counts toward the price. The card shows "Paid MX$3,000 of MX$4,000 · MX$1,000 to own" with a progress bar;
  • the last charge is only what is left, never a full week;
  • once the price is reached, rent stops. The card shows "Paid off on 3 November: hand over the car's papers".

The driver sees the same progress on their wallet's rent card, and "the car is yours" once it is paid off.

Rent-to-own needs the driver on a fixed rent. Change edits the price or the start day; End agreement removes it, and rent goes on as before.

Reminders for a car's papers

For each fleet car the partner app shows the next paper to run out within 30 days, in amber, or red within a week or once it has run out:

  • insurance;
  • inspection (verificación);
  • city registration (CDMX's CRV).

Example: "Insurance ends 8 November".

The fleet owner and the car's driver also get a notification in their language 30 days before, 7 days before and on the day. Each is sent once. Update the dates in Admin → Vehicles → Edit, or in the partner app's vehicle page.

Running the jobs by hand

Both run on their own: rent billing for each period, and paper reminders every hour. An operator can run them now, after an outage or right after setting an agreement:

  • POST /api/admin/partners/jobs/lease-billing: each period is billed once, so running it twice charges nothing twice;
  • POST /api/admin/partners/jobs/vehicle-papers.

Code

  • backend/src/fleet/rent-to-own.ts: the terms, the progress, and the capped last charge (no I/O);
  • fleet/lease-billing.service.ts: ownProgress and markOwned. A car that is paid off is no longer billed;
  • fleet/fleet-rent.service.ts: setRentToOwn, and rentToOwn on the rent statement;
  • fleet.controller.ts: PUT/DELETE /fleet/drivers/:id/rent-to-own;
  • fleet/vehicle-papers.ts, vehicle-papers.service.ts: the reminders;
  • migration 1700000157000-RentToOwn;
  • partner app:
    • src/components/RentSection.tsx;
    • app/(app)/vehicles.tsx;
  • driver app: src/components/FleetRent.tsx.

Check locally

Rent-to-own is a sale on instalments. In Mexico and elsewhere the written agreement, the transfer of the car's title, and any tax on the sale are between the fleet and the driver. Have your counsel provide the contract template.

source: docs/fleet-rent-to-own.md (ships identically in the product zip)