Search⌘ K
AI Features

Uber API Design

Learn how Uber's API design connects riders and drivers through efficient backend services, real-time updates, secure payments, and scalable architecture. Understand the workflow from booking to payment, including design choices for latency, availability, and data formats that support a seamless user experience.

Uber API design

Uber provides ride-hailing services that connect two user types: a riderThe user who requests a ride., who requests a vehicle, and a driverThe driver who provides the service., who provides the ride. Designing an efficient API requires understanding how multiple backend services interact and ensuring near-real-time synchronization between users. If a driver accepts a ride but the rider isn't notified promptly, the rider may cancel and request another ride, degrading the experience.

Functional and nonfunctional requirements of the Uber API
Functional and nonfunctional requirements of the Uber API

What techniques can you use to maintain payment security and availability, especially when integrating with third-party gateways like Stripe?

Use the AI assessment widget below to submit your solution and get an interactive response.

Payments with Third-Party Gateways

Functional requirements

  • Book a ride: A rider requests a ride and receives ETA and fare estimates. The driver can accept or reject the request.

  • Trip processes: The driver starts and ends the ride. Riders can modify trips (e.g., by adding or removing stops).

  • Rider and driver activities: Both users view ride history and current trip details, submit feedback, and update profiles.

  • Chat: Riders and drivers exchange messages during a ride.

  • Payment: Riders pay fares using multiple payment methods.

Nonfunctional requirements

  • Availability: The API must be highly available to both riders and drivers at all times.

  • Scalability: The API must handle an ever-increasing volume of requests.

  • Security: Payment data, profiles, ride history, and all user information must be secured.

  • Low latency: The API must deliver fast responses to users.

Prerequisites

The Uber API builds on several previously designed APIs:

  • Google Maps API: Provides map display, optimal route finding, ETA calculation, and navigation for drivers.

  • Messenger API: Enables rider-driver chat.

  • Payment API: Handles credit/debit card and online payment processing.

  • Rating API: Captures mutual feedback between riders and drivers.

With these requirements and dependencies established, the API design becomes complex because multiple services interact behind the scenes. This interaction involves significant communication between user types, backend services, and third-party providers like Google Maps. This complexity requires careful choices around architectural style, data formats, and communication protocols.

Design overview and decisions

The high-level Uber design comprises three service categories: ...