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

# Update invoice payments



## OpenAPI

````yaml /openapi/adam-v1.json post /invoices/{uuid}/payments
openapi: 3.0.3
info:
  title: Adam Developer API
  version: 1.0.0
  description: >-
    REST API for useadam.io — Adam, the AI accounting agent for small
    businesses. Paths are appended to the server URL.


    **Business key** (`tyms_sk_...`): all routes except `POST
    /register-business` and OAuth authorization steps that document their own
    auth. **Partner key** (`adam_partner_sk_...` or equivalent): only `POST
    /register-business`. **OAuth**: integration apps use `tyms_pk_...` /
    `tyms_sk_...` plus user Bearer tokens — see the OAuth guide.


    Financial reports match what you see in the Adam app. AI create endpoints
    accept optional attachment objects (`name`, `file`, `type`) — see the
    Attachments page in this docs site.
servers:
  - url: https://api.useadam.io/v1/adam
    description: Production
security:
  - apiKey: []
tags:
  - name: Partners
    description: Referral partner (distributor) flows — partner API key only.
  - name: Authentication
    description: Validate a business Developer API key.
  - name: OAuth
    description: >-
      Third-party integration authorization — connect Tyms users to your app
      without sharing their business secret keys.
  - name: Chart of accounts
    description: COA and bank-linked accounts.
  - name: Invoices
    description: Invoice CRUD and payments.
  - name: Bills
    description: Bill CRUD and payments.
  - name: Expenses
    description: Expense CRUD.
  - name: Income
    description: Income record CRUD.
  - name: Journals
    description: Journal entry CRUD.
  - name: Contacts
    description: Contact CRUD.
  - name: Banks
    description: Bank accounts.
  - name: Bank transactions
    description: Statement lines and AI-assisted upload.
  - name: Reports
    description: Financial statements (aligned with in-app reports).
paths:
  /invoices/{uuid}/payments:
    post:
      tags:
        - Invoices
      summary: Update invoice payments
      operationId: updateInvoicePayments
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentsRequest'
      responses:
        '200':
          description: Payments applied to invoice
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdamSuccessResponse'
              example:
                status: success
                message: Invoice payments updated successfully
                data:
                  uuid: 550e8400-e29b-41d4-a716-446655440001
                  payments:
                    - uuid: pay-uuid-1
                      amount_paid: 500
                      category: Bank Transfer
                      date: '2024-01-20'
                      exchange_rate: 1
components:
  schemas:
    PaymentsRequest:
      type: object
      required:
        - payments
      properties:
        payments:
          type: array
          items:
            $ref: '#/components/schemas/PaymentLine'
        overwrite:
          type: boolean
          default: false
          description: If true, replaces all existing payments.
    AdamSuccessResponse:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          example: success
        message:
          type: string
        data:
          description: >-
            Single resource, array of resources, statement sections, or async
            job metadata — see each operation's example.
        meta:
          type: object
          additionalProperties: true
          description: >-
            Pagination (`page`, `limit`, `total`) and/or report range (`from`,
            `to`). Cash flow may include `previous_period_end`.
    PaymentLine:
      type: object
      required:
        - amount_paid
        - category
        - date
      properties:
        uuid:
          type: string
          description: Include to update an existing payment.
        amount_paid:
          type: number
        category:
          type: string
          description: Payment method / category (e.g. Cash, Bank Transfer).
        date:
          type: string
          format: date
        exchange_rate:
          type: number
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Business secret `tyms_sk_...` for all routes except **Register
        business**, which expects your **partner** secret.
      x-default: your_tyms_sk_or_partner_key

````