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

# Void Invoice Payment

> Void an existing invoice payment.

        This creates a reversing journal entry to void the payment and updates the invoice status.
        For Stripe payments, this will also process a refund through Stripe.

        Optionally accepts a void_date in the request body to specify when the payment should be voided.
        If not provided, defaults to today's date.



## OpenAPI

````yaml https://api.meetcampfire.com/api/schema?format=json post /coa/api/v1/invoice/{invoice_id}/payment/{payment_id}/void/
openapi: 3.0.3
info:
  title: Campfire Developer APIs
  version: 1.0.0
  description: >
    ## Introduction

    Campfire's developer APIs offer granular access to Campfire's core
    accounting,

    revenue recognition, and financial data features.


    These APIs are designed to be used by developers to build custom
    integrations,

    automate workflows, and perform any other programmatic operations.
servers:
  - url: https://api.meetcampfire.com
    description: Production server
security: []
tags:
  - name: Cash Management
    description: Operations related to accounts, transactions, and other bank-related data.
  - name: Core Accounting
    description: >-
      Operations related to core accounting data, such as the chart of accounts,
      entity management, and the general ledger.
  - name: Revenue Recognition
    description: >-
      Operations related to revenue recognition, contract management, and
      contract data aggregation.
  - name: Accounts Receivable
    description: Operations related to invoicing and the AR subledger
  - name: Accounts Payable
    description: Operations related to billing and the AP subledger.
  - name: Financial Statements
    description: Operations related to financial statement generation and data aggregation.
  - name: Settings
    description: Operations related to system and accounting settings configuration.
paths:
  /coa/api/v1/invoice/{invoice_id}/payment/{payment_id}/void/:
    post:
      tags:
        - Accounts Receivable
      summary: Void Invoice Payment
      description: |-
        Void an existing invoice payment.

                This creates a reversing journal entry to void the payment and updates the invoice status.
                For Stripe payments, this will also process a refund through Stripe.

                Optionally accepts a void_date in the request body to specify when the payment should be voided.
                If not provided, defaults to today's date.
      operationId: coa_api_v1_invoice_payment_void_create
      parameters:
        - in: path
          name: invoice_id
          schema:
            type: integer
          description: ID of the invoice
          required: true
        - in: path
          name: payment_id
          schema:
            type: integer
          description: ID of the payment to void
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoidPayment'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/VoidPayment'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/VoidPayment'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingInvoicePayment'
          description: ''
      security:
        - knoxApiToken: []
components:
  schemas:
    VoidPayment:
      type: object
      properties:
        void_date:
          type: string
          format: date
          nullable: true
    AccountingInvoicePayment:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        credit_memo:
          type: string
          readOnly: true
        payment_transaction_bank_description:
          type: string
          readOnly: true
        payment_journal_entry_order:
          type: string
          readOnly: true
        payment_intercompany_journal:
          type: string
          readOnly: true
        voided_journal_entry_order:
          type: string
          readOnly: true
        currency:
          type: string
          maxLength: 3
        amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        payment_date:
          type: string
          format: date
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        voided_date:
          type: string
          format: date
          nullable: true
        source:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/AccountingInvoicePaymentSourceEnum'
            - $ref: '#/components/schemas/BlankEnum'
            - $ref: '#/components/schemas/NullEnum'
        payment_type:
          readOnly: true
          nullable: true
          description: >-
            Type of payment: credit memo application, bank transaction, or
            manual transaction


            * `CREDIT_MEMO` - Credit Memo

            * `BANK_TRANSACTION` - Bank Transaction

            * `MANUAL_TRANSACTION` - Manual Transaction
          oneOf:
            - $ref: '#/components/schemas/PaymentTypeEnum'
            - $ref: '#/components/schemas/NullEnum'
        external_id:
          type: string
          nullable: true
          description: >-
            Stable upstream identifier for this payment (e.g. Stripe balance
            transaction 'btxn_...', Stripe credit note 'cn_...', or the mart's
            event external_id for customer-balance applications). Used as the
            natural dedup/idempotency key. Null for manually-entered payments.
          maxLength: 256
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
        customer:
          type: integer
          readOnly: true
        invoice:
          type: integer
        payment_journal_entry:
          type: integer
          nullable: true
        payment_transaction:
          type: integer
          nullable: true
        fx_gain_loss_realized_transaction:
          type: integer
          nullable: true
        payment_term_discount_transaction:
          type: integer
          nullable: true
        voided_journal_entry:
          type: integer
          nullable: true
        payment_transactions:
          type: array
          items:
            type: integer
      required:
        - created_at
        - credit_memo
        - customer
        - external_id
        - id
        - invoice
        - last_modified_at
        - payment_intercompany_journal
        - payment_journal_entry_order
        - payment_transaction_bank_description
        - payment_type
        - voided_journal_entry_order
    AccountingInvoicePaymentSourceEnum:
      enum:
        - STRIPE
        - MANUAL
      type: string
      description: |-
        * `STRIPE` - Stripe
        * `MANUAL` - Manual
    BlankEnum:
      enum:
        - ''
    NullEnum:
      enum:
        - null
    PaymentTypeEnum:
      enum:
        - CREDIT_MEMO
        - BANK_TRANSACTION
        - MANUAL_TRANSACTION
      type: string
      description: |-
        * `CREDIT_MEMO` - Credit Memo
        * `BANK_TRANSACTION` - Bank Transaction
        * `MANUAL_TRANSACTION` - Manual Transaction
  securitySchemes:
    knoxApiToken:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````