Commerce Accounts Payable
Track supplier bills, process payments, run payment batches, and monitor AP aging.
How It Works
- Create bills from supplier invoices with line items.
- Approve bills for payment.
- Record individual payments or create payment runs for batch processing.
- Allocate payments to specific bills.
- Generate AP aging reports by supplier.
Usage
- MCP tools:
list_bills, create_bill, approve_bill, record_bill_payment, create_payment_run, approve_payment_run, get_ap_aging, get_ap_summary.
- Writes require
--apply.
Bill Statuses
- Draft -> Pending -> Approved -> PartiallyPaid -> Paid (or Cancelled/Disputed/Overdue)
Payment Methods
- Check, ACH, Wire, CreditCard, Cash, Other
Payment Run Statuses
- Draft -> Pending -> Approved -> Processing -> Completed (or Cancelled)
Aging Buckets
- Current, 1-30 days, 31-60 days, 61-90 days, 90+ days
Output
{"status":"payment_recorded","bill_id":"BILL-2025-0050","amount_paid":2500.00,"balance_remaining":0.00,"payment_method":"ACH"}
Present Results to User
- Bill number, supplier, and payment status.
- Amount paid and remaining balance.
- Aging summary with overdue amounts by bucket.
- Payment run totals and included bills.
Troubleshooting
- Bill not approved: bills must be approved before payment.
- Payment exceeds balance: verify bill amount and prior payments.
- Duplicate bill: check existing bills for the same supplier invoice number.
References
- references/ap-aging.md
- /home/dom/stateset-icommerce/crates/stateset-core/src/models/accounts_payable.rs
- /home/dom/stateset-icommerce/crates/stateset-embedded/src/accounts_payable.rs
1---2name: commerce-accounts-payable3description: Manage supplier bills, payments, and AP aging. Use when recording supplier invoices, processing payments, running payment batches, or reviewing AP aging reports.4---5
6# Commerce Accounts Payable
7
8Track supplier bills, process payments, run payment batches, and monitor AP aging.
9
10## How It Works
11
121. Create bills from supplier invoices with line items.
132. Approve bills for payment.
143. Record individual payments or create payment runs for batch processing.
154. Allocate payments to specific bills.
165. Generate AP aging reports by supplier.
17
18## Usage
19
20- MCP tools: `list_bills`, `create_bill`, `approve_bill`, `record_bill_payment`, `create_payment_run`, `approve_payment_run`, `get_ap_aging`, `get_ap_summary`.
21- Writes require `--apply`.
22
23## Bill Statuses
24
25- Draft -> Pending -> Approved -> PartiallyPaid -> Paid (or Cancelled/Disputed/Overdue)
26
27## Payment Methods
28
29- Check, ACH, Wire, CreditCard, Cash, Other
30
31## Payment Run Statuses
32
33- Draft -> Pending -> Approved -> Processing -> Completed (or Cancelled)
34
35## Aging Buckets
36
37- Current, 1-30 days, 31-60 days, 61-90 days, 90+ days
38
39## Output
40
41```json
42{"status":"payment_recorded","bill_id":"BILL-2025-0050","amount_paid":2500.00,"balance_remaining":0.00,"payment_method":"ACH"}
43```
44
45## Present Results to User
46
47- Bill number, supplier, and payment status.
48- Amount paid and remaining balance.
49- Aging summary with overdue amounts by bucket.
50- Payment run totals and included bills.
51
52## Troubleshooting
53
54- Bill not approved: bills must be approved before payment.
55- Payment exceeds balance: verify bill amount and prior payments.
56- Duplicate bill: check existing bills for the same supplier invoice number.
57
58## References
59- references/ap-aging.md
60- /home/dom/stateset-icommerce/crates/stateset-core/src/models/accounts_payable.rs
61- /home/dom/stateset-icommerce/crates/stateset-embedded/src/accounts_payable.rs