> ## 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.

# Get Orders for a Payment Link

> Use this API to view all order details for a payment link.



## OpenAPI

````yaml /openapi/payments/v2022-09-01.yaml get /links/{link_id}/orders
openapi: 3.0.0
info:
  version: '2022-09-01'
  title: Cashfree Payment Gateway APIs
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    email: developers@cashfree.com
    name: API Support
    url: https://discord.com/invite/QdZkNSxXsB
  description: >-
    Cashfree's Payment Gateway APIs provide developers with a streamlined
    pathway to integrate advanced payment processing capabilities into their
    applications, platforms and websites.
servers:
  - url: https://sandbox.cashfree.com/pg
    description: Sandbox server
  - url: https://api.cashfree.com/pg
    description: Production server
security: []
tags:
  - name: Orders
    description: Collection of APIs to handle orders.
  - name: Payments
    description: Collection of APIs to handle payments.
  - name: Refunds
    description: Collection of APIs to handle refunds.
  - name: Settlements
    description: Collection of APIs to handle settlements.
  - name: Payment Links
    description: Collection of APIs to handle payment links.
  - name: Token Vault
    description: >-
      Collection of APIs to use Cashfree's token Vault. This helps you save
      cards and tokenize them in a PCI complaint manner. We support creation of
      network tokens which can be used across acquiring banks
  - name: softPOS
    description: Collection of APIs to manage softPOS' agent and order
  - name: Offers
    description: Collection of APIs to handle offers
  - name: Eligibility
    description: >-
      Collection of APIs to check eligibile entities - payment methods, offer,
      affordibility
  - name: Settlement Reconciliation
    description: Collection of APIs to handle settlements
  - name: PG Reconciliation
    description: Collection of APIs to handle reconciliation
paths:
  /links/{link_id}/orders:
    get:
      tags:
        - Payment Links
      summary: Get Orders for a Payment Link
      description: Use this API to view all order details for a payment link.
      operationId: PGLinkFetchOrders
      parameters:
        - $ref: '#/components/parameters/apiVersionHeader'
        - $ref: '#/components/parameters/xRequestIDHeader'
        - $ref: '#/components/parameters/linkIDParam'
        - $ref: '#/components/parameters/xIdempotencyKeyHeader'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderEntity'
              examples:
                order_entity_list_example:
                  $ref: '#/components/examples/order_entity_list_example'
          headers:
            x-api-version:
              $ref: '#/components/headers/x-api-version'
            x-ratelimit-limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            x-ratelimit-remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            x-ratelimit-retry:
              $ref: '#/components/headers/x-ratelimit-retry'
            x-ratelimit-type:
              $ref: '#/components/headers/x-ratelimit-type'
            x-request-id:
              $ref: '#/components/headers/x-request-id'
            x-idempotency-key:
              $ref: '#/components/headers/x-idempotency-key'
            x-idempotency-replayed:
              $ref: '#/components/headers/x-idempotency-replayed'
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401'
        '404':
          $ref: '#/components/responses/Response404'
        '409':
          $ref: '#/components/responses/Response409'
        '422':
          $ref: '#/components/responses/Response422'
        '429':
          $ref: '#/components/responses/Response429'
        '500':
          $ref: '#/components/responses/Response500'
      deprecated: false
      security:
        - XClientID: []
          XClientSecret: []
        - XClientID: []
          XPartnerAPIKey: []
        - XClientID: []
          XClientSignatureHeader: []
        - XPartnerMerchantID: []
          XPartnerAPIKey: []
