How to use the Compensation API
This article explains how to read and write tour compensation through the MotionTools API, including the compensation endpoints, the tour.compensation_updated webhook, and how to migrate off the deprecated legacy earnings attribute.
Introduction
INFO
New to tour compensation? Read the Introduction to Tour Compensation article first for a conceptual overview of base earnings, bonuses, and tips.
The compensation object gives every tour a structured breakdown of base earnings, bonuses, and tips. This article is aimed at developers building or maintaining an integration with MotionTools.
It covers how to read and write compensation values through the API, how to receive change notifications through the tour.compensation_updated webhook, and how to migrate away from the deprecated legacy earnings attribute.
The Compensation Endpoints
The compensation object is available via a dedicated API endpoint on every tour.
Read compensation:
GET /api/tours/:id/compensation
Set base earnings:
PUT /api/tours/:id/compensation/base
Add or update a bonus:
PUT /api/tours/:id/compensation/bonus/:key
Remove a bonus:
DELETE /api/tours/:id/compensation/bonus/:key
Each write requires the currency to be passed explicitly. The currency is sourced from the tour's service area and must match across all components on the same tour.
For full API documentation and request/response examples, see the Tour Compensation API reference.
Locked Compensation After Reporting
If the Tour Compensation report is enabled, a tour's compensation is locked once a report includes it. From then on, the endpoints that set or remove base earnings and bonuses answer 403 Forbidden. Whether a tour's compensation can still be set or updated is also shown by the permissions.update_compensation flag on the tour's standard and compact views.
The tour's standard view shows where it stands:
compensation_reporting_status:not_readywhile the tour is in progress and until its tips are settled,readywhile it waits for the next report,reportedonce a report includes it, andskippedfor tours that never enter a report, such as cancelled tours or tours whose tips were settled while the report was disabledcompensation_reported_at: when the tour was included in a reportpermissions.update_compensation: whether the tour's compensation can still be set or updated;falseonce it is locked
Make your compensation writes before a tour's report is generated, and correct a payout in your own payroll after that.
Webhook: tour.compensation_updated
The tour.compensation_updated webhook fires whenever any component of a tour's compensation changes.
To reduce noise from rapid successive updates, the webhook is debounced: it fires once, 120 seconds after the last change on a given tour. If multiple components are updated in quick succession, a single webhook is sent with the final state.
Subscribe to this webhook in your integration settings to receive compensation updates automatically without polling the API.
WARNING
The legacy tour.earnings_updated webhook is deprecated. It continues to fire unchanged during the transition period but will be removed on November 6, 2026. Migrate to tour.compensation_updated before that date.
Deprecation of the Legacy Earnings Attribute
The following are deprecated as of May 7, 2026 and will be removed on November 6, 2026:
earningsfield on tour responsesPUT /api/hailing/bookings/:id/earningsendpointtour.earnings_updatedwebhook
All three continue to work unchanged during the transition window. No data is mirrored between the old and new surfaces.
To migrate your integration:
Replace writes to
PUT /api/hailing/bookings/:id/earningswithPUT /api/tours/:id/compensation/base. If you currently bundle bonuses into a single earnings value, split them into individual bonus writes usingPUT /api/tours/:id/compensation/bonus/:key.Replace subscriptions to
tour.earnings_updatedwithtour.compensation_updated.
See the migration guide for the full API before/after comparison.