---
title: CANCEL Order
slug: cancel-order
icon: 🟩
createdAt: 2022-03-23T02:16:11.000Z
---

To cancel an order, POST with the order id with your private key from your server.  This will keep the details of an order around, but will disallow any further payments added to it

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://test-api.featherpay.io/api/v1/orders/{orderId}/cancel",
  "name": "Cancel Order",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "9EC-lGwx45zLcr-VUHniP",
        "code": "[]",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "HeatsMObTjPrLYaTkfBH0",
        "code": "{\n    \"subErrors\":[],\n    \"message\":\"Must remove all payment methods before cancelling the order\"\n}",
        "language": "412",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "HeatsMObTjPrLYaTkfBH0"
  },
  "examples": {
    "languages": [
      {
        "id": "pFc138RTNF7Ft8IrnNHCM",
        "code": "curl -X POST \\\n  --url 'https://test-api.featherpay.io/api/v1/orders/:orderId/cancel' \\\n  --header 'content-type: application/json;charset=UTF-8' \\\n  --header 'accept: application/json' \\\n  --header 'X-Api-Key: {Secret API Key}' \\\n  --header 'X-Store-Id: {Store ULID}' \\\n  --data '{}'",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "pFc138RTNF7Ft8IrnNHCM"
  },
  "description": "Cancel an Order by its ID",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::



