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

# Refresh Stripe invoice

> Fetch an invoice from Stripe and update its local record.



## OpenAPI

````yaml openapi-public-preview.json POST /v1/cash-applications/invoices/refresh
openapi: 3.1.0
info:
  title: Entendre API
  version: 1.0.0
  description: Programmatic access to crypto-native accounting and treasury operations.
servers:
  - url: https://api.entendre.finance
    description: Production API.
security:
  - ApiKey: []
tags:
  - name: Organization
    description: Read your organization profile and find members for agent assignments.
  - name: Transactions
    description: Find transactions, inspect their details and create manual records.
  - name: Sources
    description: >-
      Manage wallets, exchange accounts, bank accounts and other transaction
      sources.
  - name: Assets
    description: Inspect asset acquisitions, remaining quantities and cost basis.
  - name: Journals
    description: >-
      Create and post journal entries, correct eligible entries and sync posted
      journals to a connected general ledger.
  - name: Documents
    description: >-
      Upload documents, check processing status and link supporting evidence to
      transactions.
  - name: Legal Entities
    description: Manage the legal entities used in your accounting records.
  - name: Ledger Accounts
    description: Manage your chart of accounts and find accounts for journal entries.
  - name: Tags
    description: Create and manage tags to classify your records.
  - name: Accruals
    description: >-
      Create and post accruals, inspect their status and reverse eligible
      entries.
  - name: Cash Application
    description: Match deposits to invoices and manage the resulting cash applications.
  - name: Classification
    description: >-
      Classify transactions in a batch, post eligible entries and inspect the
      results.
  - name: Revaluation
    description: Run asset revaluations for an accounting period and check their results.
  - name: Accounting Periods
    description: Check whether a period is ready to close, then close or reopen it.
  - name: Income Statement
    description: View revenue, expenses and net income for a reporting period.
  - name: Balance Sheet
    description: View assets, liabilities and equity as of a reporting date.
  - name: Trial Balance
    description: Review ledger account balances and debit and credit totals.
  - name: Closing Positions
    description: View asset positions at the end of a reporting period.
  - name: Treasury Balances
    description: Review treasury balances by asset and source.
  - name: Realized Gains & Losses
    description: Review realized gains and losses from asset dispositions.
  - name: Asset Tax Lots
    description: Inspect asset tax lots, remaining quantities and cost basis.
  - name: Schedule of Dispositions
    description: >-
      Review asset dispositions and their proceeds, cost basis and gains or
      losses.
  - name: Financial Insights
    description: Review financial insights for your selected reporting context.
  - name: Agents
    description: Create agents, schedule their work and inspect their runs.
  - name: Memory
    description: Read, search and maintain the memory files your agents use.
  - name: Connections
    description: Connect providers, manage authorization and disconnect.
  - name: GL Mapping
    description: >-
      Map ledger accounts and legal entities to your ERP. Import legal entities,
      tags and chart of accounts.
  - name: Request
    description: Request information, documents or connections from a client.
  - name: Client
    description: Manage your firm’s client relationships.
  - name: Team
    description: Invite team members and manage their access to your firm.
  - name: Settings
    description: Read and update your firm settings.
externalDocs:
  description: Versioning, deprecation, and rate-limit policy
  url: https://entendre.ai/docs/get-started/versioning
