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

# Retrieve a payment session

> Retrieves the payment session with the given ID.



## OpenAPI

````yaml openapi-payments.json GET /v1/payment_sessions/{id}
openapi: 3.1.0
info:
  title: Yorlet Payments API
  description: APIs for managing transactions, payment initiations, and external accounts.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/payment_sessions/{id}:
    get:
      tags:
        - Payment Sessions
      summary: Retrieve a payment session
      description: Retrieves the payment session with the given ID.
      operationId: payment_sessions_retrieve
      parameters:
        - schema:
            type: string
            description: The id identifier.
          required: true
          description: The id identifier.
          name: id
          in: path
      responses:
        '200':
          description: Returns a payment session object if a valid identifier was provided.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - payment_session
                  amount:
                    type: number
                    description: >-
                      The amount of the payment session, in the smallest
                      currency unit.
                  currency:
                    type: string
                    description: >-
                      Three-letter ISO currency code, in lowercase. Must be a
                      supported currency.
                  customer:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                    description: The customer the payment session is for.
                  description:
                    type:
                      - string
                      - 'null'
                    description: >-
                      An arbitrary string attached to the object. Often useful
                      for displaying to users.
                  merchant:
                    type: object
                    properties:
                      business_name:
                        type:
                          - string
                          - 'null'
                        description: The legal business name of the merchant.
                      color:
                        type:
                          - string
                          - 'null'
                        description: The merchant's brand color, as a hex code.
                      country:
                        type:
                          - string
                          - 'null'
                        description: The ISO 3166-1 alpha-2 country code of the merchant.
                      display_name:
                        type:
                          - string
                          - 'null'
                        description: The display name shown on hosted pages.
                      icon:
                        type:
                          - string
                          - 'null'
                        description: The URL of the merchant icon shown on hosted pages.
                      id:
                        type: string
                        description: The ID of the merchant.
                      support_email:
                        type:
                          - string
                          - 'null'
                        description: The support email address shown on hosted pages.
                      support_phone:
                        type:
                          - string
                          - 'null'
                        description: The support phone number shown on hosted pages.
                      support_website:
                        type:
                          - string
                          - 'null'
                        description: The support website URL shown on hosted pages.
                    required:
                      - business_name
                      - color
                      - country
                      - display_name
                      - icon
                      - id
                      - support_email
                      - support_phone
                      - support_website
                    description: >-
                      Information about the merchant operating the payment
                      session.
                  metadata:
                    type:
                      - object
                      - 'null'
                    additionalProperties:
                      type: string
                    description: >-
                      Set of key-value pairs that you can attach to an object.
                      This can be useful for storing additional information
                      about the object in a structured format.
                  mode:
                    type: string
                    enum:
                      - payment
                    description: The mode of the payment session.
                  payment_method_types:
                    type: array
                    items:
                      type: string
                    description: The payment method types allowed for this session.
                  reporting_type:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The reporting type used to categorize this payment
                      session.
                  return_url:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The URL to redirect to after the payment session is
                      complete.
                  status:
                    type: string
                    enum:
                      - paid
                      - unpaid
                      - canceled
                    description: The status of the payment session.
                  transaction:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                    description: The transaction created for this payment session.
                  url:
                    type:
                      - string
                      - 'null'
                    description: The hosted URL of the payment session.
                required:
                  - id
                  - created
                  - object
                  - amount
                  - currency
                  - customer
                  - description
                  - mode
                  - payment_method_types
                  - reporting_type
                  - return_url
                  - status
                  - transaction
                  - url
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````