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

# Get a payment by id

> Get a payment by id



## OpenAPI

````yaml get /payments/{id}
openapi: 3.0.0
info:
  title: Channel Manager API
  version: 0.1.0
  description: >-
    Official API documentation for Channel Manager. All endpoints are protected
    by an API key.
servers:
  - url: https://channels-service-alpha.fourvenues.com
    description: Test server
  - url: https://channels-service.fourvenues.com
    description: Production server
security: []
tags: []
paths:
  /payments/{id}:
    get:
      tags:
        - Payments
      summary: Get a payment by id
      description: Get a payment by id
      operationId: getPaymentById
      parameters:
        - name: id
          in: path
          description: The id of the payment to retrieve.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Payment'
                  success:
                    type: boolean
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      security:
        - ApiKey: []
components:
  schemas:
    Payment:
      type: object
      properties:
        _id:
          type: string
          example: abcdefghi1234567890
          description: Unique identifier of the payment.
        status:
          type: string
          example: pending
          description: Status of the payment.
        rate_id:
          type: string
          example: abcdefghi1234567890
          description: Unique identifier for the ticket rate.
        organization_id:
          type: string
          example: abcdefghi1234567890
          description: Unique identifier for the organization.
        event_id:
          type: string
          example: abcdefghi1234567890
          description: Unique identifier for the organization.
        resource_type:
          type: string
          example: ticket
          description: Resource bought.
          enum:
            - ticket
            - name-change
            - list
            - pass
            - plan
            - booking
        resource_ids:
          type: array
          items:
            type: string
            example: abcdefghi1234567890
            description: Unique identifier for the resources.
        total:
          type: object
          example:
            amount: 20.6
            fees: 0.6
          description: Total payment.
          properties:
            amount:
              type: number
              example: 20.6
            fees:
              type: number
              example: 0.6
        send_resources:
          type: boolean
          example: true
          description: >-
            If the resources (tickets, passes, etc) should be sent to the user
            (via email, sms, whatsapp, etc) by Fourvenues.
        metadata:
          type: object
          example:
            user_id: abcdefghi1234567890
            internal_id: abcdefghi1234567890
          description: >-
            Metadata passed by the API client to be stored in the payment. Max
            1kb.
        currency:
          type: string
          example: EUR
          description: Currency used for total.
        paid_at:
          type: string
          format: date-time
          example: '2023-12-31T00:00:00.000Z'
          description: Date that should be displayed as the date the payment was made.
        expires_at:
          type: string
          format: date-time
          example: '2024-01-01T00:00:00.000Z'
          description: Expiration date of for the payment.
      required:
        - _id
        - status
        - rate_id
        - organization_id
        - event_id
        - resource_type
        - resource_ids
        - total
        - currency
        - paid_at
        - expires_at
  securitySchemes:
    ApiKey:
      in: header
      name: X-Api-Key
      type: apiKey

````