Creates a Debtor resource.
This endpoint records a payment or credit against every eligible collection order for a debtor that matches the provided lookup filter.
The debtor is identified by the {debtor_number} path parameter and must belong to your account — otherwise the endpoint responds with 404.
### Lookup filter (query parameters)
Provide exactly one of the following query parameters:
| Parameter | Behaviour |
|---------------------|------------------------------------------------------------------------------|
| payment_reference | Matches every collection order for the debtor with that payment reference. |
| invoice_number | Matches every collection order for the debtor containing that invoice. |
Only standalone or child collection orders are updated. Parent collection orders that have children, and orders already marked as paid, are skipped. When no eligible collection order matches, the endpoint still responds with 200 and both counters set to 0.
### Amounts
- amount is required and must be a positive integer in the currency's minor unit (e.g. 100 = 1.00 of the main unit).
- The generated invoice line uses today's date with number and description set to "payment".
### Type
The optional type field controls the generated invoice line:
- payment (default): records a payment.
- credit: records a credit.
### Rounding
If round is provided (in the currency's minor unit), the endpoint checks the outstanding amount after applying the payment on each matched order. If the remainder is greater than 0 and less than or equal to round, a payment_difference invoice line is added to bring that order to zero.
### Response
Returns the number of collection orders and paylink messages that were updated.
curl -X POST "/v3/debtors/{debtor_number}/collection_orders/payments" \
-H "Authorization: Bearer $POM_API_DOCUMENTATION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "payment",
"amount": 10000,
"round": 1000
}'Authorization
AuthorizationstringheaderrequiredOAuth 2.0 client credentials Grant
Parameters
debtor_numberstringpathrequiredDebtor identifier
payment_referencestringqueryPayment reference to match collection orders on. Mutually exclusive with
invoice_number.invoice_numberstringqueryInvoice number to match collection orders on. Mutually exclusive with
payment_reference.
Body
The new Debtor resource
typeenum<string> | nullInvoice type applied to the generated invoice line. Defaults to
payment.One of:paymentcreditamountinteger | nullrequiredAmount in the currency's minor unit. Always positive. The system stores it as a negative invoice line so it lowers the outstanding amount.
roundinteger | nullIf provided and the remaining outstanding amount after the payment is positive but less than or equal to this value (in the currency's minor unit), a
payment_differenceinvoice line is added to bring the collection order to zero.
Response
Debtor resource created
updated_collection_ordersintegerNumber of collection orders that were updated by this request.
updated_messagesintegerNumber of paylink messages that had their amount (and optionally status) synchronized.
{
"updated_collection_orders": 0,
"updated_messages": 0
}