Creates a CollectionOrder resource.
This endpoint records a payment or credit against a single collection order. It creates an invoice line that reduces the outstanding amount, synchronises linked paylink messages, and closes the collection order when fully paid.
The collection order is identified by its internal {id} (path parameter) and must belong to your account — otherwise the endpoint responds with 404. Parent collection orders that have children, and orders already marked as paid, are skipped without error.
### 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. If the remainder is greater than 0 and less than or equal to round, a payment_difference invoice line is added for the remaining amount, bringing the collection order to zero.
### Response
Returns the number of collection orders and paylink messages that were updated.
curl -X POST "/v3/collection_orders/{id}/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
idstringpathrequiredCollectionOrder identifier
Body
The new CollectionOrder 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
CollectionOrder 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
}