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

# Get Checkout Session

> Retrieve details of an existing checkout session



## OpenAPI

````yaml GET /checkout/session/{id}
openapi: 3.1.0
info:
  title: Clink API
  description: >-
    Official API documentation for Clink's payment processing platform. This API
    enables merchants to create and manage payment sessions, handle
    subscriptions, and process transactions.
  version: 1.0.0
servers:
  - url: https://uat-api.clinkbill.com/api/
security:
  - ApiKeyAuth: []
paths:
  /checkout/session/{id}:
    get:
      summary: Get Checkout Session
      description: Retrieve details of an existing checkout session
      operationId: getSession_2
      parameters:
        - $ref: '#/components/parameters/TimestampHeader'
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Unique identifier of the checkout session to retrieve
      responses:
        '200':
          description: Successfully retrieved checkout session details
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RSessionApiVo'
            application/json:
              schema:
                $ref: '#/components/schemas/SessionGetRes'
        '401':
          description: Unauthorized
          content:
            '*/*':
              schema:
                type: string
components:
  parameters:
    TimestampHeader:
      name: X-Timestamp
      in: header
      required: true
      description: >-
        Current timestamp in milliseconds since Unix epoch (required for request
        signing)
      schema:
        type: string
        example: '1783513683000'
  schemas:
    RSessionApiVo:
      type: object
      properties:
        code:
          type: integer
          format: int32
        msg:
          type: string
        data:
          $ref: '#/components/schemas/SessionApiVo'
    SessionGetRes:
      type: object
      properties:
        code:
          type: integer
          description: Response code, 200 when success
          format: int32
        msg:
          type: string
          example: success
          description: Brief description of what happened, 'success' when happy case
        data:
          $ref: '#/components/schemas/SessionApiVo'
    SessionApiVo:
      type: object
      properties:
        sessionId:
          type: string
          description: Unique identifier for the checkout session
        token:
          type: string
          description: Time-limited authentication token for this checkout session
        status:
          type: string
          enum:
            - open
            - completed
            - expired
          description: Current state of the checkout session
        paymentStatus:
          type: string
          enum:
            - unpaid
            - processing
            - paid
          description: Current state of the payment process
        amountSubtotal:
          type: number
          description: Sum of all items before taxes and discounts
        amountTotal:
          type: number
          description: Final amount including all taxes, fees, and discounts
        originalCurrency:
          type: string
          description: Currency specified in the initial request
        paymentCurrency:
          type: string
          description: Currency selected by the customer for payment
        subscriptionId:
          type: string
          description: Unique identifier for recurring billing subscription (if applicable)
        invoiceId:
          type: string
          description: Unique identifier for the generated invoice
        orderId:
          type: string
          description: Unique identifier for the created order
        merchantReferenceId:
          type: string
          description: Your provided reference identifier from the initial request
        locale:
          type: string
          description: Language code for the checkout interface (e.g., en-US)
        uiMode:
          type: string
          enum:
            - elements
            - hostedPage
          description: Checkout UI mode used for this session
        returnUrl:
          type: string
          description: Return URL configured for embedded checkout sessions
        cancelUrl:
          type: string
          description: URL where customers return if they abandon checkout
        successUrl:
          type: string
          description: URL where customers are directed after successful payment
        created:
          type: string
          description: Timestamp when the session was created
          format: date-time
        expire:
          type: string
          description: Timestamp when the session will expire
          format: date-time
        price:
          $ref: '#/components/schemas/PriceApiVo'
          refType: PriceApiVo
        product:
          $ref: '#/components/schemas/ProductApiVo'
          refType: ProductApiVo
        customer:
          $ref: '#/components/schemas/CustomerApiVo'
          refType: CustomerApiVo
        priceDataList:
          type: array
          description: List of product and price information for non-dashboard transactions
          items:
            $ref: '#/components/schemas/PriceData'
          refType: ProductPriceDataVo
    PriceApiVo:
      type: object
      properties:
        priceId:
          type: string
          description: Unique identifier for the price configuration
        priceList:
          type: array
          description: Available price options based on customer's location
          items:
            $ref: '#/components/schemas/PriceDataApiVo'
          refType: PriceDataApiVo
        recurring:
          $ref: '#/components/schemas/RecurringApiVo'
          refType: RecurringApiVo
    ProductApiVo:
      type: object
      properties:
        productId:
          type: string
          description: Unique identifier for the product
        productName:
          type: string
          description: Display name of the product
    CustomerApiVo:
      type: object
      properties:
        customerId:
          type: string
          description: Unique identifier for the customer
        email:
          type: string
          description: Customer's email address for communications and receipts
    PriceData:
      required:
        - name
        - unitAmount
      type: object
      properties:
        name:
          type: string
          description: Display name of the product shown to customers during checkout
        quantity:
          minimum: 1
          type: integer
          description: Number of units to be purchased (minimum 1)
          format: int32
        unitAmount:
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: Price per unit in the specified currency (must be greater than 0)
        currency:
          type: string
          description: Three-letter ISO currency code for the price (e.g., USD, EUR, GBP)
        imageUrl:
          type: string
          description: URL of the product image to display during checkout
    PriceDataApiVo:
      type: object
      properties:
        amount:
          type: number
          description: Price amount in the specified currency
        currency:
          type: string
          description: Three-letter ISO currency code
        exchangeRate:
          type: number
          description: Current exchange rate from original currency
          format: double
    RecurringApiVo:
      type: object
      properties:
        freeTrialDays:
          type: integer
          description: Duration of the free trial period in days
          format: int32
        interval:
          type: string
          enum:
            - week
            - month
            - year
            - day
            - quarter
            - half_year
            - custom
          description: >-
            Frequency of recurring charges. Supported values: day, week, month,
            year, quarter, half_year, custom.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Your secret API key obtained from the Clink dashboard (Developers
        section)

````