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

# TransactionNotify

The `TransactionNotify` endpoint is used to notify the integrator about
the final details of a charging session, including charger availability,
amount, and display information.


## OpenAPI

````yaml /openapi/zh/spark.yaml post /TransactionNotify
openapi: 3.0.1
info:
  title: Nayax Spark API
  description: RemoteStart V2
  version: v2
servers:
  - url: https://nayax-spark-dmz.nayax.com/api
    description: The same host serves the integration and production environments.
security: []
tags:
  - name: Transactions
paths:
  /TransactionNotify:
    servers:
      - url: https://{domain}/api
        variables:
          domain:
            default: nayax-spark-dmz.nayax.com
            description: >-
              The Integrator hosts this endpoint. Nayax sends the call to the
              callback URL configured during onboarding.
    post:
      tags:
        - Transactions
      summary: TransactionNotify
      requestBody:
        description: The request payload containing final session details.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionNotifyRequest'
      responses:
        '200':
          description: Success. The transaction notification was received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionNotifyResponse'
components:
  schemas:
    TransactionNotifyRequest:
      type: object
      nullable: true
      description: >
        The request payload for the `TransactionNotify` endpoint, which provides
        final details of a charging session. This request is made after a
        session has been prepared and the charger is ready for use.
      properties:
        HwSerial:
          type: string
          nullable: false
          description: |
            The hardware serial number of the terminal.
        MachineId:
          type: integer
          format: int64
          description: |
            The ID of the vending machine or service device.
        NayaxTransactionId:
          type: integer
          format: int64
          description: |
            The unique Nayax internal transaction ID.
        SparkTransactionId:
          type: string
          nullable: true
          description: |
            The unique ID generated in `StartAuthentication`.
        Amount:
          type: number
          format: double
          description: >
            The final amount to charge in central currency units (e.g.,
            dollars).
        CardLast4Digits:
          type: string
          nullable: false
          description: |
            The last four digits of the card presented.
        CardHash:
          type: string
          nullable: false
          description: |
            The one-way hash of the whole card number.
        CardUid:
          type: string
          nullable: true
          description: |
            The UID of the card (for prepaid cards).
        ServiceStationNumber:
          type: string
          nullable: true
          description: |
            The number identifying the service station.
        SiteId:
          type: integer
          format: int16
          description: |
            The identifier for the Spark site.
        MachineAuTime:
          type: string
          nullable: true
          description: |
            The timestamp from the device in `yyyyMMddHHmmssSSS` format.
      example:
        HwSerial: '0434334921100366'
        MachineId: 71234996
        NayaxTransactionId: 2004545072
        SparkTransactionId: 12c7cec2-c690-4425-9a1f-db0db60e2d8c
        Amount: 10
        CardLast4Digits: '1234'
        CardHash: 7f2082ba5dbccf706b6987e75b62083f65b5695bc2d8c827c3e46769d007a9e6
        CardUid: '1288528281124927'
        ServiceStationNumber: '5'
        SiteId: 2
        MachineAuTime: '20240205194122328'
    TransactionNotifyResponse:
      type: object
      nullable: true
      description: >
        The response payload from the integrator to the `TransactionNotify`
        request. This response confirms the session status and echoes key
        identifiers.
      properties:
        NayaxTransactionId:
          type: integer
          format: int64
          description: >
            The Nayax internal unique identifier of the transaction, echoed from
            the request.
        SparkTransactionId:
          type: string
          nullable: true
          description: |
            The unique session ID, echoed from the request.
        HwSerial:
          type: string
          nullable: false
          description: >
            The unique hardware serial number of the terminal, echoed from the
            request.
        MachineId:
          type: integer
          format: int64
          description: |
            The unique ID of the machine, echoed from the request.
        SiteId:
          type: integer
          format: int16
          nullable: true
          description: >
            The ID of the site where the transaction originated, echoed from the
            request.
        ServiceStationNumber:
          type: string
          nullable: true
          description: |
            The identifier of the service station, echoed from the request.
        Status:
          $ref: '#/components/schemas/Status'
          description: >
            An object confirming how to proceed. The `Verdict` is typically
            `"Approved"` or `"Declined"`.
      example:
        NayaxTransactionId: 2004545072
        SparkTransactionId: 12c7cec2-c690-4425-9a1f-db0db60e2d8c
        HwSerial: '0434334921100366'
        MachineId: 71234996
        SiteId: 2
        ServiceStationNumber: '5'
        Status:
          Verdict: Approved
          StatusMessage: Session will begin immediately.
    Status:
      type: object
      nullable: false
      description: 交易状态详情
      properties:
        Verdict:
          type: string
          nullable: false
          description: 请求的状态（Approved / Declined）
        ErrorCode:
          type: integer
          format: int16
          nullable: true
          description: |
            - 条件必填
            - 请求被拒绝的原因
        ErrorDescription:
          type: string
          nullable: true
          description: |
            - 条件必填
            - 长度：255
            - 错误描述
        StatusMessage:
          type: string
          nullable: true
          description: |
            - 可选
            - 长度：255
            - 交易状态消息，自由文本字段

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.