---
updatedAt: 2025-11-11T00:09:37.000Z
agentTools:
  projectIndex: https://docs.interswitchgroup.com/v1.1/llms.txt
---

# Cancel Invoice

This endpoint allows you to cancel an invoice.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "invoice",
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://qa.interswitchng.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {}
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/paymentgateway/api/v1/merchant/invoice/cancel": {
      "post": {
        "summary": "Cancel Invoice",
        "description": "This endpoint allows you to cancel an invoice.",
        "operationId": "cancel-invoice",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsicGFzc3BvcnQiLCJwcm9qZWN0LXgtbWVyY2hhbnQiXSwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiI5MDFiZGEzYi0xYzYzLTQ4YWQtOTkyZS05YWYwMzI2OGJmNTEiLCJjbGllbnRfaWQiOiJJS0lBQzQ0MjBEMTNBQkU1N0Q3NzhGQjcyNjNBMTdEMTNCNjBBOEFFNDEzNSJ9.dyre2W3xYk5yW5YHgTWbEyNo6O0JHcYH7ya8yqwJq7rLo4EboMmKv7jmvA4FdziATRJmM4ttA9-otpMOX0Hz2_j8uX6azbv6gf1vN-CPM0qvgOtTdjegtvghJ-dWIpOfa4cyvj7evS2_zJo8pnplmS6ZuhZ74mwx1GQcH6CgkNCeTE0PN1aXM7_-1D6BOiHtTnxWJWh0nMroYpFzZl-ew6TtHPRJ3YNxTupmtpQIn8ORQKvK_LadZzs1jrxMH1P3RaSQ0AGqGSVhXm6uudQM8oWbIP3A-vSSH4tuys3_kOMrWP68aOM7OV_ArHb9hRHeZG1_hHDZQKvURJZelcBvkA"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The ID of the invoice to be cancelled.",
                    "default": "30494"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"id\": 30494,\n    \"amount\": 250000,\n    \"customerName\": \"Uat tax Name email\",\n    \"customerEmail\": \"test@test.com\",\n    \"description\": \"Invoice Test\",\n    \"merchantCode\": \"MX6072\",\n    \"payableCode\": \"9405967\",\n    \"payableId\": 33597,\n    \"reference\": \"INVCK02JBWWC\",\n    \"invoiceLink\": \"https://qa.interswitchng.com/paymentgateway/invoice/pay/INVCK02JBWWC\",\n    \"lineItems\": [\n        {\n            \"itemName\": \"Uat Ba New\",\n            \"quantity\": 2,\n            \"itemAmount\": 25000\n        },\n        {\n            \"itemName\": \"Playstation\",\n            \"quantity\": 2,\n            \"itemAmount\": 100000\n        }\n    ],\n    \"invoiceStatus\": \"CANCELED\",\n    \"responseCode\": null,\n    \"tax\": 12.5,\n    \"discountPercent\": 5.5,\n    \"address\": \"Address\",\n    \"shippingFee\": 70000,\n    \"dueDate\": 2604188800000,\n    \"createdDate\": 1627131989680,\n    \"lastUpdated\": 1627490291490,\n    \"currencyCode\": \"566\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 30494,
                      "default": 0
                    },
                    "amount": {
                      "type": "integer",
                      "example": 250000,
                      "default": 0
                    },
                    "customerName": {
                      "type": "string",
                      "example": "Uat tax Name email"
                    },
                    "customerEmail": {
                      "type": "string",
                      "example": "test@test.com"
                    },
                    "description": {
                      "type": "string",
                      "example": "Invoice Test"
                    },
                    "merchantCode": {
                      "type": "string",
                      "example": "MX6072"
                    },
                    "payableCode": {
                      "type": "string",
                      "example": "9405967"
                    },
                    "payableId": {
                      "type": "integer",
                      "example": 33597,
                      "default": 0
                    },
                    "reference": {
                      "type": "string",
                      "example": "INVCK02JBWWC"
                    },
                    "invoiceLink": {
                      "type": "string",
                      "example": "https://qa.interswitchng.com/paymentgateway/invoice/pay/INVCK02JBWWC"
                    },
                    "lineItems": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "itemName": {
                            "type": "string",
                            "example": "Uat Ba New"
                          },
                          "quantity": {
                            "type": "integer",
                            "example": 2,
                            "default": 0
                          },
                          "itemAmount": {
                            "type": "integer",
                            "example": 25000,
                            "default": 0
                          }
                        }
                      }
                    },
                    "invoiceStatus": {
                      "type": "string",
                      "example": "CANCELED"
                    },
                    "responseCode": {},
                    "tax": {
                      "type": "number",
                      "example": 12.5,
                      "default": 0
                    },
                    "discountPercent": {
                      "type": "number",
                      "example": 5.5,
                      "default": 0
                    },
                    "address": {
                      "type": "string",
                      "example": "Address"
                    },
                    "shippingFee": {
                      "type": "integer",
                      "example": 70000,
                      "default": 0
                    },
                    "dueDate": {
                      "type": "integer",
                      "example": 2604188800000,
                      "default": 0
                    },
                    "createdDate": {
                      "type": "integer",
                      "example": 1627131989680,
                      "default": 0
                    },
                    "lastUpdated": {
                      "type": "integer",
                      "example": 1627490291490,
                      "default": 0
                    },
                    "currencyCode": {
                      "type": "string",
                      "example": "566"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": []
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```