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

# Accounts Payable Bookkeeping

<Note>Accounts Payable (AP) bookkeeping separates vendor liabilities from payments, supporting accurate reconciliation, auditability, and financial clarity in Accounting Systems.</Note>

Pleo supports Accounts Payable bookkeeping for Export Items that require tracking **vendor liabilities independently from payments**, unlike Journal Entry bookkeeping where expenses are recorded directly in the general ledger.

Each expense may generate:

* **Invoice entry** – represents the liability owed to a vendor
* **Payment entry** – represents the actual payment

This method enables:

* Accurate reconciliation of vendor invoices and payments
* Clear tracking of refunds, chargebacks, and credit notes
* Handling of split expenses with multiple categories or tax treatments
* Vendor-specific or single Accounts Payable GL account assignment

By understanding these principles, developers can anticipate **how exported expenses will appear in the Accounting System**, and how AP bookkeeping interacts with other export capabilities.

```mermaid theme={null}
%%{init: {"themeVariables": {"fontSize": "14px"}}}%%
flowchart TD
    A[Export Job Created in Pleo] --> B[Integration detects pending Export Job]
    B --> C[Mark Export Job as Started]
    C --> D[Pre-Export Validation: AS available?]
    D -->|No| E[Fail Export Job with failureReason]
    D -->|Yes| F[Fetch Export Items from Job]

    subgraph ItemLoop [For each Export Item]
      F --> G[Validate Item: required config & data?]
        G -->|No| H[Mark Item as Failed with failureReason]
        G -->|Yes| I[Accounts Payable Processing]
        
        subgraph APProcess [Per-Item AP Steps]
          I --> J[Create Invoice Entry &#40;vendor liability#41;]
          J --> K[Optional: Split Lines for multiple categories/tax treatments]
          K --> L[Create Payment Entry &#40;actual payment#41;]
          L --> M[Optional: Credit Note &#40;refund/chargeback#41;]
        end
        
        M --> N[Assign Accounting Period]
        N --> O[Apply Posting Behaviour &#40;Draft / Finalised#41;]
        O --> P[Update Export Item Status #40;Success/Failure#41;]
    end

    P --> Q{More Export Items?}
    Q -->|Yes| G
    Q -->|No| R[Update Export Job Status: Completed / Completed with Errors / Failed]

    %% Styling for wrapping
    style A white-space:normal
    style B white-space:normal
    style C white-space:normal
    style D white-space:normal
    style E white-space:normal
    style F white-space:normal
    style G white-space:normal
    style H white-space:normal
    style I white-space:normal
    style J white-space:normal
    style K white-space:normal
    style L white-space:normal
    style M white-space:normal
    style N white-space:normal
    style O white-space:normal
    style P white-space:normal
    style Q white-space:normal
    style R white-space:normal

    %% Make subgraph transparent with black border
    style ItemLoop fill:none,stroke:#000000
    style APProcess fill:none,stroke:#000000

```

## Core Principles

### Invoice vs Payment Separation

* Each expense produces an **invoice entry** representing the vendor liability, and a **payment entry** representing the actual payment.
* Invoice and payment entries may be recorded independently and at different times.
* Many Accounting Systems provide **Invoice Objects** (e.g., Purchase Invoices in Business Central) to record liabilities separately from journal entries.
* Pleo exports create invoice entries in these objects, while payment entries may be applied by:
  * Marking the invoice object as paid, and/or
  * Recording a payment in a journal, depending on the Accounting System’s capabilities.

### Vendor Assignment

* Each expense must be linked to a **vendor**, which can be:
  * **Supplier** – external company providing goods or services
  * **Employee** – when an employee covers an expense out-of-pocket; the reimbursement is treated as the payment entry
* Correct vendor assignment ensures invoice and payment entries are recorded accurately.

### Accounts Payable GL Account

* All vendor liabilities are tracked through a dedicated **Accounts Payable account**.
* This account can be configured as:
  * Vendor-specific, or
  * A single account for all vendors, depending on the Accounting System.

### Refunds and Chargebacks

* Refunds and chargebacks are recorded as **credit notes**, acting as the inverse of invoices.
* Credit notes allow separate tracking of returned funds versus original invoices.
* Pleo supports exporting credit notes for applicable expenses if the Accounting System provides this functionality.

### Split Expenses

* Expenses with multiple categories or tax treatments are recorded as **separate lines** on the invoice.
* Payments may still be recorded as a single entry reflecting the total amount.
* This ensures both detailed accounting records and accurate reconciliation.

## Relationship to Other Export Concepts

Accounts Payable bookkeeping interacts with other export capabilities during **per-item processing**:

* **Accounts Mapping** – determines which GL accounts are debited and credited for invoices, payments, and credit notes
* **Data Mapping** – ensures amounts, dates, dimensions, identifiers, and VAT/tax information are recorded correctly
* **Attachment Handling** – links receipts and supporting documents to invoice, payment, or credit note entries
* **Accounting Periods** – assigns entries to the correct accounting period
* **Posting Behaviour** – determines whether entries are created as drafts or finalised

Understanding these relationships helps developers anticipate **how AP bookkeeping integrates into the Export Lifecycle**.

***

## What Comes Next?

To understand how AP bookkeeping is exported in practice, see:

* [Accounts Mapping](/docs/current/platform/exports/accounts-mapping)
* [Data Mapping](/docs/current/platform/exports/data-mapping)
* [Attachment Handling](/docs/current/platform/exports/attachments)
* [Accounting Periods](/docs/current/platform/exports/accounting-periods)
* [Posting Behaviour](/docs/current/platform/exports/posting-behaviour)

For alternative bookkeeping methods, see:

* [Journal Entry Bookkeeping](/docs/current/platform/exports/bookkeeping-methods-journal-entry)

***

## Related Reading

* [Export Lifecycle](/docs/current/platform/exports/lifecycle)
* [Bookkeeping Methods Overview](/docs/current/platform/exports/bookkeeping-methods-overview)
* [Integration Design - Accounts Payable Handling](/docs/current/integration-design/exports/integration-design-exports-bookkeeping-method-accounts-payable)
* [AS/ERP Processing Workflow Guide](/docs/current/guides/accounting-system-processing-workflow-guide)

***
