Process a return (retour / avoir)
Processes a refund (retour) of selected lines from an original charge transaction (vente), at the price they were sold, and settles the money back through the chosen refundMethod (201). refundMethod is one of: cash (drawer pay-out), card (reversal to the payment card), store_credit (an in-store avoir / credit note), or exchange (goods swapped, no money moved). Reach for it to refund or exchange goods at the counter. A cash refund debits the store’s active register drawer and the returned units re-increment on-hand stock (both idempotent by the return id). Note: store_credit RECORDS the refund as an avoir here but does NOT mint the redeemable instrument — issuing the spendable credit note / gift card is a SEPARATE call (the giftcard/credits domain). Failure conditions: 400 on a malformed body; 404 when the originalTransactionId names no known charge; 409 when the return id already exists; 422 when the return breaks an invariant (e.g. returning more units than were sold).
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.
Body
11111cash, card, store_credit, exchange 111Response
The processed return: the signed refund transaction plus its refund metadata.

