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

# Get a session's receipt

> Returns a link to download the receipt PDF for a charging session. The link expires 15 minutes after the request. Only a COLLECTED payment has a receipt. A token scoped to a network only sees that network's payments.



## OpenAPI

````yaml /api/specs/payments-api.json get /payments/v1/session-payments/session/{sessionId}/receipt
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/session/{sessionId}/receipt:
    get:
      tags:
        - Session Payments
      summary: Get a session's receipt
      description: >-
        Returns a link to download the receipt PDF for a charging session. The
        link expires 15 minutes after the request. Only a COLLECTED payment has
        a receipt. A token scoped to a network only sees that network's
        payments.
      parameters:
        - in: path
          name: sessionId
          required: true
          description: ID of the charging session.
          schema:
            type: string
        - in: query
          name: locale
          required: false
          description: >-
            BCP 47 language tag for the receipt, such as `en` or `en-US`.
            Unsupported tags fall back to English.
          schema:
            type: string
            maxLength: 35
      responses:
        '200':
          description: A download link for the receipt PDF.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionPaymentReceipt'
        '400':
          description: '`locale` is longer than 35 characters.'
          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 lacks `read:sessionpayment`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentsForbiddenError'
        '404':
          description: The session has no payment, or it is in another network.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentsNotFoundError'
        '409':
          description: The payment is still PENDING.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentsConflictError'
        '500':
          description: The receipt could not be generated. Retrying may succeed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentsInternalServerError'
      security:
        - oauth2:
            - read:sessionpayment
components:
  schemas:
    SessionPaymentReceipt:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: Download link for the receipt PDF. It expires at `expiresAt`.
        expiresAt:
          type: string
          format: date-time
          description: When `url` stops working, 15 minutes after the request.
      required:
        - url
        - expiresAt
    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
    PaymentsNotFoundError:
      type: object
      description: The response body for a 404.
      properties:
        code:
          type: string
          enum:
            - NOT_FOUND
        message:
          type: string
          description: What went wrong.
        status:
          type: integer
          enum:
            - 404
      required:
        - code
        - message
        - status
    PaymentsConflictError:
      type: object
      description: The response body for a 409.
      properties:
        code:
          type: string
          enum:
            - CONFLICT
        message:
          type: string
          description: What went wrong.
        status:
          type: integer
          enum:
            - 409
      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.