> ## Documentation Index
> Fetch the complete documentation index at: https://devzone.nayax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cortina StaticQR Cancel

Finalizes and charges the customer after the product is dispensed. Nayax triggers this endpoint to complete the transaction once the machine has successfully released the item. It captures the final amount from the user's account.


## OpenAPI

````yaml /openapi/cortina.yaml post /Cortina/StaticQR/Cancel
openapi: 3.0.1
info:
  description: Credit Card, Prepaid, DynamicQR, StaticQR APIs
  title: Nayax Cortina API
  version: v2.1
  x-logo:
    url: https://www.nayax.com//wp-content/uploads/2015/10/logo_dark1.png
servers:
  - url: https://{domain}:{port}
    variables:
      domain:
        default: example.com
        description: Customer ID assigned by the service provider
      port:
        default: '443'
        enum:
          - '443'
          - '8443'
security: []
paths:
  /Cortina/StaticQR/Cancel:
    post:
      tags:
        - StaticQR
      summary: Cortina StaticQR Cancel
      requestBody:
        content:
          application/*+json:
            schema:
              $ref: '#/components/schemas/StaticCancelRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/StaticCancelRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/StaticCancelRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaticCancelResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/StaticCancelResponse'
          description: Success
components:
  schemas:
    StaticCancelRequest:
      additionalProperties: false
      example:
        ActorInfo:
          Id: 2001102296
          MerchantId: 10011
          Name: Far East Dev Zone
          OperatorId: 2000305191
          OperatorName: TanyaT_OP
        BasicInfo:
          Amount: 0.1
          CurrencyCode: USD
          CurrencyNumeric: 376
          SiteId: 12
          TransactionId: 236584335969834429321847829253667359,
        CustomData:
          Actor: 12312312
          DirectActor: 12312312
          Distributor: superDistributor
          Machine: 131231348
          Operator: 123121434134
        MachineInfo:
          Country:
            Alpha2Code: US
            Alpha3Code: USA
            Name: United States of America
            NumericCode: 840
          DecimalPlace: 2
          GroupId: Beverages
          Id: 869761713
          Name: TestPayStaticQR V2
          Offset: 2
          OperatorId: 12345
          TerminalId: 987654321
          ZipCode: 10001
        PaymentInfo:
          AdditionalData: string
          AuthAmount: 0
          AuthCode: string
          AuthDateTime: string
          AuthSource: string
          IsGatewayTimeout: true
          RRN: string
          SettAmount: 0
          SettDateTime: string
          SrvTranId: string
          Token: string
          TraceNumber: string
        ReasonCode: 2
        ReasonText: Cashless cancelled by consumer
      properties:
        ActorInfo:
          $ref: '#/components/schemas/ActorInfo'
        BasicInfo:
          $ref: '#/components/schemas/BasicInfo'
        CustomData:
          $ref: '#/components/schemas/CustomData'
        DeviceInfo:
          $ref: '#/components/schemas/DeviceInfo'
        MachineInfo:
          $ref: '#/components/schemas/MachineInfo'
        PaymentInfo:
          $ref: '#/components/schemas/PaymentInfo'
        ReasonCode:
          description: |
            - Optional
            - Cancellation reason code (by nayax system table of error codes)
          format: int16
          type: integer
        ReasonText:
          description: >
            - Optional

            - Length: 255

            - Cancellation reason description (by nayax system table of error
            codes)
          type: string
      type: object
    StaticCancelResponse:
      additionalProperties: false
      example:
        Status:
          StatusMessage: Cortina V2 Stub Tester
          Verdict: Approved
      properties:
        Status:
          $ref: '#/components/schemas/Status'
      type: object
    ActorInfo:
      additionalProperties: false
      description: Merchant (Actor) details.
      properties:
        Country:
          $ref: '#/components/schemas/CountryInfo'
        DynamicURL:
          description: >
            Optional URL configuration at the actor level. Supports dynamic
            URLs. 

            - Max length: 255.
          example: https://www.nayax.com/alternativeURL
          type: string
        GeoLocation:
          $ref: '#/components/schemas/GeoLocation'
        Id:
          description: >
            Unique ID of the actor (merchant) as defined in the Nayax
            backoffice.
          example: 2001537302
          format: int64
          type: integer
        MCC:
          description: >
            Merchant Category Code (MCC), classifies businesses by type of goods
            or services provided.
          example: 455
          format: int32
          type: integer
        MerchantId:
          description: >
            Merchant identifier as defined in the Nayax backoffice. Contact
            Nayax to configure. 

            - Max length: 255.
          example: 999999888885
          type: string
        Name:
          description: >
            Merchant name as registered in the Nayax backoffice. Max length:
            255.
          example: TestPayCC V2 OP
          type: string
        OperatorId:
          description: |
            ID of the operator associated with the merchant. Max length: 255.
          example: 2001537302
          format: int64
          type: integer
        OperatorName:
          description: |
            Name of the operator associated with the merchant. Max length: 255.
          example: TestPayCC V2 OP _ Sub Merchant
          type: string
        SubMerchantId:
          description: >
            Identifier for a sub-merchant under the main merchant. Contact Nayax
            to configure. Max length: 255.
          example: 999999888886
          type: string
      type: object
    BasicInfo:
      additionalProperties: false
      description: Basic transaction information.
      properties:
        AgeLimitation:
          description: |
            Minimum age required for transaction approval.
          example: 18
          format: int16
          type: integer
        Amount:
          description: >
            Transaction amount. Use decimal format (e.g. 0.01 for 1 cent).
            Currencies without decimal places should also be expressed as a
            double (e.g. 234.0).
          example: 5
          format: double
          type: number
        AuditNumber:
          description: |
            For internal Nayax use.
          example: 342
          format: int64
          type: integer
        BillingProviderId:
          description: |
            ID of the billing provider (assigned by Nayax).
          example: 1
          format: int32
          type: integer
        CurrencyCode:
          description: |
            ISO 4217 currency code in Alpha-3 format (e.g. USD, EUR, ILS).
          example: ILS
          type: string
        CurrencyNumeric:
          description: |
            ISO 4217 currency code in Numeric-3 format.
          example: '376'
          type: string
        IsDeferredAuthorization:
          description: |
            Indicates whether the authorization is deferred.
          type: boolean
        IsProductSelected:
          description: |
            Indicates whether a product was pre-selected before payment.
          example: true
          type: boolean
        IsSoftDeclineCompletion:
          description: >
            Indicates whether the transaction was completed after a soft
            decline.
          type: boolean
        MachineAuTime:
          description: |
            Timestamp of machine authorization (DDMMYYHHMMSS).
          example: 71221132914
          type: string
        NayaxRRN:
          description: >
            Reference number for external identification. Should be visible to
            the end-user or external parties (e.g. card issuer, app provider).
            Echoed in `/Inquiry` requests.
          example: '111111'
          type: string
        NayaxTransactionId:
          description: |
            Internal Nayax ID used to track the transaction in future requests.
          example: 3584697384
          format: int64
          type: integer
        PaymentMethodID:
          description: |
            ID of the payment method provider (assigned by Nayax).
          example: 1
          format: int32
          type: integer
        SiteId:
          description: |
            Region identifier for the Nayax server.
          example: 1
          format: int16
          type: integer
        TimeoutMS:
          description: |
            Server timeout in milliseconds.
          example: 15000
          format: int32
          type: integer
        TransactionId:
          description: >
            Unique identifier for the transaction.

            - If `/StartSession` was used, this echoes the encrypted transaction
            ID (`TranIDCipher`).

            - If not, the Nayax engine generates this value.
          example: N99O4XURDQYJZIK4OTCAWF1RHHA40TZWVCRB
          type: string
        TransitElement:
          $ref: '#/components/schemas/TransitElement'
      required:
        - TransactionId
        - Amount
        - CurrencyCode
        - CurrencyNumeric
      type: object
    CustomData:
      additionalProperties: false
      description: Custom Fields Information, Contact Nayax TPOC to define.
      properties:
        Actor:
          description: |
            Actor custom data (String in json format)
          example: String
          type: string
        DirectActor:
          description: |
            Direct actor custom data (String in json format)
          example: String
          type: string
        Distributor:
          description: |
            Distributor custom data (String in json format)
          example: String
          type: string
        Machine:
          description: |
            Machine custom data (String in json format)
          example: String
          type: string
        Operator:
          description: |
            Operator custom data (String in json format)
          example: String
          type: string
        SoftDecline:
          description: |
            Soft Decline custom data (String in json format)
          example: String
          type: string
      type: object
    DeviceInfo:
      additionalProperties: false
      description: Hardware and firmware information of the Nayax device.
      properties:
        FWVersion:
          description: |
            Firmware version installed on the device.
          example: 4.0.0.22-RC01 - Aug 25 2021
          type: string
        HwSerial:
          description: |
            Hardware serial number of the Nayax device.
          example: 434324119376526
          type: string
        Type:
          description: |
            Device type as defined in the Nayax system.
          example: Onyx
          type: string
      type: object
    MachineInfo:
      description: Information about the machine involved in the transaction.
      properties:
        City:
          description: >
            City where the machine is located, as defined in the Nayax
            backoffice. Maximum length: 255 characters.
          example: Abbeville
          type: string
        Country:
          $ref: '#/components/schemas/CountryInfo'
        DecimalPlace:
          description: >
            Number of decimal places for transaction amounts.

            - For example, `2` means values like 123.45. - A value of `0` means
            12345 (no decimal).
          example: 2
          format: int64
          type: integer
        ExternalId:
          description: >
            External machine ID as provided by the operator in the Nayax
            backoffice. Maximum length: 200 characters.
          example: OperatorExternalID
          type: string
        GeoLocation:
          $ref: '#/components/schemas/GeoLocation'
        GroupId:
          description: |
            Internal Nayax group ID.
          example: String
          type: string
        Id:
          description: |
            Unique machine ID as allocated in the Nayax backoffice.
          example: 106791869
          format: int64
          type: integer
        Name:
          description: >
            Machine name as defined in the Nayax backoffice. Maximum length: 255
            characters.
          example: Itai_TestPayCC V2
          type: string
        Offset:
          description: |
            UTC timezone offset. Maximum length: 255 characters.
          example: '3.00'
          type: string
        OperatorId:
          description: >
            Merchant ID as defined in the Nayax backoffice. Maximum length: 255
            characters.
          example: 2001537302
          type: string
        Region:
          description: >
            Region assigned to the machine in the Nayax backoffice. Maximum
            length: 255 characters.
          example: EU
          type: string
        TerminalId:
          description: >
            Optional terminal identifier defined in the Nayax backoffice.
            Contact Nayax TPOC to configure. Maximum length: 255 characters.
          example: '8888888844'
          type: string
        Type:
          description: >
            Machine type as defined in the Nayax backoffice. Maximum length: 50
            characters.
          example: machine type
          type: string
        ZipCode:
          description: >
            Zip or postal code for the machine location. Maximum length: 255
            characters.
          example: 22448Z
          type: string
      type: object
    PaymentInfo:
      type: object
      additionalProperties: false
      description: >
        Identifies transaction information and references. Included in all
        response messages for payment calls.

        When used in requests (e.g. `/Settlement`, `/Void`, `/Refund`,
        `/Inquiry`), this object should match the `PaymentInfo` returned in a
        previous call.
      properties:
        SrvTranId:
          type: string
          description: >
            Integrator's internal transaction ID. Use only if `/StartSession`
            was not used. If `/StartSession` was used, this should be empty or
            echo the transaction ID from the request.
          example: '3584697388'
        AuthCode:
          type: string
          description: >
            External authorization code (usually from the card issuer). In
            dynamic QR, the approval code from the `/Inquiry` response overrides
            previous values.
          example: '333333'
        AuthAmount:
          type: number
          format: double
          description: >
            Original amount requested in `/Authorization` or `/Sale`. Optional
            in other cases.
          example: 5.5
        SettAmount:
          type: number
          format: double
          description: >
            Final settled amount, used in `/Settlement`, `/Inquiry`, or `/Sale`.
            In Cortina External Prepaid, this may reflect a discounted amount
            and is used for reporting only.
          example: 5.5
        RRN:
          type: string
          description: >
            Reference Retrieval Number. Should be visible to the cardholder and
            match the one in the `/GenerateQR` response.
          example: '111111'
        Token:
          type: string
          description: |
            Unique token for the transaction. For internal Nayax use only.
          example: string
        AuthDateTime:
          type: string
          description: >
            Date and time of the `/Authorization` or `/Sale`. Format:
            `ddMMyyHHmmss`
          example: '071221133300'
        SettDateTime:
          type: string
          description: >
            Date and time of the `/Settlement` or `/Sale`. Format:
            `ddMMyyHHmmss`
          example: '071221133330'
        TraceNumber:
          type: string
          description: |
            Trace number. For internal Nayax use only.
          example: '4444'
        AdditionalData:
          type: string
          description: |
            Optional custom data in JSON format. Contact Nayax to configure.
          example: string
        IsGatewayTimeout:
          type: boolean
          description: |
            Indicates whether there was a gateway timeout.
          example: false
        ProviderExternalData:
          type: string
          description: |
            External data from provider in JSON format.
          example: string
        InitiateTranReference:
          type: integer
          format: int64
          description: >
            References the original Nayax transaction ID when reattempting a
            prepaid loyalty card transaction.
          example: 11223344
        IsRevalueCard:
          type: boolean
          description: |
            Indicates whether the card supports revalue.
          example: false
    Status:
      additionalProperties: false
      description: Transaction status
      properties:
        Code:
          description: >
            - Conditional - Only if verdict value is declined

            - Please refer to the Decline Reasons Code List in the relevant
            Overview section for full list of allowed decline codes
          format: int32
          type: integer
        CustomDeclineCode:
          description: >
            - Always mirrors the value of the Code field when Code is present,
            regardless of Verdict.

            - Included in all responses (Approved or Declined) whenever Code is
            present.
          format: int32
          type: integer
        StatusMessage:
          description: >
            - Optional

            - Length: 255

            - Transaction status message free text field / additional varying
            data
          type: string
        Verdict:
          description: |
            - Mandatory
            - Const string values:
            - Status of the request ('Approved'/'Declined')
          type: string
      type: object
    CountryInfo:
      additionalProperties: false
      description: |
        Actor and Machine Country information
      properties:
        Alpha2Code:
          description: |
            String(2)
            Mandatory
            ISO-3166-1 format: Alpha-2 code
          example: US
          type: string
        Alpha3Code:
          description: |
            String(3)
            Mandatory
            ISO-3166-1 format: Alpha-3 code
          example: USA
          type: string
        Intra:
          description: >
            String

            Mandatory

            An Intra Region refers to a geographical diversification across
            countries within a single 'Intra region'.

            E.g. 'France' is country within the 'European Union' Intra Region.
          example: Europe
          type: string
        Name:
          description: |
            String
            Mandatory
            Country Full Name
          example: UNITED STATES
          type: string
        NumericCode:
          description: |
            String(3)
            Mandatory
            ISO-3166-1 format: Numeric-3 code
          example: '840'
          type: string
      type: object
    GeoLocation:
      additionalProperties: false
      description: Actor and Machine Geo location information
      properties:
        Address:
          description: |
            String(255)
            Optional
            Address as defined in the Nayax backoffice
          example: River
          type: string
        City:
          description: |
            - String(255)
            - Optional
            - City as defined in the Nayax backoffice
          example: Zambezi
          type: string
        CountryCode:
          description: |
            String
            Optional
            Country code (ISO3) as defined in the Nayax backoffice
          example: ZM
          type: string
        Latitude:
          description: |
            - Machine Location Latitude as defined in the Nayax backoffice
          example: 51.0003431
          format: double
          type: number
        Longitude:
          description: |
            - Machine Location Longitude as defined in the Nayax backoffice
          example: 23.745245
          format: double
          type: number
        State:
          description: |
            - String
            - Optional
            - Actor geo state code as defined in the Nayax backoffice
          example: Alabama
          type: string
        ZipCode:
          description: |
            String(255)
            Optional
            Zip code defined in the Nayax backoffice
          example: '234234'
          type: string
      type: object
    TransitElement:
      description: Transit Element Information
      properties:
        DenyListIndication:
          $ref: '#/components/schemas/DenyListIndication'
        TransitTransactionType:
          $ref: '#/components/schemas/TransitTransactionType'
      type: object
    DenyListIndication:
      description: |
        * 0 - unknown/ no effect
        * 1 - Decline will cause consumer to be added to the deny list
        * 2 - Approval shall cause the consumer to be removed from deny list.
      enum:
        - 0
        - 1
        - 2
      format: int32
      type: integer
    TransitTransactionType:
      description: |
        * 1 - Prefunded
        * 2 - Realtime Authorization
        * 3 - Post-Authorization Aggregated Transaction
        * 7 - Debt Recovery
      enum:
        - 1
        - 2
        - 3
        - 7
      format: int32
      type: integer

````