---
updatedAt: 2026-05-28T15:32:22.000Z
agentTools:
  projectIndex: https://api-docs.retail.monext.com/llms.txt
---

# Cancel a transaction

The function of the cancellation of a transaction is possible only if the transaction has been validated and not banked, so the customer has not been charged to his bank account.<br> The Reset function is used to cancel the sending to your bank of a debit or credit transaction made from the following functions: payment, debit, dredit, refund.


# OpenAPI definition

````json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Checkout API",
    "version": "1.31.1",
    "license": {
      "url": "https://www.monext.fr/retail",
      "name": "Monext - All rights reserved"
    },
    "description": "# BASICS\n\n  ## Introduction\n\n  The Monext Retail API is RESTful, meaning that it uses HTTP verbs (POST, PUT, GET...) to perform functions on resources.\n\n  Specifically, POST is used to create a resource, PUT to update a resource, and GET to retrieve a resource or a collection of resources.\n\n  For example, to create a new wallet resource you would send a POST requests to Wallets.\n\n  POST and PUT requests usually require data to be passed in the message body to define the attributes of the object being created or updated.\n\n\n  ## Versioning\n  The API version is indicated in each endpoint resource path. For example, [https://api-sandbox.retail.monext.com/v1/checkout](https://api-sandbox.retail.monext.com/v1/checkout) indicates the API is at version 1.\n\n  Monext increments the version number when it releases a new version containing backwards-incompatible changes.\n\n  Some minor changes, mostly for improvements, could happens without version changes.\n\n\n  ## Security\n  The Monext Retail API processes sensitive data. That's why we pay special attention to security.\n  * Monext data centers deploy the latest in hardware and software security best practices.\n  * Communication with all Monext services requires TLS1.2.\n  * All communication is made by using standard features of HTTPs.\n  * Monext maintains PCI-DSS compliance certifications.\n\n  ## Responses\n  Monext Retail API calls return HTTP status codes. Some API calls also return JSON response bodies that include information about the resource.\n  When you create any Monext resource, the system associates an internal unique identifier for referencing that resource.\n\n  **HTTP Status Code**\n\n  Each API call returns a success or error HTTP status codes following the [RFC7231](https://tools.ietf.org/html/rfc7231).\n\n\n  **Success**\n\n  The following status codes of HTTP are used:\n\n  2xx - the request was successfully accepted and was or will be processed.\n\n\n  **Error**\n\n  The following status codes of HTTP are used:\n\n  4xx - the request was rejected due to a problem with the information sent by the client.\n\n  5xx - something unexpected occurred while fulfilling the request; the request may or may not have been processed, depending on the error.\n\n  Whenever a client receives a 5xx response, it should not assume anything about the processing state of such request.\n\n\n  ## Authentication\n\n  | Security Scheme Type      | HTTP  | Server |\n  |---------------------------|-------|--------|\n  | HTTP Authorization Scheme | basic |        |\n\n\n  ## Query\n  For most REST GET calls, you can specify one or more optional query parameters on the request URI to filter, limit the size of, and sort the data in an API response. For filter parameters, see the individual GET calls.\n\n\n  ## Sorting and Pagination\n  Rather than return everything from a large result set, we are using some URL parameters that will influence the page size and starting page number.\n\n  **Query parameter details**\n\n  | Parameter   | Type        | Description                                                             |\n  |-------------|-------------|-------------------------------------------------------------------------|\n  | size        | integer     | The number of items to list in the response.                            |\n  | page        | integer     | The page index.                                                         |\n  | sort        | string      | Sorts resources in the response by a specified value and sort direction.|\n\n  **Response field details**\n\n  | Parameter   | Type    | Description                                                       |\n  |-------------|---------|-------------------------------------------------------------------|\n  | count       | integer | The number of items to list in the response.                      |\n  | startIndex  | integer | The sort order index of the first resource in the returned array. |\n  | endIndex    | integer | The sort order index of the last resource in the returned array.  |\n  | recordTotal | integer | count of records                                                  |\n  <br>"
  },
  "x-readme": {
    "explorer-enabled": true,
    "samples-languages": [
      "curl",
      "node",
      "javascript",
      "python",
      "kotlin",
      "swift"
    ],
    "proxy-enabled": true,
    "samples-enabled": true
  },
  "externalDocs": {
    "url": "https://api-docs.retail.monext.com/",
    "description": "Monext Online documentation"
  },
  "servers": [
    {
      "url": "https://api-sandbox.retail.monext.com",
      "description": "Try our API on the sandbox (Homologation environment)"
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "tags": [
    {
      "name": "Transaction",
      "description": "Used for manage transaction",
      "externalDocs": {
        "description": "Documentation",
        "url": "#"
      }
    }
  ],
  "paths": {
    "/v1/checkout/transactions/{id}/cancels": {
      "post": {
        "tags": [
          "Transaction"
        ],
        "summary": "Cancel a transaction",
        "description": "The function of the cancellation of a transaction is possible only if the transaction has been validated and not banked, so the customer has not been charged to his bank account.<br> The Reset function is used to cancel the sending to your bank of a debit or credit transaction made from the following functions: payment, debit, dredit, refund.\n",
        "operationId": "transactionCancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Transaction unique identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionActionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionActionResponse"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionActionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "501": {
            "description": "Not Implemented",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway ou Proxy Error",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "504": {
            "description": "Gateway Time-out",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Result": {
        "title": "Result",
        "description": "Result",
        "required": [
          "title",
          "code",
          "detail"
        ],
        "type": "object",
        "properties": {
          "title": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "ACCEPTED, ERROR, REFUSED, CANCELLED, INPROGRESS, ONHOLD_PARTNER, PENDING_RISK.<br> See [result code list](https://docs.monext.fr/display/DT/Return+codes)",
            "example": "ERROR"
          },
          "code": {
            "maxLength": 5,
            "minLength": 0,
            "type": "string",
            "description": "Return code : more information. <br> See [result code list](https://docs.monext.fr/display/DT/Return+codes)",
            "example": "02305"
          },
          "detail": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "example": "Invalid field format, please refer to the user guide"
          }
        }
      },
      "SuccessfulResult": {
        "title": "SuccessfulResult",
        "description": "Successful result",
        "allOf": [
          {
            "$ref": "#/components/schemas/Result"
          },
          {
            "type": "object",
            "properties": {
              "title": {
                "description": "Result object in case of success or warning. ACCEPTED, REFUSED, CANCELLED, INPROGRESS, ONHOLD_PARTNER, PENDING_RISK.<br> See [result code list](https://docs.monext.fr/display/DT/Return+codes)",
                "example": "ACCEPTED"
              },
              "code": {
                "description": "Return code : more information. <br> See [result code list](https://docs.monext.fr/display/DT/Return+codes)",
                "example": "00000"
              },
              "detail": {
                "example": "Sucessful"
              }
            }
          }
        ]
      },
      "BadRequestResult": {
        "title": "BadRequestResult",
        "description": "BadRequest result",
        "allOf": [
          {
            "$ref": "#/components/schemas/Result"
          },
          {
            "type": "object",
            "properties": {
              "invalidParams": {
                "description": "List of invalid fields and the appropriate format",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvalidParams"
                }
              }
            }
          }
        ]
      },
      "InvalidParams": {
        "title": "InvalidParams",
        "type": "object",
        "description": "List of invalid fields and the appropriate format",
        "properties": {
          "name": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "description": "invalid field name"
          },
          "reason": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "description": "expected format for the field",
            "example": "size must be between 3 and 4"
          },
          "codes": {
            "maxItems": 255,
            "minItems": 0,
            "type": "array",
            "description": "Translation error key",
            "example": "{form.group.error}",
            "items": {
              "type": "string",
              "description": "Translation error key",
              "example": "{form.group.error}"
            }
          },
          "arguments": {
            "maxItems": 255,
            "minItems": 0,
            "type": "array",
            "description": "Arguments error key",
            "example": 127,
            "items": {
              "type": "string",
              "description": "Arguments error key",
              "example": "127"
            }
          }
        }
      },
      "OrderItem": {
        "type": "object",
        "description": "Item in a order",
        "properties": {
          "reference": {
            "type": "string",
            "description": "Order item reference.",
            "maxLength": 50,
            "minLength": 0,
            "example": "ref-1"
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Amount",
                "description": "Total price of these items, in the smallest currency unit."
              }
            ]
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of Items: nb, weight, volume, in the smallest currency unit.",
            "minimum": 1,
            "example": 10
          },
          "comment": {
            "type": "string",
            "description": "Comment of the item in the order.",
            "maxLength": 255,
            "minLength": 0,
            "example": "Lorem impusum color damet"
          },
          "brand": {
            "type": "string",
            "description": "Product brand.",
            "maxLength": 50,
            "minLength": 0,
            "example": "MONEXT"
          },
          "category": {
            "type": "string",
            "description": "Category of item. <br> Values : [category values](https://docs.monext.fr/display/DT/Codes+-+Category)",
            "maxLength": 50,
            "minLength": 0,
            "example": "100010001"
          },
          "subCategory1": {
            "type": "string",
            "description": "Rank 1 subcategory.",
            "maxLength": 50,
            "minLength": 0,
            "example": "Watches & Jewellery"
          },
          "subCategory2": {
            "type": "string",
            "description": "Rank 2 subcategory.",
            "maxLength": 50,
            "minLength": 0,
            "example": "Men watches"
          },
          "miscellaneous": {
            "$ref": "#/components/schemas/Miscellaneous"
          },
          "taxRate": {
            "type": "integer",
            "description": "Item tax rate (expressed in hundredths). Format : 1580 for 15.8%.",
            "maximum": 9999,
            "example": 1580
          },
          "seller": {
            "type": "string",
            "description": "Name or id of the final seller.",
            "maxLength": 100,
            "minLength": 0,
            "example": "MONEXT"
          },
          "sellerType": {
            "type": "string",
            "description": "Type of seller.  Values : PROFESSIONAL, PRIVATE_SELLER",
            "enum": [
              "PROFESSIONAL",
              "PRIVATE_SELLER"
            ]
          }
        }
      },
      "TransactionActionRequest": {
        "title": "TransactionActionRequest",
        "type": "object",
        "description": "Action request for a transaction",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Amount"
          },
          "comment": {
            "type": "string",
            "description": "Description of reason for cancel. It can be viewed on the transaction log accessible through the Merchant Administration Center.",
            "maxLength": 255,
            "minLength": 0,
            "pattern": "^[^<>]*$",
            "example": "A comment."
          },
          "items": {
            "type": "array",
            "description": "The merchant must indicate the details of the order for a partial action on a transaction.",
            "items": {
              "$ref": "#/components/schemas/OrderItem"
            }
          },
          "privateData": {
            "$ref": "#/components/schemas/PrivateData"
          },
          "miscData": {
            "$ref": "#/components/schemas/MiscData"
          },
          "merchantReference": {
            "type": "string",
            "description": "Merchant reference of the action on a transaction.",
            "example": 173629
          }
        }
      },
      "TransactionActionResponse": {
        "title": "TransactionActionResponse",
        "type": "object",
        "description": "Action response for a transaction",
        "required": [
          "result"
        ],
        "properties": {
          "result": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SuccessfulResult"
              },
              {
                "description": "Result of the request when the response is valid."
              }
            ]
          },
          "transaction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionAction"
              },
              {
                "description": "Details of the payment transaction."
              }
            ]
          },
          "miscData": {
            "$ref": "#/components/schemas/MiscData"
          }
        }
      },
      "TransactionBase": {
        "title": "TransactionBase",
        "type": "object",
        "description": "Details of the payment transaction",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique Monext transaction identifier.",
            "maxLength": 50,
            "minLength": 0,
            "example": "127382"
          },
          "date": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Date",
                "description": "Processing date and time of the transaction.<br> Format ISO 8601: yyyy-MM-ddThh:mm:ssZ"
              }
            ]
          }
        }
      },
      "TransactionAction": {
        "title": "Transaction",
        "type": "object",
        "description": "Details of the transaction for this action.",
        "allOf": [
          {
            "$ref": "#/components/schemas/TransactionBase"
          },
          {
            "type": "object"
          },
          {
            "description": "Details of the transaction for this action.",
            "properties": {
              "type": {
                "$ref": "#/components/schemas/TransactionType"
              }
            }
          }
        ]
      },
      "TransactionType": {
        "title": "TransactionType",
        "type": "string",
        "description": "Type of transaction<br> Specify whether it is an authorization, a capture, a refund, ...",
        "enum": [
          "AUTHORIZATION",
          "CAPTURE",
          "CANCEL",
          "REFUND",
          "CREDIT",
          "AUTHORIZATION_AND_CAPTURE",
          "ORDER",
          "REAUTHORIZATION_AND_CAPTURE",
          "DEBIT",
          "CHEQUE_SCORING",
          "REAUTHORIZATION",
          "AUTHORIZATION_AND_CAPTURE_COMPLEMENT",
          "SIGNATURE",
          "ACCOUNT_VERIFICATION"
        ]
      },
      "PrivateData": {
        "title": "PrivateData",
        "type": "object",
        "additionalProperties": {
          "type": "string",
          "description": "${privateData.transaction.desc}",
          "example": "{\"property1\":\"value1\",\"property2\":\"value2\"}"
        },
        "description": "Additional data to be used throughout the payment lifecycle.<br> A dictionary of key-value pairs where the values can only be strings.<br> e.g. {\"suborderid\": \"AE-3023-001\", \"chanel\": \"mobile\"}",
        "example": {
          "property1": "value1",
          "property2": "value2"
        }
      },
      "MiscData": {
        "title": "MiscData",
        "type": "object",
        "additionalProperties": true,
        "description": "miscData can be transmit to the payment method partners.<br> Consult the payment method for each use.<br> miscData is a dictionary values can be of any type (aka free-form object) Example:<br> ``` {\n  \"key1\": \"value1\",\n  \"key2\": \"value2\"\n} ``` or ``` \"SBCC\": {\n  \"membershipStatus\": \"01\",\n  \"deferredPayment\": {\n      \"numberOfDays\": \"060\"\n} ```",
        "example": {
          "SBCC": {
            "membershipStatus": "01",
            "deferredPayment": {
              "numberOfDays": "060"
            }
          }
        }
      },
      "Date": {
        "title": "Date",
        "type": "string",
        "description": "Date and time<br> Format ISO 8601: yyyy-MM-ddThh:mm:ssZ",
        "format": "date-time",
        "example": "2020-03-27T12:45:00Z"
      },
      "Amount": {
        "title": "Amount",
        "description": "The amount is expressed in the smallest currency unit.<br> For example, 1€ value must be 100.<br> Shall be set to 0 for an account verification query.",
        "type": "integer",
        "format": "int64",
        "maximum": 1000000000000000000,
        "minimum": 0,
        "example": 1000
      },
      "Miscellaneous": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        },
        "description": "Additional data to be used throughout the payment lifecycle. A dictionary of key-value pairs where the values can only be strings e.g. ``` { \"suborderid\": \"AE-3023-001\", \"chanel\": \"mobile\" } ```.",
        "example": {
          "suborderid": "AE-3023-001",
          "chanel": "mobile"
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  }
}
````