Cancel Trip

Cancel an existing TRUXX HUB trip request.

Use this endpoint to cancel a trip that belongs to the authenticated TRUXX HUB account. The API returns the applied cancellation fees, if any, based on the client cancellation policy and the current trip state.

EndpointPOST
Path/api/Trips/cancel-trip
Test base URLhttps://hub-sandbox-api.truxx.ae
Live base URLhttps://hub-api.truxx.ae
Authenticationx-api-key required

Request example

Send the TRUXX trip identifier you want to cancel. The trip must belong to the authenticated account.

curl --location 'https://hub-sandbox-api.truxx.ae/api/Trips/cancel-trip' \
--header 'Content-Type: application/json' \
--header 'x-api-key: truxx_sk_test_25d003e5789c483ab47793ad8cc3704f' \
--data '{
  "tripId": 23217
}'

Required field

tripIdRequired. The TRUXX trip identifier to cancel.

Response example

A successful response returns the same trip identifier together with the cancellation fees applied to the trip.

{
  "success": true,
  "code": 200,
  "message": "OK",
  "data": {
    "tripID": 23217,
    "cancellationFees": 0.0
  }
}

Response fields

  • tripID: The cancelled trip identifier
  • cancellationFees: The fees charged for cancelling the trip

Client cancellation policy

  • If the trip is cancelled early in the request flow, cancellation may be free and cancellationFees can be 0
  • If the trip has progressed further, a cancellation fee may apply
  • When a trip has already started, the cancellation fee can be higher than early-stage cancellation
  • If a refund is applicable, TRUXX HUB handles the related wallet adjustment internally