Loyalty / customer fidelity — Nostr-native points and tiers #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracks the loyalty layer of #2 (
fulltier).Background
DarthCoin's nudge:
A regular customer should be recognized — and rewarded — without
having to install a per-restaurant app or sign up to anything. We
already have the right primitive baked in: every order can carry an
optional
customer_pubkey(Nostr identity). That's the loyalty key.Why this is interesting
show up at a venue, the venue sees them, points accrue. No
registration, no email, no per-merchant identity friction.
that history follow them if the loyalty events are published
publicly (per the Nostr-native direction of the rest of the
stack). The customer chooses what the next venue can see.
pay out as a literal LNbits internal transfer / discount, not a
paper stamp.
Data model (sketch)
kindvalues:earned,redeemed,expired,granted(manualoperator gift),
revoked.Balances are denormalized — derived from the events ledger so the
ledger is the source of truth and
loyalty_balancesis a cache.Behavior
enabled → emit
earnedevent (points_delta = sats * earn_rate).configured perk (free menu item, % discount on next order).
Emits
redeemedevent with negative points_delta.current tier in the operator's order monitor and on the
receipt.
GET /api/v1/restaurants/{id}/loyalty/{customer_pubkey}returns{points, tier, recent_events}.Nostr surface
customer's pubkey carries a portable history. Open question
what kind / NIP — could be a custom kind for now (
30404orsimilar), or fold into NIP-15-style commerce events.
pending) the customer's wallet stores; redemption proves the
grant.
curators publish NIP-51 lists of programs, customers see all
their balances in one place.
Operator UX
Visible only when
mode == 'full'(per #2). A new CMS page:Stretch
(B's first order tagged with A's pubkey) → A earns referral
points.
curated NIP-51 list of programs.
satoshi-back rebate per order (LNbits internal transfer to the
customer's wallet).
Acceptance
full.mark_order_paidwhencustomer_pubkeyset.grant + redeem).
so the waiter sees "Gold tier — 4th visit this month".
See also
References