Post a collection against one of their open debts
POST/api/contacts/:contact/crm/payment
The write an agent needs mid-call, against the balance row already on screen.
The debt is named, not the amount alone. Their ledger is a list of
rows, each with its own currency and its own remaining balance — "pay
500 against this customer" is not a question their api can be asked.
debt_kind/debt_id are echoed back from the balance section, never
composed here.
The adapter re-reads that row in the instant before writing and refuses an amount over what is owed, or a currency that does not match the row. None of that is repeated in this endpoint: a second copy of a money rule is a second place for it to be wrong.
No idempotency token, deliberately. Unlike a sale, a payment is identified by what it settles: a row that no longer owes what it owed refuses the write, so retrying one that landed fails loudly rather than posting twice.
Request
Responses
- 201
- 409
- 422
- 503
Posted; the refreshed card and the write receipt.
crm_not_connected · crm_write_closed (contract or the workspace's
own switch) · crm_not_linked · crm_ambiguous_link — two identities
for one person is "ask a human", never "pick the first".
A validation refusal (amount at or below zero, missing row), or
crm_invalid_draft when the draft object refuses it one layer
deeper.
Their server did not answer; nothing was posted.