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

# Get a checkout session by ID



## OpenAPI

````yaml https://api.meteroid.com/api-docs/openapi.json get /api/v1/checkout-sessions/{id}
openapi: 3.1.0
info:
  title: meteroid
  description: ''
  license:
    name: LicenseRef-Proprietary
    identifier: LicenseRef-Proprietary
  version: 0.1.0
servers: []
security: []
tags:
  - name: Meteroid
    description: Meteroid API
  - name: Add-ons
  - name: Batch Jobs
  - name: Checkout Sessions
  - name: Connect
    description: Manage connected accounts (Express & Standard)
  - name: Coupons
  - name: Credit Notes
  - name: Customers
  - name: Entitlements
  - name: Events
  - name: Features
  - name: Invoices
  - name: Metrics
  - name: OAuth
    description: OAuth 2.0 token endpoints (public, client-credentials auth)
  - name: OAuth Apps
    description: Manage OAuth applications for Connect integrations
  - name: Plans
  - name: Product Families
  - name: Products
  - name: Subscriptions
  - name: Usage
paths:
  /api/v1/checkout-sessions/{id}:
    get:
      tags:
        - Checkout Sessions
      summary: Get a checkout session by ID
      operationId: get_checkout_session
      parameters:
        - name: id
          in: path
          description: Checkout session ID
          required: true
          schema:
            $ref: '#/components/schemas/CheckoutSessionId'
      responses:
        '200':
          description: Checkout session details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCheckoutSessionResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    CheckoutSessionId:
      type: string
      format: MeteroidId
      examples:
        - che_7n42DGM5Tflk9n8mt7Fhc7
    GetCheckoutSessionResponse:
      type: object
      required:
        - session
      properties:
        session:
          $ref: '#/components/schemas/CheckoutSession'
    RestErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
    CheckoutSession:
      type: object
      required:
        - id
        - customer_id
        - plan_version_id
        - status
        - checkout_type
        - created_at
      properties:
        billing_day_anchor:
          type:
            - integer
            - 'null'
          format: int32
        billing_start_date:
          type:
            - string
            - 'null'
          format: date
        checkout_type:
          $ref: '#/components/schemas/CheckoutType'
        checkout_url:
          type:
            - string
            - 'null'
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        coupon_code:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        customer_id:
          $ref: '#/components/schemas/CustomerId'
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the session expires. None means the session never expires.
        id:
          $ref: '#/components/schemas/CheckoutSessionId'
        net_terms:
          type:
            - integer
            - 'null'
          format: int32
        payment_methods_config:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PaymentMethodsConfig'
        plan_version_id:
          $ref: '#/components/schemas/PlanVersionId'
        status:
          $ref: '#/components/schemas/CheckoutSessionStatus'
        subscription_id:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SubscriptionId'
        trial_duration_days:
          type:
            - integer
            - 'null'
          format: int32
    ErrorCode:
      type: string
      enum:
        - BAD_REQUEST
        - NOT_FOUND
        - CONFLICT
        - FORBIDDEN
        - UNAUTHORIZED
        - TOO_MANY_REQUESTS
        - INTERNAL_SERVER_ERROR
    CheckoutType:
      type: string
      enum:
        - SELF_SERVE
        - SUBSCRIPTION_ACTIVATION
        - PLAN_CHANGE
        - ADDON_PURCHASE
    CustomerId:
      type: string
      format: MeteroidId
      examples:
        - cus_7n42DGM5Tflk9n8mt7Fhc7
    PaymentMethodsConfig:
      oneOf:
        - $ref: '#/components/schemas/OnlinePaymentMethodConfig'
        - $ref: '#/components/schemas/BankTransferPaymentMethodConfig'
        - $ref: '#/components/schemas/ExternalPaymentMethodConfig'
      description: Online (card/direct debit), BankTransfer, or External.
      discriminator:
        propertyName: type
        mapping:
          bank_transfer:
            $ref: '#/components/schemas/BankTransferPaymentMethodConfig'
          external:
            $ref: '#/components/schemas/ExternalPaymentMethodConfig'
          online:
            $ref: '#/components/schemas/OnlinePaymentMethodConfig'
    PlanVersionId:
      type: string
      format: MeteroidId
      examples:
        - plv_7n42DGM5Tflk9n8mt7Fhc7
    CheckoutSessionStatus:
      type: string
      title: CheckoutSessionStatus
      enum:
        - CREATED
        - AWAITING_PAYMENT
        - COMPLETED
        - EXPIRED
        - CANCELLED
    SubscriptionId:
      type: string
      format: MeteroidId
      examples:
        - sub_7n42DGM5Tflk9n8mt7Fhc7
    OnlinePaymentMethodConfig:
      type: object
      properties:
        config:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OnlineMethodsConfig'
              description: If None, inherits all online providers from invoicing entity.
    BankTransferPaymentMethodConfig:
      type: object
      properties:
        account_id:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/BankAccountId'
    ExternalPaymentMethodConfig:
      type: object
    OnlineMethodsConfig:
      type: object
      properties:
        card:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OnlineMethodConfig'
        direct_debit:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OnlineMethodConfig'
    BankAccountId:
      type: string
      format: MeteroidId
      examples:
        - ba_7n42DGM5Tflk9n8mt7Fhc7
    OnlineMethodConfig:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````