Registration Flow
Standard Registration (with SMS verification):
User submits registration data (POST without
code)System sends SMS verification code
Code stored in session as
confirmation_dataUser resubmits with
codeparameterSystem validates phone and code match
Creates loyalty account in external system
Creates local LoyaltyCard record
Sets user attributes:
has_loyalty=true,verified_user=trueOptionally syncs user data if
is_sync=true
OTP Registration (without SMS verification):
User already verified via other means
Direct submission to
/add_loyalty_card_otp/Skips SMS verification entirely
Creates loyalty account and local record
Sets
has_loyalty=trueattribute
Search and Link:
User submits phone/email to
/search_exists_create/System queries external loyalty system
If account exists, creates local LoyaltyCard link
If not found, returns message (no account creation)
Last updated
Was this helpful?

