Submerchant

Once the Marketplace transaction has been approved, the sub-merchants will first need to have an iyzico account in order for the money transfer to take place. Since the sub-merchant data is already available at the Marketplace, the data can be sent to the iyzico Onboarding API to create and update a sub-merchant account. The submerchants can be one of the following 3 types: an individual, a private company or a limited/S.A. company. The parameters sent during registration differs with the sub-merchant type. The subMerchantKey that is returned after the sub-merchant registration is a unique value for that sub-merchant and must be recorded within your system as the subMerchantKey will be needed to identify the sub-merchant during the payment process.

All parameters to be sent to iyzico must hold the real values and should not contain any random, testing or imaginary numbers.

PRIVATE_COMPANY Create Request

Parameters to be sent to the service are as follows:

Input Name Data Type Mandatory Description
taxOffice String Yes Tax office of submerchant
legalCompanyTitle String Yes Legal Company Title of submerchant
email String Yes Email of submerchant
address String Yes Address of submerchant
subMerchantExternalId String Yes Merchant provided of submerchant
subMerchantType String Yes Type of submerchant must be PRIVATE_COMPANY
name String No Name of submerchant
gsmNumber String No GSM number of submerchant
iban String No IBAN number of submerchant
identityNumber String No Identity number of submerchant

PRIVATE_COMPANY Create Response

Parameters to be returned from the service are as follows:

Output Name Type Description
subMerchantKey String Key of submerchant
status String Service response result (success / failure)
errorCode String Error code if service response status is failure
errorMessage String Error message if service response status is failure
errorGroup String Error group if service response status is failure
locale String Language (default: tr)
systemTime Integer Response system timestamp value
conversationId String If set, conversation ID to match request and response

PRIVATE_COMPANY Sample Codes

Sample codes that can be found in iyzico clients:

$request = new \Iyzipay\Request\CreateSubMerchantRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setSubMerchantExternalId("S49222");
$request->setSubMerchantType(\Iyzipay\Model\SubMerchantType::PRIVATE_COMPANY);
$request->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$request->setTaxOffice("Tax office");
$request->setLegalCompanyTitle("John Doe inc");
$request->setEmail("email@submerchantemail.com");
$request->setGsmNumber("+905350000000");
$request->setName("John's market");
$request->setIban("TR180006200119000006672315");
$request->setIdentityNumber("31300864726");
$request->setCurrency(\Iyzipay\Model\Currency::TL);

$subMerchant = \Iyzipay\Model\SubMerchant::create($request, Config::options());
CreateSubMerchantRequest request = new CreateSubMerchantRequest();
request.Locale = Locale.TR.ToString();
request.ConversationId = "123456789";
request.SubMerchantExternalId = "S49222";
request.SubMerchantType = SubMerchantType.PRIVATE_COMPANY.ToString();
request.Address = "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1";
request.TaxOffice = "Tax office";
request.LegalCompanyTitle = "John Doe inc";
request.Email = "email@submerchantemail.com";
request.GsmNumber = "+905350000000";
request.Name = "John's market";
request.Iban = "TR180006200119000006672315";
request.IdentityNumber = "31300864726";
request.Currency = Currency.TRY.ToString();

SubMerchant subMerchant = SubMerchant.Create(request, options);
CreateSubMerchantRequest request = new CreateSubMerchantRequest();
request.setLocale(Locale.TR.getValue());
request.setConversationId("123456789");
request.setSubMerchantExternalId("S49222");
request.setSubMerchantType(SubMerchantType.PRIVATE_COMPANY.name());
request.setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
request.setTaxOffice("Tax office");
request.setLegalCompanyTitle("John Doe inc");
request.setEmail("email@submerchantemail.com");
request.setGsmNumber("+905350000000");
request.setName("John's market");
request.setIban("TR180006200119000006672315");
request.setIdentityNumber("31300864726");
request.setCurrency(Currency.TRY.name());

