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

# List payments for sessions

> Returns the payments for up to 100 charging sessions in one request. Sessions without a payment are left out, so the list can be shorter than `sessionIds` or empty. A token scoped to a network only sees that network's payments.



## OpenAPI

````yaml /api/specs/payments-api.json get /payments/v1/session-payments
openapi: 3.0.0
info:
  title: Lynkwell API
  version: 1.404.0
  description: API Documentation for the Payments Service
servers:
  - url: https://api.lynkwell.com
security: []
tags: []
paths:
  /payments/v1/session-payments:
    get:
      tags:
        - Session Payments
      summary: List payments for sessions
      description: >-
        Returns the payments for up to 100 charging sessions in one request.
        Sessions without a payment are left out, so the list can be shorter than
        `sessionIds` or empty. A token scoped to a network only sees that
        network's payments.
      parameters:
        - in: query
          name: sessionIds
          required: true
          description: >-
            Comma-separated session IDs, at most 100 after duplicates are
            removed. Each ID is at most 128 characters.
          schema:
            type: string
            example: ses_123,ses_456
      responses:
        '200':
          description: The payments found, in no particular order.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SessionPayment'
        '400':
          description: '`sessionIds` is missing, empty, or lists more than 100 IDs.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentsValidationError'
        '401':
          description: Missing or invalid access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentsUnauthorizedError'
        '403':
          description: >-
            The token has neither `read:sessionpayment` nor
            `write:sessionpayment`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentsForbiddenError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentsInternalServerError'
      security:
        - oauth2:
            - read:sessionpayment
        - oauth2:
            - write:sessionpayment
