Record Supplier Payment
POST/api/purchase-invoices/supplier-payments
Record one supplier-level payment allocated across multiple open invoices. All-or-nothing: the run is rejected (422) if any allocation exceeds its invoice's outstanding balance, targets another supplier's invoice, or repeats an invoice.
Fields:
- supplier_id (required)
- payment_date (required, Y-m-d)
- payment_type_id (optional; defaults to Cash)
- external_reference (optional; stored on the payment run and suffixed per invoice on the individual payment records)
- allocations (required, min 1): purchase_invoice_id + amount (> 0, at most the invoice's outstanding balance)
Each allocation creates a regular invoice payment, so invoice payment statuses (paid / partially paid) update immediately.
Authentication: Requires Bearer token.
Request
Responses
- 201
- 401
- 403
- 422
- 429
Created
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.