SubMerchant subMerchant = SubMerchant.create(request, options);
iyzipay.subMerchant.create({
    locale: Iyzipay.LOCALE.TR,
    conversationId: '123456789',
    subMerchantExternalId: 'S49222',
    subMerchantType: Iyzipay.SUB_MERCHANT_TYPE.PRIVATE_COMPANY,
    address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
    taxOffice: 'Tax office',
    legalCompanyTitle: 'John Doe inc',
    email: 'email@submerchantemail.com',
    gsmNumber: '+905350000000',
    name: 'John\'s market',
    iban: 'TR180006200119000006672315',
    identityNumber: '31300864726',
    currency: Iyzipay.CURRENCY.TRY
}, function (err, result) {
    console.log(err, result);
    done();
});
request = {
    locale: 'tr',
    conversationId: '123456789',
    subMerchantExternalId: 'S49222',
    subMerchantType: Iyzipay::Model::SubMerchantType::PRIVATE_COMPANY,
    address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
    taxOffice: 'Tax office',
    legalCompanyTitle: 'John Doe inc',
    email: 'email@submerchantemail.com',
    gsmNumber: '+905350000000',
    name: 'John\'s market',
    iban: 'TR180006200119000006672315',
    identityNumber: '31300864726',
    currency: Iyzipay::Model::Currency::TRY
}
sub_merchant = Iyzipay::Model::SubMerchant.new.create(request, @options)
request = dict([('locale', 'tr')])
request['conversationId'] = '123456789'
request['subMerchantExternalId'] = 'S49222'
request['subMerchantType'] = 'PRIVATE_COMPANY'
request['address'] = 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1'
request['taxOffice'] = 'Tax Office'
request['legalCompanyTitle'] = 'John Doe inc'
request['email'] = 'email@submerchantemail.com'
request['gsmNumber'] = '+905350000000'
request['name'] = 'John\'s market'
request['iban'] = 'TR180006200119000006672315'
request['identityNumber'] = '31300864726'
request['currency'] = 'TRY'

sub_merchant = iyzipay.SubMerchant()
sub_merchant_response = sub_merchant.create(request, options)
//Request
{
    "locale": "tr",
    "conversationId": "123456789",
    "name": "John's market",
    "email": "email@submerchantemail.com",
    "gsmNumber": "+905350000000",
    "address": "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1",
    "iban": "TR180006200119000006672315",
    "taxOffice": "Tax office",
    "legalCompanyTitle": "John Doe inc",
    "currency": "TRY",
    "subMerchantExternalId": "S49222",
    "identityNumber": "31300864726",
    "subMerchantType": "PRIVATE_COMPANY"
}

//Response
{
    "status": "success",
    "locale": "tr",
    "systemTime": 1470732341410,
    "conversationId": "123456789",
    "subMerchantKey": "PPFFZPedVQSvaOqZu5xpvpLEqmc="
}

If your sub-merchant is a limited/S.A. company, you’ll need to send the following input parameters to the API in order to complete their registration to iyzico as a limited/S.A. company.

LIMITED_OR_JOINT_STOCK_COMPANY Create Request

Parameters to be sent to the service are as follows:

Input Name Data Type Mandatory Description
taxOffice String Yes Tax office of submerchant
legalCompanyTitle String Yes Legal Company Title of submerchant
email String Yes Email of submerchant
address String Yes Address of submerchant
subMerchantExternalId String Yes Merchant provided of submerchant
subMerchantType String Yes Type of submerchant must be LIMITED_OR_JOINT_STOCK_COMPANY
name String No Name of submerchant
gsmNumber String No GSM number of submerchant
taxNumber String No Tax number of submerchant
iban String No IBAN number of submerchant

LIMITED_OR_JOINT_STOCK_COMPANY Create Response

Parameters to be returned from the service are as follows:

Output Name Type Description
subMerchantKey String Key of submerchant
status String Service response result (success / failure)
errorCode String Error code if service response status is failure
errorMessage String Error message if service response status is failure
errorGroup String Error group if service response status is failure
locale String Language (default: tr)
systemTime Integer Response system timestamp value
conversationId String If set, conversation ID to match request and response

LIMITED_OR_JOINT_STOCK_COMPANY Sample Codes

Sample codes that can be found in iyzico clients:

