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

# TransactionCallback

The terminal uses the `TransactionCallback` endpoint to notify the
integrator about the result of a card tap. It is triggered automatically
when a user presents a card, and an authorization flow is initiated with
the payment provider.


## OpenAPI

````yaml /openapi/spark.yaml post /TransactionCallback
openapi: 3.0.1
info:
  title: Nayax Spark API
  description: RemoteStart V2
  version: v2
servers:
  - url: https://{domain}/api
    variables:
      domain:
        default: nayax-spark-dmz.nayax.com
        description: >-
          Your Nayax-assigned domain (e.g., nayax-spark-dmz.nayax.com). Nayax
          provides a QA domain during sandbox onboarding and a production domain
          after certification.
security: []
tags:
  - name: Transactions
paths:
  /TransactionCallback:
    post:
      tags:
        - Transactions
      summary: TransactionCallback
      requestBody:
        description: The request payload including the result of the card scan operation.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionCallbackRequest'
      responses:
        '200':
          description: Success. A simple 200 OK server acknowledgment is sufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionCallbackOutcome'
components:
  schemas:
    TransactionCallbackRequest:
      type: object
      nullable: true
      description: >
        The request payload sent by the Spark platform to the integrator's
        configured `TransactionCallback` endpoint. This request includes the
        full result of the card scan operation and is essential for proceeding
        with transaction confirmation or rejection handling.
      properties:
        NayaxTransactionId:
          type: integer
          format: int64
          description: |
            The unique internal transaction ID assigned by Nayax.
        SparkTransactionId:
          type: string
          nullable: true
          description: |
            The unique session ID generated in `StartAuthentication`.
        SiteId:
          type: integer
          format: int16
          description: |
            The ID of the vending site or Spark location.
        TerminalId:
          type: string
          nullable: false
          description: |
            The unique ID of the terminal that read the card.
        MachineId:
          type: integer
          format: int64
          description: |
            The identifier of the vending machine or device.
        HwSerial:
          type: string
          nullable: false
          description: |
            The hardware serial number of the terminal.
        MachineAuTime:
          type: string
          nullable: true
          description: |
            The timestamp from the machine in the format `yyyyMMddHHmmssSSS`.
        AuthStatus:
          $ref: '#/components/schemas/AuthStatus'
          description: |
            The object containing the card authorization result.
        CardLast4Digits:
          type: string
          nullable: true
          description: |
            The last four digits of the presented card.
        CardHash:
          type: string
          nullable: false
          description: |
            The one-way hash of the full card number.
        CardUid:
          type: string
          nullable: true
          description: |
            The unique identifier of the card (for prepaid cards).
        Amount:
          type: number
          format: double
          description: >
            The transaction amount in the main currency unit (decimal place 0,
            e.g., 15 for $15.00).
      example:
        NayaxTransactionId: 2004545072
        SparkTransactionId: 12c7cec2-c690-4425-9a1f-db0db60e2d8c
        SiteId: 2
        TerminalId: '0434334921100366'
        MachineId: 71234996
        HwSerial: '0434334921100366'
        AuthStatus:
          Verdict: Approved
          ErrorCode: 0
          ErrorDescription: ''
          StatusMessage: ''
        CardLast4Digits: '1234'
        CardHash: 7f2082ba5dbccf706b6987e75b62083f65b5695bc2d8c827c3e46769d007a9e6
        CardUid: '1288528281124927'
        MachineAuTime: '20240205194122328'
        Amount: 15
    TransactionCallbackOutcome:
      type: object
      nullable: true
      description: >
        The response payload from the integrator to Nayax's
        `TransactionCallback`, confirming the receipt of the transaction result.
        This callback is triggered when a user presents a card and an
        authorization flow is initiated.
      properties:
        SparkTransactionId:
          type: string
          nullable: true
          description: >
            The unique identifier for the Spark session. This ID is generated
            during `StartAuthentication`.
        Status:
          $ref: '#/components/schemas/Status'
      example:
        SparkTransactionId: 12c7cec2-c690-4425-9a1f-db0db60e2d8c
        Status:
          Verdict: Approved
          ErrorDescription: No Errors
    AuthStatus:
      type: object
      description: The object containing the card authorization result.
      properties:
        Verdict:
          type: string
          description: >-
            The authorization decision, which can be `"Approved"`, `"Declined"`,
            etc.
        ErrorCode:
          type: integer
          description: An optional numeric error code if the card was declined.
        ErrorDescription:
          type: string
          description: An explanation of the error, if any.
        StatusMessage:
          type: string
          description: A status message returned by Spark.
      example:
        Verdict: Approved
        ErrorCode: 0
        ErrorDescription: ''
        StatusMessage: ''
    Status:
      type: object
      nullable: false
      description: Transaction Status Details
      properties:
        Verdict:
          type: string
          nullable: false
          description: Status of the request (Approved / Declined)
        ErrorCode:
          type: integer
          format: int16
          nullable: true
          description: |
            - Conditional
            - Reason for declined request
        ErrorDescription:
          type: string
          nullable: true
          description: |
            - Conditional
            - Length: 255
            - Error description
        StatusMessage:
          type: string
          nullable: true
          description: |
            - Optional
            - Length: 255
            - Transaction status message as free text field

````