Skip to main content
After the POS records a customer’s return, Lobyco looks up the coupons redeemed on each original receipt. A coupon comes back once every product it discounted has been returned in full. Until then the customer keeps the discount on what they kept, and the coupon stays used. The flow is on Returns and refunds.

What counts as returned

  • Products with an allocation for the coupon’s discount. For each discount on the sale with couponIds, Lobyco takes the products with an entry for it in discountAllocations. It does not use appliedProducts, because that is empty for a basket discount. A product the discount excluded, or one that only helped reach a threshold, has no allocation. The customer can keep it.
  • Every unit of the product, on every line. Lobyco matches returned products to the sale by id, not by line. So every unit of that id on the sale must come back, including units on lines without the allocation.
  • Over all the returns of the sale. Lobyco records every return of a sale, so returns add up. A sale of 3 can come back as 2 and then 1.
  • Quantities only. Lobyco ignores refund amounts. Lines with isCancelled: true are netted out of the quantities.

When a coupon comes back

  • On the receipt it was redeemed on. Lobyco matches a return to the coupons redeemed with the receiptId that the returned products give as originalReceiptId.
  • Together with the other coupons of its discount. Coupons of one offer used on a sale are one discount with several couponIds. Lobyco cannot tell which unit each covered, so they come back together.
  • Even after it has expired. Lobyco cancels the redemption and restores the coupon’s usage and the offer’s limits. An expired coupon still cannot be used.

Examples

Each example is one sale, SALE-1, and what happens to its coupon as the customer brings items back.

A multi-buy returned in two visits

The same multi-buy on separate lines

The discount sits on the third line only. Lobyco matches returns by id, not by line, so all 3 yoghurts still count.

A basket coupon

A product the coupon excludes

The coupon is “10% off when you spend 100 or more, tobacco excluded”.
The discount is shared between the coffee and the milk. The cigarettes are excluded, so they do not count.

A Mix & Match meal deal

The coupon is a meal deal: “a sandwich, a drink and crisps for 6.00”. The customer also buys a second drink at full price.
The discount is shared between the sandwich, the drink line and the crisps. Both drinks count, because Lobyco matches returns by id, not by unit.

Buy one, get one free

Only the conditioner carries the discount. The two rows are alternatives:

Two coupons of the same offer

API reference

Endpoint documentation: Purchases and Coupons (POS).
Last modified on October 29, 2026