components:
  schemas:
    SessionPayment:
      type: object
      description: >-
        The payment for one charging session. All amounts are integers in the
        minor unit of `currency` (cents for USD). `billedAmount` =
        `preTaxChargingSessionCost` + `preTaxAdditionalFee` −
        `priceAdjustment.calculatedAdjustment` + `totalTaxAmount`.
      properties:
        id:
          type: string
          description: Unique ID, prefixed `pmt_`.
          example: pmt_I4FkDaG7zlcoJvXJDsSsw
        network:
          type: string
          description: ID of the network the session belongs to.
        session:
          type: string
          description: ID of the charging session. A session has at most one payment.
        sitePartners:
          type: array
          description: >-
            IDs of the charging station's site partners when the payment was
            recorded.
          items:
            type: string
        location:
          type: string
          description: ID of the charging station's location.
        currency:
          type: string
          description: ISO 4217 currency code of the session's rate.
          example: USD
        status:
          type: string
          description: >-
            PENDING: recorded, but the money has not been collected from the
            driver yet. COLLECTED: the money has been collected.
          enum:
            - PENDING
            - COLLECTED
        paymentType:
          type: string
          description: >-
            How the session was paid for. GUEST: a guest checkout without a
            driver account. PAYMENT_TERMINAL: a card reader at the station.
            ROAMING: a roaming partner's driver. DRIVER_ACCOUNT: a driver's
            account, through the app, an RFID card or a vehicle. FREE: the
            session cost nothing and had no known payer. UNKNOWN: the session
            had a cost but no known payer.
          enum:
            - GUEST
            - PAYMENT_TERMINAL
            - ROAMING
            - FREE
            - UNKNOWN
            - DRIVER_ACCOUNT
        costs:
          type: object
          description: >-
            The session's charges per pricing component, as the session service
            calculated them. Tax-inclusive, before any discount.
          properties:
            energy:
              type: integer
              description: Charge for energy delivered.
            idle:
              type: integer
              description: Charge for idle time after charging finished.
            flat:
              type: integer
              description: Flat session fee from the rate.
            time:
              type: integer
              description: Charge for time connected.
          required:
            - energy
            - idle
            - flat
            - time
          example:
            energy: 1828
            idle: 108
            flat: 108
            time: 216
        usages:
          type: object
          description: What the session used.
          properties:
            energy:
              type: number
              description: Energy delivered, in Wh.
              example: 40000
            time:
              type: number
              description: Time connected, in seconds.
              example: 5400
            idle:
              type: number
              description: Idle time after charging finished, in seconds.
              example: 600
          required:
            - energy
            - time
            - idle
        taxConfig:
          type: object
          nullable: true
          description: >-
            The location's tax rates when the payment was recorded. `null` when
            the location has no tax configured.
          properties:
            totalPercentSalesTax:
              type: number
              nullable: true
              description: Sales tax rate as a fraction. `0.08` is 8%.
              example: 0.08
            energyPerKwhExciseTax:
              type: number
              nullable: true
              description: >-
                Excise tax per kWh delivered, in major currency units. `0.025`
                is $0.025/kWh.
              example: 0.025
        preTaxChargingSessionCost:
          type: integer
          description: >-
            Pre-tax cost of the charging session before any discount, excluding
            `additionalFee`.
          example: 2000
        preTaxCosts:
          type: object
          description: >-
            Pre-tax value of each component of `costs`. They normally sum to
            `preTaxChargingSessionCost`.
          properties:
            energy:
              type: integer
              description: Charge for energy delivered.
            idle:
              type: integer
              description: Charge for idle time after charging finished.
            flat:
              type: integer
              description: Flat session fee from the rate.
            time:
              type: integer
              description: Charge for time connected.
          required:
            - energy
            - idle
            - flat
            - time
          example:
            energy: 1600
            idle: 100
            flat: 100
            time: 200
        additionalFee:
          type: integer
          description: >-
            Fee charged on top of the session, tax-inclusive. Omitted when no
            fee was charged.
          example: 250
        preTaxAdditionalFee:
          type: integer
          description: >-
            Pre-tax share of `additionalFee`. Its sales tax is part of
            `taxes.totalPercentSalesTax`. Omitted when there is no
            `additionalFee`.
          example: 231
        priceAdjustment:
          type: object
          nullable: true
          description: >-
            The driver discount applied to the session, as it stood when the
            payment was recorded. `null` when no discount applied.
          properties:
            id:
              type: string
              description: ID of the price adjustment.
            amount:
              type: number
              description: Discount percentage. `20` is 20% off.
              example: 20
            maxAdjustment:
              type: number
              nullable: true
              description: >-
                Most the discount could take off, in cents. `null` or `0` means
                no cap.
              example: 400
            calculatedAdjustment:
              type: integer
              description: Discount actually taken off this session.
              example: 400
          required:
            - id
            - amount
            - maxAdjustment
            - calculatedAdjustment
        taxes:
          type: object
          description: >-
            Tax included in `billedAmount`, by kind. These are amounts, not
            rates.
          properties:
            totalPercentSalesTax:
              type: integer
              description: Sales tax on the session and `additionalFee`.
              example: 147
            energyPerKwhExciseTax:
              type: integer
              description: Excise tax on the energy delivered.
              example: 100
          required:
            - totalPercentSalesTax
            - energyPerKwhExciseTax
        totalTaxAmount:
          type: integer
          description: Sum of `taxes`.
          example: 247
        billedAmount:
          type: integer
          description: >-
            Total charged to the driver: tax-inclusive, after any discount,
            including `additionalFee`.
          example: 2078
        recordedAt:
          type: string
          format: date-time
          description: When the payment was recorded.
        collectedAt:
          type: string
          format: date-time
          nullable: true
          description: When the payment was collected. Not set while `status` is PENDING.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - network
        - session
        - sitePartners
        - location
        - currency
        - status
        - paymentType
        - costs
        - usages
        - taxConfig
        - preTaxChargingSessionCost
        - preTaxCosts
        - priceAdjustment
        - taxes
        - totalTaxAmount
        - billedAmount
        - recordedAt
        - createdAt
        - updatedAt
    PaymentsValidationError:
      type: object
      description: >-
        The response body for a 400 when a query parameter or the request body
        fails validation.
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            name:
              type: string
              enum:
                - ZodError
            issues:
              type: array
              description: One entry per problem found.
              items:
                type: object
                properties:
                  code:
                    type: string
                    description: Kind of problem, e.g. `too_small`.
                  message:
                    type: string
                    description: Human-readable explanation.
                  path:
                    type: array
                    description: Where the problem is, e.g. `["billedAmount"]`.
                    items:
                      oneOf:
                        - type: string
                        - type: integer
                required:
                  - code
                  - message
                  - path
          required:
            - name
            - issues
      required:
        - success
        - error
    PaymentsUnauthorizedError:
      type: object
      description: >-
        The response body for a 401: the access token is missing, invalid or
        expired.
      properties:
        message:
          type: string
          example: Unauthorized
      required:
        - message
    PaymentsForbiddenError:
      type: object
      description: >-
        The response body for a 403: the access token lacks the scope the route
        requires.
      properties:
        code:
          type: string
          enum:
            - FORBIDDEN
        message:
          type: string
          description: What went wrong.
        status:
          type: integer
          enum:
            - 403
      required:
        - code
        - message
        - status
    PaymentsInternalServerError:
      type: object
      description: The response body for a 500.
      properties:
        code:
          type: string
          enum:
            - INTERNAL_SERVER_ERROR
        message:
          type: string
          description: What went wrong.
        status:
          type: integer
          enum:
            - 500
      required:
        - code
        - message
        - status
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth2 Client Credentials Flow
      flows:
        clientCredentials:
          tokenUrl: https://lynkwell-prod.us.auth0.com/oauth/token
          scopes:
            read:asset: Retrieve assets
            write:asset: Create and update assets
            read:assetgroup: Retrieve asset groups
            write:assetgroup: Create and update asset groups
            read:assetstatus: Retrieve asset statuses
            read:chargingstationmodel: Retrieve charging station models
            write:chargingstationmodel: Create and update charging station models
            write:network: Create and update networks
            write:sitepartner: Create and update site partners
            read:sitepartner: Retrieve site partners
            write:sitepartneruser: Create and update site partner users
            read:sitepartneruser: Retrieve site partner users
            read:networkaccessprofile: Retrieve network access profiles
            write:paymentprofile: Create payment profile
            write:onboardinglink: Create an onboarding link
            read:invoice: Retrieve an invoice
            write:session: Create or update a session
            read:session: Retrieve a session
            write:ticket: Create a ticket
            write:verificationcode: Send and confirm verification codes
            write:driver: Create and update drivers
            read:driver: Retrieve drivers
            write:token: Create and update tokens
            read:token: Retrieve tokens
            read:tokenvalue: Retrieve token by ID including its value
            write:invitecode: Create and update invite codes
            write:invitation: Create and update invitations
            read:invitation: Retrieve invitations
            read:payment_terminals_payment: Read payments from payment terminal
            abort:session: Abruptly end session
            read:paymentprofile: Retrieve payment profile from payment terminal
            write:ocpp: Sends request over OCPP
            write:ocpp.raw_request: Sends raw request over OCPP
            write:notification.email: Create and update email
            read:invoiceitem: Retrieve invoice item
            read:subscription: Retrieve subscription
            write:plugandcharge_enrollment: Update Plug and Charge enrollment status
            write:projects: Create and update projects
            read:projects: Retrieve projects
            write:project_stations: Create and update project stations
            write:panel: Create and update panels.
            read:panel: Retrieve panels.
            write:webhooks: Create, update, and delete webhooks
            read:webhooks: Retrieve webhooks
            read:incident: Retrieve incidents and their sub-resources
            write:incident: Create, update, comment on, merge, split, and link incidents
            read:sessionpayment: Retrieve session payments and receipts
            write:sessionpayment: Record, collect, and retrieve session payments

````

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