# Customer

Below are the webhook store events paired with their respective data schema related to the [Customer webhook events](https://docs.salla.dev/doc-421119):

## Customer Webhook Events Model

The following includes 3 customer webhook events that share the same model, which are mentioned in the `event` enum value under the Data Schema tab

<Tabs>
  <Tab title="Data Schema">

<DataSchema id="1307420" />
      
  </Tab>
  <Tab title="Example">
    
```
{
  "event": "customer.login",
  "merchant": 1305146709,
  "created_at": "Tue Jan 25 2022 12:36:49 GMT+0300",
  "data": {
    "id": 225167971,
    "first_name": "User",
    "last_name": "Mohammed",
    "mobile": 555555555,
    "mobile_code": "+966",
    "email": "test@gmail.com",
    "urls": {
      "customer": "https://salla.sa/dev-wofftr4xsra5xtlv/profile",
      "admin": "https://s.salla.sa/customers/l7mYBdgXA9xJwWZRZK8WD42GNkZbjvRO"
    },
    "avatar": "https://i.ibb.co/jyqRQfQ/avatar-male.webp",
    "gender": "female",
    "birthday": {
      "date": "1997-06-03 00:00:00.000000",
      "timezone_type": 3,
      "timezone": "Asia/Riyadh"
    },
    "city": "الرياض",
    "country": "السعودية",
    "country_code": "SA",
    "currency": "AED",
    "location": "14",
    "updated_at": {
      "date": "2022-01-24 14:26:55.000000",
      "timezone_type": 3,
      "timezone": "Asia/Riyadh"
    },
    "groups": [],
    "source": {
      "device": "desktop",
      "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
      "ip": "127.0.0.1"
    },
      "is_notifications_enabled": true
  }
}
```
      
  </Tab>
</Tabs>

## Customers OTP (One-Time Password) Webhook Event Model

This event is triggered when a customer's One-Time Password has been requested.

:::warning[Important Note]
This webhook event will only be triggered if both the email and SMS attempts to send the OTP to the customer have failed.
::: 

<Tabs>
  <Tab title="Data Schema">

<DataSchema id="1307405" />
      
  </Tab>
  <Tab title="Example">
    
```
{
  "event": "customer.otp.request",
  "merchant": 1029864349,
  "created_at": "Wed Jun 30 2021 12:09:11 GMT+0300",
  "data": {
    "code": "5331",
    "contact": "+96652318526"
  }
}
```
      
  </Tab>
</Tabs>