paths:
  /v1/cash-applications/invoices/refresh:
    post:
      tags:
        - Cash Application
      summary: Refresh a Stripe invoice
      description: >-
        Refresh one invoice directly from Stripe, including manually created
        invoices. Requires write:cash-application and an active connection with
        cash application enabled. Send connection_id when several enabled
        connections exist. Refresh can move an invoice from an inactive or
        deleted connection after Stripe verifies it. This operation updates
        invoice data only. Cash application books revenue directly; refresh does
        not run the AR invoice import or create journals. Previous invoice
        values have no general undo. The reply is the same invoice row as GET
        /v1/cash-applications/invoices.
      operationId: refresh_cash_application_invoice
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Optional retry key. Check X-Idempotency-Applied before relying on
            replay protection.
          schema:
            type: string
            minLength: 1
            maxLength: 255
          example: example-operation-2026-08-31-001
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - stripe_invoice_id
              properties:
                stripe_invoice_id:
                  type: string
                  pattern: ^in_[A-Za-z0-9]+$
                  maxLength: 128
                  description: >-
                    External Stripe invoice ID. Extract in_... from the Stripe
                    invoice URL.
                connection_id:
                  type: string
                  description: >-
                    Stripe connection con_ ID. Required when multiple active
                    connections have cash application enabled. Use the
                    connection IDs in the conflict response.
      responses:
        '200':
          description: The refreshed invoice.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/V1CashApplicationInvoice'
              example:
                data:
                  id: inv_6abdd3ca45e830e2dc546380
                  invoice_number: 216F76A2-0079
                  customer_name: American Family
                  customer_id: cus_QKTLxU6mSX1lWX
                  status: open
                  amount_due: '1970.06'
                  total_amount: '1970.06'
                  invoice_date: '2026-10-01T00:00:00.000Z'
                  due_date: null
                  currency: USD
                  legal_entity_id: null
                  transaction_id: null
                  provider: stripe
                  eligible: true
                  ineligibility_reason: null
        '400':
          description: >-
            Invalid invoice or connection ID, cash application is disabled, or
            several enabled connections match and connection_id is missing
            (error.connection_ids lists them).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: VALIDATION_ERROR
                  message: >-
                    More than one enabled Stripe connection matches. Supply
                    connection_id.
                  connection_ids:
                    - con_507f1f77bcf86cd799439011
                    - con_507f191e810c19729de860ea
        '403':
          description: Missing write:cash-application permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: FORBIDDEN
                  message: Missing write:cash-application permission.
        '404':
          description: >-
            No active connection matches, or Stripe cannot find the invoice on
            the selected connection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RESOURCE_NOT_FOUND
                  message: >-
                    No active connection matches, or Stripe cannot find the
                    invoice on the selected connection.
        '409':
          description: >-
            Another active connection owns the invoice (error.connection_id
            names it; when that connection has cash application off, the message
            says so), or the invoice moved to another connection during the
            refresh.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: CONFLICT
                  message: >-
                    This invoice belongs to another active Stripe connection.
                    Select its connection_id.
                  connection_id: con_507f1f77bcf86cd799439011
        '502':
          description: >-
            Stripe could not complete the refresh. A failed Stripe request does
            not prove the invoice is absent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: PROVIDER_ERROR
                  message: >-
                    Stripe could not complete the refresh. A failed Stripe
                    request does not prove the invoice is absent.
components:
  schemas:
    V1CashApplicationInvoice:
      type: object
      description: A Stripe invoice, with its cash-application eligibility.
      required:
        - id
        - invoice_number
        - customer_name
        - customer_id
        - amount_due
        - currency
        - legal_entity_id
        - transaction_id
        - provider
        - eligible
        - ineligibility_reason
      properties:
        id:
          type: string
          description: Invoice ID (`inv_…`).
          example: inv_507f1f77bcf86cd799439011
        invoice_number:
          type:
            - string
            - 'null'
          description: Provider invoice number.
        customer_name:
          type:
            - string
            - 'null'
          description: Customer name.
        customer_id:
          type:
            - string
            - 'null'
          description: Stripe customer id (provider reference).
        status:
          type:
            - string
            - 'null'
          description: >-
            Stripe invoice status: `draft`, `open`, `paid`, `uncollectible`, or
            `void`.
        amount_due:
          type: string
          description: >-
            Decimal string; parse with a decimal library, not binary floating
            point.
          pattern: ^-?[0-9]+(?:\.[0-9]+)?$
          example: '100.00'
        total_amount:
          type: string
          description: Invoice total (decimal string).
          pattern: ^-?[0-9]+(?:\.[0-9]+)?$
          example: '100.00'
        invoice_date:
          type:
            - string
            - 'null'
          format: date-time
          description: Invoice issue date (ISO 8601).
        due_date:
          type:
            - string
            - 'null'
          format: date-time
          description: Invoice due date (ISO 8601).
        currency:
          type: string
          example: USD
          description: Invoice currency.
        legal_entity_id:
          type:
            - string
            - 'null'
          description: 'Always `null`: invoices are not linked to a legal entity.'
        transaction_id:
          type:
            - string
            - 'null'
          description: Transaction ID (`txn_…`) of the linked deposit, when one exists.
        provider:
          type: string
          enum:
            - stripe
          description: Always `stripe`.
        eligible:
          type: boolean
          description: True only while the invoice is `open` with a positive `amount_due`.
        ineligibility_reason:
          type:
            - string
            - 'null'
          enum:
            - paid
            - void
            - draft
            - uncollectible
            - zero_amount_due
            - null
          description: Set when `eligible` is false.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: Machine-readable error code.
            message:
              type: string
              description: Technical description for developers.
            fields:
              type: object
              additionalProperties:
                type: string
              description: >-
                Present only on VALIDATION_ERROR. Maps failing field paths to
                reason strings.
            details:
              type: object
              additionalProperties: true
              description: >-
                Optional redacted diagnostic details. Request validation uses
                fields or field_errors.
            suggested_action:
              type: string
              description: A suggested next step.
            documentation_url:
              type: string
              format: uri
              description: Link to documentation about this error.
            request_id:
              type: string
              description: Unique request ID for support escalation.
          description: Error details.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your organization API key. See
        [Authentication](/get-started/authentication).

````

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