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

# Get payment

> Use when you need to load a single payment (e.g. for a receipt view or reconciliation).



## OpenAPI

````yaml /api-reference/openapi.json get /payments/{id}
openapi: 3.0.1
info:
  title: Flexprice API
  description: Flexprice API Service
  contact:
    name: API Support
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1.0'
servers:
  - url: https://us.api.flexprice.io/v1
    description: US Region
  - url: https://api.cloud.flexprice.io/v1
    description: India Region
security: []
paths:
  /payments/{id}:
    get:
      tags:
        - Payments
      summary: Get payment
      description: >-
        Use when you need to load a single payment (e.g. for a receipt view or
        reconciliation).
      operationId: getPayment
      parameters:
        - name: id
          in: path
          description: Payment ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Payment details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
        '404':
          description: Payment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PaymentResponse:
      type: object
      properties:
        amount:
          type: string
        attempts:
          type: array
          items:
            $ref: '#/components/schemas/PaymentAttemptResponse'
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        currency:
          type: string
        destination_id:
          type: string
        destination_type:
          $ref: '#/components/schemas/types.PaymentDestinationType'
        error_message:
          type: string
        failed_at:
          type: string
          format: date-time
        gateway_metadata:
          $ref: '#/components/schemas/types.Metadata'
        gateway_payment_id:
          type: string
        gateway_tracking_id:
          type: string
        id:
          type: string
        idempotency_key:
          type: string
        invoice_number:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        payment_gateway:
          type: string
        payment_method_id:
          type: string
        payment_method_type:
          $ref: '#/components/schemas/types.PaymentMethodType'
        payment_status:
          $ref: '#/components/schemas/types.PaymentStatus'
        payment_url:
          type: string
        refunded_at:
          type: string
          format: date-time
        save_card_and_make_default:
          type: boolean
        succeeded_at:
          type: string
          format: date-time
        tenant_id:
          type: string
        track_attempts:
          type: boolean
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
    errors.ErrorResponse:
      type: object
      properties:
        code:
          type: string
          enum:
            - not_found
            - already_exists
            - version_conflict
            - validation_error
            - invalid_operation
            - permission_denied
            - http_client_error
            - database_error
            - system_error
            - internal_error
            - service_unavailable
        details:
          type: object
          additionalProperties:
            type: object
        http_status_code:
          type: integer
        message:
          type: string
      x-speakeasy-name-override: ErrorResponse
    PaymentAttemptResponse:
      type: object
      properties:
        attempt_number:
          type: integer
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        error_message:
          type: string
        id:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        payment_id:
          type: string
        tenant_id:
          type: string
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
    types.PaymentDestinationType:
      type: string
      enum:
        - INVOICE
      x-enum-varnames:
        - PaymentDestinationTypeInvoice
      x-speakeasy-name-override: PaymentDestinationType
    types.Metadata:
      type: object
      additionalProperties:
        type: string
      x-speakeasy-name-override: Metadata
    types.PaymentMethodType:
      type: string
      enum:
        - CARD
        - ACH
        - OFFLINE
        - CREDITS
        - PAYMENT_LINK
      x-enum-varnames:
        - PaymentMethodTypeCard
        - PaymentMethodTypeACH
        - PaymentMethodTypeOffline
        - PaymentMethodTypeCredits
        - PaymentMethodTypePaymentLink
      x-speakeasy-name-override: PaymentMethodType
    types.PaymentStatus:
      type: string
      enum:
        - INITIATED
        - PENDING
        - PROCESSING
        - SUCCEEDED
        - OVERPAID
        - FAILED
        - REFUNDED
        - PARTIALLY_REFUNDED
      x-enum-varnames:
        - PaymentStatusInitiated
        - PaymentStatusPending
        - PaymentStatusProcessing
        - PaymentStatusSucceeded
        - PaymentStatusOverpaid
        - PaymentStatusFailed
        - PaymentStatusRefunded
        - PaymentStatusPartiallyRefunded
      x-speakeasy-name-override: PaymentStatus
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Enter your API key in the format *x-api-key &lt;api-key&gt;**
      name: x-api-key
      in: header

````