Three lines

Uber

Developers

[API] Get Driver Payments

Privileged and Confidential This endpoint design has been confidentially shared with you. It is still under development and is subject to change without notice. Please do not share this document or API endpoint details with anyone who is not authorized to have access. For more information read about scopes.

Get real time payments information of single driver/all drivers linked to a supplier org. This supports data only for last 24 hours.

Resource

/v1/vehicle-suppliers/earners/payments

HTTP Method

GET

Access Method

Client Credentials

Required scopes

Primary - supplier.partner.payments

Usage

The client should access the Get Organizations API that fetches the child organizations for the given organisation. This API returns the encrypted IDs for the linked organizations . The clients can then use the encrypted organization ID in the below request for the driver payments API to fetch the driver payment response.

Support for Hierarchical Data

Not Supported. The API returns the payments information of the drivers directly linked to the organization ID passed in the query param as shown in Example Request. It doesn’t support fetching drivers linked to their child organizations

Example Request
curl -i -X GET "https://api.uber.com/v1/vehicle-suppliers/earners/payments?org_id=<org_id>&page_size=<page_size>&start_time=<start_time>&end_time=<end_time>" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
Example Request with driver filter
curl -i -X GET "https://api.uber.com/v1/vehicle-suppliers/earners/payments?org_id=<org_id>&page_size=<page_size>&start_time=<start_time>&end_time=<end_time>&driver_id=<driver_uuid>" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \

Request Query Parameters
Name Type Required Description
org_id string Y Encrypted organisation UUID.
page_token string N Option for pagination - Starting point of where the page should be taken from. If not given, first page would be returned.
page_size integer N Option for pagination - maximum number of records to be fetched in the request. Value must be between 1 and 100 inclusive. If not given, a default page size of 50 will be used.
start_time integer Y Timestamp in the format of milliseconds since default EPOCH (1/1/1970). Only payment transactions on and after this timestamp will be included in response. This can not be less than 24 hours from current time.
end_time integer Y Timestamp in the format of milliseconds since default EPOCH (1/1/1970). Only payment transactions on and before this timestamp will be included in response. This can not be more than current time.
driver_id string N Raw driver uuid to get the results for single driver_uuid.

Response Body Fields
Name Type Nullable Description
earnerPaymentBreakdowns Array of EarnerPaymentBreakdown Y List of breakdowns aggregated per driver over given time range in the request.
paginationResult PaginationResult object N Pagination info for next pages.

EarnerPaymentBreakdown

Name Type Description
paymentBreakdowns Array of PaymentBreakdown It includes List of breakdowns for the earner.
earnerInfo EarnerInfo object It includes personal information of the earner.

PaymentBreakdown

Name Type Description
categoryName string Name of the category of this component of breakdown.
categoryLabel string Label of the category of this component of breakdown.
amount Amount object Includes associated currency and amount of this category.
children Array of PaymentBreakdown List of payment breakdowns that this component is composed of.

Amount

Name Type Description
amountE5 integer Amount of currency in given current code in precision of 5 digits after decimal point represented as an integer.
currencyCode string Currency Code.

EarnerInfo

Name Type Description
uuid string Earner’s UUID.
firstName string First name of the earner.
lastName string Last name of the earner.
phoneNumber string Phone number of the earner.
email string Email id of the earner.

PaginationResult

Name Type Description
nextPageToken string Can be null, if there are no more records

Example Response
{
  "statusCode": 200,
  "body": {
    "earnerPaymentBreakdowns": [
      {
        "paymentBreakdowns": [
          {
            "categoryName": "earnings",
            "categoryLabel": "Total Earnings",
            "amount": {
              "amountE5": 120000,
              "currencyCode": "BRL"
            },
            "children": [
              {
                "categoryName": "net_fare",
                "categoryLabel": "Net Fare",
                "amount": {
                  "amountE5": 120000,
                  "currencyCode": "BRL"
                },
                "children": null
              }
            ]
          }
        ],
        "earnerInfo": {
          "uuid": "910a15d2-a5b4-402b-8888-83ed261e6f99",
          "firstName": "JOAO",
          "lastName": "VITOR",
          "phoneNumber": "9999992131",
          "email": "xxxxxxx@gmail.com"
        }
      },
      {
        "paymentBreakdowns": [
          {
            "categoryName": "earnings",
            "categoryLabel": "Total Earnings",
            "amount": {
              "amountE5": -730000,
              "currencyCode": "MXN"
            },
            "children": [
              {
                "categoryName": "net_fare",
                "categoryLabel": "Net Fare",
                "amount": {
                  "amountE5": -730000,
                  "currencyCode": "MXN"
                },
                "children": null
              }
            ]
          }
        ],
        "earnerInfo": {
          "uuid": "920b15d2-a5aa-1111-2222-83ed261e6f99",
          "firstName": "Francisco",
          "lastName": "Benitez",
          "phoneNumber": "777121921",
          "email": "yyyyyyyy@outlook.com"
        }
      }
    ],
    "paginationResult": {
      "nextPageToken": ""
    }
  }
}

Pagination
  • If page_token is not specified, then the default value will be null.

  • If the returned paginationResult object is not empty, it means you can keep calling the endpoint to get the missing entities on the next subsequent requested data, by passing the provided nextPageToken and a valid pageSize (between 1 and 100).

Rate Limit
  • Rate limit for this endpoint is 2000 requests per hour per Developer Application.
Endpoint Specific Errors
Http Status Code Code Message
400 bad_request The request parameters are invalid.
500 internal_server_error Internal server error.
403 unauthenticated User does not have permission.
429 rate_limited Number of requests exceeds allowed limit.
503 service_unavailable Service unavailable.
401 unauthorized Invalid OAuth 2.0 credentials.

Uber

Developers
© 2023 Uber Technologies Inc.