# Create Seller

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

## Credentials

- Request body field `payme_client_key` (required): PayMe Partner Key.

## Overview

**Relevant only to PayMe's partners.**
This endpoint allows you to create a seller as one of PayMe's partners.
You can find more information in the following guide - [How to Create New Sellers](/guides-and-use-cases-migrated/sellers/create-seller).

##### Testing
 For testing purposes you can use the following testing values:
Attributes	|Value
---|---
seller_social_id|	`9999999999`
seller_email	|`random@paymeservice.com` Note that by using this email you will not receive any automatic emails sent from the system
seller_bank_code|	`54`
seller_bank_branch|	`123` Any 3 digits
seller_bank_account_number|	`123456` Any 6 digits

#### Callback upon Seller creation or update
Once the Seller is created or updated, we will notify the marketplace with the Seller details with a POST request of type `x-www-form-urlencoded` to the marketplace Default Callback URL.

## Parameters

This endpoint takes no path, query or header parameters.

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payme_client_key` | string | yes | PayMe Partner Key. |
| `seller_first_name` | string | yes | Seller's first name |
| `seller_last_name` | string | yes | Seller's last name |
| `seller_social_id` | string | yes | Seller's social ID |
| `seller_birthdate` | string | yes | Seller's personal birth date. ( dd/mm/yyyy structured) |
| `seller_social_id_issued` | string | yes | Seller's personal social ID issuing day.( dd/mm/yyyy structured) |
| `seller_gender` | number | yes | Seller's gender ( 0- Male, 1- Female) |
| `seller_email` | string | yes | Seller's email address |
| `seller_phone` | string | yes | Seller's phone number |
| `seller_contact_email` | string | no | Seller's contact email |
| `seller_contact_phone` | string | no | Seller's contact phone number that will be displayed to the buyers. If not stated, will be copied from seller_phone |
| `seller_bank_code` | number | yes | Seller's bank code (Israeli only) Please see the full list of banks [Banks in Israel](/guides-and-use-cases-migrated/lists-statuses/banks-in-israel). |
| `seller_bank_branch` | number | yes | Seller's bank branch code |
| `seller_bank_account_number` | string | yes | Seller's bank account number |
| `seller_description` | string | yes | Seller’s description, including offered product line and services. Limited to 255 characters. |
| `seller_site_url` | string | yes | Seller’s site URL. |
| `seller_person_business_type` | number | yes | Business MCC (Merchant category code). List of codes [MCC List](/guides-and-use-cases-migrated/lists-statuses/mcc-list). |
| `seller_inc` | number | yes | Seller incorporation type (IL Only) You can find all the seller incorporation types [Seller Incorporation Types (IL)](/guides-and-use-cases-migrated/lists-statuses/seller-incorporation-types-il). |
| `seller_inc_code` | string | no | Seller's business ID (ח.פ, ע.מ), required when seller_inc is not 1. |
| `seller_retail_type` | number | no | Seller's retail type. (1 - Card not present (online) seller, 2 - Card present seller). |
| `seller_merchant_name` | string | yes | Seller's merchant name, required when seller_inc is not 1. |
| `seller_address_city` | string | yes | Seller's business address - City. |
| `seller_address_street` | string | yes | Seller's business address - Street. |
| `seller_address_street_number` | string | yes | Street number |
| `seller_address_country` | string | yes | Seller's business address - Country code according to the ISO 3166. You can fond all the country codes [here](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). |
| `market_fee` | number | no | A decimal between 0.00 and 60.00 representing the percent of the sale price that is collected for the marketplace (includes VAT). This fee is added on top of our fees and transferred to the marketplace once a month. Default value is 0 |
| `language` | string | no | Changes the error message language to English. Default value is Hebrew (he). |
| `seller_plan` | string | no | A predefined set of settings for the seller. If required, this value will be provided by your Account Manager. |
| `seller_merchant_name_en` | string | no | The seller's international name in English |
| `seller_additional_details` | object | no |  |
| `seller_additional_details.first_name` | string | no | Seller's first name |
| `seller_additional_details.last_name` | string | no | Seller's last name |
| `seller_additional_details.social_id` | string | no | Seller's social ID |
| `seller_additional_details.social_id_issued` | string | no | The social id document issuing date ( dd/mm/yyyy structured) |
| `seller_additional_details.type` | array | no | Possible Role. An individual can have multiple roles in a company. You can find all the individual seller types [Individual Seller Types](/guides-and-use-cases-migrated/lists-statuses/individual-seller-types). |
| `seller_additional_details.type_copy` | array | no | Possible Role. An individual can have multiple roles in a company. You can find all the individual seller types [Individual Seller Types](/guides-and-use-cases-migrated/lists-statuses/individual-seller-types). |
| `seller_additional_details.email` | string | no | Seller's Email |
| `seller_additional_details.files` | object | no | Files related to the individual, like id |
| `seller_additional_details.files.type` | number | no | You can find [File Types](/guides-and-use-cases-migrated/lists-statuses/file-types) the file types you can upload. Only individual types are valid: 90-95. |
| `seller_additional_details.files.url` | string | no | File URL |
| `seller_additional_details.files.base64` | string | no | The base64 encoded file |
| `seller_additional_details.files.name` | string | no | File name with extension. Allowed file extensions: `pdf`, `jpg`, `jpeg`, `png`, `bmp`, `tiff`, `doc`, `docx` |
| `seller_additional_details.files.mime_type` | string | no | The mime type of the file. Most common mime types are supported, such as `application/pdf`, `application/msword`, `image/png`, `image/jpg`, `image/jpeg`, `image/tiff`, `jfif`. |
| `seller_dba` | string | no | The seller's legal/registered name in Hebrew. |
| `seller_dba_en` | string | no | The seller's legal/registered international name in English. |
| `seller_id` | string | no | Merchant's unique seller ID for correlation with us. |

### Request example

```json
{
  "payme_client_key": "string",
  "seller_id": "1234",
  "seller_first_name": "string",
  "seller_last_name": "string",
  "seller_social_id": "string",
  "seller_birthdate": "string",
  "seller_social_id_issued": "string",
  "seller_gender": 0,
  "seller_email": "string",
  "seller_phone": "string",
  "seller_contact_email": "string",
  "seller_contact_phone": "string",
  "seller_bank_code ": 0,
  "seller_bank_branch": 0,
  "seller_bank_account_number": "string",
  "seller_description": "string",
  "seller_site_url": "string",
  "seller_person_business_type": 0,
  "seller_inc": 0,
  "seller_inc_code": "string",
  "seller_retail_type": 1,
  "seller_merchant_name": "string",
  "seller_address_city": "string",
  "seller_address_street": "string",
  "seller_address_street_number": "string",
  "seller_address_country": "string",
  "market_fee": 0,
  "language": "string",
  "seller_plan": "string",
  "seller_registration_date": "string",
  "seller_merchant_name_en": "string"
}
```

## Code samples

### curl

```bash
curl -X POST 'https://sandbox.payme.io/api/create-seller' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "payme_client_key": "string",
  "seller_id": "1234",
  "seller_first_name": "string",
  "seller_last_name": "string",
  "seller_social_id": "string",
  "seller_birthdate": "string",
  "seller_social_id_issued": "string",
  "seller_gender": 0,
  "seller_email": "string",
  "seller_phone": "string",
  "seller_contact_email": "string",
  "seller_contact_phone": "string",
  "seller_bank_code ": 0,
  "seller_bank_branch": 0,
  "seller_bank_account_number": "string",
  "seller_description": "string",
  "seller_site_url": "string",
  "seller_person_business_type": 0,
  "seller_inc": 0,
  "seller_inc_code": "string",
  "seller_retail_type": 1,
  "seller_merchant_name": "string",
  "seller_address_city": "string",
  "seller_address_street": "string",
  "seller_address_street_number": "string",
  "seller_address_country": "string",
  "market_fee": 0,
  "language": "string",
  "seller_plan": "string",
  "seller_registration_date": "string",
  "seller_merchant_name_en": "string"
}'
```

### Node.js

```javascript
const response = await fetch("https://sandbox.payme.io/api/create-seller", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "payme_client_key": "string",
    "seller_id": "1234",
    "seller_first_name": "string",
    "seller_last_name": "string",
    "seller_social_id": "string",
    "seller_birthdate": "string",
    "seller_social_id_issued": "string",
    "seller_gender": 0,
    "seller_email": "string",
    "seller_phone": "string",
    "seller_contact_email": "string",
    "seller_contact_phone": "string",
    "seller_bank_code ": 0,
    "seller_bank_branch": 0,
    "seller_bank_account_number": "string",
    "seller_description": "string",
    "seller_site_url": "string",
    "seller_person_business_type": 0,
    "seller_inc": 0,
    "seller_inc_code": "string",
    "seller_retail_type": 1,
    "seller_merchant_name": "string",
    "seller_address_city": "string",
    "seller_address_street": "string",
    "seller_address_street_number": "string",
    "seller_address_country": "string",
    "market_fee": 0,
    "language": "string",
    "seller_plan": "string",
    "seller_registration_date": "string",
    "seller_merchant_name_en": "string"
  }),
});

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

