---
title: "Cancel Order"
method: POST
path: "/orders/{order_id}/cancel"
tags: ["Online Checkout"]
---

# Cancel Order

`POST /orders/{order_id}/cancel`

This endpoint is requested to cancel or update the total order amount while order status on `authorised` (before the order is captured or shipping process is done). The order status value will be `canceled` or `updated` based on the modification applied to the total amount.

## Request body

- object
  - `total_amount` object, required — Total amount to be charged back to consumer.
    - `amount` number
    - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
  - `shipping_amount` object — Total amount for the shipping of the order.
    - `amount` number
    - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
  - `tax_amount` object — Total amount of taxes, if additionally applied.
    - `amount` number
    - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
  - `discount_amount` object
    - `amount` number
    - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
  - `items` object[]
    - `name` string, required — Product name. `<=255 characters`
    - `quantity` number, required — How many of this specific item is being purchased
    - `reference_id` string, required — The unique id of the item from merchant's side
    - `sku` string, required — Product SKU. **`<= 128 characters`**
    - `item_url` string, uri — URL of the item from merchant's website. **`<= 1024 characters`**
    - `image_url` string, uri — URL to an image of the product that can be later displayed to the customer. **`<= 1024 characters`** <br /> **Size** = 2-3 MB maximum <br /> **Resolution** WxH = 1024xY (the Y height of image should be small).
    - `unit_price` object
      - `amount` number
      - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
    - `tax_amount` object
      - `amount` number
      - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
    - `discount_amount` object
      - `amount` number
      - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
    - `total_amount` object, required
      - `amount` string
      - `currency` 'SAR' | 'AED' | 'BHD' | 'KWD' | 'OMR'
    - `type` string, required

## Response `200`

OK

- object
  - `cancel_id` string, uuid
  - `order_id` string, uuid
  - `status` 'updated' | 'canceled'
  - `canceled_amount` object[]
    - `amount` number
    - `currency` 'SAR' | 'AED' | 'KWD' | 'BHD' | 'OMR'

## Other responses

- `409` — Cannot cancel orders in `approved` state

---

[API](https://skmtc.net/tamara/apis/tamara-public-apis-v1-0.md) · [All operations](https://skmtc.net/tamara/apis/tamara-public-apis-v1-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tamara/tamara-public-apis-v1-0/versions/924ade2a1159/schema)
