bookkeeping.method is accounts_payable, Export Items must be recorded using Accounts Payable bookkeeping.
Accounts Payable bookkeeping separates vendor liability (invoice) from vendor settlement (payment). These events may occur at different times and may originate from different Export Jobs.
This page defines how integrations must construct invoice entries, payment entries, and reconciliation behaviour once the resolved bookkeeping method for an Export Item is accounts_payable.
Implementation
See the corresponding how-to article for API usage and step-by-step instructions:Processing Model
Accounts Payable handling follows this processing order:- Vendor Resolution
- Invoice and Payment Recording
- Expense Type Handling
- Reconciliation
- Special Cases
Example Export Item Payload (Accounts Payable)
Example Export Item Payload (Accounts Payable)
1. Vendor Resolution
Detection
bookkeeping.method = accounts_payable
Rule
A vendor must be resolved before creating invoice entries. The integration must attempt vendor matching using the following priority order:vendor.codevendor.accountvendor.taxIdentifier
vendor object exists, the supplier object must be ignored.
Failure Behaviour
If vendor matching fails:- The Export Item must not be recorded
- The Export Item must fail in Pleo
-
failureReasonType
vendor_unknown(Export V3)accounting_system_validation_failure(Export V2)
- failureReasonMessage Selected vendor cannot be processed because it does not exist or is currently blocked. Please verify the vendor’s status in the accounting system and try again.
Legacy Support
If nobookkeeping object is present but a supplier object exists, attempt
vendor resolution using the supplier object’s identifiers.
Use the following priority order to find a matching vendor in your AS:
| Priority | Supplier Field | Match Against in AS |
|---|---|---|
| 1 | supplier.code | Vendor ID |
| 2 | supplier.account | Vendor account number |
| 3 | supplier.taxIdentifier | Vendor tax identifier or tax registration number |
2. Invoice and Payment Model
Detection
bookkeeping.method = accounts_payable
Rule
The integration must record:- Vendor liability as an invoice object
- Vendor settlement as a payment entry
- Marking the invoice as paid, and/or
- Creating a separate payment entry
Behaviour Notes
Invoice and payment entries may be recorded at different times and may originate from separate Export Jobs.3. Expense Type Handling
Detection
After vendor resolution succeeds.Rule
Export Item type determines whether an invoice, payment, or both must be recorded.card_invoice, card_purchase, fee
- Record an invoice entry
- Record a payment entry
- Reconcile invoice and payment
- Set invoice status to
paid
invoice
- Record an invoice entry only
- Set invoice status to
unpaid - Reconcile once payment is recorded
invoice_payment (invoiceInformation.status = paid)
- Record a payment entry only
- Reconcile using
reconciliationId - Set invoice status to
paid
invoice_payment (invoiceInformation.status = failed_payment)
If the bank rejects the payment and funds return to the Pleo wallet:
- Record a return vendor payment
- Set invoice status to
unpaid
4. Recording and Reconciliation
Detection
Both invoice and payment entries exist.Rule
The integration must reconcile invoice and payment entries. Reconciliation may occur across Export Jobs. After reconciliation:- Invoice payment status must be set to
paid.
5. Special Cases
Refunds and Chargebacks
Detection
Export Item type isrefund or chargeback.
Rule
If supported by the Accounting System:- Record a credit note instead of an invoice
- Record the corresponding refund payment
- Reconcile credit note and payment
- Set credit note status to
paid
Split Expenses
Detection
If the Export Item contains more than one split line (accountingEntryLines.length > 1), it must be treated as a split expense.
Rule
- Record each split line as a separate line on the invoice
- Record a single payment line representing the total amount across all splits
- Reconcile invoice lines with the payment as usual
Example
Create the following in your Accounting System if the expense has 2 splits:- Line 1 (API): £120 → create 1 invoice line
- Line 2 (API): £80 → create 1 invoice line
- Line 3 (calculated total): £200 → create 1 payment line
Upstream Dependencies
- Export Job has been claimed (status =
in_progress) - Fetch Export Item Data (data layer)
- Bookkeeping method resolved
Downstream Dependencies
Accounts Payable entries rely on several platform concepts to be complete and reconcilable:- Accounts Mapping – determines which GL accounts are debited and credited
- Data Mapping – ensures amounts, dates, dimensions, identifiers, and VAT/tax information are recorded correctly
- Attachment Handling – links receipts and supporting documentation
- Accounting Periods – assigns entries to the correct accounting period
- Posting Behaviour – determines whether entries are created as drafts or finalised
- Export Item status update – updates outcome of Export Item (
successfulorfailed) - Export Job status update – updates outcome of Export Job (
completed,completed_with_errorsorfailed)
What Comes Next?
Related Reading
- How to Determine the Bookkeeping Method
- Journal Entry Handling
- Export Integration Workflow Guide
- AS/ERP Processing Workflow Guide