Create Direct Dealer
Service Address
/Dealer/CreateDirectDealer
Request Parameters
PaymentDealerAuthentication
Parameter | Explanation |
---|---|
DealerCode(string) | Dealer code issued by the Moka system |
Username (string) | Api username given by Moka system |
Password (string) | Api password given by Moka system |
CheckKey (string) | The control key (DealerCode + "MK" + Username + "PD" + Password) is created by passing this information, combined as a String, through the SHA-256 hash algorithm. Click here to go to the trial screen. |
PaymentDealerRequest
Parameter | Explanation |
---|---|
DealerType (integer) | 1 : Real Person (No Tax Plate), 2 : Legal Entity (Ltd.A.Ş), 3: Legal Entity (Personal Firm) (Mandatory) |
TRIdentityNumber (string) | Tc Identity Number (11 digits), Mandatory for natural person |
IndividualName (string) | Name Surname (max 50 chars), Mandatory for natural person |
TaxNumber (string) | Tax Number (10 digits), Mandatory for legal entity) |
CompanyName (string) | Company Name (max 100 chars), Mandatory for legal person |
ContactName (string) | Authorized Name (max 50 chars), Mandatory for legal person |
Email (string) | Reseller email address (max 100 chars). (Compulsory) |
PhoneNumber (string) | Dealer phone number (in the format 5351112233). (Compulsory) |
CityCode (integer) | The license plate code of the city where the dealer is located. (Compulsory) |
CountryCode (integer) | Code of the country where the dealer is located, optional, 212:Turkey, 232:Cyprus, default 212 if no value is given. |
Address (string) | The full address of the dealer (Mah., Cad., Sok., Flat information). (Required) (max 200 chars) |
IBanFullName (string) | The name and surname of the account holder to whom the money will be deposited. (Compulsory) |
IBan (string) | The bank account number to which the money will be deposited. (It must be sent as 24 digits without typing TR. EX: 112233445566778899001122) (Mandatory) |
BlockedDayNumber (integer) | It is the information of how long after the dealer's money will be deposited. For example, if this field is given the value 1 and the payment is made on Monday, the money will be deposited into the dealer's account on Wednesday. For the same scenario, if the value is given as 4 (Wednesday:1, Thursday:2, Friday:3, Saturday:4), the money will be credited to the account on Monday, since it will be credited to the account on a working day. The default of this field is 0, which means it will go to bed the next day. (Optional) |
PaymentDaysOfWeek (string) | What days of the week will this reseller be paid? (0: No restrictions, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, '1,2,3,4,5 values are simultaneously separated by commas. can be sent.' (Optional) |
MokaPosProposalTemplateLimitId (integer) | It is an ID that Moka will give you. It allows the dealer to define his limits. (Compulsory) |
MokaPosProposalTemplateRateId (integer) | It is an ID that Moka will give you. It allows the dealer's commission rates to be defined. (Compulsory) |
NOTE: TRIdentityNumber and IBan parameters are correct. You must send a valid Iban and TC ID number. |
Returns
Parameter | Explanation |
---|---|
DealerCode (string) | Reseller API code |
Username (string) | Reseller API username (15 chars) |
Password (string) | Reseller API password (20 chars) |
Sample Request (JSON)
{
"DealerAuthentication":{
"DealerCode":"xxx",
"Username":"xxx",
"Password":"xxx",
"CheckKey":"16ad326fcd85e6bbe946ac55d5638ab239da7efa9145d2f4cd57939c9e8de430"
},
"DealerRequest":{
"DealerType":2,
"TaxNumber":"0123456789",
"CompanyName":"Moka Ödeme Kuruluşu",
"ContactName":"Ali Aydın",
"Email":"moka.operasyon@moka.com",
"PhoneNumber":"5300000000",
"MokaPosProposalTemplateLimitId":"3",
"MokaPosProposalTemplateRateId":"1",
"IBan":"1010111200000000664446903",
"IBanFullName":"Elif Deneme",
"BlockedDayNumber":"2",
"CityCode":"34",
"Address":"Cumhuriyet Mahallesi Adnan Menderes Caddesi NO:22/C Taşdelen,Çekmeköy/İstanbul"
}
}
Successful Request Result
If the sent request data has been processed successfully in Moka, "Success" information is written in the "ResultCode" field of the return object . In the "Data" field, the result of the transaction returned from the bank is found. The status of the operation is checked by checking the "IsSuccessful" (true/false) field in "Data" . If this field returns false, it can be seen why the operation failed on the virtual pos by checking the ResultCode and ResultMessage fields in the same object.
Successful Result Example
{
"Data":{
"DealerCode":"2251",
"Username":"09a577f9-355d-4",
"Password":"55678f3a-68ad-4dbe-8"
},
"ResultCode":"Success",
"ResultMessage":"",
"Exception":null
}
Failed Request Result
If the sent request data could not be processed in Moka streams, the "ResultCode" field of the return object contains one of the error codes in the table below.
When an unexpected software error occurs, EX is written in the "ResultCode" field and the error message (Exception) is displayed in the "ResultMessage" field
In both cases, the "Data" object arrives as null.
ResultCode | Explanation |
---|---|
Dealer.CheckDealerAuthentication.InvalidRequest | The CheckKey may be bad, or the object may be bad, or the JSON may be corrupt |
Dealer.CreateDirectDealer.MissingRequest | Missing request information |
Dealer.CreateDirectDealer.InvalidAccount | No such dealer was found, Dealer code, dealer username and/or password were entered incorrectly. |
Dealer.CreateDirectDealer.TRIdentityNumberIsRequired | TR ID number is required |
Dealer.CreateDirectDealer.InvalidTRIdentityNumber | TR ID number is invalid |
Dealer.CreateDirectDealer.TaxNumberIsRequired | Tax number required |
Dealer.CreateDirectDealer.InvalidTaxNumber | Vergi numarası geçersiz |
Dealer.CreateDirectDealer.CompanyNameIsRequired | Invalid tax number |
Dealer.CreateDirectDealer.ContactNameIsRequired | Company name required |
Dealer.CreateDirectDealer.DealerTypeIsRequired | Name of authorized person required |
Dealer.CreateDirectDealer.EmailIsRequired | Merchant type required |
Dealer.CreateDirectDealer.InvalidEmailFormat | Email address required |
Dealer.CreateDirectDealer.PhoneNumberIsRequired | Email format is invalid |
Dealer.CreateDirectDealer.InvalidPhoneNumber | Phone number is invalid |
Dealer.CreateDirectDealer.CityCodeRequired | City code required |
Dealer.CreateDirectDealer.InvalidCityCodeOrCountryCode | City code or country code is invalid |
Dealer.CreateDirectDealer.AddressIsRequired | Address information required |
Dealer.CreateDirectDealer.AddressIsNoMoreThan200Characters | Address information should not exceed 200 characters. |
Dealer.CreateDirectDealer.IBanFullNameIsRequired | The full name of the account holder to which the funds will be deposited is required |
Dealer.CreateDirectDealer.IBanIsRequired | IBAN number required |
Dealer.CreateDirectDealer.IBanIsFalse | The IBAN number was entered incorrectly. |
Dealer.CreateDirectDealer.CreateDirectDealerNotAllowed | The merchant does not have the authority to create a marketplace sub-merchant. |
Dealer.CreateDirectDealer.MokaPosProposalTemplateLimitIdIsRequired | Id required to define the limits of the merchant |
Dealer.CreateDirectDealer.MokaPosProposalTemplateRateIdIsRequired | Id required to define the commission rates of the merchant |
Dealer.CreateDirectDealer.InvalidMokaPosProposalTemplateRateId | The Id that defines the commission rates of the merchant is invalid. |
Dealer.CreateDirectDealer.InvalidMokaPosProposalTemplateLimitId | The Id that defines the limits of the merchant is invalid. |
Dealer.CreateDirectDealer.InvalidTemplates | Templates are invalid |
Dealer.CreateDirectDealer.OperationWasInterrupted | The operation was interrupted. |
EX | An unexpected error has occurred. |
Example of Failed Result
{
"Data":null,
"ResultCode":"Dealer.CreateDealer.EmailIsRequired ",
"ResultMessage":"",
"Exception":null
}