Merit · OMS · Proposal · 7 Oct 2026 · updated after the 19 Oct session
When one seller cancels one item of a multi-item order, the customer must get back that item's value only. No rail in our chain can do that today. This page shows the end goal, the rules that never change, and four phases. Phase 1 needs only OMS work.
An order can mix card, Merit points and, for Al Fursan, Miles. Each rail has a different owner, and none can return part of a payment today.
Moyasar's API accepts a partial amount. Our Payment Service Refund API is full order only; partial amounts are deferred. One refund per payment: Hamd tested it on 12 Oct, a second call is declined. 30-day window.
Payment Service · HamdPost-commit refund returns the whole authorisation. No partial amount.
TamerInterim adapter is being built now. Comarch's refund call takes reward lines with quantity and points, so partial looks possible. Not tested.
E-Commerce adapter, then PX · HabeebPay with wallet works, single leg only. Wallet credit and wallet refund are not built.
Payment ServiceA person at the seller cancels the item in the portal, before shipment.
reason code SELLER_CANCELLED (proposed)The seller's system rejects or cancels the item, or the fulfilment call fails for good.
reason code SELLER_API_CANCELLED (proposed)Legacy avoids this with one item per order. We do not copy that: one payment per item means many card charges, many fees, and no shared shipping.
A cancellation becomes a refund obligation in OMS. The obligation splits pro-rata across the tenders the customer paid with, and each rail returns its share. One ledger records all of it.
Dashed line: wallet credit is a fallback for what the card cannot take (outside 30 days, or a second refund on one payment). It is not the default.
Card first turns points into cash. Pay SAR 300 card plus SAR 200 points, cancel a SAR 200 item, get SAR 200 cash back: a points cash-out and a fraud path. Points first has the reverse problem. Pro-rata keeps the customer where they started and reconciles cleanly.
Original tender · item level, any amount, many times · pro-rata split · automatic, ops sees exceptions only · one refund ledger · seller payout settled · customer sees it in the app.
These are OMS logic and need no downstream team. They are the first thing to build, and no later phase changes them.
What the customer paid for the item after item discounts, plus its pro-rata share of any order-level promo.
If a seller cancellation takes the order below a promo minimum spend, Merit does not claw the promo back. The customer did nothing wrong.
Refunded only when the last item of a shipment is cancelled before dispatch. A partial cancellation keeps the fee, because the shipment still goes out.
Pro-rata across the legs the order was paid with. Points round down, per DEC-0120. The remainder goes to the card leg.
A cancelled item creates a refund obligation at once, with amount and split. The payout path changes by phase. The obligation does not.
A seller that cancels, by portal or by API, is not paid for the item and pays no commission on it. Penalties are out of scope.
The default is the example from the proposal: SAR 500 order, SAR 300 card, SAR 200 in points, the seller of a SAR 100 item cancels.
Rule: refund = price paid for the item after discounts. Card = refund x card share. Points = refund x points share, rounded down to whole points, remainder to the card. Example: card 16, points 34, item 20 gives 13 points and 7 card.
Each phase only adds a way to pay out the obligation. OMS logic built in Phase 1 stays as it is.
| Phase | What the customer gets | Who builds | Blocked by |
|---|---|---|---|
| 0 | Nothing yet | Nobody, five answers | Moyasar, Tamer, Comarch, Legal, Ops |
| 1 | Card share back after the order closes; points share shown as pending | OMS only | Ops owner |
| 2 | Automatic card refunds; pending points paid as wallet credit | Payment Service, Wallet, adapter or PX | Legal answer, Comarch answer, team capacity |
| 3 | Instant, per item, visible in the app, seller settled | Payment Service, Settlement, B2C | Moyasar multi-refund, Settlement owner |
The colour of each box shows who acts. The two checks in the middle are what let us work inside the current limits: one refund per payment, within 30 days.
Limits of Phase 1: one manual step per refund; the customer waits for the order to close (up to 7 days); the points leg may wait for Phase 2; one partial refund per payment.
Store credit was the first idea in the standup. Three facts make it slower, not faster.
Wallet credit is a deferred Payment Service item. Store credit needs downstream work before it works at all.
A SAR 60 credit can only pay a whole order of SAR 60 or less. It cannot top up a card payment.
Muneeb and Wshah's point: the customer will ask for cash. Every credit becomes a payout request, and payouts run on old world services.
Phase 2, for what the card cannot take: outside 30 days, or a second refund on one payment. Gated by the Legal answer.
Two of five answered. The points answer is permanent: no partner reverses part of a deduction.
| # | Question | Status | What it means |
|---|---|---|---|
| Q1 | How many refunds can one Moyasar payment take? | answered 12 Oct One, partial or full. Hamd tested it. | Phase 1 consolidates per order. Instant per-item refunds wait for a second rail. |
| Q2 | Can loyalty partners reverse part of a points deduction? | answered 15 Oct: no WalaOne, STC Qitaf, Al Rajhi Mokaafa, ANB, BSF: full reversal only (Tamer, Rohit). | The points share of a partial refund is a pending obligation, paid later as wallet credit. |
| Q3 | Can Comarch reverse part of the Miles on one transaction? | open Asked Akshay 12 Oct in #proj-alfursan-migration, no reply, bumped 19 Oct. | Yes: the Al Fursan Miles leg can be automatic in the adapter. No: it is pending like the others. |
| Q4 | Store credit or points instead of card: consent, regulated wallet? | open, due 20 Oct Marta, MLSP-1467, bumped 19 Oct. | Decides whether wallet credit can pay out the pending points. |
| Q5 | Who runs the manual refund task in Phase 1? | open | Phase 1 cannot go live without a named person. |
By owner. Phase 1 needs only the OMS rows. Zarar's 19 Oct review is applied: no idempotency layer, no auto-retry, and the audit trail moves here.
| Phase | Owner | Requirement |
|---|---|---|
| 1 | OMS (Zarar) | Item-level cancellation from the Seller Portal and the seller API on a multi-item order, with reason codes SELLER_CANCELLED and SELLER_API_CANCELLED |
| 1 | OMS (Zarar) | Refund ledger: one obligation per cancelled item, split per leg (card, points, Miles), status pending, paid or escalated |
| 1 | OMS (Zarar) | Six rules: item amount after discounts plus its share of the order promo; no promo claw-back; shipping refunded only with the last item; pro-rata split, points round down, remainder to card; obligation first; seller cost |
| 1 | OMS (Zarar) | Consolidation: hold partial obligations until the order is final, cap 7 days, then one refund per payment. All items cancelled calls the existing full refund API |
| 1 | OMS (Zarar) | Refund audit trail per state change (actor, time, old and new value). requestedBy and approvedBy stop being enough once one order has several refunds |
| 1 | OMS plus LiveOps | Ops refund task: payment id, card amount, a field for the Moyasar refund id. Escalation queue for refunds past 30 days or a second refund on one payment |
| 1 | OMS plus B2C | Customer notice: item cancelled, card amount and when it lands, points amount shown as pending |
| 1 | Payment Service, Exchange, Miles adapter | New 19 Oct: points redemption as one transaction per item, not one per order, so a cancelled item reverses its own transaction in full. Scope depends on each partner's validation rule (section 10) |
| 1 | Tenant config (LiveOps) | Option, 19 Oct: tenant setting for one item per order or several, for tenants whose rails cannot reverse per item |
| 2 | Payment Service (Hamd) | Partial refund API that takes an amount per leg, with the points share kept as its own pending line. Removes the ops manual step |
| 2 | Payment Service, Wallet | Wallet credit to pay out pending points, only if Legal clears it (Q4) |
| 2 | E-Commerce adapter, then PX | Partial Miles reversal through the Comarch rewards[] list, only if Q3 is yes |
| 3 | Settlement, B2C | Seller payout deduction and commission drop; in-app refund view per item |
Source: Fathom recording, last 10 minutes of the session.
| # | Decision |
|---|---|
| 1 | Plan on the basis that no partner, Comarch included, supports partial points reversal |
| 2 | Main approach: one points transaction per item at redemption, so each item reverses fully on its own |
| 3 | If per-transaction validation blocks it, the item refunds fully to one side only (card or points, to decide). Internal Merit points refunds are a later phase |
| 4 | Several items per order stays the default. A tenant setting for one item per order is an option for tenants whose rails cannot support the main approach |
| 5 | No engineering work now. The ticket stays blocked; Hamd builds Stripe meanwhile and will cover the Moyasar and Stripe event flows in the refund design |
| Partner needs validation per points transaction? | Result |
|---|---|
| No (Al Fursan: legacy already splits one cart into several Saudia orders) | One transaction per item. Full automatic item refund |
| Yes, but one validation covers several transactions | One transaction per item, one OTP at checkout |
| Yes, one per transaction | Either several OTPs at checkout (Muneeb), or the tenant runs one item per order, or the item refunds fully to one side |
| # | Question | Who brings the answer |
|---|---|---|
| 1 | Per partner: validation per points transaction, and can one cover several? | Tamer (loyalty partners), old world team (Al Fursan) |
| 2 | Fallback side: full refund to card or to points? | Group |
| 3 | Can Merit refund as internal points, and is consent needed? (MLSP-1467, due 20 Oct) | Legal, Marta |
| 4 | Does the per-item points transaction change the Exchange or Comarch redemption API? | Tamer, old world team |