HOCO B2B
Team tasksAnis

SRV-46 — Cashback wallet and checkout use

Separate cashback ledger, earning, checks at checkout, hold and release, expiry.

FieldDetails
Task codeSRV-46
PhaseP4 — V2 evolutions
Product scopeV2
StatusPlanned
StartMon 1 Mar 2027
DueWed 3 Mar 2027
ResponsibleAnis — Full-stack developer
Co-responsible—
Effort2.5 person-day(s) planned · 6 from scratch · size M
Area · appServer · server
Depends onSRV-45
UnblocksSRV-50
Milestones—

Summary

Separate cashback ledger, earning, checks at checkout, hold and release, expiry.

Description

Change request 04 (client loyalty document and letter of 6 Nov 2026), not yet accepted or priced by HOCO. Builds CashbackTransaction, earning on the eligible amount, the checks of cart.checkout, the hold at SUBMITTED and release on refusal or cancellation (ORD-14), reversal on returns, expiry and manual adjustment. Stays behind loyalty.cashback.enabled until the accountant review D-60 is closed.

Subtasks

#SubtaskOwner
1Cashback ledger, balance cache and rule of kind CASHBACKAnis
2Earning and reversal on order eventsAnis
3cart.get and cart.checkout: cashbackAmount, voucher and cashback stackingAnis
4Hold and release around confirmationAnis
5Expiry job and admin.loyalty.cashback.adjustAnis

Deliverables

  • apps/server/src/modules/loyalty/cashback.service.ts
  • Cart engine changes behind a flag

Acceptance criteria

  • 2 % of 100 000 DA adds 2 000 DA (LOY-14)
  • The cap of 20 % is enforced at checkout (LOY-14)
  • A refused order releases the amount (LOY-14)
  • With the switch off, V1 checkout is unchanged

Requirements covered

RequirementTitleRelease
LOY-14Cashback balance, earning and use at checkoutV2
LOY-04Rewards catalogue (voucher, free delivery, discount, gift, early access, commercial advantage) and redemptionV2

API surface

Test measures

  • DB tests under concurrent checkouts
  • Regression of V1 cart totals

Risks

  • Invoice and VAT treatment unknown (D-60): keep the working assumption in one place

KPI

  • Delivered by Wed 3 Mar 2027 within 2.5 person-day(s).
  • Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
  • Zero open critical defects, permission gaps or data-integrity regressions at sign-off.

Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.

On this page