$request = new \Iyzipay\Request\CreateSubMerchantRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setSubMerchantExternalId("AS49224");
$request->setSubMerchantType(\Iyzipay\Model\SubMerchantType::LIMITED_OR_JOINT_STOCK_COMPANY);
$request->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$request->setTaxOffice("Tax office");
$request->setTaxNumber("9261877");
$request->setLegalCompanyTitle("XYZ inc");
$request->setEmail("email@submerchantemail.com");
$request->setGsmNumber("+905350000000");
$request->setName("John's market");
$request->setIban("TR180006200119000006672315");
$request->setCurrency(\Iyzipay\Model\Currency::TL);

$subMerchant = \Iyzipay\Model\SubMerchant::create($request, Config::options());
CreateSubMerchantRequest request = new CreateSubMerchantRequest();
request.Locale = Locale.TR.ToString();
request.ConversationId = "123456789";
request.SubMerchantExternalId = "AS49224";
request.SubMerchantType = SubMerchantType.LIMITED_OR_JOINT_STOCK_COMPANY.ToString();
request.Address = "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1";
request.TaxOffice = "Tax office";
request.TaxNumber = "9261877";
request.LegalCompanyTitle = "XYZ inc";
request.Email = "email@submerchantemail.com";
request.GsmNumber = "+905350000000";
request.Name = "John's market";
request.Iban = "TR180006200119000006672315";
request.Currency = Currency.TRY.ToString();

SubMerchant subMerchant = SubMerchant.Create(request, options);
CreateSubMerchantRequest request = new CreateSubMerchantRequest();
request.setLocale(Locale.TR.getValue());
request.setConversationId("123456789");
request.setSubMerchantExternalId("AS49224");
request.setSubMerchantType(SubMerchantType.LIMITED_OR_JOINT_STOCK_COMPANY.name());
request.setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
request.setTaxOffice("Tax office");
request.setTaxNumber("9261877");
request.setLegalCompanyTitle("XYZ inc");
request.setEmail("email@submerchantemail.com");
request.setGsmNumber("+905350000000");
request.setName("John's market");
request.setIban("TR180006200119000006672315");
request.setCurrency(Currency.TRY.name());

SubMerchant subMerchant = SubMerchant.create(request, options);
iyzipay.subMerchant.create({
    locale: Iyzipay.LOCALE.TR,
    conversationId: '123456789',
    subMerchantExternalId: 'AS49224',
    subMerchantType: Iyzipay.SUB_MERCHANT_TYPE.LIMITED_OR_JOINT_STOCK_COMPANY,
    address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
    taxOffice: 'Tax office',
    taxNumber: '9261877',
    legalCompanyTitle: 'XYZ inc',
    email: 'email@submerchantemail.com',
    gsmNumber: '+905350000000',
    name: 'John\'s market',
    iban: 'TR180006200119000006672315',
    currency: Iyzipay.CURRENCY.TRY
}, function (err, result) {
    console.log(err, result);
    done();
});
request = {
    locale: 'tr',
    conversationId: '123456789',
    subMerchantExternalId: 'AS49224',
    subMerchantType: Iyzipay::Model::SubMerchantType::LIMITED_OR_JOINT_STOCK_COMPANY,
    address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
    taxOffice: 'Tax office',
    taxNumber: '9261877',
    legalCompanyTitle: 'XYZ inc',
    email: 'email@submerchantemail.com',
    gsmNumber: '+905350000000',
    name: 'John\'s market',
    iban: 'TR180006200119000006672315',
    currency: Iyzipay::Model::Currency::TRY
}
sub_merchant = Iyzipay::Model::SubMerchant.new.create(request, @options)
request = dict([('locale', 'tr')])
request['conversationId'] = '123456789'
request['subMerchantExternalId'] = 'AS49224'
request['subMerchantType'] = 'LIMITED_OR_JOINT_STOCK_COMPANY'
request['address'] = 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1'
request['taxOffice'] = 'Tax Office'
request['taxNumber'] = '9261877'
request['legalCompanyTitle'] = 'XYZ inc'
request['email'] = 'email@submerchantemail.com'
request['gsmNumber'] = '+905350000000'
request['name'] = 'John\'s market'
request['iban'] = 'TR180006200119000006672315'
request['currency'] = 'TRY'

