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.

The “Get Driver Payments” API provides real-time payments information for either a single driver or all drivers associated with a specific organization. The data retrieved is limited to transactions that occurred within the last 24 hours. This endpoint enables organizations to monitor and manage payment activities efficiently, ensuring timely and accurate processing of payments.

Use case

The Get Driver Payments API offers detailed payment breakdown information for drivers, including earnings, net fare, amount, and earner information such as UUID, first name, last name, phone number, and email. This functionality is essential for platforms managing driver finances, facilitating better financial management, and enhancing fleet operations.

Using Dependent API

To access payment information for drivers, fleet owners should follow a two-step process. Firstly, they must use the Get Organizations API, entering the Fleet Supplier’s unique ID. This action retrieves all associated encrypted organization IDs, ensuring that all linked organizations are identified. Secondly, using these encrypted organization IDs as input, fleet owners can then access the Get Driver Payments API to fetch detailed payment data for drivers associated with each specific organization.

Support for Hierarchical Data

Not Supported. The API returns the payments information of the drivers directly linked to the organization. It doesn’t support fetching drivers linked to their child organizations.

Supported Supplier Types

Fleets

Scopes

Primary - supplier.partner.payments

Resource

/v1/vehicle-suppliers/earners/payments

HTTP Method

GET

Authorization

Client Credentials

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" \
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": ""
    }
  }
}
Request Query Parameters
Name Type Required Description
org_id string Y Encrypted organization 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
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.
Notes
  • If page_token is not specified, the default value will be null.
  • If the returned paginationResult object is not empty, it indicates that further calls to the endpoint can be made to retrieve missing entities in the next subsequent requested data. This is achieved by passing the provided nextPageToken along with a valid pageSize (between 1 and 100).
FAQ
  • Does the API support sandbox environments?
    • No, the API does not currently support sandbox environments.

Uber

Developers
© 2023 Uber Technologies Inc.