Skip to main content
Cortina Prepaid uses the Cancel command to notify the integrator in order to initiate the cancellation process with the Cortina payment provider whenever one of the below scenarios takes place:
  1. Getting a failed Authorization Response (either due to timeout or having an error code in the Authorization Response).
  2. Issues during product selection- inactivity of the consumer/Cancel button being pressed/invalid product selection by the consumer.
  3. Vend failure (issue with product dispensing/service providing) by the machine
This command is essential for having the payment provider aware that the transaction was cancelled on Nayax’s end (as well as from the consumer’s POV), and is done in order for the payment provider to complete the cancellation on its end.
Note: This command is relevant for PreAuthorization only. Its equivalent in the PreSelection flow is the Void command.

Request

Nayax’s servers send a POST request to your configured Cancel endpoint, which would be of the following format: (customer's URL)/Cortina/PrePaid/Cancel The payload includes the full result of the card scan operation:

Request Parameters

The following table describes the parameters included in the request body:
FieldTypeDescription
ReasonCodeInt(16)The valid cancellation or decline code:
  • 1: Insufficient funds
  • 2: Transaction ID unknown
  • 3: Cardholder exceeded daily/weekly/monthly transaction count limit
  • 4: Cardholder exceeded transaction amount limit
  • 5: Suspected Fraud
  • 6: General system failure
  • 7: Invalid amount
  • 8 / 998: Request cannot be parsed (format error) / Validation error
  • 9: Transaction not allowed to cardholder
  • 40: For Nayax internal use only.
  • 990: CertificateFileName not found
  • 991: Failed to decipher message body
  • 992: Timeout exception
  • 994: Card Brand not supported
  • 996: Transaction ID Unknown / Duplicate Transaction ID (Start Session Error)
  • 997: Missing mandatory parameters
  • 999: General exception
  • 1010: Public Key Certificate not found
  • 1011: Method not Implemented
ReasonTextStringThe verbal explanation corresponding to the ReasonCode.
TransactionIdString(36)The unique identifier for this transaction.
  • Echoes the encrypted ID from /StartSession if used.
  • Otherwise, the Nayax Engine generates the value.
NayaxTransactionIdInt(64)The Nayax internal unique ID for the transaction, echoed in further requests.
AmountDoubleThe payment amount (Decimal with max 3 digits for cents).
  • Example: 1 cent = 0.01.
  • Note: Currencies with no decimal places (e.g., JYN) are still represented as a double (e.g., 234.0).
CurrencyCodeString(3)The currency code in ISO 4217 Alpha-3 format.
CurrencyNumericString(3)The currency code in ISO 4217 Numeric-3 format.
SiteIdInt(16)The identifier for the Nayax server region.
MachineAuTimeStringThe Machine Authorization Timestamp.
TimeoutMSInt(32)Nayax Server Timeout configuration in milliseconds.
IsProductSelectedBoolIndication if the product was pre-selected before the payment process.
HwSerialStringNayax Device Hardware serial number.
FWVersionStringDevice Firmware version.
TypeStringNayax Device Type.
IdInt(64)Machine entity unique ID allocated in Nayax’s back office.
NameString(255)Machine Name as defined in Nayax’s back office.
TerminalIdString(255)Terminal identifier. Contact Nayax TPOC to define.
DecimalPlaceInt(64)The decimal point location for amounts used on this machine.
  • Example: Value of 2 means amounts like 123.45.
OffsetString(255)UTC timezone offset.
GroupIdStringFor Nayax internal use only.
OperatorIdString(255)Merchant ID as defined in Nayax’s back office (String format).
RegionString(255)Region as defined in Nayax’s back office.
CityString(255)Machine City as defined in Nayax’s back office.
ZipCodeString(255)Machine Zip Code as defined in Nayax’s back office.
NameStringCountry Full Name.
NumericCodeString(3)ISO-3166-1 Numeric-3 code.
Alpha2CodeString(2)ISO-3166-1 Alpha-2 code.
Alpha3CodeString(3)ISO-3166-1 Alpha-3 code.
StateStringActor geo state code.
CityString(255)Actor geo City.
CountryCodeStringActor geo Country code (ISO3).
ZipCodeString(255)Actor geo Zip code.
AddressString(255)Actor geo Address.
LongitudeStringMachine Location Longitude.
LatitudeStringMachine Location Latitude.
IdInt(64)Actor ID (Direct Merchant/Operator).
NameString(255)Direct Merchant name.
OperatorIdInt(64)Merchant operator ID (Integer format).
OperatorNameStringMerchant operator name.
MerchantIdInt(64)Merchant ID. Contact Nayax TPOC to define.
NameStringCountry Full Name.
NumericCodeString(3)ISO-3166-1 Numeric-3 code.
Alpha2CodeString(2)ISO-3166-1 Alpha-2 code.
Alpha3CodeString(3)ISO-3166-1 Alpha-3 code.
StateStringActor geo state code.
CityString(255)Actor geo City.
CountryCodeStringActor geo Country code (ISO3).
ZipCodeString(255)Actor geo Zip code.
AddressString(255)Actor geo Address.
LatitudeStringMachine Location Latitude.
LongitudeStringMachine Location Longitude.
DirectActorStringDirect actor custom data (String in JSON format).
OperatorStringOperator custom data (String in JSON format).
DistributorStringDistributor custom data (String in JSON format).
ActorStringActor custom data (String in JSON format).
MachineStringMachine custom data (String in JSON format).
CardNumberStringCard details provided based on transaction type:
  • Full Track 2 for card-present Authorizations/Sales.
  • Card PAN only for other transaction types (e.g., Refund, Settlement).
EntryModeString(4)How the card details were read:
  • MCR: Magnetic Stripe Read (swipe)
  • CON: Contact Chip Read (insert)
  • CLS: Contactless Chip Read (tap)
  • NFC: Phone/Mobile device contactless read (phone tap)
  • QR: Card number read from a QR code
  • Consult Nayax POC for specific edge cases.
ExpYearStringCard expiration year (YY format). Conditional (only when Interface is 1 or 10).
ExpMonthStringCard expiration month (MM format). Conditional (only when Interface is 1 or 10).
EMVDataStringEMV tags data in TLV (Tag-Length-Value) format.
IDNumberStringCardholder ID Number.
RandomNumberStringFurther information is unavailable.
PrimaryIdStringPrimary Brand ID.
PrimaryDescriptionStringPrimary Brand Description.
SecondaryIdStringSecondary Brand ID.
SecondaryDescriptionStringSecondary Brand Description.
CardHolderNameStringCard Holder Name.
SrvTranIdStringThe Integrator’s internal transaction ID.
  • Conditional: Only mandatory if /StartSession was not used.
  • If used, this should be empty or echo the Transaction ID.
AuthCodeString(40)External Authorization Code (usually from the Card Issuer’s bank).
AuthAmountDoubleThe original amount requested in the /Authorization request.
SettAmountDoubleThe original amount requested in the /Settlement or /Sale process. Irrelevant for Authorization.
RRNStringReference Retrieval Number. Highly recommended to be visible to the end consumer/Card holder.
TokenString(256)A unique token for the transaction. For Nayax Internal use only.
AuthDateTimeStringThe date and time string when the /Authorization took place. Format:ddMMyyHHmmss.
SettDateTimeDoubleThe Settlement Date/Time. Irrelevant for Authorization.
TraceNumberStringThe Trace number. For Nayax Internal use only.
AuthSourceString(5)For Nayax Internal use only.
AdditionalDataStringAdditional data string in JSON format. Contact Nayax TPOC to define.
IsGatewayTimeoutBoolIndicates if a gateway timeout occurred (valid in the response).

Response

The Cancel Response that the customer’s payment method would send to Nayax’s servers.
The payload should look as follows:

Response Parameters

The following table describes the fields returned in the API response:
FieldTypeDescription
VerdictStringThe final status of the request. Must be one of the constant string values:
  • Approved
  • Declined
CodeInt(32)The Decline Code. Conditional—only present if Verdict is ‘Declined’. Valid decline codes include:
  • 1: Insufficient funds
  • 2: Transaction ID unknown
  • 3: Cardholder exceeded transaction count limit
  • 4: Cardholder exceeded transaction amount limit
  • 5: Suspected Fraud
  • 6: General system failure
  • 7: Invalid amount
  • 8: Request cannot be parsed (format error)
  • 9: Transaction not allowed to cardholder
  • 40: For Nayax internal use only.
  • 990: CertificateFileName not found
  • 991: Failed to decipher message body
  • 992: Timeout exception
  • 994: Card Brand not supported
  • 996: Transaction ID Unknown / Duplicate Transaction ID (Start Session Error)
  • 997: Missing mandatory parameters
  • 998: Validation / request cannot be parsed
  • 999: General exception
  • 1010: Public Key Certificate not found
  • 1011: Method not Implemented
StatusMessageString(255)A free text field containing the transaction status message or additional varying data regarding the outcome.
RegularCreditTypeInt(32)Defines the unit of measure for RegularCredit (Enum values):
  • 0: Credit is counted in transactions (count).
  • 1: Credit is counted as an amount (currency).
RegularCreditDoubleThe regular credit value (amount or transaction count) based on the RegularCreditType. Uses Decimal place 2.
RevalueCreditInt(32)The revalue credit amount.
  • Only present if the associated card is configured as revalue-able.
  • Uses Decimal place 2.