sub_merchant = iyzipay.SubMerchant()
sub_merchant_response = sub_merchant.create(request, options)
//Request
{
    "locale": "tr",
    "conversationId": "123456789",
    "name": "John's market",
    "email": "email@submerchantemail.com",
    "gsmNumber": "+905350000000",
    "address": "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1",
    "iban": "TR180006200119000006672315",
    "taxOffice": "Tax office",
    "legalCompanyTitle": "XYZ inc",
    "currency": "TRY",
    "subMerchantExternalId": "AS49224",
    "taxNumber": "9261877",
    "subMerchantType": "LIMITED_OR_JOINT_STOCK_COMPANY"
}

//Response
{
    "status": "success",
    "locale": "tr",
    "systemTime": 1470732401915,
    "conversationId": "123456789",
    "subMerchantKey": "jsLbNEUu8XOKyxLdqqqqHUuu9bQ="
}

Once a sub-merchant has been registered to iyzico, their status can be updated by sending the parameters mentioned in the registration process.

  • The subMerchantKey must be sent to iyzico in order to update the status of the sub-merchant in question.
  • The IBAN of the sub-merchant must be sent to iyzico in the correct format during the update.
  • Once registered, the sub-merchant type can not be changed. If an individual sub-merchant needs to be changed into a private or limited/S.A. company, a new type of sub-merchant must be registered to iyzico and their related subMerchantKeys must be saved by the client.

Examples for Individual, Private and Limited/S.A. sub-merchant updates can be found below.

To update private companies,

PRIVATE_COMPANY Update Request

Parameters to be sent to the service are as follows:

Input Name Data Type Mandatory Description
taxOffice String Yes Tax office of submerchant
legalCompanyTitle String Yes Legal Company Title of submerchant
email String Yes Email of submerchant
address String Yes Address of submerchant
subMerchantExternalId String Yes Merchant provided of submerchant
subMerchantKey String Yes Key of submerchant
identityNumber String No Identity number of submerchant
name String No Name of submerchant
gsmNumber String No GSM number of submerchant
iban String No IBAN number of submerchant

PRIVATE_COMPANY Update Response

Parameters to be returned from the service are as follows:

Output Name Type Description
status String Service response result (success / failure)
errorCode String Error code if service response status is failure
errorMessage String Error message if service response status is failure
errorGroup String Error group if service response status is failure
locale String Language (default: tr)
systemTime Integer Response system timestamp value
conversationId String If set, conversation ID to match request and response

PRIVATE_COMPANY Sample Codes

Sample codes that can be found in iyzico clients:

$request = new \Iyzipay\Request\UpdateSubMerchantRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setSubMerchantKey("sub merchant key");
$request->setIban("TR630006200027700006678204");
$request->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$request->setContactName("Jane");
$request->setContactSurname("Doe");
$request->setEmail("email@submerchantemail.com");
$request->setGsmNumber("+905350000000");
$request->setName("Jane's market");
$request->setIdentityNumber("31300864726");
$request->setCurrency(\Iyzipay\Model\Currency::TL);

$subMerchant = \Iyzipay\Model\SubMerchant::update($request, Config::options());
UpdateSubMerchantRequest request = new UpdateSubMerchantRequest();
request.Locale = Locale.TR.ToString();
request.ConversationId = "123456789";
request.SubMerchantKey = "sub merchant key";
request.Address = "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1";
request.TaxOffice = "Tax office";
request.LegalCompanyTitle = "Jane Doe inc";
request.Email = "email@submerchantemail.com";
request.GsmNumber = "+905350000000";
request.Name = "Jane's market";
request.Iban = "TR180006200119000006672315";
request.IdentityNumber = "31300864726";
request.Currency = Currency.TRY.ToString();

SubMerchant subMerchant = SubMerchant.Update(request, options);
UpdateSubMerchantRequest request = new UpdateSubMerchantRequest();
request.setLocale(Locale.TR.getValue());
request.setConversationId("123456789");
request.setSubMerchantKey("sub merchant key");
request.setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
request.setTaxOffice("Tax office");
request.setLegalCompanyTitle("Jane Doe inc");
request.setEmail("email@submerchantemail.com");
request.setGsmNumber("+905350000000");
request.setName("Jane's market");
request.setIban("TR180006200119000006672315");
request.setIdentityNumber("31300864726");
request.setCurrency(Currency.TRY.name());

