HOCO B2B
Team tasksAnis

SRV-51 — Reseller one-time codes by WhatsApp with SMS backup

WhatsApp sender for reseller codes, channel choice in auth.otp.send, SMS fallback, on/off setting and simulator.

FieldDetails
Task codeSRV-51
PhaseP1 — V1 build & integration
Product scopeV1
StatusPlanned
StartThu 3 Dec 2026
DueSun 6 Dec 2026
ResponsibleAnis — Full-stack developer
Co-responsible—
Effort1 person-day(s) planned · 3 from scratch · size S
Area · appServer · server
Depends onSRV-05
UnblocksWEB-22, MRA-22, SRV-52
Milestones—

Summary

WhatsApp sender for reseller codes, channel choice in auth.otp.send, SMS fallback, on/off setting and simulator.

Description

Decision D-64, asked by Anis on 8 Nov 2026, not yet accepted by HOCO. Moves the code part of NOT-08 into V1. Off by default through auth.otpWhatsappEnabled. Real sending needs HOCO's Meta account and an approved template.

Subtasks

#SubtaskOwner
1Sender for the authentication template, with simulator and Mailpit copyAnis
2channel in auth.otp.send, cooldown per channel, SMS fallbackAnis
3Setting auth.otpWhatsappEnabled and its label in the back officeAnis
4First real send on HOCO's Meta accountAnis

Deliverables

  • apps/server/src/modules/identity/whatsapp.ts
  • packages/contracts/src/schemas/auth.ts

Acceptance criteria

  • With the setting off, every code goes by SMS
  • With it on, a reseller code goes by WhatsApp and a delegate code by SMS
  • When Meta refuses a message, the same code goes by SMS and channel answers SMS

Requirements covered

RequirementTitleRelease
AUTH-03Reseller self sign-up: phone verified by OTP, store details, declared customer type (super-gros, demi-gros, détail), password, optional invitation codeV1
AUTH-04Reseller sign-in (phone or email + password, or a one-time code) and password reset by OTPV1
AUTH-07Password policy, hashing, OTP expiry/resend cooldown and attempt limitingV1

API surface

Endpoint groupOperations
Authentication & sessions14

Test measures

  • Unit tests of the sender and the fallback with a mocked fetch
  • Integration test of the channel in auth.otp.send

Risks

  • Meta approval is in HOCO's hands
  • A message accepted by Meta but not delivered is not detected without a webhook: the SMS option on the code screen covers it

KPI

  • Delivered by Sun 6 Dec 2026 within 1 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