### Python

```python
import requests

response = requests.post(
    "https://sandbox.payme.io/api/create-seller",
    json={
        "payme_client_key": "string",
        "seller_id": "1234",
        "seller_first_name": "string",
        "seller_last_name": "string",
        "seller_social_id": "string",
        "seller_birthdate": "string",
        "seller_social_id_issued": "string",
        "seller_gender": 0,
        "seller_email": "string",
        "seller_phone": "string",
        "seller_contact_email": "string",
        "seller_contact_phone": "string",
        "seller_bank_code ": 0,
        "seller_bank_branch": 0,
        "seller_bank_account_number": "string",
        "seller_description": "string",
        "seller_site_url": "string",
        "seller_person_business_type": 0,
        "seller_inc": 0,
        "seller_inc_code": "string",
        "seller_retail_type": 1,
        "seller_merchant_name": "string",
        "seller_address_city": "string",
        "seller_address_street": "string",
        "seller_address_street_number": "string",
        "seller_address_country": "string",
        "market_fee": 0,
        "language": "string",
        "seller_plan": "string",
        "seller_registration_date": "string",
        "seller_merchant_name_en": "string",
    },
)

print(response.text)
```

### PHP

```php
<?php

$body = <<<'BODY'
{
  "payme_client_key": "string",
  "seller_id": "1234",
  "seller_first_name": "string",
  "seller_last_name": "string",
  "seller_social_id": "string",
  "seller_birthdate": "string",
  "seller_social_id_issued": "string",
  "seller_gender": 0,
  "seller_email": "string",
  "seller_phone": "string",
  "seller_contact_email": "string",
  "seller_contact_phone": "string",
  "seller_bank_code ": 0,
  "seller_bank_branch": 0,
  "seller_bank_account_number": "string",
  "seller_description": "string",
  "seller_site_url": "string",
  "seller_person_business_type": 0,
  "seller_inc": 0,
  "seller_inc_code": "string",
  "seller_retail_type": 1,
  "seller_merchant_name": "string",
  "seller_address_city": "string",
  "seller_address_street": "string",
  "seller_address_street_number": "string",
  "seller_address_country": "string",
  "market_fee": 0,
  "language": "string",
  "seller_plan": "string",
  "seller_registration_date": "string",
  "seller_merchant_name_en": "string"
}
BODY;

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

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

echo $response;
```

