RideKit
Docs/Reference/Price Lock

Price Lock

Built: 2026-11-04.

This is for operators, and for whoever maintains the code.

Overview

A Price Lock pass locks the fare of one route a rider takes often, such as home to work. The rider pays a small fee once, from the wallet. For the next 30 days their rides on that route never cost more than the locked fare, surge or not. Uber and Lyft sell the same thing to commuters.

Part Rule
Route A pickup and a drop-off, taken from the rider's saved places. Each matches within radiusMeters. "Both ways" covers the trip back too (on by default).
Ride type One ride type per pass.
Locked fare The route's fare without surge at the moment of purchase, plus the market's markup (0% by default).
Rides and days Up to maxRides rides within periodDays days. The pass does not renew; the rider buys again.
A ride on the pass Pays the lower of its own fare and the locked fare. Tolls, airport fees and government fees still come on top.
Who pays the difference The platform funds it the same way as a promo (promo liability), so the driver earns on the full fare.
Stacking A subscription discount does not apply on top of a locked fare. A promo applies first, and the lock then caps what is left.
Cancelling The fee is refunded if no ride was taken on the pass. Otherwise it is kept.

Price Lock is on by default in the US, with a fee of $2.99. It is off everywhere else.

Which rides use a pass

A pass applies only to a ride that:

  • is booked now, at the shown price;
  • has no stops;
  • has no offered fare (bidding);
  • is not billed to a company, and not sold at a booth.

When the rider has two passes that match, the lower locked fare wins. When the pass has no rides left, or two bookings race for its last ride, the ride is simply priced as usual.

Settings

Admin → Markets → (country) → Pricing → Price Lock (market config priceLock):

Field Default Range
enabled US on, elsewhere off
feeMinor 299 0 – 10,000,000 minor units
periodDays 30 1 – 90
maxRides 40 1 – 200
radiusMeters 400 50 – 2000
markupBps 0 0 – 5000 (the form takes a %)
maxPasses 2 1 – 10 active passes per rider

Confirm locally.

  • Check that a prepaid ride pass needs no state-specific consumer disclosure (refund terms, expiry).
  • The pass does not auto-renew, so automatic-renewal laws do not apply. If you make it renew, use the subscription flow, which carries ARL consent.

Where people see it

  • Rider app → Menu → Price Lock:
    • live passes, with rides left, the end date and the amount saved;
    • Lock a price (pick From / To from saved places, both ways, a ride type → the locked fare, and today's surged fare when there is one → Lock for $2.99);
    • cancel;
    • past passes.
  • Booking screen: a 🔒 Price Lock badge on the covered ride type. The locked fare is shown, with the normal fare struck through, and the Book button carries the locked amount.
  • Receipt: a "Price Lock −X" line under the agreed fare.
  • Admin:
    • Subscriptions → Price Lock passes lists every pass: rider, route, locked fare, rides used, status and saved amount;
    • Trips → (trip) → Money shows "Price Lock (locked at X) −Y".

Money

Event Ledger
Buy price_lock: rider wallet debit → platform revenue credit (key price-lock-fee-<pass>)
Refund (cancelled unused) price_lock: platform revenue debit → rider wallet credit (key price-lock-refund-<pass>)
Ride on the pass ride_fare: rider pays the locked fare, promo liability funds price_lock_minor, and the driver and commission are worked out on the full fare

Code

Area Where
Rules (no I/O) backend/src/price-lock/price-lock.ts (+ spec)
Service and routes price-lock.service.ts: GET /price-lock, POST /price-lock/quote, POST /price-lock, POST /price-lock/:id/cancel, GET /price-lock/for-trip, GET /admin/price-lock/passes
Data Migration 1700000205000-PriceLock: price_lock_passes; rides.price_lock_pass_id, price_lock_fare_minor, price_lock_minor; ledger reason price_lock
Booking rides.service.ts book(): match, cap the wallet check, attach under an advisory lock
Settlement dispatch.service.ts: lockSaving after the promo; added to the platform-funded amount; kept for retries
Rider app app/(app)/price-lock.tsx, confirm.tsx badge and price, receipt line, menu row
Admin components/markets/PriceLockCard.tsx, components/subscriptions/PriceLockPasses.tsx, TripMoney line

Tested

  • Unit tests: price-lock.spec.ts.
  • End to end (24 checks), with a real 1.5× surge rule:
    • the quote leaves out the surge;
    • buying, a duplicate route refused, and a too-short route refused;
    • matching from 220 m away and on the way back;
    • completion at the locked fare, with the promo liability funding the rest and the driver credited on the full fare;
    • the receipt line;
    • the pass running out;
    • refund only when unused;
    • a wallet that cannot cover the fee;
    • the admin list and its permission.
  • iOS (Arabic, RTL):
    • the screen and the purchase from the app;
    • the booking screen showing the locked fare and the struck-through fare;
    • booking from the app, and the receipt.
  • Chrome: the admin card, the passes table and the trip line.
source: docs/us-price-lock.md (ships identically in the product zip)