SubMerchant subMerchant = SubMerchant.update(request, options);
iyzipay.subMerchant.update({
    locale: Iyzipay.LOCALE.TR,
    conversationId: '123456789',
    subMerchantKey: 'sub merchant key',
    address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
    taxOffice: 'Tax office',
    legalCompanyTitle: 'Jane Doe inc',
    email: 'email@submerchantemail.com',
    gsmNumber: '+905350000000',
    name: 'Jane\'s market',
    iban: 'TR180006200119000006672315',
    identityNumber: '31300864726',
    currency: Iyzipay.CURRENCY.TRY
}, function (err, result) {
    console.log(err, result);
    done();
});
request = {
    locale: 'tr',
    conversationId: '123456789',
    subMerchantExternalId: 'S49222',
    subMerchantKey: 'sub merchant key',
    address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
    taxOffice: 'Tax office',
    legalCompanyTitle: 'Jane Doe inc',
    email: 'email@submerchantemail.com',
    gsmNumber: '+905350000000',
    name: 'Jane\'s market',
    iban: 'TR180006200119000006672315',
    identityNumber: '31300864726',
    currency: Iyzipay::Model::Currency::TRY
}
sub_merchant = Iyzipay::Model::SubMerchant.new.update(request, @options)
request = dict([('locale', 'tr')])
request['conversationId'] = '123456789'
request['subMerchantKey'] = 'sub merchant key'
request['address'] = 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1'
request['taxOffice'] = 'Tax Office'
request['legalCompanyTitle'] = 'John Doe inc'
request['email'] = 'email@submerchantemail.com'
request['gsmNumber'] = '+905350000000'
request['name'] = 'John\'s market'
request['iban'] = 'TR180006200119000006672315'
request['identityNumber'] = '31300864726'
request['currency'] = 'TRY'

sub_merchant = iyzipay.SubMerchant()
sub_merchant_response = sub_merchant.update(request, options)
//Request
{
    "locale": "tr",
    "conversationId": "123456789",
    "name": "Jane's market",
    "email": "email@submerchantemail.com",
    "gsmNumber": "+905350000000",
    "address": "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1",
    "iban": "TR180006200119000006672315",
    "taxOffice": "Tax office",
    "legalCompanyTitle": "Jane Doe inc",
    "currency": "TRY",
    "subMerchantKey": "PPFFZPedVQSvaOqZu5xpvpLEqmc=",
    "identityNumber": "31300864726"
}

//Response
{
    "status": "success",
    "locale": "tr",
    "systemTime": 1470732942251,
    "conversationId": "123456789"
}

To update limited or S.A. companies,

LIMITED_OR_JOINT_STOCK_COMPANY Update Request

Parameters to be sent to the service are as follows:

Input Name Data Type Mandatory Description
legalCompanyTitle String Yes Legal Company Title of submerchant
email String Yes Email of submerchant
address String Yes Address of submerchant
subMerchantExternalId String Yes Merchant provided of submerchant
subMerchantKey String Yes Key of submerchant must be
taxOffice String Yes Tax office of submerchant
iban String No IBAN number of submerchant
name String No Name of submerchant
gsmNumber String No GSM number of submerchant
taxNumber String No Tax number of submerchant

LIMITED_OR_JOINT_STOCK_COMPANY Update Response

Parameters to be returned from the service are as follows:

Output Name Type Description
status String Service response result (success / failure)
errorCode String Error code if service response status is failure
errorMessage String Error message if service response status is failure
errorGroup String Error group if service response status is failure
locale String Language (default: tr)
systemTime Integer Response system timestamp value
conversationId String If set, conversation ID to match request and response

LIMITED_OR_JOINT_STOCK_COMPANY Sample Codes

Sample codes that can be found in iyzico clients:

