v1

latestOpenAPI 3.0.32026-07-2418074.2 KB
Online Checkout

Cancel Order

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.

post/orders/{order_id}/cancel

Request body

Example request

{
  "total_amount": {
    "amount": 300,
    "currency": "SAR"
  },
  "shipping_amount": {
    "amount": 300,
    "currency": "SAR"
  },
  "tax_amount": {
    "amount": 100,
    "currency": "SAR"
  },
  "discount_amount": {
    "amount": 10,
    "currency": "SAR"
  },
  "items": [
    {
      "name": "Lego City 8601",
      "quantity": 1,
      "reference_id": "123",
      "sku": "SA-12436",
      "item_url": "SA-12436",
      "image_url": "SA-12436",
      "unit_price": {
        "amount": 490,
        "currency": "SAR"
      },
      "tax_amount": {
        "amount": 10,
        "currency": "SAR"
      },
      "discount_amount": {
        "amount": 100,
        "currency": "SAR"
      },
      "total_amount": {
        "amount": "100",
        "currency": "SAR"
      },
      "type": "Digital"
    }
  ]
}

Response

OK

cancel_idstring uuid
order_idstring uuid
status'updated' | 'canceled'