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

# List Checkout Sessions



## OpenAPI

````yaml https://app.flowglad.com/api/openapi get /api/v1/checkout-sessions
openapi: 3.1.0
info:
  title: Flowglad API
  version: 0.0.1
servers:
  - url: https://app.flowglad.com
security: []
externalDocs:
  url: https://docs.flowglad.com
paths:
  /api/v1/checkout-sessions:
    get:
      tags:
        - Checkout Sessions
        - Purchases
      summary: List Checkout Sessions
      operationId: checkoutSessions-list
      parameters:
        - in: query
          name: cursor
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CheckoutSessionRecord'
                      description: >-
                        A time-limited checkout session, which captures the
                        payment details needed to create a subscription, or
                        purchase, or pay a standalone invoice.
                  currentCursor:
                    type: string
                  nextCursor:
                    type: string
                  hasMore:
                    type: boolean
                  total:
                    type: number
                required:
                  - data
                  - hasMore
                  - total
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CheckoutSessionRecord:
      anyOf:
        - $ref: '#/components/schemas/PurchaseCheckoutSessionRecord'
        - $ref: '#/components/schemas/ProductCheckoutSessionRecord'
        - $ref: '#/components/schemas/AddPaymentMethodCheckoutSessionRecord'
        - $ref: '#/components/schemas/ActivateSubscriptionCheckoutSessionRecord'
    error.BAD_REQUEST:
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Invalid input data
          type: string
        code:
          description: The error code
          example: BAD_REQUEST
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
    error.UNAUTHORIZED:
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Authorization not provided
          type: string
        code:
          description: The error code
          example: UNAUTHORIZED
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
    error.FORBIDDEN:
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Insufficient access
          type: string
        code:
          description: The error code
          example: FORBIDDEN
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
    error.NOT_FOUND:
      title: Not found error (404)
      description: The error information
      example:
        code: NOT_FOUND
        message: Not found
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Not found
          type: string
        code:
          description: The error code
          example: NOT_FOUND
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
    error.INTERNAL_SERVER_ERROR:
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Internal server error
          type: string
        code:
          description: The error code
          example: INTERNAL_SERVER_ERROR
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
    PurchaseCheckoutSessionRecord:
      $ref: '#/components/schemas/PurchaseCheckoutSessionClientSelectSchema'
    ProductCheckoutSessionRecord:
      $ref: '#/components/schemas/ProductCheckoutSessionClientSelectSchema'
    AddPaymentMethodCheckoutSessionRecord:
      $ref: '#/components/schemas/AddPaymentMethodCheckoutSessionClientSelectSchema'
    ActivateSubscriptionCheckoutSessionRecord:
      $ref: >-
        #/components/schemas/ActivateSubscriptionCheckoutSessionClientSelectSchema
    PurchaseCheckoutSessionClientSelectSchema:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        pricingModelId:
          type: string
        status:
          type: string
          enum:
            - open
            - pending
            - succeeded
            - failed
            - expired
        billingAddress:
          anyOf:
            - $ref: '#/components/schemas/BillingAddress'
            - type: 'null'
        priceId:
          type: string
        purchaseId:
          type: string
        invoiceId:
          anyOf:
            - type: string
            - type: 'null'
        quantity:
          type: integer
          minimum: -2147483648
          maximum: 2147483647
        organizationId:
          type: string
        customerName:
          anyOf:
            - type: string
            - type: 'null'
        customerEmail:
          anyOf:
            - type: string
            - type: 'null'
        customerId:
          anyOf:
            - type: string
            - type: 'null'
        paymentMethodType:
          anyOf:
            - type: string
              enum:
                - card
                - link
                - us_bank_account
                - sepa_debit
            - type: 'null'
        discountId:
          anyOf:
            - type: string
            - type: 'null'
        successUrl:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
        cancelUrl:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
        type:
          type: string
          const: purchase
        preserveBillingCycleAnchor:
          type: boolean
          const: false
        outputMetadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        outputName:
          anyOf:
            - type: string
            - type: 'null'
        targetSubscriptionId:
          description: Omitted.
          type: 'null'
        automaticallyUpdateSubscriptions:
          description: Omitted.
          type: 'null'
        expires:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - pricingModelId
        - status
        - priceId
        - purchaseId
        - invoiceId
        - quantity
        - organizationId
        - customerName
        - customerEmail
        - customerId
        - discountId
        - type
        - outputName
        - expires
      additionalProperties: false
    ProductCheckoutSessionClientSelectSchema:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        pricingModelId:
          type: string
        status:
          type: string
          enum:
            - open
            - pending
            - succeeded
            - failed
            - expired
        billingAddress:
          anyOf:
            - $ref: '#/components/schemas/BillingAddress'
            - type: 'null'
        priceId:
          type: string
        purchaseId:
          anyOf:
            - type: string
            - type: 'null'
        invoiceId:
          type: 'null'
        quantity:
          type: integer
          minimum: -2147483648
          maximum: 2147483647
        organizationId:
          type: string
        customerName:
          anyOf:
            - type: string
            - type: 'null'
        customerEmail:
          anyOf:
            - type: string
            - type: 'null'
        customerId:
          anyOf:
            - type: string
            - type: 'null'
        paymentMethodType:
          anyOf:
            - type: string
              enum:
                - card
                - link
                - us_bank_account
                - sepa_debit
            - type: 'null'
        discountId:
          anyOf:
            - type: string
            - type: 'null'
        successUrl:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
        cancelUrl:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
        type:
          type: string
          const: product
        preserveBillingCycleAnchor:
          description: >-
            Whether to preserve the billing cycle anchor date in the case that
            the customer already has an active subscription that renews. If not
            provided, defaults to false.
          type: boolean
        outputMetadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        outputName:
          anyOf:
            - type: string
            - type: 'null'
        targetSubscriptionId:
          description: Omitted.
          type: 'null'
        automaticallyUpdateSubscriptions:
          description: Omitted.
          type: 'null'
        expires:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - pricingModelId
        - status
        - priceId
        - purchaseId
        - quantity
        - organizationId
        - customerName
        - customerEmail
        - customerId
        - discountId
        - type
        - outputName
        - expires
      additionalProperties: false
    AddPaymentMethodCheckoutSessionClientSelectSchema:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        pricingModelId:
          type: string
        status:
          type: string
          enum:
            - open
            - pending
            - succeeded
            - failed
            - expired
        billingAddress:
          anyOf:
            - $ref: '#/components/schemas/BillingAddress'
            - type: 'null'
        priceId:
          anyOf:
            - type: string
            - type: 'null'
        purchaseId:
          anyOf:
            - type: string
            - type: 'null'
        invoiceId:
          anyOf:
            - type: string
            - type: 'null'
        quantity:
          type: integer
          minimum: -2147483648
          maximum: 2147483647
        organizationId:
          type: string
        customerName:
          anyOf:
            - type: string
            - type: 'null'
        customerEmail:
          anyOf:
            - type: string
            - type: 'null'
        customerId:
          description: >-
            The customer that the payment method will be added to as the default
            payment method.
          type: string
        paymentMethodType:
          anyOf:
            - type: string
              enum:
                - card
                - link
                - us_bank_account
                - sepa_debit
            - type: 'null'
        discountId:
          anyOf:
            - type: string
            - type: 'null'
        successUrl:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
        cancelUrl:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
        type:
          type: string
          const: add_payment_method
        preserveBillingCycleAnchor:
          type: boolean
        outputMetadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        outputName:
          anyOf:
            - type: string
            - type: 'null'
        targetSubscriptionId:
          description: >-
            The subscription that the payment method will be added to as the
            default payment method.
          anyOf:
            - type: string
            - type: 'null'
        automaticallyUpdateSubscriptions:
          description: >-
            Whether to automatically update all current subscriptions to the new
            payment method. Defaults to false.
          anyOf:
            - type: boolean
            - type: 'null'
        expires:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - pricingModelId
        - status
        - priceId
        - purchaseId
        - invoiceId
        - quantity
        - organizationId
        - customerName
        - customerEmail
        - customerId
        - discountId
        - type
        - preserveBillingCycleAnchor
        - outputName
        - expires
      additionalProperties: false
    ActivateSubscriptionCheckoutSessionClientSelectSchema:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        pricingModelId:
          type: string
        status:
          type: string
          enum:
            - open
            - pending
            - succeeded
            - failed
            - expired
        billingAddress:
          anyOf:
            - $ref: '#/components/schemas/BillingAddress'
            - type: 'null'
        priceId:
          anyOf:
            - type: string
            - type: 'null'
        purchaseId:
          type: 'null'
        invoiceId:
          type: 'null'
        quantity:
          type: integer
          minimum: -2147483648
          maximum: 2147483647
        organizationId:
          type: string
        customerName:
          anyOf:
            - type: string
            - type: 'null'
        customerEmail:
          anyOf:
            - type: string
            - type: 'null'
        customerId:
          anyOf:
            - type: string
            - type: 'null'
        paymentMethodType:
          anyOf:
            - type: string
              enum:
                - card
                - link
                - us_bank_account
                - sepa_debit
            - type: 'null'
        discountId:
          anyOf:
            - type: string
            - type: 'null'
        successUrl:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
        cancelUrl:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
        type:
          type: string
          const: activate_subscription
        preserveBillingCycleAnchor:
          description: >-
            Whether to preserve the billing cycle anchor date in the case that
            the customer already has an active subscription that renews. If not
            provided, defaults to false.
          type: boolean
        outputMetadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        outputName:
          anyOf:
            - type: string
            - type: 'null'
        targetSubscriptionId:
          type: string
        automaticallyUpdateSubscriptions:
          anyOf:
            - type: boolean
            - type: 'null'
        expires:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - pricingModelId
        - status
        - priceId
        - quantity
        - organizationId
        - customerName
        - customerEmail
        - customerId
        - discountId
        - type
        - outputName
        - targetSubscriptionId
        - automaticallyUpdateSubscriptions
        - expires
      additionalProperties: false
    BillingAddress:
      type: object
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
        firstName:
          anyOf:
            - type: string
            - type: 'null'
        lastName:
          anyOf:
            - type: string
            - type: 'null'
        email:
          anyOf:
            - type: string
              format: email
              pattern: >-
                ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            - type: 'null'
        address:
          type: object
          properties:
            name:
              anyOf:
                - type: string
                - type: 'null'
            line1:
              anyOf:
                - type: string
                - type: 'null'
            line2:
              anyOf:
                - type: string
                - type: 'null'
            city:
              anyOf:
                - type: string
                - type: 'null'
            state:
              anyOf:
                - type: string
                - type: 'null'
            postal_code:
              anyOf:
                - type: string
                - type: 'null'
            country:
              type: string
          required:
            - country
          additionalProperties: false
        phone:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - address
      additionalProperties: false
    Metadata:
      description: JSON object
      type: object
      propertyNames:
        type: string
      additionalProperties:
        anyOf:
          - type: string
            maxLength: 500
          - type: number
          - type: boolean
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````