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

# Fetch Payment by Merchant Transaction ID

> Fetch details of a specific payment associated with a given merchant transaction ID.



## OpenAPI

````yaml get /api/v2/subscriptions/payments/merchantTxnId/{merchantTxnId}
openapi: 3.0.0
info:
  title: Cashfree Subscription API
  description: >-
    Create and manage subscriptions and collect recurring payments from
    customers easily with Cashfree Subscriptions.
  version: v2
servers:
  - url: https://sandbox.cashfree.com
    description: Sandbox server
  - url: https://api.cashfree.com
    description: Production server
security: []
externalDocs:
  url: https://docs.cashfree.com/reference/postman-collection-1
  description: This url will have the information of all the APIs.
paths:
  /api/v2/subscriptions/payments/merchantTxnId/{merchantTxnId}:
    get:
      tags:
        - Subscription
      summary: Fetch Payment by Merchant Transaction ID
      description: >-
        Fetch details of a specific payment associated with a given merchant
        transaction ID.
      operationId: fetchPaymentByMerchantTxnId
      parameters:
        - name: X-Client-Id
          in: header
          required: true
          schema:
            type: string
            description: Client ID provided by Cashfree.
            example: <x-client-id>
        - name: X-Client-Secret
          in: header
          required: true
          schema:
            type: string
            description: Client Secret provided by Cashfree.
            example: <x-client-secret>
        - name: merchantTxnId
          in: path
          required: true
          schema:
            type: string
            description: >-
              The merchant transaction ID whose payment details are to be
              fetched.
            example: test-txn-id-4
      responses:
        '200':
          description: Successful retrieval of the payment details.
          content:
            application/json:
              examples:
                Fetch Payment By Merchant Transaction ID Success:
                  value:
                    status: OK
                    message: Subscription Payment
                    payment:
                      paymentId: 121799
                      referenceId: 1489904256
                      cfOrderId: 3528817
                      orderId: SUB_109826_CHARGE_121799
                      subReferenceId: 109826
                      currency: INR
                      amount: 1
                      cycle: 1
                      status: PENDING
                      remarks: null
                      scheduledOn: null
                      addedOn: '2023-01-18 13:00:38'
                      retryAttempts: 0
                      failureReason: null
                      merchantTxnId: test-txn-id-4
                      splitDetails:
                        scheme:
                          - merchantVendorId: test-vendor-1
                            percentage: 10
                          - merchantVendorId: test-vendor-2
                            percentage: 10
        '400':
          description: >-
            Bad request due to invalid parameters or missing required
            information.
          content:
            application/json:
              examples:
                Payment Not Found:
                  value:
                    status: ERROR
                    subCode: '400'
                    message: 'Payment Does not exist for merchantTxnId: test-txn-id-4'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the API call.
                    example: ERROR
                  message:
                    type: string
                    description: Error message.
                    example: Server encountered an unexpected condition.

````