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

# Payments Link - Retrieve

> To retrieve the properties of a Payment Link. This may be used to get the status of a previously initiated payment or next action for an ongoing payment



## OpenAPI

````yaml get /payment_link/{payment_link_id}
openapi: 3.0.3
info:
  title: Hyperswitch - API Documentation
  description: >

    ## Get started


    Hyperswitch provides a collection of APIs that enable you to process and
    manage payments.

    Our APIs accept and return JSON in the HTTP body, and return standard HTTP
    response codes.


    You can consume the APIs directly using your favorite HTTP/REST library.


    We have a testing environment referred to "sandbox", which you can setup to
    test API calls without

    affecting production data.

    Currently, our sandbox environment is live while our production environment
    is under development

    and will be available soon.

    You can sign up on our Dashboard to get API keys to access Hyperswitch API.


    ### Environment


    Use the following base URLs when making requests to the APIs:


    | Environment   |  Base URL                          |

    |---------------|------------------------------------|

    | Sandbox       | <https://sandbox.hyperswitch.io>   |

    | Production    | <https://api.hyperswitch.io>       |


    ## Authentication


    When you sign up on our [dashboard](https://app.hyperswitch.io) and create a
    merchant

    account, you are given a secret key (also referred as api-key) and a
    publishable key.

    You may authenticate all API requests with Hyperswitch server by providing
    the appropriate key in

    the request Authorization header.


    | Key             | 
    Description                                                                                 
    |

    |-----------------|-----------------------------------------------------------------------------------------------|

    | api-key         | Private key. Used to authenticate all API requests from
    your merchant server                  |

    | publishable key | Unique identifier for your account. Used to authenticate
    API requests from your app's client  |


    Never share your secret api keys. Keep them guarded and secure.
  contact:
    name: Hyperswitch Support
    url: https://hyperswitch.io
    email: support.global@juspay.io
  license:
    name: Apache-2.0
  version: 0.1.0
servers:
  - url: https://sandbox.hyperswitch.io
    description: Sandbox Environment
security: []
tags:
  - name: Merchant Account
    description: Create and manage merchant accounts
  - name: Profile
    description: Create and manage profiles
  - name: Merchant Connector Account
    description: Create and manage merchant connector accounts
  - name: Payments
    description: Create and manage one-time payments, recurring payments and mandates
  - name: Refunds
    description: Create and manage refunds for successful payments
  - name: Mandates
    description: Manage mandates
  - name: Customers
    description: Create and manage customers
  - name: Payment Methods
    description: Create and manage payment methods of customers
  - name: Disputes
    description: Manage disputes
  - name: API Key
    description: Create and manage API Keys
  - name: Payouts
    description: Create and manage payouts
  - name: payment link
    description: Create payment link
  - name: Routing
    description: Create and manage routing configurations
  - name: Event
    description: Manage events
  - name: Authentication
    description: Create and manage authentication
  - name: Subscriptions
    description: Subscription management and billing endpoints
  - name: Card Issuer
    description: Create and manage card issuers
paths:
  /payment_link/{payment_link_id}:
    get:
      tags:
        - Payments
      summary: Payments Link - Retrieve
      description: >-
        To retrieve the properties of a Payment Link. This may be used to get
        the status of a previously initiated payment or next action for an
        ongoing payment
      operationId: Retrieve a Payment Link
      parameters:
        - name: payment_link_id
          in: path
          description: The identifier for payment link
          required: true
          schema:
            type: string
        - name: client_secret
          in: query
          description: >-
            This is a token which expires after 15 minutes, used from the client
            to authenticate and create sessions from the SDK
          required: false
          schema:
            type: string
            nullable: true
      responses:
        '200':
          description: Gets details regarding payment link
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievePaymentLinkResponse'
        '404':
          description: No payment link found
      security:
        - api_key: []
        - publishable_key: []
components:
  schemas:
    RetrievePaymentLinkResponse:
      type: object
      required:
        - payment_link_id
        - merchant_id
        - link_to_pay
        - amount
        - created_at
        - status
      properties:
        payment_link_id:
          type: string
          description: Identifier for Payment Link
        merchant_id:
          type: string
          description: Identifier for Merchant
        processor_merchant_id:
          type: string
          description: Identifier for the processor merchant
          nullable: true
        link_to_pay:
          type: string
          description: Open payment link (without any security checks and listing SPMs)
        amount:
          type: integer
          format: int64
          description: >-
            The payment amount. Amount for the payment in the lowest
            denomination of the currency
          example: 6540
        created_at:
          type: string
          format: date-time
          description: Date and time of Payment Link creation
        expiry:
          type: string
          format: date-time
          description: Date and time of Expiration for Payment Link
          nullable: true
        description:
          type: string
          description: Description for Payment Link
          nullable: true
        status:
          $ref: '#/components/schemas/PaymentLinkStatus'
        currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          nullable: true
        secure_link:
          type: string
          description: >-
            Secure payment link (with security checks and listing saved payment
            methods)
          nullable: true
    PaymentLinkStatus:
      type: string
      description: Status Of the Payment Link
      enum:
        - active
        - expired
    Currency:
      type: string
      description: >-
        The three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the
        payment amount. This field is mandatory for creating a payment.
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLF
        - CLP
        - CNY
        - COP
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - IRR
        - ISK
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLE
        - SLL
        - SOS
        - SRD
        - SSP
        - STD
        - STN
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
        - ZWL
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api-key
      description: >-
        Use the API key created under your merchant account from the HyperSwitch
        dashboard. API key is used to authenticate API requests from your
        merchant server only. Don't expose this key on a website or embed it in
        a mobile application.
    publishable_key:
      type: apiKey
      in: header
      name: api-key
      description: >-
        Publishable keys are a type of keys that can be public and have limited
        scope of usage.

````