0
votes

Why doesn't Uber Rides Python SDK (API v1.2) client.estimate_ride upfront fare match ride_receipt's total_fare?

  1. Doesn't factor in a minimum UberPool price when present.
  2. Display price $4.80 vs subtotal $5.45, despite pickup and destination not changing

Example where UberPool had a $7 minimum:

client.estimate_ride returned

u'price': {
  u'display': u'$4.80',
  u'fare_breakdown': [],
  u'fare_id': u'REMOVED BY OP',
  u'high_estimate': 7,
  u'low_estimate': 4,
  u'minimum': None},
u'product_id': u'ee3ab307-e340-4406-b5ec-9f8c3b43075a',

8 second later, I requested a ride using client.request_ride, with product_id & fare_id included. The ride_receipt shows there was a minimum fare.

{u'charge_adjustments': [{u'amount': u'1.55',
   u'name': u'Booking Fee',
   u'type': u'booking_fee'}],
 u'charges': [{u'amount': u'1.75',
   u'name': u'Base Fare',
   u'type': u'base_fare'},
  {u'amount': u'1.66', u'name': u'Distance', u'type': u'distance'},
  {u'amount': u'0.88', u'name': u'Time', u'type': u'time'},
  {u'amount': u'1.16', u'name': u'$7.00 Minimum', u'type': u'minimum'}],
 u'currency_code': u'USD',
 u'distance': u'2.22',
 u'distance_label': u'miles',
 u'duration': u'00:08:47',
 u'normal_fare': u'$5.45',
 u'request_id': u'REMOVED BY OP',
 u'subtotal': u'$5.45',
 u'surge_charge': None,
 u'total_charged': u'$7.00',
 u'total_fare': u'$7.00',
 u'total_owed': None}
2
And what's your question?Sami Kuhmonen
Edited question: Why doesn't Uber Rides Python SDK (API v1.2) client.estimate_ride upfront fare match ride_receipt's total_fare?Xiao Wei Chen

2 Answers

1
votes

It doesn't look like you are actually calling /v1.2/requests/estimate on an upfront_fare_enabled product. If you request an actual estimate for an upfront fare you will get an exact price and not an estimate as shown in your example json.

For non-upfront fares the estimates endpoint will return an estimated price and not the guaranteed fare.

The cost will not change (unless destination changes) with an 'upfront_fare' for enabled products as indicated by the 'upfront_fare_enabled' key in the /products.

0
votes

(Posted on behalf of the OP).

Upgrade to uber-rides-0.3.1 to upgrade to v1.2 of the uber api.