Merit · OMS · Proposal · 7 Oct 2026 · updated after the 19 Oct session

Partial refunds: where we want to be, and how we start this sprint

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.

Author: Brian Arfi Faridhi · Status: approach agreed 19 Oct, next session Mon 26 Oct · Sources: B2C + SP + PIM standup 7 Oct, partial refund call 12 Oct, Tamer 15 Oct, Zarar PRD review 19 Oct

Agreed on 19 Oct (recording). We plan as if no partner, Comarch included, can reverse part of a points payment. The new main approach: at checkout, take points as one transaction per item, not one per order. A cancelled item then reverses its own transaction in full, which every partner supports. This works where the partner needs no validation per transaction, or where one validation covers several. Where it does not, the item refunds fully to one side only (card or points, to decide). Several items per order stays the default; a tenant setting for one item per order is an option for tenants whose rails cannot support this. Engineering builds nothing yet; the ticket stays blocked until 26 Oct.
What changed before the session. No external loyalty partner (WalaOne, STC Qitaf, Al Rajhi Mokaafa, ANB, BSF) can reverse part of a points deduction: full reversal only. Pro-rata stays as the split, but only the card leg pays out. The points share of a partial refund becomes a pending obligation in OMS until wallet credit exists. Jump to Decide today and What must be built.

01The problem: every rail refunds the whole order only

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.

full order only

Card · Moyasar

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 · Hamd
full only

Merit points · Exchange

Post-commit refund returns the whole authorisation. No partial amount.

Tamer
not built

Al Fursan Miles · Comarch

Interim 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 · Habeeb
deferred

Merit Wallet

Pay with wallet works, single leg only. Wallet credit and wallet refund are not built.

Payment Service
Seller and supplier are the same party. What differs is how the seller is integrated, because that decides where the cancellation comes from. Both produce the same refund obligation; only the trigger and reason code differ.
portal seller

Cancels in the Seller Portal

A person at the seller cancels the item in the portal, before shipment.

reason code SELLER_CANCELLED (proposed)
API-integrated seller

Cancels through the API

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.

02The end goal

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.

Why pro-rata, not card first

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.

The seven end-goal properties

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.

03Six rules that hold in every phase

These are OMS logic and need no downstream team. They are the first thing to build, and no later phase changes them.

rule 1

Refund amount per item

What the customer paid for the item after item discounts, plus its pro-rata share of any order-level promo.

rule 2

Promo threshold

If a seller cancellation takes the order below a promo minimum spend, Merit does not claw the promo back. The customer did nothing wrong.

rule 3

Shipping

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.

rule 4

Tender split

Pro-rata across the legs the order was paid with. Points round down, per DEC-0120. The remainder goes to the card leg.

rule 5

Obligation first, execution second

A cancelled item creates a refund obligation at once, with amount and split. The payout path changes by phase. The obligation does not.

rule 6

Seller cancellation is seller cost

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.

04Worked example: try your own numbers

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.

Original payment
Refund for the cancelled item
Back to card
SAR 60
Back as points
SAR 40
Split
60 / 40

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.

05Four phases: start now, automate as teams deliver

Each phase only adds a way to pay out the obligation. OMS logic built in Phase 1 stays as it is.

phase 0 · this week

Confirm the constraints

  • Moyasar: one refund per payment, partial or full. Answered 12 Oct
  • Loyalty partners: full reversal only. Answered 15 Oct: no partial
  • Comarch partial Miles reversal: asked 12 Oct, no answer, bumped 19 Oct
  • Legal store credit and consent: due 20 Oct
  • Ops: who runs the manual task? Open
Two of five answered. Comarch is the last answer that changes the build.
phase 1 · about one sprint

Unblock seller cancellation

  • OMS builds the six rules and the refund ledger
  • All items cancelled: existing full refund API
  • Otherwise hold until the order is final, max 7 days
  • Ops refunds the card share in the Moyasar dashboard
  • Points share is logged as a pending obligation; the customer is told it is pending
OMS only. Blocked only by the ops owner.
phase 2 · per team

Automate the rails

  • Payment Service partial-amount refund, with the points share as its own pending line (Hamd)
  • Wallet credit becomes the payout rail for pending points, if Legal allows
  • Miles partial reversal in the adapter, then PX, only if Comarch supports it
  • Refund audit trail (Zarar: needed once partials exist)
