Get Guest Trip Receipt
GEThttps://api.uber.com/v1/guests/trips/{request_id}/receipt
¶ Use case
Use this endpoint to retrieve the receipt for a given trip.
If the request is from a third party (3P) app, please add x-uber-organizationuuid header and the Organization UUID as the value or the request will be denied.
¶ Authorization
OAuth 2.0 Bearer token with the guests.trips
scope.
¶ Request
¶ Example request
curl -X GET \
-H 'authorization: Bearer <access_token>' \
-H 'content-type: application/json' \
'https://api.uber.com/v1/guests/trips/<request_id>/receipt'
¶ Request URL path parameters
Name | Type | Description |
---|---|---|
request_id | string | The unique ID of the ride request. |
¶ Response
¶ Example response
{
"guest": {
"first_name": "Jane",
"last_name": "Doe",
"phone_number": "+14155550000",
"email": "jane@example.com"
},
"request_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"charges": [
{
"name": "Base Fare",
"amount": 2.2
},
{
"name": "Distance",
"amount": 2.75
},
{
"name": "Time",
"amount": 3.57
}
],
"surge_charge": {
"name": "Surge x1.5",
"amount": 4.26
},
"home_currency_total_fare": {
"currency_code": "USD",
"amount": 13.97
},
"normal_fare": "$8.52",
"subtotal": "$12.78",
"total_fare": "$5.92",
"total_owed": null,
"currency_code": "USD",
"duration": "00:11:35",
"distance": "1.49",
"distance_label": "miles"
}
¶ Response body parameters
Field | Type | Description |
---|---|---|
request_id |
string | The unique ID of the ride request. |
guest |
object | Object containing all the information about the rider. |
guest.guest_id |
string | Unique identifier of a rider. |
guest.first_name |
string | The first name of the rider. |
guest.last_name |
string | The last name of the rider. |
guest.phone_number |
string | Phone number of rider E.164 (international) format. |
guest.email |
string | Email address of the rider. |
guest.locale |
string | The preferred locale for any communication with the guest (e.g., SMS). Defaults to en (English) if not specified. |
charges |
array | Enumerated charges. |
charges.name |
string | The name of the charge. |
charges.amount |
float | The amount of the charge. |
charge_adjustments |
array | Adjustments made to the charges. |
charge_adjustments\[].name |
string | The name of the charge adjustment. |
charge_adjustments\[].amount |
float | The amount of the charge adjustment. |
charge_adjustments\[].type |
string | The type of charge adjustment. |
surge_charge |
object | Object containing information about increased fares. |
surge_charge.name |
string | The name of the surge charge (includes multiplier). |
surge_charge.amount |
float | The amount of the surge charge. |
normal_fare |
string | The summation of the charges. |
subtotal |
string | The summation of the normal_fare and surge_charge[amount]. |
total_fare |
string | The fare after credits and refunds have been applied. |
total_owed |
float | The total amount still owed after attempting to charge the user. May be null if amount was paid in full. |
currency_code |
string | The currency of the amounts in the response, in ISO 4217 format. |
expense_memo |
string | A free-text field used to describe the purpose of the trip for expense reporting (maximum length: 64 characters). This value will appear on the trip receipt and in any configured expense-reporting integrations, such as Uber for Business or Business Profiles. |
duration |
string | Time duration of the trip in ISO 8601 HH:MM:SS format. |
distance |
string | Distance of the trip. |
distance_label |
string | The localized unit of distance. |
home_currency_total_fare |
object | Total fare in the currency of the U4B Organization. |
home_currency_total_fare.currency_code |
string | Currency of the U4B Organization in ISO 4217 format. |
home_currency_total_fare.amount |
float | Total Amount of the trip displayed in U4B Organization’s default currency. |
taxes |
array | List of tax items applicable for the trip receipt. |
taxes.name |
string | The name of the tax classification. |
taxes.rate |
float | The rate at which the tax is charged. |
taxes.rate_type |
string | The rate type of the tax, also known as tax label. For example, GST, VAT, etc. |
taxes.amount |
float | Amount paid in taxes. |
taxes.authority |
object | The object contains the authority that charged the tax. |
taxes.authority.country |
string | The country ISO2 of the authority that charged the tax. |
¶ Endpoint Possible Errors
HTTP Status | Code | Description |
---|---|---|
400 | validation_failed | This error occurs when an incorrect or invalid request_id is provided in the request path. Please use a valid request_id to avoid this error. |
401 | unauthorized | Authentication failed. The client lacks valid authentication credentials for the requested resource. |
403 | forbidden | The client does not have permission to access the requested resource. |
404 | entity_not_found | This error occurs when trying to fetch a receipt for a trip created in the sandbox environment. |
404 | entity_not_found | This error occurs when trying to fetch a receipt that has not yet been generated or for a trip where no charge was applied. |
404 | not_found | The requested resource or entity could not be found on the server or in the database. |
500 | internal_server_error | An unexpected error occurred on the server while processing the request. |