## Responses

### 200 — OK (success)

| Field | Type | Description |
| --- | --- | --- |
| `status_code` | number | Status of the request (0 - success, 1 - error) |
| `seller_payme_id` | string | The MPL the authorization will be given for |
| `seller_payme_secret` | string | The seller's secret key |
| `seller_public_key` | object | PayMe seller's public key details |
| `seller_public_key.uuid` | string | PayMe seller's public key |
| `seller_public_key.description` | string | PayMe seller's public key description |
| `seller_public_key.is_active` | boolean | Indicates if the public key is active or not (active = true) |
| `seller_id` | string | The seller's ID |
| `seller_dashboard_signup_link` | string | Link for the signup process |

```json
{
  "status_code": 0,
  "seller_payme_id": "string",
  "seller_payme_secret": "string",
  "seller_public_key": {
    "uuid": "string",
    "description": "string",
    "is_active": true
  },
  "seller_id": "string",
  "seller_dashboard_signup_link": "string"
}
```

### 500 — Internal Server Error (error)

| Field | Type | Description |
| --- | --- | --- |
| `status_code` | number |  |
| `status_error_details` | string |  |
| `status_additional_info` | string |  |
| `status_error_code` | number |  |

```json
{
  "status_code": 0,
  "status_error_details": "string",
  "status_additional_info": null,
  "status_error_code": 0
}
```
