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

# ExternalCancel

`POST /ExternalCancel`

## Request body

- ExternalCancelRequest, nullable — Request details for canceling an external payment transaction (e.g., voiding a pre-authorization).
  - `NayaxTransactionId` integer — Nayax Internal Unique identifier for the transaction being cancelled.
  - `SparkTransactionId` string, nullable — Spark Unique identifier for this transaction.
  - `SiteId` integer, nullable — Optional. Indication for the Nayax Engine in which Site the transaction originated. Echo value from Authorization Callback.
  - `MachineAuTime` string, yyyyMMddHHmmssfff., nullable — The date time string of when the `/Authorization` or `/Sale` took place, in local (machine) time.
  - `TerminalId` string — Unique Identifier for the Nayax Terminal.
  - `TerminalIdType` 1 | 2, nullable — Indicates the type of TerminalId. 1 - Nayax HW serial, 2 - Nayax Machine ID
  - `CancellationType` 1 | 2 — Indicates which cancellation flow is implemented. 1 - Pre-Authorization Cancel, 2 - Pre-Selection Void
  - `ReasonCode` string, int16, nullable — Conditional. Cancel reason code.
  - `ReasonText` string, nullable — Conditional. Detailed description or text of the cancel reason. Either ReasonCode or ReasonText must be provided. ExternalCancel request without both will cause failure.
  - `CancelAmount` number, double, nullable — Always mandatory. Amount to be cancelled. Can’t be higher than the authorized amount.

## Response `200`

Success

- ExternalCancelResponse, nullable — Response details for an external transaction cancellation request.
  - `SparkTransactionId` string, nullable — The Spark unique identifier for this transaction.
  - `Status` Status — Transaction Status Details
    - `Verdict` string — Status of the request (Approved / Declined)
    - `ErrorCode` integer, nullable — - Conditional - Reason for declined request
    - `ErrorDescription` string, nullable — - Conditional - Length: 255 - Error description
    - `StatusMessage` string, nullable — - Optional - Length: 255 - Transaction status message as free text field
  - `AuthCode` string, nullable — For Credit card implementation, when the transaction is approved, this is the External (usually Card issuer's) Authorization Code.
  - `MachineAuTime` string, yyyyMMddHHmmssfff, nullable — The date time string of when the `/Authorization` or `/Sale` took place, in local (machine) time.

---

[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)
