Core Resources
Credit and Collection
Commercial terms, credit limits, collection discounts and the account statement of a customer.
Overview
Each customer has commercial terms (commercial_terms on the customer object): a default payment term, a salesperson and a price list for new documents. Credit limits are set per currency and checked when an invoice is issued, following the company policy in Settings > Customers > Credit and collection (off, warn or block).
Endpoints
| Method | Path | Permission | Description |
|---|---|---|---|
POST | /v1/customers/{id} | write | Set payment_term_id, salesperson_id and price_list_id (null clears them) |
GET | /v1/customers/{id}/credit | read | Credit policy and limit per currency with used and available |
POST | /v1/customers/{id}/credit_limits | admin | Set the limit of one currency (credit_limit null removes it) |
GET | /v1/customers/{id}/statement | read | Account statement (currency, from, to) |
GET | /v1/invoices/{id}/discounts | read | Collection discounts of an invoice |
POST | /v1/invoices/{id}/discounts | write | Apply a collection discount |
DELETE | /v1/invoices/{id}/discounts/{discountId} | admin | Remove a collection discount |
Account Statement
- Charges: invoices, debit notes, refunds and credit sent to the wallet. Credits: payments, credit notes, collection discounts and write-offs
- Each line carries the running
balance.open_invoicesandagingare as of today - Without
fromthe statement starts at the first movement; one currency per statement (currencieslists the others)
Collection Discounts
- A discount is not a payment: it does not count as income and does not go to cash or treasury
- Reasons:
rounding(default),early_payment,withholding,other - The company limits (max amount and percent) apply unless the key has
adminpermission. Disabled discounts return403 discount_disabled