# Submerchant

After the approval of the marketplace transaction, submerchants are required to have records at iyzico APIs to facilitate the money transfer. Since the merchant already has access to the submerchant details such like, email, address, name, taxoffice, it can be seamlessly transmitted to the iyzico Onboarding API for submerchant account creation and updates.

### Submerchant Services

* [Submerchant Creation](#post-onboarding-submerchant)
* [Submerchant Update](https://docs.iyzico.com/en/products/marketplace/marketplace-implementation/submerchant/submerchant-update)
* [Submerchant Details](https://docs.iyzico.com/en/products/marketplace/marketplace-implementation/submerchant/alt-uye-sorgulama)
* [Submerchant Price / Item Update](https://docs.iyzico.com/en/products/marketplace/marketplace-implementation/submerchant/alt-uye-sorgulama-1)

### Submerchant Creation

Possible submerchants can be one of the following 3 types: &#x20;

1. **PERSONAL**
2. **PRIVATE COMPANY**
3. **LIMITED OR JOINT STOCK COMPANY**

The parameters sent during the sub-merchant registration process may vary depending on the specific transaction type. Upon the completion of a sub-merchant registration, the response will include a unique **subMerchantKey** assigned to that particular seller. It is **essential** to securely store this value within your system, as you will need to provide the `subMerchantKey` when identifying the seller during the payment process.

{% hint style="info" %}
When transmitting parameters to iyzico, it is crucial to ensure that all values are genuine and accurately reflect the required information. Please refrain from sending random, test, or non-authentic data.
{% endhint %}

## Create Submerchant

> Creates a submerchant for the marketplace model. Supported types are \*\*PERSONAL\*\*, \*\*PRIVATE\_COMPANY\*\*, and \*\*LIMITED\_OR\_JOINT\_STOCK\_COMPANY\*\*. The subme rchant type is selected via the \*\*subMerchantType\*\* parameter.<br>

```json
{"openapi":"3.0.3","info":{"title":"Marketplace - Submerchant Create & Update - Approve","version":"1.3.3"},"servers":[{"url":"https://api.iyzipay.com","description":"iyzico API"}],"paths":{"/onboarding/submerchant":{"post":{"summary":"Create Submerchant","description":"Creates a submerchant for the marketplace model. Supported types are **PERSONAL**, **PRIVATE_COMPANY**, and **LIMITED_OR_JOINT_STOCK_COMPANY**. The subme rchant type is selected via the **subMerchantType** parameter.\n","tags":["Marketplace"],"parameters":[{"$ref":"#/components/parameters/AuthHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmerchantCreateRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmerchantCreateResponse"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"AuthHeader":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Authorization header; a signed hash value that starts with **IYZWSv2** and is generated in Base64 format."},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Request body content type."}},"schemas":{"SubmerchantCreateRequest":{"oneOf":[{"$ref":"#/components/schemas/SubmerchantPersonalRequest"},{"$ref":"#/components/schemas/SubmerchantPrivateCompanyRequest"},{"$ref":"#/components/schemas/SubmerchantLimitedJointRequest"}],"discriminator":{"propertyName":"subMerchantType","mapping":{"PERSONAL":"#/components/schemas/SubmerchantPersonalRequest","PRIVATE_COMPANY":"#/components/schemas/SubmerchantPrivateCompanyRequest","LIMITED_OR_JOINT_STOCK_COMPANY":"#/components/schemas/SubmerchantLimitedJointRequest"}},"description":"The request body varies depending on **subMerchantType**."},"SubmerchantPersonalRequest":{"description":"Personal Submerchant","type":"object","required":["subMerchantType","email","gsmNumber","address","contactName","contactSurname","subMerchantExternalId","identityNumber"],"properties":{"subMerchantType":{"type":"string","enum":["PERSONAL","PRIVATE_COMPANY","LIMITED_OR_JOINT_STOCK_COMPANY"],"description":"Submerchant type. Use PERSONAL for personal accounts."},"name":{"type":"string","description":"Submerchant (store) name."},"email":{"type":"string","description":"Submerchant email."},"gsmNumber":{"type":"string","description":"Submerchant phone."},"address":{"type":"string","description":"Submerchant address."},"iban":{"type":"string","description":"Submerchant IBAN. Must be consistent with **contactName/contactSurname**. If not sent during creation, it must be provided before product approval for payouts.\n"},"contactName":{"type":"string","description":"Contact first name."},"contactSurname":{"type":"string","description":"Contact last name."},"subMerchantExternalId":{"type":"string","description":"External unique id set by the merchant to map your Submerchant."},"identityNumber":{"type":"string","description":"National ID (TCKN)."},"currency":{"type":"string","enum":["TRY","USD","EUR","GBP","RUB","CHF","NOK"],"description":"Currency (default TRY)."},"locale":{"type":"string","enum":["tr","en"],"description":"Response language."},"conversationId":{"type":"string","description":"Correlation id for request/response."}}},"SubmerchantPrivateCompanyRequest":{"description":"Private Company","type":"object","required":["subMerchantType","email","gsmNumber","address","taxOffice","legalCompanyTitle","subMerchantExternalId"],"properties":{"subMerchantType":{"type":"string","enum":["PERSONAL","PRIVATE_COMPANY","LIMITED_OR_JOINT_STOCK_COMPANY"],"description":"Submerchant type. Use \"PRIVATE_COMPANY\" for private companies."},"name":{"type":"string","description":"Submerchant name."},"email":{"type":"string","description":"Submerchant email."},"gsmNumber":{"type":"string","description":"Submerchant phone (E.164)."},"address":{"type":"string","description":"Submerchantt address."},"iban":{"type":"string","description":"Submerchant IBAN. Must match **legalCompanyTitle**. If not sent during creation, it must be provided before product approval for payouts.\n"},"taxOffice":{"type":"string","description":"Tax office."},"taxNumber":{"type":"string","description":"Tax number."},"legalCompanyTitle":{"type":"string","description":"Registered company title."},"subMerchantExternalId":{"type":"string","description":"External unique id set by the merchant."},"identityNumber":{"type":"string","description":"National ID (TCKN)."},"currency":{"type":"string","enum":["TRY","USD","EUR","GBP","RUB","CHF","NOK"],"description":"Currency (default TRY)."},"locale":{"type":"string","enum":["tr","en"]},"conversationId":{"type":"string"}}},"SubmerchantLimitedJointRequest":{"description":"Limited/Joint-Stock Company","type":"object","required":["subMerchantType","email","gsmNumber","address","taxOffice","taxNumber","legalCompanyTitle","subMerchantExternalId"],"properties":{"subMerchantType":{"type":"string","enum":["PERSONAL","PRIVATE_COMPANY","LIMITED_OR_JOINT_STOCK_COMPANY"],"description":"Submerchant type. Use \"LIMITED_OR_JOINT_STOCK_COMPANY\" for LTD/JSC companies."},"name":{"type":"string","description":"Submerchant name."},"email":{"type":"string","description":"Submerchant email."},"gsmNumber":{"type":"string","description":"Submerchant phone."},"address":{"type":"string","description":"Submerchant address."},"iban":{"type":"string","description":"Submerchant IBAN. Must match **legalCompanyTitle**. If not sent during creation, it must be provided before product approval for payouts.\n"},"taxOffice":{"type":"string","description":"Tax office."},"taxNumber":{"type":"string","description":"Tax number."},"legalCompanyTitle":{"type":"string","description":"Registered company title."},"subMerchantExternalId":{"type":"string","description":"External unique id set by the merchant."},"identityNumber":{"type":"string","description":"National ID (TCKN)."},"currency":{"type":"string","enum":["TRY","USD","EUR","GBP","RUB","CHF","NOK"],"description":"Currency (default TRY)."},"locale":{"type":"string","enum":["tr","en"]},"conversationId":{"type":"string"}}},"SubmerchantCreateResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","failure"],"description":"Result."},"locale":{"type":"string","enum":["tr","en"],"description":"Response language."},"systemTime":{"type":"integer","description":"Operation time (epoch ms)."},"conversationId":{"type":"string","description":"ID sent in the request."},"subMerchantKey":{"type":"string","description":"Generated Submerchant key."}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["failure"]},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"locale":{"type":"string","enum":["tr","en"]},"systemTime":{"type":"integer"},"conversationId":{"type":"string"}}}}}}
```

#### Sample Codes

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><a href="https://github.com/iyzico/iyzipay-php/blob/master/samples/create_sub_merchant.php">PHP</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-java/blob/master/src/test/java/com/iyzipay/sample/SubMerchantSample.java">Java</a></td></tr><tr><td></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-node/blob/master/samples/IyzipaySamples.js#L1185">Node.Js</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-python/tree/master/samples">Python</a></td></tr><tr><td><a href="https://www.postman.com/iyzico/iyzico/folder/chsu7gd/1-1-create-submerchant">Postman</a></td></tr></tbody></table>
