Status flow
REQUESTED
Triggered by: RiderWhen you call
POST /rides/book, the ride is created with status REQUESTED. The ride is now visible to available drivers via GET /rides/requested.At this point, the ride has a startOtp and endOtp generated by the server. These one-time passwords are used to verify that the correct driver picks up and completes the ride.ACCEPTED
Triggered by: DriverA driver calls The rider can now poll
POST /rides/status/{rideId} with "status": "ACCEPTED" and their driverId. The ride is assigned to that driver and acceptedAt is recorded.GET /rides/status/{rideId} to see the driver’s live location as it updates via driverLat and driverLon.PICKED
Triggered by: DriverWhen the driver arrives and picks up the rider, they call The
POST /rides/status/{rideId} with "status": "PICKED" and the startOtp provided by the rider. The server validates the OTP before accepting the transition.startOtp confirms the right driver picked up the right rider. If the OTP is incorrect, the request is rejected.COMPLETED
Triggered by: DriverAt the destination, the driver calls Once completed, the rider can submit a rating and feedback via
POST /rides/status/{rideId} with "status": "COMPLETED" and the endOtp provided by the rider. The server validates the OTP before marking the ride complete.POST /rides/feedback/{rideId}.Cancelling a ride
Either the rider or the driver can cancel a ride at any point before completion by callingPOST /rides/cancel/{rideId}. The request body accepts an optional reason string.
status set to CANCELLED, cancelledBy set to the user who cancelled, and cancellationReason populated with the reason you provided.
Updating driver location
While a ride is active, the driver should callPOST /rides/location/{rideId} periodically to broadcast their position to the rider.
driverLat, driverLon, and driverLocationUpdatedAt fields.
The Ride object
Below is a representative ride object as returned by the API.Key fields
| Field | Description |
|---|---|
status | Current lifecycle status: REQUESTED, ACCEPTED, PICKED, COMPLETED, or CANCELLED |
startOtp | One-time password the rider shares with the driver to confirm pickup |
endOtp | One-time password the rider shares with the driver to confirm drop-off |
fare | Estimated fare in INR calculated at booking time |
paymentMode | Payment method chosen at booking (e.g. UPI, CARD, CASH) |
paymentStatus | Current payment status: PENDING, PAID, or FAILED |
paymentReference | Razorpay payment ID, populated after successful payment verification |
driverLat / driverLon | Driver’s most recent reported coordinates |
cancellationFee | Fee applied if the ride was cancelled after acceptance |
riderRating | Rating (1–5) the rider gave the driver after completion |
driverRating | Rating (1–5) the driver gave the rider after completion |