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

# Listar cobranzas de clientes

> Lista cobranzas de clientes con búsqueda, filtro por fecha, estado y paginación por cursor.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/customer-payments
openapi: 3.1.0
info:
  title: La Pyme API
  description: >-
    Resources and workflows for purchases, sales, inventory, contacts, products,
    reports, and settings.
  version: 1.0.0
  contact:
    name: La Pyme Support
    email: hola@lapyme.com.ar
  license:
    name: Proprietary
    url: https://lapyme.com.ar/terminos
servers:
  - url: https://api.lapyme.com.ar
    description: Servidor de producción
security:
  - bearerAuth: []
tags:
  - name: API
    description: Public API operations for La Pyme integrations.
paths:
  /api/v1/customer-payments:
    get:
      tags:
        - API
      summary: Listar cobranzas de clientes
      description: >-
        Lista cobranzas de clientes con búsqueda, filtro por fecha, estado y
        paginación por cursor.
      operationId: listApiCustomerPayments
      parameters:
        - name: cursor
          in: query
          description: Valor de next_cursor recibido en la respuesta anterior
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Cantidad máxima de resultados por respuesta
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: query
          in: query
          description: Texto de búsqueda por cliente, número de cobranza o método de pago
          required: false
          schema:
            type: string
        - name: status
          in: query
          description: Estado de la cobranza
          required: false
          schema:
            $ref: '#/components/schemas/ApiSharedEnum8ef2575a44'
        - name: date_from
          in: query
          description: Fecha inicial en formato YYYY-MM-DD
          required: false
          schema:
            type: string
            format: date
        - name: date_to
          in: query
          description: Fecha final en formato YYYY-MM-DD
          required: false
          schema:
            type: string
            format: date
      responses:
        '200':
          description: Cobranzas obtenidas exitosamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiCustomerPaymentListResponse'
        '400':
          description: Parámetros inválidos
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_customer_payments_1
                    error:
                      code: INVALID_REQUEST
                      message: Invalid customer payments query parameters
                      retryable: false
                      type: invalid_request_error
                      details: []
        '401':
          description: API key faltante o inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: API key faltante o inválida
                      retryable: false
                      details: []
        '403':
          description: Scopes insuficientes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Scopes insuficientes
                      retryable: false
                      details: []
        '429':
          description: Límite de solicitudes excedido para la organización
          headers:
            Retry-After:
              description: Segundos a esperar antes de volver a intentar la solicitud.
              schema:
                type: string
                example: '30'
            X-RateLimit-Limit:
              description: Límite de la ventana activa.
              schema:
                type: string
                example: '5000'
            X-RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa.
              schema:
                type: string
                example: '0'
            X-RateLimit-Reset:
              description: Segundos restantes hasta el reset de la ventana activa.
              schema:
                type: string
                example: '30'
            RateLimit-Limit:
              description: Límite de la ventana activa en formato estándar.
              schema:
                type: string
                example: '5000'
            RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa en formato estándar.
              schema:
                type: string
                example: '0'
            RateLimit-Reset:
              description: >-
                Segundos hasta el reset de la ventana activa en formato
                estándar.
              schema:
                type: string
                example: '30'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: RATE_LIMITED
                  value:
                    request_id: req_rate_limit_1
                    error:
                      type: rate_limit_error
                      code: RATE_LIMITED
                      message: >-
                        The organization request limit was reached. Try again
                        later.
                      retryable: true
                      details: []
        '500':
          description: Error interno del servidor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Error interno del servidor
                      retryable: false
                      details: []
      x-codeSamples:
        - lang: typescript
          label: La Pyme SDK
          source: >
            import { Lapyme } from "lapyme";


            const lapyme = new Lapyme({
              bearerAuth: process.env["LAPYME_API_KEY"] ?? "",
            });


            const payments = await
            lapyme.customerPayments.listCustomerPayments({
              limit: 20,
              dateFrom: new Date("2026-03-01"),
              dateTo: new Date("2026-03-31"),
            });
components:
  schemas:
    ApiSharedEnum8ef2575a44:
      type: string
      enum:
        - active
        - voided
        - all
      default: active
    ApiCustomerPaymentListResponse:
      type: object
      properties:
        request_id:
          type: string
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              payment_date:
                type: string
              amount:
                type: integer
              balance:
                type: integer
              formatted_payment_number:
                anyOf:
                  - type: string
                  - type: 'null'
              currency:
                $ref: '#/components/schemas/ApiSharedEnum6cfb146157'
              payment_method:
                anyOf:
                  - $ref: '#/components/schemas/ApiSharedObject78bf4093ef'
                  - type: 'null'
              payment_method_count:
                type: integer
              related_entity:
                anyOf:
                  - $ref: '#/components/schemas/ApiSharedObjectf442c4288c'
                  - type: 'null'
              created_by:
                anyOf:
                  - $ref: '#/components/schemas/ApiSharedObject0fb80a7625'
                  - type: 'null'
              created_at:
                type: string
                format: date-time
              created_at_cursor:
                type: string
              updated_at:
                type: string
                format: date-time
            required:
              - id
              - payment_date
              - amount
              - balance
              - formatted_payment_number
              - currency
              - payment_method
              - payment_method_count
              - related_entity
              - created_by
              - created_at
              - created_at_cursor
              - updated_at
            additionalProperties: false
        has_more:
          type: boolean
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
        object:
          $ref: '#/components/schemas/ApiSharedEnum8d46e1ec20'
        url:
          type: string
          description: Requested list path.
      required:
        - request_id
        - data
        - has_more
        - next_cursor
        - object
        - url
      additionalProperties: false
    ApiErrorEnvelope:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - authorization_error
                - business_error
                - external_dependency_error
                - idempotency_error
                - invalid_request_error
                - rate_limit_error
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: array
              items:
                $ref: '#/components/schemas/ApiSharedObjectc671832641'
          required:
            - type
            - code
            - message
            - retryable
            - details
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
    ApiSharedEnum6cfb146157:
      type: string
      enum:
        - PES
        - DOL
    ApiSharedObject78bf4093ef:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        icon:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - id
        - name
        - icon
      additionalProperties: false
    ApiSharedObjectf442c4288c:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          anyOf:
            - type: string
            - type: 'null'
        number:
          anyOf:
            - type: string
            - type: 'null'
        sale_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
      required:
        - id
        - name
        - number
        - sale_id
      additionalProperties: false
    ApiSharedObject0fb80a7625:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - id
        - name
      additionalProperties: false
    ApiSharedEnum8d46e1ec20:
      type: string
      enum:
        - list
      description: List-envelope discriminator.
    ApiSharedObjectc671832641:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        field:
          type: string
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Incluí tu API key en el header Authorization con el prefijo Bearer.

````