> ## 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.

# Post Renew Key

Rotates the encryption key used for secure operations. This POST endpoint requests a key refresh from the provider. It submits the `CurrentKeyData` and returns the `NewKeyData` (including the new PIN encryption key encrypted under the Zone Master Key), along with its ID and Key Check Value (KCV).


## OpenAPI

````yaml /openapi/cortina.yaml post /Cortina/RenewKey
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/RenewKey:
    post:
      tags:
        - Cortina
      summary: Post Renew Key
      requestBody:
        content:
          application/*+json:
            schema:
              $ref: '#/components/schemas/RenewKeyRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/RenewKeyRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/RenewKeyRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewKeyResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/RenewKeyResponse'
          description: Success
components:
  schemas:
    RenewKeyRequest:
      additionalProperties: false
      properties:
        BasicInfo:
          $ref: '#/components/schemas/BasicInfo'
        CurrentKeyData:
          $ref: '#/components/schemas/CurrentKeyData'
      type: object
    RenewKeyResponse:
      additionalProperties: false
      example:
        NewKeyData:
          EncryptedKeyValue: string
          ExternalKeyId: 1
          Kcv: 05A301
        Status:
          Code: 0
          CustomDeclineCode: 0
          StatusMessage: Cortina V2 Stub Tester
          Verdict: Approved
      properties:
        NewKeyData:
          $ref: '#/components/schemas/NewKeyData'
        Status:
          $ref: '#/components/schemas/Status'
      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
    CurrentKeyData:
      description: |
        - Current Key Data
      properties:
        AlgorithmId:
          description: |
            - AlgorithmId ID
          format: int32
          type: integer
        ExternalKeyId:
          description: |
            - External Key ID
          format: int32
          type: integer
        Kcv:
          description: |
            - Key Check value (content is bytes)
          type: string
        KeyExpirationDt:
          description: |
            - Key Expiration Datetime
          example: '2021-03-01 13:45:56.100'
          type: string
        KeyFormatId:
          description: |
            - Key Format ID
          format: int32
          type: integer
        KeyProviderId:
          description: |
            - Key Provider ID
          format: int32
          type: integer
        KeyRenewalDt:
          description: |
            - Key Renewal Datetime
          example: '2021-03-01 13:45:56.100'
          type: string
        ProviderId:
          description: |
            - Provider ID
          format: int32
          type: integer
        ZmkId:
          description: |
            - Internal ID for the ZMK Key
          format: int32
          type: integer
        ZpkId:
          description: |
            - Internal ID for the ZPK Key
          format: int32
          type: integer
      type: object
    NewKeyData:
      description: |
        - New Key Data
      properties:
        EncryptedKeyValue:
          description: |
            - Encrypted Key Value
          type: string
        ExternalKeyId:
          description: |
            - New External Key Id
          type: string
        Kcv:
          description: |
            - New Key Check value (content is bytes)
          type: string
      type: object
    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
    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

````