Merit · OMS · Proposal · 7 Oct 2026

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: draft for discussion · Source: B2C + SP + PIM standup, 7 Oct 2026

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. More than one refund per payment is not confirmed. 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

Points are shown at SAR value. The real system rounds to whole points, down, and gives the remainder to the card leg.

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: how many refunds per payment? (partial amount confirmed)
  • Exchange: partial points refund or credit?
  • Comarch: partial Miles reversal?
  • Legal: store credit without consent?
  • Ops: who runs the manual task?
Builds nothing. Two answers could change Phase 1.
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 amount in the Moyasar dashboard
OMS only. Blocked only by the ops owner.
phase 2 · per team

Automate the rails

  • Payment Service partial-amount refund
  • Exchange partial points refund
  • Miles partial reversal in the adapter, then PX
  • Wallet credit as fallback
  • Payment Service retry worker
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 money back after the order closes; points may be pendingOMS onlyOps owner
2Automatic refunds per rail, store credit fallbackPayment Service, Exchange, adapter or PXEach team's 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: five questions to answer this week

Two constraints are on record but not proven. If either is wrong, the plan changes, so these go first.

#QuestionOwnerWhy it matters
Q1How many refunds can one Moyasar payment take? A partial amount is confirmed in Moyasar's API docs (Wshah, 7 Oct); the docs are silent on more than one.Zarar, with the Payment Service teamOne: consolidate per order, as Phase 1 does. Many: Phase 3 is easy.
Q2Can Merit Exchange refund part of an authorisation, or credit N points to a member?TamerDecides the points leg in Phase 1.
Q3Does Comarch support partial Miles reversal? Likely yes: its Refund an Order endpoint takes a list of reward lines with quantity and points. Not tested.Tahsin, Aditya or Akshay, in #proj-legacy-to-ecom-sol-migrationThe adapter is built now. Partial must be in it from day one.
Q4Can a card refund go out as store credit without consent under Saudi consumer rules?LegalStore credit as fallback, or only as a customer choice.
Q5Who executes the manual refund task in Phase 1?OpsPhase 1 has a manual step.

09Decisions needed

  1. Pro-rata tender split. Recommended.
  2. Phase 1 card refunds run manually from an OMS task, not as store credit. Recommended.
  3. Consolidate partial refunds per order, with a 7-day hold cap. Recommended.
  4. Shipping and promo rules (rules 2 and 3).
  5. The Al Fursan interim adapter includes partial Miles reversal from the start.

Next: Zarar and Khawar review, Zarar checks Q1 against the Moyasar API, then a session with Tamer on Q2. After the review this becomes the separate Partial Refund PRD.