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

# Get a checkout session

> Returns the current state of a checkout session, including the payment and subscription it created once the customer completes checkout. Poll this endpoint or subscribe to the `checkoutsession.completed` webhook event.



## OpenAPI

````yaml /api-reference/v2/specs/2026-04-01.json get /checkout-sessions/{id}
openapi: 3.1.0
info:
  title: Alguna Public API
  version: '2026-04-01'
servers:
  - url: https://api.alguna.io
security:
  - bearerAuth: []
tags:
  - name: Billing Events and Metrics
  - name: Checkout Sessions
  - name: Credit Notes
  - name: Credits
  - name: Customer Portal Sessions
  - name: Customers
  - name: Insights
  - name: Integrations
  - name: Invoices
  - name: Payments
  - name: Plans
  - name: Product Bundles
  - name: Products
  - name: Refunds
  - name: Revenue Schedules
  - name: Subscription Changes
  - name: Subscription Versions
  - name: Subscriptions
  - name: Tax
  - name: Wallet Grants
  - name: Wallets
paths:
  /checkout-sessions/{id}:
    get:
      tags:
        - Checkout Sessions
      summary: Get a checkout session
      description: >-
        Returns the current state of a checkout session, including the payment
        and subscription it created once the customer completes checkout. Poll
        this endpoint or subscribe to the `checkoutsession.completed` webhook
        event.
      operationId: get-checkout-session
      parameters:
        - in: header
          name: Alguna-Version
          required: true
          schema:
            enum:
              - '2026-04-01'
            type: string
        - in: path
          name: id
          required: true
          schema:
            description: Unique identifier for the checkout-session
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSessionResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    CheckoutSessionResponse:
      properties:
        amount:
          description: Total amount for the session
          example: '99.00'
          nullable: true
          type: string
        checkout_intent:
          description: >-
            Whether the session charges the customer or only stores a payment
            method
          enum:
            - payment
            - vault
          example: payment
          type: string
        client_reference_id:
          description: Your reference supplied at creation
          example: order_1234
          nullable: true
          type: string
        created_at:
          description: Timestamp when the session was created
          example: '2026-04-01T10:00:00Z'
          format: date-time
          type: string
        currency:
          description: ISO 4217 currency code
          example: USD
          type: string
        customer_id:
          description: Customer the checkout is for, once known
          example: cust_abc123
          nullable: true
          type: string
        expires_at:
          description: Timestamp when the session token expires
          example: '2026-04-02T10:00:00Z'
          format: date-time
          nullable: true
          type: string
        id:
          description: Unique identifier for the checkout session
          example: chks_01H1VECT
          type: string
        invoice_id:
          description: >-
            Invoice created by the session, once completed. One-off sessions
            (line_items or amount) produce a paid invoice instead of a
            subscription.
          example: inv_01H1VECT
          nullable: true
          type: string
        payment_id:
          description: Payment created by the session, once completed
          example: pay_01H1VECT
          nullable: true
          type: string
        session_token:
          description: >-
            Browser-safe token that scopes the embedded checkout to this
            session. Pass it to the Alguna Checkout SDK.
          example: elt_01H1VECT
          type: string
        status:
          description: Checkout session status
          enum:
            - created
            - started
            - successful
            - expired
          example: created
          type: string
        subscription_id:
          description: Subscription created by the session, once completed
          example: sub_01H1VECT
          nullable: true
          type: string
        url:
          description: >-
            Hosted checkout URL for this session. The Alguna Checkout SDK embeds
            this URL; it can also be used directly as a redirect target.
          example: https://acme.alguna.io/embed/checkout/elt_01H1VECT
          type: string
      required:
        - checkout_intent
        - created_at
        - currency
        - id
        - session_token
        - status
        - url
      type: object
    ErrorResponse:
      properties:
        detail:
          type: string
        status:
          format: int64
          type: integer
      required:
        - status
        - detail
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http

````