Three lines

Uber

Developers

Overview

Vouchers Sandbox Overview

Sandbox environment provides a way to test uber APIs and user flows using test tenancy entities.

It resembles production environments much as possible, so that one can test their API integration. The test scenarios function similar to how they would work in production, except that they can only operate on organizations and trips created using test accounts.

Account Setup

To get started, work with an Uber representative to get approved access to u4b organization data and application scopes.

API requests

All production APIs are availble to be used in Sandbox environment. To make a request, direct requests to https://sandbox-api.uber.com.

Note: Sandbox APIs can only be used on test organizations.

Environment Host
Production https://api.uber.com
Sandbox https://sandbox-api.uber.com

Webhooks

Any webhook event that you receive contains environment header which indicates whether the request is coming from production or sandbox. All test voucher events will have the header value as Sandbox.

Header Description
X-Environment Indicates if this request is coming from the production or sandbox endpoint.

Simulating trips in Sandbox

In order to facilitate testing of voucher redemption, we have made following test trip simulation APIs available in sandbox.

Available Endpoints:
Method Endpoint Description
POST /v1/sandbox/terminal-state-trip Creates a new run to simulate terminal state trip
GET /v1/sandbox/run/<run_id> Retrieves the execution state of a run

Call POST /v1/sandbox/terminal-state-trip-run to create an asynchronous run for simulating terminal state trip. The call will return a runID to track the status of execution.

Typically, a run takes around 1-2 minutes to complete simulation. You can query the status of run by invoking GET /v1/sandbox/run/<run_id> endpoint.

Once the trip simulation is complete, GetVoucher API will reflect updated voucher usage.

Uber

Developers
© 2023 Uber Technologies Inc.