components:
  parameters:
    apiVersionHeader:
      in: header
      name: x-api-version
      required: true
      description: API version to be used. Format is in YYYY-MM-DD
      schema:
        type: string
        description: API version to be used
        default: '2022-09-01'
      example: '2022-09-01'
    xRequestIDHeader:
      in: header
      name: x-request-id
      description: >-
        Request id for the API call. Can be used to resolve tech issues.
        Communicate this in your tech related queries to cashfree
      required: false
      schema:
        type: string
      example: 4dfb9780-46fe-11ee-be56-0242ac120002
    linkIDParam:
      name: link_id
      in: path
      required: true
      description: The payment link ID for which you want to view the details.
      schema:
        type: string
      example: your-link-id
    xIdempotencyKeyHeader:
      in: header
      name: x-idempotency-key
      required: false
      description: >
        Idempotency works by saving the resulting status code and body of the
        first request made for any given idempotency key, regardless of whether
        it succeeded or failed. Subsequent requests with the same key return the
        same result, including 500 errors.


        Currently supported on all POST calls that uses x-client-id &
        x-client-secret. To use enable, pass x-idempotency-key in the request
        header. The value of this header must be unique to each operation you
        are trying to do. One example can be to use the same order_id that you
        pass while creating orders 
      schema:
        type: string
        format: UUID
      example: 47bf8872-46fe-11ee-be56-0242ac120002
  schemas:
    OrderEntity:
      title: OrderEntity
      type: object
      description: The complete order entity
      example:
        $ref: '#/components/examples/order_entity_list_example/value/0'
      properties:
        cf_order_id:
          type: integer
          format: int64
          description: unique id generated by cashfree for your order
        order_id:
          type: string
          description: order_id sent during the api request
        entity:
          type: string
          description: Type of the entity.
        order_currency:
          type: string
          description: Currency of the order. Example INR
        order_amount:
          type: number
        order_status:
          type: string
          description: >
            Possible values are 

            - `ACTIVE`: Order does not have a sucessful transaction yet

            - `PAID`: Order is PAID with one successful transaction

            - `EXPIRED`: Order was not PAID and not it has expired. No
            transaction can be initiated for an EXPIRED order.
        payment_session_id:
          type: string
        order_expiry_time:
          type: string
          format: date-time
        order_note:
          type: string
          description: Additional note for order
          nullable: true
        created_at:
          type: string
          format: date-time
          description: When the order was created at cashfree's server
          example: '2022-08-16T14:45:38+05:30'
        order_splits:
          type: array
          items:
            $ref: '#/components/schemas/VendorSplit'
        customer_details:
          $ref: '#/components/schemas/CustomerDetails'
        order_meta:
          $ref: '#/components/schemas/OrderMeta'
        payments:
          $ref: '#/components/schemas/PaymentURLObject'
        settlements:
          $ref: '#/components/schemas/SettlementURLObject'
        refunds:
          $ref: '#/components/schemas/RefundURLObject'
        order_tags:
          $ref: '#/components/schemas/OrderTags'
    VendorSplit:
      title: VendorSplit
      description: >-
        Use to split order when cashfree's Easy Split is enabled for your
        account.
      type: object
      example:
        vendor_id: Vendor01
        amount: 100.12
        description: order amount should be more than equal to 100.12
      properties:
        vendor_id:
          type: string
          description: Vendor id created in Cashfree system
        amount:
          type: number
          description: Amount which will be associated with this vendor
        percentage:
          type: number
          description: Percentage of order amount which shall get added to vendor account
    CustomerDetails:
      title: CustomerDetails
      description: >-
        The customer details that are necessary. Note that you can pass dummy
        details if your use case does not require the customer details.
      example:
        customer_id: 7112AAA812234
        customer_email: john@cashfree.com
        customer_phone: '9908734801'
        customer_name: John Doe
        customer_bank_account_number: '1518121112'
        customer_bank_ifsc: XITI0000001
        customer_bank_code: 3333
      type: object
      properties:
        customer_id:
          type: string
          description: A unique identifier for the customer. Use alphanumeric values only.
          minLength: 3
          maxLength: 50
        customer_email:
          type: string
          description: Customer email address.
          minLength: 3
          maxLength: 100
          nullable: true
        customer_phone:
          type: string
          description: Customer phone number.
          minLength: 10
          maxLength: 10
        customer_name:
          type: string
          description: Name of the customer.
          minLength: 3
          maxLength: 100
          nullable: true
        customer_bank_account_number:
          type: string
          description: >-
            Customer bank account. Required if you want to do a bank account
            check (TPV)
          minLength: 3
          maxLength: 20
          nullable: true
        customer_bank_ifsc:
          type: string
          description: >-
            Customer bank IFSC. Required if you want to do a bank account check
            (TPV)
          nullable: true
        customer_bank_code:
          type: number
          nullable: true
          description: >-
            Customer bank code. Required for net banking payments, if you want
            to do a bank account check (TPV)
      required:
        - customer_id
        - customer_phone
    OrderMeta:
      title: OrderMeta
      description: >-
        Optional meta details to control how the customer pays and how payment
        journey completes
      type: object
      properties:
        return_url:
          type: string
          nullable: true
          example: https://example.com/return?order_id={order_id}
          description: >-
            The URL to which user will be redirected to after the payment on
            bank OTP page. Maximum length: 250. The return_url must contain
            placeholder {order_id}. When redirecting the customer back to the
            return url from the bank’s OTP page, Cashfree will replace this
            placeholder with the actual value for that order.
        notify_url:
          type: string
          nullable: true
          example: https://example.com/cf_notify
          description: >-
            Notification URL for server-server communication. Useful when user's
            connection drops while re-directing. NotifyUrl should be an https
            URL. Maximum length: 250.
        payment_methods:
          nullable: true
          example: cc,dc,upi
          description: >-
            Allowed payment modes for this order. Pass comma-separated values
            among following options - "cc", "dc", "ccc",
            "ppc","nb","upi","paypal","app","paylater","cardlessemi","dcemi","ccemi","banktransfer".
            Leave it blank to show all available payment methods
    PaymentURLObject:
      title: PaymentURLObject
      description: URL for payment retrieval for an order
      type: object
      properties:
        url:
          type: string
          example: >-
            https://sandbox.cashfree.com/pg/orders/order_271vovQ3PTZAx3fDI0xtZbC4jkPET/payments
    SettlementURLObject:
      title: SettlementURLObject
      description: Settlement URL object
      type: object
      properties:
        url:
          type: string
          example: >-
            https://sandbox.cashfree.com/pg/orders/order_271vovQ3PTZAx3fDI0xtZbC4jkPET/settlements
    RefundURLObject:
      title: RefundURLObject
      description: URL to get refunds for order
      type: object
      properties:
        url:
          type: string
          example: >-
            https://sandbox.cashfree.com/pg/orders/order_271vovQ3PTZAx3fDI0xtZbC4jkPET/refunds
    OrderTags:
      type: object
      nullable: true
      maxProperties: 15
      description: >-
        Custom Tags in thr form of {"key":"value"} which can be passed for an
        order. A maximum of 10 tags can be added
      additionalProperties:
        type: string
        minLength: 1
        maxLength: 255
      example:
        product: Laptop
        shipping_address: 123 Main St
    BadRequestError:
      title: BadRequestError
      description: Invalid request received from client
      example:
        message: bad URL, please check API documentation
        code: request_failed
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
    AuthenticationError:
      title: AuthenticationError
      description: Error if api keys are wrong
      example:
        message: authentication Failed
        code: request_failed
        type: authentication_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          description: authentication_error
    ApiError404:
      title: ApiError404
      description: Error when resource requested is not found
      example:
        message: something is not found
        code: somethind_not_found
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
          description: invalid_request_error
    ApiError409:
      title: ApiError409
      description: duplicate request
      example:
        message: order with same id is already present
        code: order_already_exists
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
          description: invalid_request_error
    IdempotencyError:
      title: IdempotencyError
      description: >-
        Error when idempotency fails. Different request body with the same
        idempotent key
      example:
        message: something is not found
        code: request_invalid
        type: idempotency_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - idempotency_error
          description: idempotency_error
    RateLimitError:
      title: RateLimitError
      description: Error when rate limit is breached for your api
      example:
        message: Too many requests from IP. Check headers
        code: request_failed
        type: rate_limit_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - rate_limit_error
          description: rate_limit_error
    ApiError:
      title: ApiError
      description: Error at cashfree's server
      example:
        message: internal Server Error
        code: internal_error
        type: api_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - api_error
          description: api_error
  examples:
    order_entity_list_example:
      description: OrderEntityListExample
      summary: OrderEntityListExample
      value:
        - cf_order_id: 2149460581
          created_at: '2023-08-11T18:02:46+05:30'
          customer_details:
            customer_id: '409128494'
            customer_name: Johmn Doe
            customer_email: pmlpayme@ntsas.com
            customer_phone: '9876543210'
          entity: order
          order_amount: 22
          order_currency: INR
          order_expiry_time: '2023-09-09T18:02:46+05:30'
          order_id: order_3242Tq4Edj9CC5RDcMeobmJOWOBJij
          order_meta:
            return_url: https://example.com/return/{order_id}
            notify_url: https://example.com/notify
            payment_methods: cc
          order_note: some order note LIST
          order_splits: []
          order_status: ACTIVE
          order_tags:
            name: John
            age: '19'
          payment_session_id: >-
            session_a1VXIPJo8kh7IBigVXX8LgTMupQW_cu25FS8KwLwQLOmiHqbBxq5UhEilrhbDSKKHA6UAuOj9506aaHNlFAHEqYrHSEl9AVtYQN9LIIc4vkH
          payments:
            url: >-
              https://sandbox.cashfree.com/pg/orders/order_3242Tq4Edj9CC5RDcMeobmJOWOBJij/payments
          refunds:
            url: >-
              https://sandbox.cashfree.com/pg/orders/order_3242Tq4Edj9CC5RDcMeobmJOWOBJij/refunds
          settlements:
            url: >-
              https://sandbox.cashfree.com/pg/orders/order_3242Tq4Edj9CC5RDcMeobmJOWOBJij/settlements
          terminal_data: null
  headers:
    x-api-version:
      schema:
        type: string
        format: YYYY-MM-DD
        enum:
          - '2022-09-01'
      description: >-
        This header has the version of the API. The current version is
        `2022-09-01`.
    x-ratelimit-limit:
      schema:
        type: integer
      example: 200
      description: Ratelimit set for your account for this API per minute
    x-ratelimit-remaining:
      schema:
        type: integer
      example: 2
      description: >-
        Rate limit remaning for your account for this API in the next minute.
        Uses sliding window
    x-ratelimit-retry:
      schema:
        type: integer
      example: 4
      description: |
        Contains number of seconds to wait if rate limit is breached
        - Is 0 if withing the limit
        - Is between 1 and 59 if breached
    x-ratelimit-type:
      schema:
        type: string
        enum:
          - app_id
          - ip
      example: ip
      description: >
        either ip or app_id

        - `ip` if making a call from the browser. True for api where you don't
        need `x-client-id` and `x-client-secret`

        - `app_id` for authenticated api calls i.e using `x-client-id` and
        `x-client-secret`
    x-request-id:
      schema:
        type: string
      example: some-req-id
      description: >-
        Request id for your api call. Is blank or null if no `x-request-id` is
        sent during the request
    x-idempotency-key:
      schema:
        type: string
      example: some-idem-id
      description: Idempotency key used during the request. Applicable for POST only
    x-idempotency-replayed:
      schema:
        type: string
        format: boolean
      example: 'true'
      description: |-
        In conjunction with `x-idempotency-key` this means
        - `true` if the response was replayed
        - `false` if the response has not been replayed
  responses:
    Response400:
      description: Bad request error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response401:
      description: Authentication Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthenticationError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response404:
      description: Resource Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError404'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response409:
      description: Resource already present
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError409'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response422:
      description: Idempotency error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/IdempotencyError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response429:
      description: Rate Limit Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response500:
      description: API related Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
  securitySchemes:
    XClientID:
      type: apiKey
      in: header
      name: x-client-id
      description: >-
        Client app ID. You can find your app id in the [Merchant
        Dashboard](https://merchant.cashfree.com/auth/login/pg/developers/api-keys?env=prod).
    XClientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Client secret key. You can find your secret in the [Merchant
        Dashboard](https://merchant.cashfree.com/auth/login/pg/developers/api-keys?env=prod).
    XPartnerAPIKey:
      type: apiKey
      in: header
      name: x-partner-apikey
      description: >-
        If you are partner and you are making an api call on behalf of a
        merchant
    XClientSignatureHeader:
      type: apiKey
      in: header
      name: x-client-signature
      description: >-
        Use this if you do not want to pass the secret key and instead want to
        use signature
    XPartnerMerchantID:
      type: apiKey
      in: header
      name: x-partner-merchantid
      description: >-
        If you are partner use this to specify the merchant id if you don't have
        the merchant client app id

````