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

# List commissions

> List commissions for the authenticated developer

Returns a paginated list of commissions with optional filters using
cursor-based pagination. Pass the `endCursor` from a previous response
as `after` to fetch the next page, or the `startCursor` as `before` to
fetch the previous page. Specifying both `after` and `before` returns 422.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/checkout-intents/openapi.documented.yml get /api/v1/commissions
openapi: 3.0.0
info:
  title: Universal Checkout API
  version: 1.0.5
  description: >-
    Turn any product URL into a completed checkout. Instantly retrieve price,
    tax, and shipping for any product, and let users buy without ever leaving
    your native AI experience.


    View the [Rye API docs](https://docs.rye.com).
  termsOfService: https://rye.com/terms-of-service
  license:
    name: UNLICENSED
  contact:
    name: Rye
    email: dev@rye.com
    url: https://docs.rye.com
servers:
  - url: https://staging.api.rye.com
security: []
paths:
  /api/v1/commissions:
    get:
      tags:
        - Commissions
      summary: List commissions
      description: >-
        List commissions for the authenticated developer


        Returns a paginated list of commissions with optional filters using

        cursor-based pagination. Pass the `endCursor` from a previous response

        as `after` to fetch the next page, or the `startCursor` as `before` to

        fetch the previous page. Specifying both `after` and `before` returns
        422.
      operationId: ListCommissions
      parameters:
        - description: Maximum number of results to return (default 100)
          in: query
          name: limit
          required: false
          schema:
            format: int32
            type: integer
            minimum: 1
            maximum: 100
        - description: Cursor from a previous response's `pageInfo.endCursor`
          in: query
          name: after
          required: false
          schema:
            type: string
        - description: Cursor from a previous response's `pageInfo.startCursor`
          in: query
          name: before
          required: false
          schema:
            type: string
        - in: query
          name: type
          required: false
          schema:
            $ref: '#/components/schemas/CommissionType'
        - in: query
          name: status
          required: false
          schema:
            $ref: '#/components/schemas/CommissionStatus'
        - in: query
          name: checkoutIntentId
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Paginated commissions response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommissionListResponse'
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateError'
      security:
        - bearerAuth:
            - billing:read
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import CheckoutIntents from 'checkout-intents';

            const client = new CheckoutIntents({
              apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
            });

            // Automatically fetches more pages as needed.
            for await (const commission of client.commissions.list()) {
              console.log(commission.id);
            }
        - lang: Python
          source: |-
            import os
            from checkout_intents import CheckoutIntents

            client = CheckoutIntents(
                api_key=os.environ.get("CHECKOUT_INTENTS_API_KEY"),  # This is the default and can be omitted
            )
            page = client.commissions.list()
            page = page.data[0]
            print(page.id)
        - lang: Java
          source: |-
            package com.rye.example;

            import com.rye.client.CheckoutIntentsClient;
            import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;
            import com.rye.models.commissions.CommissionListPage;
            import com.rye.models.commissions.CommissionListParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();

                    CommissionListPage page = client.commissions().list();
                }
            }
        - lang: cURL
          source: |-
            curl https://staging.api.rye.com/api/v1/commissions \
                -H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY"
components:
  schemas:
    CommissionType:
      type: string
      enum:
        - surcharge
        - promo_arbitrage
        - discount_code
        - affiliate
        - out_of_band
      description: >-
        Type of commission earned on an order. Canonical definition used by

        both the API contract and the internal `@rye-com/ci-commissions`
        package.
    CommissionStatus:
      type: string
      enum:
        - pending
        - confirmed
        - updated
        - finalized
        - refunded
        - expired
      description: Lifecycle status of a commission record.
    CommissionListResponse:
      properties:
        pageInfo:
          properties:
            endCursor:
              type: string
            startCursor:
              type: string
            hasPreviousPage:
              type: boolean
            hasNextPage:
              type: boolean
          required:
            - hasPreviousPage
            - hasNextPage
          type: object
        data:
          items:
            $ref: '#/components/schemas/CommissionResponse'
          type: array
      required:
        - pageInfo
        - data
      type: object
      description: >-
        Paginated commissions response. Use `pageInfo.endCursor` as the next
        page's

        `after` query parameter to walk forward; use `pageInfo.startCursor` as
        the

        next page's `before` query parameter to walk backward.
    AuthenticationError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
        - name
        - message
      type: object
      additionalProperties: false
    ValidateError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
        status:
          type: number
          format: double
        fields:
          $ref: '#/components/schemas/FieldErrors'
      required:
        - name
        - message
        - status
        - fields
      type: object
      additionalProperties: false
    CommissionResponse:
      properties:
        finalizedAt:
          type: string
          format: date-time
          description: >-
            Time the commission moved to a terminal status. Unset until
            finalized.
        updatedAt:
          type: string
          format: date-time
          description: Time the commission last changed (e.g. status transition).
        createdAt:
          type: string
          format: date-time
          description: Time the commission was first recorded.
        ryeFee:
          $ref: '#/components/schemas/Money'
          description: Fee retained by Rye.
        developerCommission:
          $ref: '#/components/schemas/Money'
          description: Commission amount paid to the developer.
        settlementDirection:
          $ref: '#/components/schemas/SettlementDirection'
          description: Whether Rye owes the developer or vice versa once settled.
        status:
          $ref: '#/components/schemas/CommissionStatus'
          description: Lifecycle status, e.g. pending, finalized, refunded.
        type:
          $ref: '#/components/schemas/CommissionType'
          description: Kind of commission, e.g. surcharge, discount_code, affiliate.
        checkoutIntentId:
          type: string
          description: The checkout intent this commission was generated from.
        id:
          type: string
          description: Unique identifier for this commission.
      required:
        - updatedAt
        - createdAt
        - ryeFee
        - developerCommission
        - settlementDirection
        - status
        - type
        - checkoutIntentId
        - id
      type: object
      description: A commission earned (or owed) on a completed checkout intent.
    FieldErrors:
      properties: {}
      type: object
      additionalProperties:
        properties:
          value: {}
          message:
            type: string
        required:
          - message
        type: object
    Money:
      properties:
        currencyCode:
          type: string
          example: USD
        amountSubunits:
          type: integer
          format: int32
          example: 1500
      required:
        - currencyCode
        - amountSubunits
      type: object
    SettlementDirection:
      type: string
      enum:
        - rye_owes_developer
        - developer_owes_rye
      description: 'Direction of settlement: who owes whom once the commission is finalized.'
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Rye API key

````