$request = new \Iyzipay\Request\UpdateSubMerchantRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setSubMerchantKey("sub merchant key");
$request->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$request->setTaxOffice("Tax office");
$request->setTaxNumber("9261877");
$request->setLegalCompanyTitle("ABC inc");
$request->setEmail("email@submerchantemail.com");
$request->setGsmNumber("+905350000000");
$request->setName("Jane's market");
$request->setIban("TR180006200119000006672315");
$request->setCurrency(\Iyzipay\Model\Currency::TL);

$subMerchant = \Iyzipay\Model\SubMerchant::update($request, Config::options());
UpdateSubMerchantRequest request = new UpdateSubMerchantRequest();
request.Locale = Locale.TR.ToString();
request.ConversationId = "123456789";
request.SubMerchantKey = "sub merchant key";
request.Address = "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1";
request.TaxOffice = "Tax office";
request.TaxNumber = "9261877";
request.LegalCompanyTitle = "ABC inc";
request.Email = "email@submerchantemail.com";
request.GsmNumber = "+905350000000";
request.Name = "Jane's market";
request.Iban = "TR180006200119000006672315";
request.Currency = Currency.TRY.ToString();

SubMerchant subMerchant = SubMerchant.Update(request, options);
UpdateSubMerchantRequest request = new UpdateSubMerchantRequest();
request.setLocale(Locale.TR.getValue());
request.setConversationId("123456789");
request.setSubMerchantKey("sub merchant key");
request.setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
request.setTaxOffice("Tax office");
request.setTaxNumber("9261877");
request.setLegalCompanyTitle("ABC inc");
request.setEmail("email@submerchantemail.com");
request.setGsmNumber("+905350000000");
request.setName("Jane's market");
request.setIban("TR180006200119000006672315");
request.setCurrency(Currency.TRY.name());

SubMerchant subMerchant = SubMerchant.update(request, options);
iyzipay.subMerchant.update({
    locale: Iyzipay.LOCALE.TR,
    conversationId: '123456789',
    subMerchantKey: 'sub merchant key',
    address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
    taxOffice: 'Tax office',
    taxNumber: '9261877',
    legalCompanyTitle: 'ABC inc',
    email: 'email@submerchantemail.com',
    gsmNumber: '+905350000000',
    name: 'Jane\'s market',
    iban: 'TR180006200119000006672315',
    currency: Iyzipay.CURRENCY.TRY
}, function (err, result) {
    console.log(err, result);
    done();
});
request = {
    locale: Iyzipay::Model::Locale::TR,
    conversationId: '123456789',
    subMerchantKey: 'sub merchant key',
    address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
    taxOffice: 'Tax office',
    taxNumber: '9261877',
    legalCompanyTitle: 'ABC inc',
    email: 'email@submerchantemail.com',
    gsmNumber: '+905350000000',
    name: 'Jane\'s market',
    iban: 'TR180006200119000006672315',
    currency: Iyzipay::Model::Currency::TRY
}
sub_merchant = Iyzipay::Model::SubMerchant.new.update(request, @options)
request = dict([('locale', 'tr')])
request['conversationId'] = '123456789'
request['subMerchantKey'] = 'sub merchant key'
request['address'] = 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1'
request['taxOffice'] = 'Tax Office'
request['taxNumber'] = '9261877'
request['legalCompanyTitle'] = 'ABC inc'
request['email'] = 'email@submerchantemail.com'
request['gsmNumber'] = '+905350000000'
request['name'] = 'John\'s market'
request['iban'] = 'TR180006200119000006672315'
request['currency'] = 'TRY'

sub_merchant = iyzipay.SubMerchant()
sub_merchant_response = sub_merchant.update(request, options)
//Request
{
    "locale": "tr",
    "conversationId": "123456789",
    "name": "Jane's market",
    "email": "email@submerchantemail.com",
    "gsmNumber": "+905350000000",
    "address": "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1",
    "iban": "TR180006200119000006672315",
    "taxOffice": "Tax office",
    "legalCompanyTitle": "ABC inc",
    "currency": "TRY",
    "subMerchantKey": "jsLbNEUu8XOKyxLdqqqqHUuu9bQ=",
    "taxNumber": "9261877"
}