Each item ships on its own. OMS does not change.
phase 3 · end goal

Instant, visible, settled

  • Refund at cancellation, no hold
  • Partial refunds from returns
  • Settlement Service deducts seller payouts
  • Customer refund view in the app
Needs Moyasar multi-refund or wallet, and a Settlement owner (DEC-0468).
PhaseWhat the customer getsWho buildsBlocked by
0Nothing yetNobody, five answersMoyasar, Tamer, Comarch, Legal, Ops
1Card share back after the order closes; points share shown as pendingOMS onlyOps owner
2Automatic card refunds; pending points paid as wallet creditPayment Service, Wallet, adapter or PXLegal answer, Comarch answer, team capacity
3Instant, per item, visible in the app, seller settledPayment Service, Settlement, B2CMoyasar multi-refund, Settlement owner

06Phase 1 workflow, step by step

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.

Reconciliation (Wshah's question). Each ledger row holds the payment id and the Moyasar refund id. Moyasar's settlement report lists the refund under the same payment id, so Finance matches one to one. Phase 1 converts nothing to gift cards, so no new liability account.

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.

07Why Phase 1 is not store credit

Store credit was the first idea in the standup. Three facts make it slower, not faster.

needs a build

Wallet cannot be credited today

Wallet credit is a deferred Payment Service item. Store credit needs downstream work before it works at all.

hard to spend

Wallet pays single leg only

A SAR 60 credit can only pay a whole order of SAR 60 or less. It cannot top up a card payment.

comes back anyway

The customer paid cash

Muneeb and Wshah's point: the customer will ask for cash. Every credit becomes a payout request, and payouts run on old world services.

kept as fallback

Where store credit fits

Phase 2, for what the card cannot take: outside 30 days, or a second refund on one payment. Gated by the Legal answer.

08Phase 0 status, 19 Oct

Two of five answered. The points answer is permanent: no partner reverses part of a deduction.

#QuestionStatusWhat it means
Q1How 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.
Q2Can 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.
Q3Can 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.
Q4Store 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.
Q5Who runs the manual refund task in Phase 1?openPhase 1 cannot go live without a named person.

09What must be built

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.

PhaseOwnerRequirement
1OMS (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
1OMS (Zarar)Refund ledger: one obligation per cancelled item, split per leg (card, points, Miles), status pending, paid or escalated
1OMS (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
1OMS (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
1OMS (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
1OMS plus LiveOpsOps 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
1OMS plus B2CCustomer notice: item cancelled, card amount and when it lands, points amount shown as pending
1Payment Service, Exchange, Miles adapterNew 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)
1Tenant config (LiveOps)Option, 19 Oct: tenant setting for one item per order or several, for tenants whose rails cannot reverse per item
2Payment 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
2Payment Service, WalletWallet credit to pay out pending points, only if Legal clears it (Q4)
2E-Commerce adapter, then PXPartial Miles reversal through the Comarch rewards[] list, only if Q3 is yes
3Settlement, B2CSeller payout deduction and commission drop; in-app refund view per item

10Outcome of 19 Oct, and what 26 Oct must settle

Source: Fathom recording, last 10 minutes of the session.

Decided

#Decision
1Plan on the basis that no partner, Comarch included, supports partial points reversal
2Main approach: one points transaction per item at redemption, so each item reverses fully on its own
3If 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
4Several 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
5No engineering work now. The ticket stays blocked; Hamd builds Stripe meanwhile and will cover the Moyasar and Stripe event flows in the refund design

Which path applies, by partner

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 transactionsOne transaction per item, one OTP at checkout
Yes, one per transactionEither several OTPs at checkout (Muneeb), or the tenant runs one item per order, or the item refunds fully to one side

To settle on Mon 26 Oct (with Tamer and the old world team)

#QuestionWho brings the answer
1Per partner: validation per points transaction, and can one cover several?Tamer (loyalty partners), old world team (Al Fursan)
2Fallback side: full refund to card or to points?Group
3Can Merit refund as internal points, and is consent needed? (MLSP-1467, due 20 Oct)Legal, Marta
4Does the per-item points transaction change the Exchange or Comarch redemption API?Tamer, old world team