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

# Registrar pago de cartera

> Abono total o parcial a un cobro; no puede superar el saldo. Alcance `finanzas:write`.
Envía `Idempotency-Key` para que un reintento no registre el pago dos veces.



## OpenAPI

````yaml /integraciones/openapi.json post /api/v1/schools/{school_id}/receivables/{receivable_id}/payments
openapi: 3.0.3
info:
  title: API de integraciones de Equinos
  version: '1'
  description: >-
    Pide un token en `https://api.equinos.co/oauth/token` con
    `grant_type=client_credentials`, el client id y el secreto de una API key, y
    envíalo como `Authorization: Bearer <token>`. Cada key solo ve su
    organización y sus alcances.
servers:
  - url: https://api.equinos.co
    description: Producción
security: []
tags:
  - name: API v1
    description: Escuelas, criaderos, cartera y ferias de la organización de la API key.
paths:
  /api/v1/schools/{school_id}/receivables/{receivable_id}/payments:
    parameters:
      - in: path
        name: school_id
        description: The ID of the school.
        example: architecto
        required: true
        schema:
          type: string
      - in: path
        name: receivable_id
        description: The ID of the receivable.
        example: architecto
        required: true
        schema:
          type: string
      - in: path
        name: school
        description: UUID de la escuela.
        example: 9a1b2c3d-0000-0000-0000-000000000000
        required: true
        schema:
          type: string
      - in: path
        name: receivable
        description: UUID del cobro.
        example: 9a1b2c3d-0000-0000-0000-000000000002
        required: true
        schema:
          type: string
    post:
      tags:
        - API v1
      summary: Registrar pago de cartera
      description: >-
        Abono total o parcial a un cobro; no puede superar el saldo. Alcance
        `finanzas:write`.

        Envía `Idempotency-Key` para que un reintento no registre el pago dos
        veces.
      operationId: registrarPagoDeCartera
      parameters:
        - in: header
          name: Idempotency-Key
          description: ''
          example: 'Identificador único del pago en tu sistema. Example: pago-8812'
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: number
                  description: Monto en la moneda del cobro.
                  example: 280000
                payment_date:
                  type: string
                  description: Fecha del pago (YYYY-MM-DD).
                  example: '2026-10-12'
                payment_method:
                  type: string
                  description: >-
                    cash, transfer, bank_transfer, card, credit_card, nequi,
                    daviplata, pse, check u other.
                  example: transfer
                reference_number:
                  type: string
                  description: Referencia de la transacción.
                  example: TRX-99812
                  nullable: true
                notes:
                  type: string
                  description: Nota interna.
                  example: null
                  nullable: true
              required:
                - amount
                - payment_date
                - payment_method
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      receivable_id:
                        type: string
                      amount:
                        type: integer
                      currency:
                        type: string
                      payment_date:
                        type: string
                      payment_method:
                        type: string
                      reference_number:
                        type: string
                      status:
                        type: string
                      created_at:
                        type: string
                    required:
                      - id
                      - receivable_id
                      - amount
                      - currency
                      - payment_date
                      - payment_method
                      - reference_number
                      - status
                      - created_at
                  receivable:
                    type: object
                    properties:
                      id:
                        type: string
                      balance:
                        type: integer
                      status:
                        type: string
                    required:
                      - id
                      - balance
                      - status
                required:
                  - data
                  - receivable
                example:
                  data:
                    id: uuid
                    receivable_id: uuid
                    amount: 280000
                    currency: COP
                    payment_date: '2026-10-12'
                    payment_method: transfer
                    reference_number: TRX-99812
                    status: confirmed
                    created_at: '2026-10-12T15:00:00-05:00'
                  receivable:
                    id: uuid
                    balance: 0
                    status: paid
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: oauth2
      description: Token de una API key (credenciales de cliente). Dura una hora.
      flows:
        clientCredentials:
          tokenUrl: https://api.equinos.co/oauth/token
          scopes:
            escuelas:read: Consultar la escuela
            escuelas:write: Crear prospectos de la escuela
            criaderos:read: Consultar el criadero
            criaderos:write: Crear prospectos del criadero
            finanzas:read: Consultar la cartera
            finanzas:write: Registrar pagos de cartera
            ferias:read: Consultar ferias e inscripciones

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.