//Response
{
    "status": "success",
    "locale": "tr",
    "systemTime": 1470733009785,
    "conversationId": "123456789"
}

Merchants can retrieve the registered submerchants data via retrieve submerchant request.

Retrieve Submerchant Request

Parameters to be sent to the service are as follows:

Input Name Data Type Mandatory Description
subMerchantExternalId String Yes Merchant provided of submerchant
conversationId String No If set, conversation ID to match request and response
locale String No Language (default: tr)

Retrieve Submerchant Response

Parameters to be returned from the service are as follows:

Input Name Data Type Description
name String Name of submerchant
gsmNumber String GSM number of submerchant
taxOffice String Tax office of submerchant
taxNumber String Tax number of submerchant
legalCompanyTitle String Legal Company Title of submerchant
email String Email of submerchant
address String Address of submerchant
iban String IBAN number of submerchant
subMerchantExternalId String Merchant provided of submerchant
subMerchantKey String Key of submerchant must be
status String Service response result (success / failure)
errorCode String Error code if service response status is failure
errorMessage String Error message if service response status is failure
errorGroup String Error group if service response status is failure
locale String Language (default: tr)
systemTime Integer Response system timestamp value
conversationId String If set, conversation ID to match request and response

Retrieve Submerchant Sample Codes

Sample codes that can be found in iyzico clients:

$request = new \Iyzipay\Request\UpdateSubMerchantRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setSubMerchantKey("sub merchant key");
$request->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$request->setTaxOffice("Tax office");
$request->setTaxNumber("9261877");
$request->setLegalCompanyTitle("ABC inc");
$request->setEmail("email@submerchantemail.com");
$request->setGsmNumber("+905350000000");
$request->setName("Jane's market");
$request->setIban("TR180006200119000006672315");
$request->setCurrency(\Iyzipay\Model\Currency::TL);

$subMerchant = \Iyzipay\Model\SubMerchant::update($request, Config::options());
RetrieveSubMerchantRequest request = new RetrieveSubMerchantRequest();
request.Locale = Locale.TR.ToString();
request.ConversationId = "123456789";
request.SubMerchantExternalId = "AS49224";

SubMerchant subMerchant = SubMerchant.Retrieve(request, options);
RetrieveSubMerchantRequest request = new RetrieveSubMerchantRequest();
request.setLocale(Locale.TR.getValue());
request.setConversationId("123456789");
request.setSubMerchantExternalId("AS49224");

SubMerchant subMerchant = SubMerchant.retrieve(request, options);
iyzipay.subMerchant.retrieve({
    locale: Iyzipay.LOCALE.TR,
    conversationId: '123456789',
    subMerchantExternalId: 'AS49224'
}, function (err, result) {
    console.log(err, result);
    done();
});
request = {
    locale: 'tr',
    conversationId: '123456789',
    subMerchantExternalId: 'AS49224'
}
sub_merchant = Iyzipay::Model::SubMerchant.new.retrieve(request, @options)
request = dict([('locale', 'tr')])
request['conversationId'] = '123456789'
request['subMerchantExternalId'] = 'AS49224'

sub_merchant = iyzipay.SubMerchant()
sub_merchant_response = sub_merchant.retrieve(request, options)
//Request
{
    "locale": "tr",
    "conversationId": "123456789",
    "subMerchantExternalId": "S49222"
}

//Response
{
    "status": "success",
    "locale": "tr",
    "systemTime": 1470733133885,
    "conversationId": "123456789",
    "name": "Jane's market",
    "email": "email@submerchantemail.com",
    "gsmNumber": "+905350000000",
    "address": "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1",
    "iban": "TR180006200119000006672315",
    "bankCountry": "TR",
    "currency": "TRY",
    "taxOffice": "Tax office",
    "legalCompanyTitle": "Jane Doe inc",
    "subMerchantExternalId": "S49222",
    "identityNumber": "31300864726",
    "subMerchantType": "PRIVATE_COMPANY",
    "subMerchantKey": "PPFFZPedVQSvaOqZu5xpvpLEqmc="
}

Questions

If you have questions about this service, get in touch with us and find out how we can help you.