---
title: "CancelTransaction"
method: POST
path: "/CancelTransaction"
tags: ["Transactions"]
---

# CancelTransaction

`POST /CancelTransaction`

## Request body

- CancelTransactionRequest, nullable — The request body for canceling a transaction. This is used to cancel a pre-authorized transaction or void a pre-selected one, providing details such as the transaction ID, the reason for cancellation, and the amount.
  - `NayaxTransactionId` integer — The unique transaction ID assigned by Nayax, provided in the `/TransactionCallback`.
  - `SparkTransactionId` string — The unique session ID from the initial `/StartAuthentication` request.
  - `SiteId` integer — The ID of the site where the transaction occurred.
  - `MachineAuTime` string — The timestamp of the cancellation from the device in its local timezone. The format is `yyyyMMddHHmmssSSS`.
  - `TerminalId` string — The serial or external ID of the terminal used.
  - `TerminalIdType` integer — Defines the type of ID used for the `TerminalId` parameter. Use `1` for the HW Serial or `2` for the Nayax Machine ID.
  - `CancellationType` integer — Indicates which cancellation flow is being implemented. Use `1` for a Pre-Authorization Cancel or `2` for a Pre-Selection Void.
  - `ReasonCode` integer — The internal code explaining the reason for the cancellation.
  - `ReasonText` string, nullable — A human-readable explanation of the cancellation reason. This parameter is optional.
  - `CancelAmount` number, double — The amount to be canceled in major currency units (e.g., dollars or euros).

## Response `200`

Success. The transaction has been successfully canceled.

- CancelTransactionResponse, nullable — The response object for a canceled transaction, confirming the outcome of the cancellation and providing key details such as transaction identifiers, timestamps, and payment information.
  - `SparkTransactionId` string, nullable — The ID of the canceled session.
  - `Status` object — An object containing the final verdict of the cancellation and a descriptive message.
    - `Verdict` string — The outcome of the cancellation. It will be `"Approved"` if successful or `"Declined"` if it failed.
    - `ErrorDescription` string — Provides additional information if the verdict is `"Declined"`, or `"No Errors"` for a successful request.
    - `ErrorCode` number — A numeric code that specifies the type of error that occurred. This field is present only in error responses.
  - `CardBrand` string, nullable — The brand of the card used for the transaction (e.g., `"Visa"`, `"MasterCard"`).
  - `CardLast4Digits` string, nullable — The last four digits of the card used.
  - `AuthCode` string, nullable — The authorization code for the cancellation.
  - `MachineAuTime` string, nullable — The timestamp of the cancellation from the device, in the format `yyyyMMddHHmmssSSS`.
  - `AuTime` string, nullable — The timestamp from the authorization server.
  - `CancelTime` string, nullable — The server timestamp of the cancellation confirmation, in the format `yyyyMMddHHmmssSSS`.
  - `CurrencyCode` string, nullable — The ISO currency code (e.g., `"EUR"`).
  - `CurrencyNumeric` string, nullable — The ISO numeric currency code (e.g., `"978"` for EUR).
  - `FiscalRrn` string, nullable — The fiscal reference number for the receipt or audit trail.
  - `NayaxRRN` string, nullable — The Nayax reference number of the transaction.

---

[API](https://skmtc.net/nayax/apis/nayax-cortina-api.md) · [All operations](https://skmtc.net/nayax/apis/nayax-cortina-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nayax/nayax-cortina-api/revisions/421f6f83c257/schema)
