A keyless golf cart rental app should price a day in three layers: an hourly rate billed in short blocks, a cap so no single ride gets out of hand, and a day pass the app offers when it is cheaper for the guest. Axons Mobility is golf cart and LSV fleet management software, based in Dubai, UAE, for cart makers, dealers and fleet operators.

This post shows that logic in about 40 lines of Python, with tests you can run.

What does it cost to rent a golf cart for a day?

It depends on the operator's rates, so the useful question is how the app turns minutes into a fair price. A guest who rides twice in the morning and once after lunch should never pay more than a day pass would have cost.

Campground guests already budget for the day. KOA's 2026 Camping and Outdoor Hospitality Report says more than 52 million North American households camped in 2025, and average daily spending per person, not counting accommodation, passed $200. A cart that costs a surprise amount at drop-off stands out in that budget.

Why bill in blocks instead of exact minutes?

Blocks make the price easy to read on the receipt. With 15-minute blocks, a 50-minute ride is 4 blocks, and the 61st minute starts a fifth one.

Exact per-minute billing suits very short trips. Golf cart guests think in hours and half days, so blocks match how they plan.

How does a per-ride cap work?

The cap is the most one ride can cost, however long it runs. Without it, a family that keeps a cart from 10:00 to 15:00 at a peak rate gets a bill that feels like a penalty.

from dataclasses import dataclass from math import ceil @dataclass class Plan: peak_per_hour: float # rate between peak_start and peak_end offpeak_per_hour: float # rate at all other hours ride_cap: float # the most one ride can ever cost day_pass: float # flat price for unlimited rides that day block_minutes: int = 15 # bill in started 15-minute blocks peak_start: int = 10 # 10:00 peak_end: int = 16 # 16:00 def hourly_rate(plan: Plan, start_hour: int) -> float: """Price per hour for a ride that starts at start_hour (0-23).""" if plan.peak_start <= start_hour < plan.peak_end: return plan.peak_per_hour return plan.offpeak_per_hour def ride_price(plan: Plan, minutes: int, start_hour: int) -> float: """Started blocks x block price, never above the per-ride cap.""" if minutes <= 0: return 0.0 blocks = ceil(minutes / plan.block_minutes) price = blocks * hourly_rate(plan, start_hour) * plan.block_minutes / 60 return round(min(price, plan.ride_cap), 2) 

The rate is chosen by the hour the ride starts. That keeps the rule simple to explain at the counter: "rides that start between 10 and 4 are peak".

When should the app offer a day pass instead?

When the guest's rides for the day add up to more than the pass. The app should do that sum for the guest, not leave them to find out later.

def best_offer(plan: Plan, rides: list[tuple[int, int]]) -> tuple[str, float]: """rides = [(minutes, start_hour), ...] for one guest on one day.""" pay_per_ride = round(sum(ride_price(plan, m, h) for m, h in rides), 2) if plan.day_pass < pay_per_ride: return "day pass", plan.day_pass return "pay per ride", pay_per_ride 

Show this as a nudge on the second or third unlock of the day ("a day pass would save you money from here"), not as a refund after the fact.

Does the logic hold up? Run the tests

Save the two code blocks above together as fares.py, then run this. The rates are example numbers only, not market prices.

from fares import Plan, ride_price, best_offer plan = Plan(peak_per_hour=30, offpeak_per_hour=20, ride_cap=90, day_pass=120) assert ride_price(plan, 50, 11) == 30.0 # 4 started blocks x 7.50 assert ride_price(plan, 50, 8) == 20.0 # same ride, off-peak assert ride_price(plan, 61, 11) == 37.5 # the 61st minute starts a new block assert ride_price(plan, 300, 11) == 90.0 # 5 hours would be 150, the cap stops it at 90 assert ride_price(plan, 0, 11) == 0.0 print(best_offer(plan, [(45, 9), (90, 12)])) # ('pay per ride', 60.0) print(best_offer(plan, [(120, 10), (180, 13), (60, 17)])) # ('day pass', 120) 

Output:

('pay per ride', 60.0) ('day pass', 120) 

What should happen when a guest books ahead?

Charge nothing at booking and price the ride at pickup with the same rules. A booking should reserve one cart of the fleet, counted against the carts you can rent, so the fleet is never booked twice over.

Pricing checklist before launch

Check Why it matters
Block length (10, 15 or 30 min) Sets how fair short rides feel
Peak hours and both rates Busy hours earn more, quiet hours fill up
Per-ride cap No bill that feels like a penalty
Day pass price The app can offer the cheaper option
Refundable deposit and ID check Protects the cart before the first unlock
Receipt wording Guest sees blocks, rate and cap in plain words

What this logic will not do

It does not choose your rates: those come from your market, your carts and your season. It does not handle sales tax, refunds after a breakdown or deposits, which belong in the payment flow, not in the fare function. And it does not put rides on a hotel room bill.

It also trusts the ride's start and end times. If a guest's ride ends because the cart lost signal, check the cart's last report before you price it.

For a full rental flow with keyless unlock, a live GPS map and payments into your own Stripe account, see Axons Mobility's golf cart rental platform.