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

# Get payment

> Get a payment by it's paymentId.



## OpenAPI

````yaml openapi/payment-v1.json GET /v2/payments/{paymentId}
openapi: 3.0.4
info:
  title: PaymentCoordinator.Api
  version: v1
servers:
  - url: https://{host}/payment
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - Bearer: []
paths:
  /v2/payments/{paymentId}:
    get:
      tags:
        - Service2Service
      summary: Get payment
      description: Get a payment by it's paymentId.
      parameters:
        - name: paymentId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.GetPaymentV2Response
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
components:
  schemas:
    PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.GetPaymentV2Response:
      required:
        - amount
        - createdAt
        - paymentId
        - paymentMethods
        - receiptId
        - state
        - storeId
        - type
      type: object
      properties:
        paymentId:
          minLength: 1
          type: string
          description: The payment identifier
        createdAt:
          type: string
          description: Timestamp when the transaction was created
          format: date-time
        type:
          $ref: >-
            #/components/schemas/PaymentCoordinator.Domain.Entities.TransactionType
        receiptId:
          minLength: 1
          type: string
          description: The receipt identifier
        storeId:
          minLength: 1
          type: string
          description: The store identifier
        state:
          $ref: >-
            #/components/schemas/PaymentCoordinator.Domain.Entities.TransactionState
        amount:
          type: number
          description: The amount that the transaction was created with
          format: double
        paymentMethods:
          type: array
          items:
            $ref: >-
              #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.GetPaymentV2Response.PaymentMethod
          description: The collection of payment methods selected by the member
      additionalProperties: false
    LoopFoundation.Commons.Contracts.WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
    PaymentCoordinator.Domain.Entities.TransactionType:
      enum:
        - Payment
        - Refund
      type: string
    PaymentCoordinator.Domain.Entities.TransactionState:
      enum:
        - WaitingMemberConfirmation
        - WaitingPosCapture
        - Captured
        - Canceled
        - WaitingRefund
        - Refunded
        - WaitingExternalAction
      type: string
    PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.GetPaymentV2Response.PaymentMethod:
      required:
        - state
        - type
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/PaymentCoordinator.Domain.Entities.TransactionEntryType
        state:
          $ref: >-
            #/components/schemas/PaymentCoordinator.Domain.Entities.TransactionEntryState
        amount:
          type: number
          description: Indicates the amount used for the current payment method
          format: double
          nullable: true
        card:
          $ref: >-
            #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.GetPaymentV2Response.CardInfo
        failureCause:
          type: string
          description: Optional. Indicates the failure cause/message
          nullable: true
      additionalProperties: false
    PaymentCoordinator.Domain.Entities.TransactionEntryType:
      enum:
        - Bonus
        - Card
        - ExternalCard
        - LoyaltySubscription
      type: string
    PaymentCoordinator.Domain.Entities.TransactionEntryState:
      enum:
        - WaitingReservation
        - WaitingCapture
        - Captured
        - Canceled
        - WaitingRefund
        - Refunded
        - ReservationDeclined
      type: string
    PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.GetPaymentV2Response.CardInfo:
      required:
        - pan
        - type
      type: object
      properties:
        pan:
          minLength: 1
          type: string
          description: The masked card pan
        type:
          minLength: 1
          type: string
          description: The type of the card (e.g. Visa, Mastercard)
        fundsType:
          $ref: >-
            #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.GetPaymentV2Response.FundsType
      additionalProperties: false
    PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.GetPaymentV2Response.FundsType:
      enum:
        - Unknown
        - Credit
        - Debit
      type: string
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````