Return a rental and settle the caution
IRREVERSIBLE CLOSE-OUT. Takes the unit back, flips the rental to returned (terminal — there is no un-return, no re-open and no way to amend a settlement afterwards) and stamps the settlement. Legal from active AND from overdue; a second call on an already-returned rental is 422. condition is your assessment: {"kind":"conforme"} releases the whole caution, {"kind":"dommage","retentionCents":N} retains N cents of it and releases the rest. Only send dommage on a damage assessment a human actually made — you are deciding to keep a customer’s money. TWO MONEY TRAPS. (1) retentionCents is SILENTLY CLAMPED to depositAmountCents: ask for more than the caution and you get a 200 with the caution retained in full and no warning, so always compare the returned settlement.damageRetentionCents against what you sent. (2) settlement.lateFeeCents (ratePerDayCents x 1.5 x whole days past dueAt, any part of a day counting as a full one) is REPORTED, not collected: it is NOT deducted from the caution and releasedDepositCents is deposit - retention alone, so a late conforme return releases the entire caution while still owing a fee. Surface a non-zero lateFeeCents to the operator — nothing else in this API will charge it. The release/retention itself is executed by the payment terminal against depositReference, not by this call. 404 for an unknown id. NOT IDEMPOTENT — there is no dedup key. A SEQUENTIAL replay cannot settle twice (the status guard rejects it), but that guard is an unsynchronised read-then-write with no row lock, so two CONCURRENT returns can both pass it and both settle — never fan this out. If your call times out RE-READ with getRental before retrying: a returned status means the first attempt already committed, and the settlement you see is the only one there will ever be — never assume a retry produced a fresh one. See solya-pos#956 for the missing lockKeys.
Authorizations
Authorization: Bearer <token>. Accepts EITHER a Keycloak access token (scopes-in-token) OR an opaque POS session token; both resolve to the same pos.* scope vocabulary the route guards enforce.
Path Parameters
1Body
- Option 1
- Option 2
Response
The closed-out rental: returned, with the settlement stamped. In this example the unit came back two days late and damaged, so 1500 cents were retained, 2500 released, and 1920 cents of late fee are OWED but not taken.
The closed-out rental: returned, with the settlement stamped. In this example the unit came back two days late and damaged, so 1500 cents were retained, 2500 released, and 1920 cents of late fee are OWED but not taken.
1 -9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991active, returned, overdue 
