---
# System prepended metadata

title: Widget User

---

# Widget User

userId: uuid
clientName: string
phone: string
email: string, required: true

Widget Service:
Check access using phone and email
We should be able to pass in identifier (email or phone) and get back access rights for this user.
Can re-use and modify userpurchase service from commit "ac33e04" in branch "login-logic".

Purchase Flow

1. New user buyiong subs by phone

1. Check if widget user with email (abc@g) exists. If not, then create WU. Then send pincode using Zlick API
2. Once user confirms pincode, use Zlick's confirm_pincode to get zlick userid
3. Using zlick userid, create subscription.


# To check access

## To check access by phone:
Query transactions / subscriptions by phone number

## To check access by email:

To check single purchase:
Query transactions by extraData.customer_email

To check subscriptions:
Query subscription by email