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

# Get a payment

> One cash payment by id. A payment of another entity, or a bank fee on its own, is not found.



## OpenAPI

````yaml https://app.synthetic.ai/api/v1/openapi.json get /payments/{id}
openapi: 3.1.0
info:
  title: Synthetic API
  description: Read access to your Synthetic data.
  version: 0.1.0
servers:
  - url: https://app.synthetic.ai/api/v1
security: []
paths:
  /payments/{id}:
    get:
      tags:
        - Payments
      summary: Get a payment
      description: >-
        One cash payment by id. A payment of another entity, or a bank fee on
        its own, is not found.
      operationId: payments-get
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            description: The payment id.
          required: true
          description: The payment id.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
        '400':
          description: Input validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '404':
          description: Payment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: An unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - BearerAuth: []
components:
  schemas:
    Payment:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        type:
          type: string
          enum:
            - CASH
            - BANK_FEE
          description: >-
            CASH for money received; BANK_FEE for the fee nested in a cash
            payment.
        parentPaymentId:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
          description: >-
            For a bank fee, the cash payment it was charged against; null for a
            cash payment.
        receivedDate:
          format: date-time
          description: >-
            The calendar date the payment was received, carried at UTC midnight.
            The time is not data.
          type: string
        customerId:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        customerName:
          anyOf:
            - type: string
            - type: 'null'
        amountCents:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        appliedAmountCents:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        unappliedAmountCents:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        journalEntryId:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        bankFee:
          anyOf:
            - $ref: '#/components/schemas/Payment'
            - type: 'null'
          description: >-
            The bank fee charged against this payment, itself a payment. A fee
            has none.
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - type
        - parentPaymentId
        - receivedDate
        - customerId
        - customerName
        - amountCents
        - appliedAmountCents
        - unappliedAmountCents
        - journalEntryId
        - bankFee
        - createdAt
        - updatedAt
      additionalProperties: false
      description: >-
        Money a customer paid: how much, which customer, how much of it has been
        applied to invoices, and the bank fee charged on it, which is a payment
        of type BANK_FEE.
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Input validation failed
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Input validation failed error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Input validation failed
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Unauthorized
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Unauthorized error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Unauthorized
        issues: []
    error.NOT_FOUND:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Payment not found
        code:
          type: string
          description: The error code
          example: NOT_FOUND
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Payment not found error (404)
      description: The error information
      example:
        code: NOT_FOUND
        message: Payment not found
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: An unexpected error occurred.
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: An unexpected error occurred. error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: An unexpected error occurred.
        issues: []
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'An API key created in Settings, sent as `Authorization: Bearer <key>`.'

````