Skip to content

Cancel Booking

Cancel a confirmed booking that hasn't started yet. This endpoint allows users to cancel their reservations and receive a refund according to the agency's cancellation policy.

Cancellation is a common need when travel plans change, and Daakey makes it easy while still protecting agencies from last-minute cancellations. The refund amount depends on how far in advance the cancellation is made—earlier cancellations typically receive higher refunds.

Important

  • Only bookings with status upcoming can be cancelled
  • Once a booking is active (the rental period has started), it cannot be cancelled—it must be ended instead
  • Refunds are processed to the original payment method

Endpoint

INFO

POST /api/v1/client/bookings/{id}/cancel

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes
X-Agency-Signature{signature}Yes

Path Parameters

ParameterTypeDescription
idintegerBooking ID

Request Body

ParameterTypeRequiredDescription
reasonstringNoCancellation reason

Example Request

bash
curl -X POST https://api.daakey.com/api/v1/client/bookings/1/cancel \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -H "X-Agency-Signature: {signature}" \
  -d '{
    "reason": "Change of plans"
  }'

Response

Success (200)

json
{
  "success": true,
  "message": "Booking cancelled successfully",
  "data": {
    "id": 1,
    "status": "cancelled",
    "cancelled_at": "2024-01-16T00:00:00Z",
    "cancellation_reason": "Change of plans",
    "refund": {
      "amount": 70.40,
      "status": "processing",
      "method": "Original payment method"
    }
  },
  "meta": {
    "agency_id": 123,
    "agency_code": "AGENCY123"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Error (400) - Cannot Cancel

json
{
  "success": false,
  "message": "Booking cannot be cancelled",
  "data": {
    "reason": "Booking has already started"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Error (404)

json
{
  "success": false,
  "message": "Booking not found",
  "data": null,
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Cancellation Policy

The refund amount depends on when the booking is cancelled:

Time Before StartRefund
> 24 hours100%
12 - 24 hours50%
< 12 hours0%

WARNING

Cancellation policy may vary by agency. Check the booking details for specific terms.

Notes

  • Only upcoming bookings can be cancelled
  • Active bookings must be ended, not cancelled
  • Refunds are processed within 5-10 business days

Daakey Car Sharing Platform