> ## Documentation Index
> Fetch the complete documentation index at: https://docs.khaime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Register Customer

> Create a new customer account

# Register Customer

Creates a new customer account for your business.

## Request

<ParamField header="X-API-Key" type="string" required>
  Your API key
</ParamField>

### Body Parameters

<ParamField body="email" type="string" required>
  Customer's email address
</ParamField>

<ParamField body="password" type="string" required>
  Password (min 6 characters)
</ParamField>

<ParamField body="first_name" type="string" required>
  Customer's first name
</ParamField>

<ParamField body="last_name" type="string" required>
  Customer's last name
</ParamField>

<ParamField body="phone_number" type="string">
  Customer's phone number
</ParamField>

## Response

<ResponseExample>
  ```json theme={null}
  {
    "status": true,
    "message": "Registration successful. Please verify your email.",
    "data": {
      "id": 98765,
      "email": "john@example.com",
      "first_name": "John",
      "last_name": "Doe",
      "is_verified": false
    }
  }
  ```
</ResponseExample>

## Errors

| Error Code             | Description                 |
| ---------------------- | --------------------------- |
| `EMAIL_ALREADY_EXISTS` | Email is already registered |
| `VALIDATION_FAILED`    | Invalid input data          |

## Example

```bash theme={null}
curl -X POST "https://api.khaime.com/api/v1/register" \
  -H "X-API-Key: pk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "john@example.com",
    "password": "securepassword123",
    "first_name": "John",
    "last_name": "Doe"
  }'
```

## Notes

* After registration, the customer receives an OTP via email for verification
* Unverified customers can still make purchases (verification happens automatically)
* For guest checkout, you can skip registration - just pass the email in the payment intent
