Cancel

Cancel a placed order. Cancellation fees may apply depending on how far along the fulfillment process the order is. Always check cancellation_terms from the status response before cancelling, and retrieve valid reason codes from the cancellation-reasons endpoint.

Cancel Order

POST/ret11/cancel
Auth Required

Include a Bearer token. See Authentication.

Request Body

FieldTypeRequiredDescription
orderIdstringrequiredOrder ID returned from create-order
cancellationReasonIdstringrequiredReason code from the cancellation-reasons endpoint. Example: "006"
{
  "orderId": "019c2f0a2c1d74dba2dec3aa6e9cb2c3",
  "cancellationReasonId": "006"
}

Response

Returns the full ONDC on_cancel response. The order state is updated to "Cancelled", the fulfillments array is updated with a Cancel-type entry, the quote reflects any applicable cancellation fee (or "0.00" if none), and a cancellation object is included with the reason and cancelling party.

FieldTypeDescription
contextobjectONDC context block with action: "on_cancel"
message.orderobjectFull updated order object (see below)

message.order fields

FieldTypeDescription
idstringThe order ID
statestringAlways "Cancelled" on a successful cancel
providerobjectSeller details — id and locations[]
items[]arrayOrdered items with fulfillment_id, quantity, and tags
billingobjectBilling details (name, address, phone, email)
fulfillments[]arrayUpdated fulfillment with type: "Cancel" and state.descriptor.code: "Cancelled"
quoteobjectUpdated quote. price.value is "0.00" when no fee applies, or the cancellation fee amount otherwise
paymentobjectOriginal payment details
cancellationobjectContains cancelled_by (the party who cancelled) and reason.id (the reason code supplied in the request)
created_atstringISO 8601 timestamp when the order was originally created
updated_atstringISO 8601 timestamp of the cancellation
{
  "data": {
    "dto": {
      "context": {
        "domain": "ONDC:RET11",
        "country": "IND",
        "city": "std:080",
        "action": "on_cancel",
        "core_version": "1.2.0",
        "bap_id": "ondc.preprod.highwaydelite.com",
        "bap_uri": "https://ondc.preprod.highwaydelite.com/ret11",
        "bpp_id": "pramaan.ondc.org/beta/preprod/mock/seller",
        "bpp_uri": "https://pramaan.ondc.org/beta/preprod/mock/seller",
        "transaction_id": "56a55c3f-8052-4bb6-91d6-47e1a178a0c0",
        "message_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "timestamp": "2026-06-01T10:45:00.000Z",
        "ttl": "PT30S"
      },
      "message": {
        "order": {
          "id": "019bb2ca-a956-71a8-83c1-397bc5a092f9",
          "state": "Cancelled",
          "provider": {
            "id": "pramaan_provider_1",
            "locations": [
              { "id": "SSL1" }
            ]
          },
          "items": [
            {
              "id": "id_1cctu3_9_0",
              "fulfillment_id": "6c00379b-17ec-42b1-bf36-037a744d2056",
              "quantity": { "count": 1 },
              "tags": [
                { "code": "type", "list": [{ "code": "type", "value": "item" }] }
              ]
            }
          ],
          "billing": {
            "name": "John Doe",
            "address": {
              "door": "12-34",
              "building": "MG Road",
              "street": "MG Road",
              "locality": "Indiranagar",
              "city": "Bengaluru",
              "state": "Karnataka",
              "country": "IND",
              "area_code": "560001"
            },
            "phone": "9876543210",
            "email": "john@example.com"
          },
          "fulfillments": [
            {
              "id": "6c00379b-17ec-42b1-bf36-037a744d2056",
              "type": "Cancel",
              "state": {
                "descriptor": { "code": "Cancelled" }
              }
            }
          ],
          "quote": {
            "price": { "currency": "INR", "value": "0.00" },
            "breakup": [
              {
                "@ondc/org/item_id": "id_1cctu3_9_0",
                "title": "Double Patty Cheese Burger",
                "@ondc/org/title_type": "item",
                "price": { "currency": "INR", "value": "0.00" }
              }
            ],
            "ttl": "PT6H"
          },
          "payment": {
            "params": {
              "currency": "INR",
              "amount": "610.00",
              "transaction_id": "56a55c3f-8052-4bb6-91d6-47e1a178a0c0"
            },
            "status": "PAID",
            "type": "ON-ORDER",
            "collected_by": "BAP"
          },
          "cancellation": {
            "cancelled_by": "com.example.buyerapp",
            "reason": { "id": "006" }
          },
          "created_at": "2026-06-01T10:00:00.000Z",
          "updated_at": "2026-06-01T10:45:00.000Z"
        }
      }
    },
    "status": "ACK"
  }
}

Cancellation Fees

The fee applied depends on the fulfillment state at the moment of cancellation. The applicable rules are returned in cancellation_terms from the status response. When a fee applies, the quote.price.value in the on_cancel response reflects the fee amount rather than "0.00".

Fulfillment StateTypical Fee
Pending0%
Packed0%
Order-picked-up10%
Out-for-delivery30%–35%
Check Before Cancelling

Always retrieve cancellation_terms from the status endpoint before showing a cancel option. This lets you display the exact fee to the user so there are no surprises at cancellation time.

EndpointPurpose
Cancellation ReasonsFetch valid cancellationReasonId values before calling this endpoint
StatusCheck current fulfillment state and cancellation_terms fees before cancelling
Create OrderSource of the orderId used in the request body