# Customer Object (deprecated)

A customer object represent the merchant / your business customers which stored in Harsya System for multiple purpose activity. e.g. recurring payments, store payment method of each customers, etc.

### Customer Object Example

```json
{
    "uuid": "234f-873g-551A-lgtm",
    "firstName":"John",
    "lastName":"Doe",
    "email": "johndoe@gmail.com",
    "phoneNumber":"081234567890",
    "merchantId": "7822-9dfu-2156-lgtm",
    "address": {
        "addressLine1": "addressLine1",
        "addressLine2": "addressLine2",
        "city": "Jakarta Utara",
        "state" : "DKI Jakarta",
        "postalCode": "123456", 
        "country": "ID"   
    },
    "metadata": {
        "foo": "bar"
    }
}
```

### Customer Object Schema

<table data-full-width="true"><thead><tr><th width="218">Schema Path</th><th width="219">Specs and Validation</th><th width="276">Description</th></tr></thead><tbody><tr><td><strong>uuid</strong></td><td><ul><li>String</li></ul></td><td>Object Unique Identifier</td></tr><tr><td><strong>firstName</strong></td><td><ul><li>String</li><li>Required</li></ul></td><td>First Name of the customer</td></tr><tr><td><strong>lastName</strong></td><td><ul><li>String</li><li>Required</li><li>Alphanumeric</li></ul></td><td>Last Name of the customer</td></tr><tr><td><strong>email</strong></td><td><ul><li>String</li><li>Required</li></ul></td><td>Email Address of the customer</td></tr><tr><td><strong>phoneNumber</strong></td><td><ul><li>String</li><li>Required</li><li>Unique</li></ul></td><td>Phone Number of the customer</td></tr><tr><td><strong>merchantId</strong></td><td><ul><li>String</li><li>Required</li></ul></td><td>Merchant Id where the customer first registered</td></tr><tr><td><strong>address</strong></td><td><ul><li>Object</li><li>Optional</li></ul></td><td>Address of residence of the customer</td></tr><tr><td>address.<strong>addressLine1</strong></td><td><ul><li>String</li><li>Optional</li></ul></td><td>Address of the customers i.e. Street Name and Number</td></tr><tr><td>address.<strong>addressLine2</strong></td><td><ul><li>String</li><li>Optional</li></ul></td><td>Additional address information of the customers. i.e. Building Name, Room Number</td></tr><tr><td>address.<strong>city</strong></td><td><ul><li>String</li><li>Optional</li></ul></td><td>City of the customer address</td></tr><tr><td>address.<strong>state</strong></td><td><ul><li>String</li><li>Optional</li></ul></td><td>State / Province of the customer address</td></tr><tr><td>address.<strong>postalCode</strong></td><td><ul><li>String</li><li>Optional</li></ul></td><td>Postal code of the customer address</td></tr><tr><td>address.<strong>country</strong></td><td><ul><li>String</li><li>Optional</li></ul></td><td>Two letter digits country code based on <a href="https://en.wikipedia.org/wiki/ISO_3166-1">ISO 3166-1 alpha-2</a> of the customer address</td></tr><tr><td><strong>metadata</strong></td><td><ul><li>Object</li><li>Optional</li></ul></td><td>Contains key-value pairs to store additional information of the customer</td></tr></tbody></table>
