You received a car with a scratch on the bumper but didn't fill out the handover report. Proving the damage isn't yours is impossible. Or driver verification takes a week, and clients leave for competitors. We solved these tasks for 20+ projects over many years of experience. Our engineers built an architecture that scales to thousands of cars. It all starts with the data model—it determines how flexible and reliable the platform will be. According to J.D. Power, 60% of users abandon platforms without verification, and online inspection reduces damage disputes by 40%. Operational cost savings reach 30% through automation.
How the data model for car rental works?
Each car is a specific unit with VIN, plate number, insurance and inspection history. Booking is tied to a real vehicle, not an abstract class. This eliminates double booking. For geodata we use PostGIS—it is 100x faster for spatial queries than regular indexes.
CREATE TABLE vehicles (
id BIGSERIAL PRIMARY KEY,
owner_id BIGINT NOT NULL REFERENCES users(id),
make VARCHAR(50) NOT NULL, -- Toyota
model VARCHAR(50) NOT NULL, -- Camry
year SMALLINT NOT NULL,
plate_number VARCHAR(20) UNIQUE NOT NULL,
vin VARCHAR(17) UNIQUE NOT NULL,
transmission VARCHAR(10) NOT NULL, -- auto, manual
fuel_type VARCHAR(15) NOT NULL, -- petrol, diesel, electric, hybrid
seats SMALLINT NOT NULL DEFAULT 5,
mileage_km INT NOT NULL DEFAULT 0,
location GEOGRAPHY(POINT, 4326),
insurance_expiry DATE NOT NULL,
inspection_expiry DATE NOT NULL,
status VARCHAR(20) NOT NULL DEFAULT 'available'
);
CREATE TABLE rental_bookings (
id BIGSERIAL PRIMARY KEY,
vehicle_id BIGINT NOT NULL REFERENCES vehicles(id),
renter_id BIGINT NOT NULL REFERENCES users(id),
pickup_datetime TIMESTAMPTZ NOT NULL,
return_datetime TIMESTAMPTZ NOT NULL,
pickup_location GEOGRAPHY(POINT, 4326),
return_location GEOGRAPHY(POINT, 4326),
status VARCHAR(20) NOT NULL DEFAULT 'pending',
total_amount NUMERIC(10,2) NOT NULL,
security_deposit NUMERIC(10,2) NOT NULL,
fuel_policy VARCHAR(20) NOT NULL -- 'full_to_full', 'prepaid'
);
This schema allows building complex queries: find all free cars near the user, check booking overlaps, calculate cost with seasonality. We use transactions and row-level locks to eliminate race conditions during booking.
Why driver verification is critical for the platform?
A platform without verification bears legal liability for renters' actions. We integrate Stripe Identity or Jumio: document check, selfie, license expiry recognition. All takes 30 seconds without operator involvement. This reduces fraudulent bookings by 60%.
- Initiation — create VerificationSession via Stripe API.
- Verification — user uploads document and selfie.
- Processing — webhook updates user status.
- Ready — driver can book.
class DriverVerificationService
{
public function initiateVerification(User $user): string
{
// Stripe Identity
$session = $this->stripe->identity->verificationSessions->create([
'type' => 'document',
'options' => [
'document' => [
'allowed_types' => ['driving_license'],
'require_id_number' => true,
'require_live_capture' => true,
'require_matching_selfie' => true,
],
],
'metadata' => ['user_id' => $user->id],
]);
$user->update([
'stripe_verification_session_id' => $session->id,
'verification_status' => 'pending',
]);
return $session->url;
}
public function handleWebhook(array $payload): void
{
$session = $payload['data']['object'];
$user = User::where(
'stripe_verification_session_id',
$session['id']
)->firstOrFail();
match ($session['status']) {
'verified' => $user->update([
'verification_status' => 'verified',
'verified_at' => now(),
'license_expiry' => $session['last_verification_report']['document']['expiration_date'] ?? null,
]),
'requires_input' => $user->update(['verification_status' => 'failed']),
default => null,
};
}
}
How does flexible pricing work?
We support hourly, daily, and combined tariffs. Seasonal coefficient is automatically applied depending on car class and date. For long-term rentals — discounts up to 20%. The calculator instantly compares all options and shows the best price. Average rental cost is reduced by 15% through dynamic pricing.
| Duration | Tariff | Discount |
|---|---|---|
| 1-6 hours | hourly | — |
| 1-6 days | daily | — |
| 7-13 days | daily | 10% |
| 14-29 days | daily | 15% |
| 30+ days | daily | 20% |
class PricingCalculator
{
public function calculate(
Vehicle $vehicle,
Carbon $pickup,
Carbon $return
): PricingResult {
$hours = $pickup->diffInHours($return);
$days = $pickup->diffInDays($return);
// If less than 24 hours — charge hourly
if ($hours <= 24 && $vehicle->hourly_rate) {
$base = $vehicle->hourly_rate * $hours;
} else {
// Daily + surcharge for partial day
$fullDays = floor($hours / 24);
$remainHours = $hours % 24;
$base = $vehicle->daily_rate * $fullDays;
if ($remainHours > 0) {
// If remainder > half a day, charge full day
$base += $remainHours > 12
? $vehicle->daily_rate
: $vehicle->hourly_rate * $remainHours;
}
}
// Seasonal coefficient
$multiplier = $this->getSeasonMultiplier($pickup, $vehicle->vehicle_class);
// Long-term rental discount
$discount = match(true) {
$days >= 30 => 0.20,
$days >= 14 => 0.15,
$days >= 7 => 0.10,
default => 0.0,
};
$subtotal = $base * $multiplier * (1 - $discount);
$deposit = $vehicle->deposit_amount;
$fee = $subtotal * $this->platformFeeRate;
return new PricingResult(
base: $base,
multiplier: $multiplier,
discount: $discount,
subtotal: $subtotal,
platform_fee: $fee,
security_deposit: $deposit,
total: $subtotal + $fee,
);
}
}
How is photo inspection ensured?
Before handover and after return, a mandatory digital report: car diagram with damage coordinates, photos, odometer readings, fuel level. Signature of both parties via canvas (signature_pad.js). The report is saved to S3 and becomes a legally significant document.
Example of a custom damage field
```json { "title": "Scratch on bumper", "coordinates": [55.7558, 37.6176], "photos": ["https://s3.example.com/act/123.jpg"] } ```Why is GPS tracking mandatory for fleets?
For fleets of 20+ cars, live tracking via MQTT — coordinates every 10 seconds. MQTT is 10x more efficient than HTTP polling in latency and traffic. Geofencing: if the car leaves the allowed zone, the owner gets an alert. This reduces theft and fraud risks by 40%.
// MQTT message handler from trackers
class VehicleTelematicsHandler
{
public function handle(string $topic, string $payload): void
{
// topic: vehicles/{plate}/location
preg_match('/vehicles\/(.+)\/location/', $topic, $matches);
$plate = $matches[1];
$data = json_decode($payload, true);
DB::transaction(function () use ($plate, $data) {
$vehicle = Vehicle::where('plate_number', $plate)->firstOrFail();
$vehicle->update([
'location' => DB::raw(
"ST_MakePoint({$data['lng']}, {$data['lat']})"
),
'mileage_km' => $data['odometer'] ?? $vehicle->mileage_km,
'last_seen_at' => now(),
]);
// Geofencing — check if outside allowed zone
if (isset($vehicle->activeRental)) {
$this->checkGeofence($vehicle, $data);
}
});
}
}
How are security deposits handled?
The deposit is held on the card at booking via Stripe PaymentIntents with capture_method=manual. On return without damage, the hold is released. On damage, only the damage amount is captured. We guarantee: no ruble leaves without confirmation.
// Create a hold (authorization hold) without charging
$paymentIntent = $stripe->paymentIntents->create([
'amount' => $booking->security_deposit_cents,
'currency' => 'eur',
'capture_method' => 'manual',
'confirm' => false,
'description' => "Security deposit for booking #{$booking->id}",
]);
// If no damage — cancel hold
$stripe->paymentIntents->cancel($paymentIntent->id);
// If damage — capture required amount
$stripe->paymentIntents->capture($paymentIntent->id, [
'amount_to_capture' => $damageAmount,
]);
Work stages
We follow a transparent process so you control every step:
- Analysis — study your fleet, target market, legal requirements.
- Design — create ERD, API schema, interface prototype.
- Development — write code, set up CI/CD, conduct code review.
- Testing — load tests, security checks, UAT.
- Deployment and monitoring — deploy to production, set up alerts.
Solution components
| Component | Details |
|---|---|
| Backend (API) | Laravel / Django + PostgreSQL + Redis |
| Frontend | React / Next.js (SSR) with mobile-first design |
| Verification | Stripe Identity / Jumio + webhook processing |
| Payments | Stripe (hold/capture, discounts, seasonality) |
| GPS tracking | MQTT server + geofencing (optional) |
| Handover report | Photos + canvas signatures → S3 |
| Documentation | Swagger schema, README, deployment description |
| Support | 1 month free monitoring after launch |
Development timeline
- MVP (catalog, booking, verification, owner cabinet): 8–10 weeks.
-
- Inspections, GPS, flexible pricing, deposits: additional 4–5 weeks.
- Full launch (corporate accounts, fleet management, analytics): 16–18 weeks total.
Cost is calculated individually — depends on integration complexity and fleet size. On average, the platform pays for itself in 3–6 months through automation.
Contact us for a project assessment — we'll prepare architecture and estimate in 2 days. Get a consultation on platform architecture and timelines. We work with projects of any scale — from startups to large fleets.







