> ## 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.

# List all checkout sessions

> Returns a list of checkout sessions. The checkout sessions are returned sorted by creation date, with the most recent checkout sessions appearing first.



## OpenAPI

````yaml openapi-checkout.json GET /v1/checkout_sessions
openapi: 3.1.0
info:
  title: Yorlet Checkout API
  description: APIs for managing checkout sessions.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/checkout_sessions:
    get:
      tags:
        - Checkout Sessions
      summary: List all checkout sessions
      description: >-
        Returns a list of checkout sessions. The checkout sessions are returned
        sorted by creation date, with the most recent checkout sessions
        appearing first.
      operationId: checkout_sessions_list
      responses:
        '200':
          description: >-
            A object with a data property that contains an array of checkout
            sessions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: number
                    description: Total number of items in the list.
                    example: 1
                  has_more:
                    type: boolean
                    description: Whether more items are available.
                    example: false
                  object:
                    type: string
                    enum:
                      - list
                  data:
                    type: array
                    items:
                      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:
                            - checkout_session
                        completed_at:
                          type:
                            - number
                            - 'null'
                          description: >-
                            The time at which the checkout session was
                            completed.
                        consent_collection:
                          type:
                            - object
                            - 'null'
                          properties:
                            terms_of_service:
                              type: boolean
                              description: >-
                                Whether terms of service acceptance is collected
                                during the checkout session.
                          required:
                            - terms_of_service
                          description: >-
                            Configuration for collecting consent during the
                            checkout session.
                        custom_text:
                          type:
                            - object
                            - 'null'
                          properties:
                            terms_of_service:
                              type:
                                - object
                                - 'null'
                              properties:
                                message:
                                  type: string
                                  description: >-
                                    Custom message to display alongside the
                                    terms of service.
                              required:
                                - message
                              description: >-
                                Custom text shown next to the terms of service
                                section.
                          required:
                            - terms_of_service
                          description: Custom text to display on the checkout session.
                        currency:
                          type: string
                          enum:
                            - gbp
                            - usd
                            - eur
                            - sek
                          description: >-
                            Three-letter ISO currency code, in lowercase. Must
                            be a supported currency.
                          example: gbp
                        customer:
                          anyOf:
                            - type: string
                            - type: object
                              additionalProperties: {}
                          description: The customer the checkout session is for.
                        default_payment_method:
                          anyOf:
                            - type: string
                            - type: object
                              additionalProperties: {}
                            - type: 'null'
                          description: >-
                            The default payment method selected during the
                            checkout session.
                        description:
                          type:
                            - string
                            - 'null'
                          description: >-
                            The description of the checkout session. This will
                            be displayed to the customer.
                        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.
                            terms_of_service_url:
                              type:
                                - string
                                - 'null'
                              description: The URL of the merchant terms of service.
                          required:
                            - business_name
                            - color
                            - country
                            - display_name
                            - icon
                            - id
                            - support_email
                            - support_phone
                            - support_website
                            - terms_of_service_url
                          description: >-
                            Information about the merchant operating the
                            checkout 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.
                        payment_method_types:
                          type: array
                          items:
                            type: string
                          description: >-
                            The payment method types allowed for this checkout
                            session.
                        return_url:
                          type:
                            - string
                            - 'null'
                          description: >-
                            The URL to return to after the checkout session is
                            complete.
                        status:
                          type: string
                          enum:
                            - canceled
                            - expired
                            - open
                            - complete
                          description: The status of the checkout session.
                        subscription_data:
                          type:
                            - object
                            - 'null'
                          properties:
                            add_invoice_items:
                              type:
                                - array
                                - 'null'
                              items:
                                type: object
                                properties:
                                  amount:
                                    type: integer
                                    description: >-
                                      The amount to be charged, represented as a
                                      whole integer if possible.
                                  currency:
                                    type: string
                                    description: >-
                                      Three-letter ISO currency code, in
                                      lowercase. Must be a supported currency.
                                  description:
                                    type: string
                                    description: >-
                                      The description for the invoice item, to
                                      be displayed to the customer.
                                  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.
                                  price:
                                    type: string
                                    description: The ID of the price object.
                                  tax_percent:
                                    type: number
                                    minimum: 0
                                    maximum: 100
                                    description: >-
                                      The tax percentage to use when calculating
                                      the tax amount.
                                  tax_rate:
                                    type: string
                                    description: The ID of the tax rate object.
                                  transfer_behavior:
                                    type: string
                                    enum:
                                      - automatic
                                      - owner
                                      - none
                                    description: >-
                                      The invoice item transfer behavior. The
                                      default is automatic.
                                  transfer_destination:
                                    type: string
                                    description: >-
                                      ID of the owner that will be the transfer
                                      destination. Only allowed when the invoice
                                      item transfer behavior is owner.
                                  type:
                                    type: string
                                    enum:
                                      - charge
                                      - rent
                                      - product
                                    description: The type of the invoice item.
                                  unit:
                                    type:
                                      - string
                                      - 'null'
                                    description: >-
                                      The ID of the unit the invoice item is
                                      for.
                                required:
                                  - amount
                                  - currency
                                  - description
                                  - tax_percent
                                  - transfer_behavior
                                  - type
                              maxItems: 10
                              description: >-
                                A list of invoice items to add to invoices
                                created by the subscription.
                            billing_anchor:
                              type:
                                - integer
                                - 'null'
                              description: >-
                                The reference point that aligns future billing
                                cycle dates.
                            billing_anchor_config:
                              type:
                                - object
                                - 'null'
                              properties:
                                day_of_month:
                                  type: integer
                                  minimum: 1
                                  maximum: 31
                                  description: The day of the month to anchor billing to.
                              required:
                                - day_of_month
                              description: Configuration for the billing anchor.
                            collection_method:
                              type: string
                              enum:
                                - charge_automatically
                                - send_invoice
                              description: The collection method for the subscription.
                            coupon:
                              type:
                                - string
                                - 'null'
                              description: >-
                                The identifier of the coupon to apply to the
                                subscription.
                            custom_fields:
                              type: array
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                    maxLength: 30
                                    description: The name of the custom field.
                                  value:
                                    type: string
                                    maxLength: 30
                                    description: The value of the custom field.
                                required:
                                  - name
                                  - value
                              maxItems: 4
                              description: >-
                                Custom fields attached to the subscription
                                invoices.
                            days_before_collection:
                              type: integer
                              minimum: 0
                              maximum: 7
                              description: >-
                                The number of days before the due date to
                                attempt collection.
                            days_until_due:
                              type:
                                - integer
                                - 'null'
                              minimum: 0
                              description: The number of days until the invoice is due.
                            description:
                              type: string
                              description: The description of the subscription.
                            end_date:
                              type:
                                - integer
                                - 'null'
                              description: The end date of the subscription.
                            end_date_config:
                              type:
                                - object
                                - 'null'
                              properties:
                                day:
                                  type: integer
                                  minimum: 1
                                  maximum: 31
                                  description: The day of the month for the end date.
                                month:
                                  type: integer
                                  minimum: 1
                                  maximum: 12
                                  description: The month for the end date.
                                year:
                                  type: integer
                                  description: The year for the end date.
                              required:
                                - day
                                - month
                                - year
                              description: >-
                                Configuration to compute the end date of the
                                subscription.
                            metadata:
                              type:
                                - object
                                - 'null'
                              additionalProperties:
                                type: string
                              description: >-
                                Set of key-value pairs to attach to the
                                subscription.
                            phases:
                              type:
                                - array
                                - 'null'
                              items:
                                type: object
                                properties:
                                  start_date:
                                    type: integer
                                    description: The start date of the phase.
                                  items:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        description:
                                          type: string
                                          description: >-
                                            The description of the subscription
                                            item.
                                        metadata:
                                          type:
                                            - object
                                            - 'null'
                                          additionalProperties:
                                            type: string
                                          description: >-
                                            Set of key-value pairs to attach to the
                                            subscription item.
                                        price:
                                          type: string
                                          description: >-
                                            The identifier of the price to use for
                                            the subscription item.
                                        price_data:
                                          type: object
                                          properties:
                                            amount:
                                              type: integer
                                              description: The amount of the price.
                                            currency:
                                              type: string
                                              description: The currency of the price.
                                            tax_percent:
                                              type: number
                                              description: >-
                                                The tax percentage to apply to the
                                                price.
                                          required:
                                            - amount
                                            - currency
                                          description: >-
                                            The price data for the subscription
                                            item.
                                        proration_behavior:
                                          type: string
                                          enum:
                                            - create_prorations
                                            - none
                                          description: >-
                                            Whether to create prorations when
                                            creating the subscription item.
                                        schedule:
                                          type:
                                            - array
                                            - 'null'
                                          items:
                                            type: object
                                            properties:
                                              amount:
                                                type: integer
                                                description: The amount for the scheduled change.
                                              effective_at:
                                                type: integer
                                                description: >-
                                                  The date the scheduled change takes
                                                  effect.
                                              effective_at_config:
                                                type: object
                                                properties:
                                                  day:
                                                    type: integer
                                                    minimum: 1
                                                    maximum: 31
                                                    description: >-
                                                      The day of the month the scheduled
                                                      change takes effect.
                                                  month:
                                                    type: integer
                                                    minimum: 1
                                                    maximum: 12
                                                    description: >-
                                                      The month the scheduled change takes
                                                      effect.
                                                  year:
                                                    type: integer
                                                    description: >-
                                                      The year the scheduled change takes
                                                      effect.
                                                required:
                                                  - day
                                                  - month
                                                  - year
                                                description: >-
                                                  Configuration to compute the effective
                                                  date of the scheduled change.
                                            required:
                                              - amount
                                          description: The schedule for the subscription item.
                                        tax_rate:
                                          type: string
                                          description: >-
                                            The identifier of the tax rate for the
                                            subscription item.
                                        transfer_behavior:
                                          type: string
                                          enum:
                                            - automatic
                                            - owner
                                            - none
                                          description: >-
                                            The transfer behavior for the
                                            subscription item.
                                        transfer_destination:
                                          type: string
                                          description: >-
                                            The identifier of the connected account
                                            to transfer funds to.
                                        type:
                                          type: string
                                          enum:
                                            - charge
                                            - rent
                                            - product
                                          description: The type of the subscription item.
                                        unit:
                                          type:
                                            - string
                                            - 'null'
                                          description: >-
                                            The identifier of the unit associated
                                            with the subscription item.
                                      required:
                                        - price_data
                                        - type
                                    minItems: 1
                                    maxItems: 10
                                    description: The items in the phase.
                                required:
                                  - start_date
                                  - items
                              minItems: 1
                              description: >-
                                The phases of the subscription. Required when
                                interval is custom.
                            start_date:
                              type:
                                - integer
                                - 'null'
                              description: The start date of the subscription.
                            start_date_config:
                              type:
                                - object
                                - 'null'
                              properties:
                                day:
                                  type: integer
                                  minimum: 1
                                  maximum: 31
                                  description: The day of the month for the start date.
                                month:
                                  type: integer
                                  minimum: 1
                                  maximum: 12
                                  description: The month for the start date.
                                year:
                                  type: integer
                                  description: The year for the start date.
                              required:
                                - day
                                - month
                                - year
                              description: >-
                                Configuration to compute the start date of the
                                subscription.
                            application:
                              type:
                                - string
                                - 'null'
                              description: >-
                                The identifier of the application to associate
                                with the subscription.
                            interval:
                              type: string
                              enum:
                                - month
                                - week
                                - custom
                              description: The billing interval for the subscription.
                            interval_count:
                              type: integer
                              description: >-
                                The number of intervals between each billing
                                cycle. Required when interval is not custom.
                            invoice_settings:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                        maxLength: 40
                                        description: The name of the custom field.
                                      value:
                                        type: string
                                        maxLength: 140
                                        description: The value of the custom field.
                                    required:
                                      - name
                                      - value
                                  maxItems: 4
                                  description: Custom fields to include on invoices.
                              description: The invoice settings for the subscription.
                            items:
                              type:
                                - array
                                - 'null'
                              items:
                                type: object
                                properties:
                                  description:
                                    type: string
                                    description: The description of the subscription item.
                                  metadata:
                                    type:
                                      - object
                                      - 'null'
                                    additionalProperties:
                                      type: string
                                    description: >-
                                      Set of key-value pairs to attach to the
                                      subscription item.
                                  price:
                                    type: string
                                    description: >-
                                      The identifier of the price to use for the
                                      subscription item.
                                  price_data:
                                    type: object
                                    properties:
                                      amount:
                                        type: integer
                                        description: The amount of the price.
                                      currency:
                                        type: string
                                        description: The currency of the price.
                                      tax_percent:
                                        type: number
                                        description: >-
                                          The tax percentage to apply to the
                                          price.
                                    required:
                                      - amount
                                      - currency
                                    description: The price data for the subscription item.
                                  proration_behavior:
                                    type: string
                                    enum:
                                      - create_prorations
                                      - none
                                    description: >-
                                      Whether to create prorations when creating
                                      the subscription item.
                                  schedule:
                                    type:
                                      - array
                                      - 'null'
                                    items:
                                      type: object
                                      properties:
                                        amount:
                                          type: integer
                                          description: The amount for the scheduled change.
                                        effective_at:
                                          type: integer
                                          description: >-
                                            The date the scheduled change takes
                                            effect.
                                        effective_at_config:
                                          type: object
                                          properties:
                                            day:
                                              type: integer
                                              minimum: 1
                                              maximum: 31
                                              description: >-
                                                The day of the month the scheduled
                                                change takes effect.
                                            month:
                                              type: integer
                                              minimum: 1
                                              maximum: 12
                                              description: >-
                                                The month the scheduled change takes
                                                effect.
                                            year:
                                              type: integer
                                              description: >-
                                                The year the scheduled change takes
                                                effect.
                                          required:
                                            - day
                                            - month
                                            - year
                                          description: >-
                                            Configuration to compute the effective
                                            date of the scheduled change.
                                      required:
                                        - amount
                                    description: The schedule for the subscription item.
                                  tax_rate:
                                    type: string
                                    description: >-
                                      The identifier of the tax rate for the
                                      subscription item.
                                  transfer_behavior:
                                    type: string
                                    enum:
                                      - automatic
                                      - owner
                                      - none
                                    description: >-
                                      The transfer behavior for the subscription
                                      item.
                                  transfer_destination:
                                    type: string
                                    description: >-
                                      The identifier of the connected account to
                                      transfer funds to.
                                  type:
                                    type: string
                                    enum:
                                      - charge
                                      - rent
                                      - product
                                    description: The type of the subscription item.
                                  unit:
                                    type:
                                      - string
                                      - 'null'
                                    description: >-
                                      The identifier of the unit associated with
                                      the subscription item.
                                required:
                                  - price_data
                                  - type
                              minItems: 1
                              maxItems: 10
                              description: >-
                                The items for the subscription. Required when
                                interval is not custom.
                            use_future_billing_date:
                              type: boolean
                              description: >-
                                Whether to use a future billing date for the
                                first invoice.
                          required:
                            - collection_method
                            - interval
                          description: >-
                            The subscription data used to create the
                            subscription on checkout completion.
                        subscription:
                          anyOf:
                            - type: string
                            - type: object
                              additionalProperties: {}
                            - type: 'null'
                          description: >-
                            The subscription created by the checkout session, if
                            any.
                        url:
                          type:
                            - string
                            - 'null'
                          description: The hosted URL of the checkout session.
                      required:
                        - id
                        - created
                        - object
                        - completed_at
                        - consent_collection
                        - custom_text
                        - currency
                        - customer
                        - default_payment_method
                        - description
                        - payment_method_types
                        - return_url
                        - status
                        - subscription_data
                        - subscription
                        - url
                required:
                  - count
                  - has_more
                  - object
                  - data
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````