v1

latestOpenAPI 3.0.12026-07-26181265484.9 KB
Transactions

ExternalCancel

post/ExternalCancel

Request body

NayaxTransactionIdinteger

Nayax Internal Unique identifier for the transaction being cancelled.

SparkTransactionIdstring nullable

Spark Unique identifier for this transaction.

SiteIdinteger nullable

Optional. Indication for the Nayax Engine in which Site the transaction originated. Echo value from Authorization Callback.

MachineAuTimestring yyyyMMddHHmmssfff. nullable

The date time string of when the /Authorization or /Sale took place, in local (machine) time.

TerminalIdstring

Unique Identifier for the Nayax Terminal.

TerminalIdType1 | 2 nullable

Indicates the type of TerminalId. 1 - Nayax HW serial, 2 - Nayax Machine ID

CancellationType1 | 2

Indicates which cancellation flow is implemented. 1 - Pre-Authorization Cancel, 2 - Pre-Selection Void

ReasonCodestring int16 nullable

Conditional. Cancel reason code.

ReasonTextstring nullable

Conditional. Detailed description or text of the cancel reason. Either ReasonCode or ReasonText must be provided. ExternalCancel request without both will cause failure.

CancelAmountnumber double nullable

Always mandatory. Amount to be cancelled. Can’t be higher than the authorized amount.

Example request

{
  "NayaxTransactionId": 987654321,
  "SparkTransactionId": "f8e7d6c5-b4a3-2109-fedc-ba9876543210",
  "SiteId": 2,
  "MachineAuTime": "20251212110000500",
  "TerminalId": "NX0087654321",
  "TerminalIdType": 1,
  "CancellationType": 1,
  "ReasonCode": "01",
  "ReasonText": "User requested cancellation",
  "CancelAmount": 5
}

Response

Success

SparkTransactionIdstring nullable

The Spark unique identifier for this transaction.

AuthCodestring nullable

For Credit card implementation, when the transaction is approved, this is the External (usually Card issuer's) Authorization Code.

MachineAuTimestring yyyyMMddHHmmssfff nullable

The date time string of when the /Authorization or /Sale took place, in local (machine) time.

Example response

{
  "SparkTransactionId": "f8e7d6c5-b4a3-2109-fedc-ba9876543210",
  "AuthCode": "D4E5F6",
  "MachineAuTime": "20251212110000500"
}