Three lines

Uber

Developers

GET /partners/payments

Access to the Driver API is currently limited access. If you are interested in using this API, you can apply for access on the Drivers Product Page.

Earnings

The Earnings endpoint returns an array of payments for the given driver. Payments are available at this endpoint in near real-time. Some entries, such as device_subscription will appear on a periodic basis when actually billed to the partner. If a trip is cancelled (either by rider or driver) and there is no payment made, the corresponding trip_id of that cancelled trip will not appear in this endpoint. If the given driver works for a fleet manager, there will be no payments associated and the response will always be an empty array. Drivers working for fleet managers will receive payments from the fleet manager and not from Uber.

The payments array in the response will have a maximum length based on the limit parameter. The response value count may exceed limit, therefore subsequent API requests may be necessary.

This endpoint can only serve queries for time ranges spanning 10 days or less. For instance, if you want to get payment details for the last 30 days, you would need to query the endpoint using 3 different 10-day ranges, paginating through each 10-day period 50 payments at a time (max possible value for limit), if necessary.

Note: If you set a time range spanning more than 10 days, a 422 HTTP error will be returned.

If only from_time is provided, the time range defaults to 7 days from the given time. For example, if you just provide a from_time and set it to 14 days, you will retrieve payments information between 14 and 21 days in the past.

If only to_time is provided, the time range defaults to 7 days up to the given time. For example, if the to_time is set to 14 days in the past, you will retrieve payments information between 7 and 14 days in the past.

Resource

GET /v1/partners/payments

Authorization

OAuth 2.0 bearer token with the partner.payments scope.

Query Parameters
Name Type Description
offset (optional) integer Offset the list of returned results by this amount. Default is zero.
limit (optional) integer Number of items to retrieve per page. Default is 5, maximum is 50.
from_time (optional) integer Unix timestamp of the start time to query from.
to_time (optional) integer Unix timestamp of the end time to query to.

Example Request

curl "https://api.uber.com/v1/partners/payments" \
  -H "Authorization: Bearer <TOKEN>"
Response

Status-Code: 200 OK

{
  "count": 1200,
  "limit": 1,
  "payments": [
    {
      "payment_id": "5cb8304c-f3f0-4a46-b6e3-b55e020750d7",
      "category": "fare",
      "event_time": 1502842757,
      "trip_id": "5cb8304c-f3f0-4a46-b6e3-b55e020750d7",
      "cash_collected": 0,
      "amount": 4.12,
      "driver_id": "8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==",
      "breakdown": {
        "other": 4.16,
        "toll": 1,
        "service_fee": -1.04
      },
      "rider_fees": {
        "split_fare": 0.50
      },
      "partner_id": "8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==",
      "currency_code": "USD"
    }
  ],
  "offset": 0
}
Name Type Description
offset integer Position in pagination.
limit integer Number of items to retrieve (50 max).
count integer Total number of items available from the request.
payments[] array List of payments.
payments[].payment_id string Unique identifier of the payment item. Same as trip_id if the payment is related to a trip.
payments[].category string Payment type. Can be fare, device_payment, vehicle_payment, promotion, other.
payments[].amount float Net payout to the driver. Positive for payments to the account, negative for charges to the account.
payments[].cash_collected float Amount collected in cash by the driver. For Uber products that are enabled for cash payments.
payments[].currency_code string ISO 4217 currency code of the payment.
payments[].driver_id string Unique identifier of the driver who received or made the payment.
payments[].event_time integer Unix timestamp of the payment processing time.
payments[].trip_id string Unique identifier of the trip associated with the payment. Only present for payment type fare, otherwise null.
payments[].partner_id string Unique identifier of the Fleet Manager for the driver.
payments[].breakdown object The breakdown of the fare.
payments[].breakdown.toll float The amount for tolls included in the fare.
payments[].breakdown.service_fee float The service fee collected by Uber for this fare.
payments[].breakdown.other float The remainder of the fare.
payments[].rider_fees object Fees paid to the driver by the rider. These fees are not reflected in the fare.
payments[].rider_fees.split_fare float The split fare fee.
Error Responses
Error Code Description
401 unauthorized Invalid OAuth 2.0 credentials provided.
409 forbidden The account used for authentication is not a driver account.
422 time_range_too_great The requested time range is too great.
422 validation_failed The limit is is greater than maximum value 50.

Uber

Developers
© 2023 Uber Technologies Inc.