Three lines

Uber

Developers

Overview

Business Receipts Sandbox Overview

Our Sandbox environment provides a way to test the endpoints and user flows without actually requesting a production trip.

It resembles production environments much as possible, so that you can test your integration. Any scenarios function similar to how they would work in production, except it can only operate on trips created using test accounts.

To use the Sandbox, make calls to: https://sandbox-api.uber.com/

Receipt workflow in Sandbox

1. Account Setup

Follow the instructions in Getting Started to ensure that you have been approved for access to your organization’s data and the business.receipts scope. Make sure to obtain Test rider account from Uber representative if you want to simulate e2e trips.

2. Create a trip 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 and tripID 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.

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
3. Receive Receipt webhook

Once the trip is complete, you will receive receipt-ready webhook if your devapp has been configured to receive webhooks.

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

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

Once you receive a webhook, you can then query GetReceipt endpoint to fetch details of the receipt.

All of the receipt endpoints can be invoked on Sandbox for test trips created under your org using a test account. Replace the host url to point to Uber Sandbox.

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

Uber

Developers
© 2023 Uber Technologies Inc.