Phase 0S1–S4
The split
Shopify is the till. The platform is the brain.
Club Remedy · operating picture
Shopify takes the peso. We take the liability.
Shopify · money
Commercial front door
- Checkout · POS · gift cards · refunds · discounts
- PayMongo / GCash / BillEase / TendoPay — already live
- HelixPay installed · native subscriptions unavailable in PH
Platform · brain
Operational system of record
- Credit ledger (stored-value liability)
- Entitlements · booking lock · loyalty
- Member app · staff console · clinical flags
refunds/create → REVERSAL
Same payload twice changes nothing. HMAC + idempotency keys. Gated review.
Mid-flow money (mixed tender remainder, top-up, no-show fee): platform mints a Shopify draft order / checkout link, then confirms on the paid webhook. We still never touch a card.
INVARIANTS.md · five, always
- 1Balance is SUM(entries) — never a stored column.
- 2Ledger has no UPDATE or DELETE. Corrections are new entries.
- 3Resource claims and credit holds commit or roll back as one.
- 4Liability = ISSUE − DEBIT − FORFEIT − EXPIRE, per lot.
- 5Every ISSUE / reversal traces to one Shopify order, refund, grant, or reason-coded adjustment. Same webhook twice changes nothing.