# Create seller

- Sandbox: `POST https://sandbox.payme.io/api/public/sellers/create`
- Production: `POST https://live.payme.io/api/public/sellers/create`

## Credentials

- Header `Authorization: Bearer <token>`

Register a new seller account with Israeli business compliance validation. Includes validation for Israeli ID numbers, business registration, and bank account details.

## Parameters

This endpoint takes no path, query or header parameters.

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `firstName` | string | yes | Seller's first name |
| `lastName` | string | yes | Seller's last name |
| `email` | string | yes | Seller's primary email address (used for login) |
| `contactEmail` | string | no | Business contact email address |
| `password` | string | yes | Account password |
| `phone` | string | yes | Phone number in international format |
| `businessName` | string | yes | Legal business name |
| `businessType` | integer | yes | Israeli business type classification |
| `businessNumber` | string | yes | Israeli business registration number (ח.פ. / עוסק מורשה) |
| `socialId` | string | yes | Israeli ID number (תעודת זהות) |
| `industryClassification` | string | no | Industry classification code (optional) |
| `bankId` | string | no | Israeli bank code (optional) |
| `accountNumber` | string | no | Bank account number (optional) |
| `branchNumber` | string | no | Bank branch number (optional) |
| `logo` | string | no | Business logo as base64 encoded data URI (optional) |

### Request example

```json
{
  "firstName": "David",
  "lastName": "Cohen",
  "email": "david.cohen@example.com",
  "contactEmail": "business@cohenelectronics.co.il",
  "password": "securePassword123",
  "phone": "+972541234567",
  "businessName": "Cohen Electronics Ltd",
  "businessType": 1,
  "businessNumber": "330988015",
  "socialId": "336907282",
  "industryClassification": "12",
  "bankId": "12",
  "accountNumber": "123456789012345",
  "branchNumber": "123",
  "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
```

## Code samples

### curl

```bash
curl -X POST 'https://sandbox.payme.io/api/public/sellers/create' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <YOUR_TOKEN>' \
  --data-raw '{
  "firstName": "David",
  "lastName": "Cohen",
  "email": "david.cohen@example.com",
  "contactEmail": "business@cohenelectronics.co.il",
  "password": "securePassword123",
  "phone": "+972541234567",
  "businessName": "Cohen Electronics Ltd",
  "businessType": 1,
  "businessNumber": "330988015",
  "socialId": "336907282",
  "industryClassification": "12",
  "bankId": "12",
  "accountNumber": "123456789012345",
  "branchNumber": "123",
  "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}'
```

### Node.js

```javascript
const response = await fetch("https://sandbox.payme.io/api/public/sellers/create", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer <YOUR_TOKEN>",
  },
  body: JSON.stringify({
    "firstName": "David",
    "lastName": "Cohen",
    "email": "david.cohen@example.com",
    "contactEmail": "business@cohenelectronics.co.il",
    "password": "securePassword123",
    "phone": "+972541234567",
    "businessName": "Cohen Electronics Ltd",
    "businessType": 1,
    "businessNumber": "330988015",
    "socialId": "336907282",
    "industryClassification": "12",
    "bankId": "12",
    "accountNumber": "123456789012345",
    "branchNumber": "123",
    "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
  }),
});

console.log(await response.text());
```

### Python

```python
import requests

response = requests.post(
    "https://sandbox.payme.io/api/public/sellers/create",
    headers={
        "Authorization": "Bearer <YOUR_TOKEN>",
    },
    json={
        "firstName": "David",
        "lastName": "Cohen",
        "email": "david.cohen@example.com",
        "contactEmail": "business@cohenelectronics.co.il",
        "password": "securePassword123",
        "phone": "+972541234567",
        "businessName": "Cohen Electronics Ltd",
        "businessType": 1,
        "businessNumber": "330988015",
        "socialId": "336907282",
        "industryClassification": "12",
        "bankId": "12",
        "accountNumber": "123456789012345",
        "branchNumber": "123",
        "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    },
)

print(response.text)
```

### PHP

```php
<?php

$body = <<<'BODY'
{
  "firstName": "David",
  "lastName": "Cohen",
  "email": "david.cohen@example.com",
  "contactEmail": "business@cohenelectronics.co.il",
  "password": "securePassword123",
  "phone": "+972541234567",
  "businessName": "Cohen Electronics Ltd",
  "businessType": 1,
  "businessNumber": "330988015",
  "socialId": "336907282",
  "industryClassification": "12",
  "bankId": "12",
  "accountNumber": "123456789012345",
  "branchNumber": "123",
  "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
BODY;

$ch = curl_init('https://sandbox.payme.io/api/public/sellers/create');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: Bearer <YOUR_TOKEN>',
    ],
    CURLOPT_POSTFIELDS => $body,
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
```

## Responses

### 201 — Seller created successfully (success)

| Field | Type | Description |
| --- | --- | --- |
| `payload` | object |  |
| `payload.sellerId` | string | Newly created seller's UUID |

```json
{
  "payload": {
    "sellerId": "9a5e7898-067e-4c0c-a50f-5f8d83e7c686"
  }
}
```

### 400 — Bad Request (error)

| Field | Type | Description |
| --- | --- | --- |
| `statusCode` | integer | HTTP status code |
| `message` | string | Error message(s) |
| `error` | string | Error type |

```json
{
  "statusCode": 400,
  "message": [
    "Validation failed"
  ],
  "error": "Bad Request"
}
```

### 401 — Unauthorized (error)

| Field | Type | Description |
| --- | --- | --- |
| `error` | string |  |
| `error_description` | string |  |

```json
{
  "error": "unauthorized_client",
  "error_description": "Client authentication failed"
}
```
