Service Address
/PaymentDealer/UpdateDealerPaymentMarketPlace
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 |
OtherTrxCode (string) (optional) |
You can submit your own Unique Transaction Code in this field for reconciliation. Note: You can find out the payment status by using this code while getting the dealer payment detail list. |
Software (string) |
The name of the e-commerce package or software that you call this service integrated with the Moka payment system. (Max 30 characters) |
Description (string) |
Description field. If you want to write a description about the payment, it can be written in this field. (Up to 200 characters can be written.) |
CommissionScenario (integer) |
It is the commission option that is decided by the top dealer and tells how the commissions to be deducted from the sub-dealers that have participated in this sale will be calculated. |
BuyerInformation (Array)(optional) |
These are the fields related to the customer who buys a product/service from our dealer. Although it is not mandatory to send these fields, sharing them with Moka is in the interests of both our dealer and Moka in case of future payment related problems.
BuyerFullName (string) | Optional field. Name and surname of the recipient |
BuyerEmail (string) | Optional field. Recipient's e-mail address. |
BuyerGsmNumber (string) | Optional field. It is the mobile phone number of the recipient. It must be entered as 10 digits, without spaces. |
BuyerAddress (string) | Optional field. It is the address of the recipient. |
|
SubDealer (Array - List) |
DealerId (integer) | It is the dealer number of the sub-dealer that will receive the payment. |
Amount (decimal) | It is the transaction amount of the sub-dealer within the main amount. |
DealerCommissionRate (decimal) | It is the percentage commission rate that will be deducted from the sub-dealer. |
DealerCommissionAmount (decimal) | It is the TL commission rate to be deducted from the sub-dealer. |
DealerCommissionFixedAmount (decimal) | The fixed commission to be deducted from the sub-dealer is TL amount. |
GroupRevenueRate (decimal) | It is the percentage revenue rate that the top dealer requests instantly for a payment. |
GroupRevenueAmount (decimal) | It is the TL income amount that the top dealer requests instantly for a payment. |
AmountToBeCommissioned (decimal) | It is the amount to which the commission desired to be reflected to the sub-dealer will be applied. |
IsIncludedFixedAmount (integer) | If there is a fixed amount defined for the parent dealer and it is requested to be added to the payment of this sub dealer, this field 1 is sent. If it will not be added, it is left blank or sent as 0 |
|
Sample Request (JSON)
{
"PaymentDealerAuthentication":{
"DealerCode":"XXX",
"Username":"XXX",
"Password":"XXX",
"CheckKey":"28ba1f316e661ee7a0477a13aa30613da548c94a8098829af9255b04d7e916e3"
},
"PaymentDealerRequest":{
"OtherTrxCode":"20201221172055",
"Software":"Possimulation",
"Description":"",
"CommissionScenario":2,
"BuyerInformation":{
"BuyerFullName":"",
"BuyerGsmNumber":"",
"BuyerEmail":"",
"BuyerAddress":"Tasdelen / Çekmeköy"
},
"SubDealer":[
{
"DealerId":167,
"Amount":150,
"DealerCommissionRate":"2.00",
"DealerCommissionAmount":"",
"DealerCommissionFixedAmount":"0",
"GroupRevenueRate":"",
"GroupRevenueAmount":"",
"AmountToBeCommissioned":"",
"IsIncludedFixedAmount":""
}
]
}
}
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. In case of a successful transaction from the bank, the code from the VirtualPosOrderId field in the same object should be stored. Cancellation, refund or pool payment confirmation transactions,
Successful Result Example
{
"Data":{
"DealerPaymentId":64318,
"OtherTrxCode":"20201221172055",
"VirtualPosOrderId":"Test-50e76e51-6baf-4640-bbc5-1bd93120699b"
},
"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 |
PaymentDealer.UpdateDealerPaymentMarketPlace.InvalidRequest | The CheckKey may be bad, or the object may be bad, or the JSON may be corrupt. |
PaymentDealer.CheckPaymentDealerAuthentication.InvalidRequest | No such dealer was found, Dealer code, dealer username and/or password were entered incorrectly. |
PaymentDealer.UpdateDealerPaymentMarketPlace.ChannelPermissionNotAvailable | The reseller is not authorized to send a payment request. |
PaymentDealer.UpdateDealerPaymentMarketPlace.IpAddressNotAllowed | The IPs that the dealer can access are restricted. |
PaymentDealer.UpdateDealerPaymentMarketPlace.MustNeedDealerPaymentIdOrOtherTrxCodeOrVirtualPosOrderId | DealerPaymentId or OtherTrxCode or VirtualPosOrderId must be defined for the dealer. |
PaymentDealer.UpdateDealerPaymentMarketPlace.CannotFoundPayment | No such payment was found. |
PaymentDealer.UpdateDealerPaymentMarketPlace.InvalidCommissionScenario | Invalid Commission Scenario |
PaymentDealer.UpdateDealerPaymentMarketPlace.SubDealerInfoRequired | Sub-dealer information required. |
PaymentDealer.Fields.InvalidSoftwareLength | Invalid software name length |
PaymentDealer.Fields.InvalidDescriptionLength | Invalid description length |
PaymentDealer.Fields.InvalidBuyerFullNameLength | Invalid FullName length |
PaymentDealer.Fields.InvalidBuyerGsmNumberLength | Invalid number length |
PaymentDealer.Fields.InvalidBuyerAddressLength | Invalid address length |
PaymentDealer.CheckSubDealer.InvalidSubDealerId | Sub-dealer ID is invalid |
PaymentDealer.CheckSubDealer.InvalidSubDealerAmount | The sub-dealer's amount information is invalid |
PaymentDealer.CheckSubDealer.MoreThanOneSameSubDealer | More than one same sub-dealer defined |
PaymentDealer.CheckSubDealer.SubDealerAmountTotalMustBeEqualPaymentAmount | The sum of the sub-dealer's amount must be equal to the payment amount. |
PaymentDealer.CheckSubDealer.InconsistentForScenarioOne | 1.Conflicting information available for scenario |
PaymentDealer.CheckSubDealer.InconsistentForScenarioTwo | 2.Conflicting information available for scenario |
PaymentDealer.CheckSubDealer.InconsistentForScenarioThree | 3. Conflicting information available for scenario |
PaymentDealer.CheckSubDealer.InconsistentForScenarioFour | 4. Conflicting information available for scenario |
PaymentDealer.CheckSubDealer.InconsistentForScenarioFive | 5. Conflicting information available for scenario |
PaymentDealer.CheckSubDealer.InvalidDealerCommissionRate | Invalid Reseller Commission Rate |
PaymentDealer.CheckSubDealer.InvalidDealerCommissionFixedAmount | Invalid Dealer Commission Fixed Amount |
PaymentDealer.CheckSubDealer.InvalidDealerCommissionAmount | Invalid Dealer Commission Amount |
PaymentDealer.CheckSubDealer.InvalidGroupRevenuePercentage | Invalid Group Income Percentage |
PaymentDealer.CheckSubDealer.InvalidAmountToBeCommissioned | The amount to be applied to the commission to be reflected to the sub-dealer is invalid. |
PaymentDealer.CheckSubDealer.AmountToBeCommissionedTotalMustBeEqualPaymentAmount | The amount to be applied to the commission to be reflected to the sub-dealer must be equal to the total amount. |
PaymentDealer.CheckSubDealer.InvalidGroupRevenueAmount | Invalid Group Income Amount |
PaymentDealer.CheckSubDealer.InvalidCommissionScenario | Invalid Commission Scenario |
PaymentDealer.UpdateDealerPaymentMarketPlace.InvalidSubDealer | Invalid Sub-Reseller |
PaymentDealer.UpdateDealerPaymentMarketPlace.DealerGroupNotFoundOrMarketPlacePermission | The Dealer Group could not be found or there is no Marketplace permission. |
PaymentDealer.UpdateDealerPaymentMarketPlace.DealerCommissionRateNotFound | Reseller Commission Rate not found. |
PaymentDealer.UpdateDealerPaymentMarketPlace.DealerGroupCommissionRateNotFound | Dealer Group commission rate not found. |
PaymentDealer.UpdateDealerPaymentMarketPlace.MustBeSelectedIncludedFixedAmountToOneSubDealer | A fixed amount must be chosen for a sub-dealer. |
EX | An unexpected error has occurred |
Example of Failed Result
{
"Data":null,
"ResultCode":" PaymentDealer.UpdateDealerPaymentMarketPlace.InvalidSubDealer ",
"ResultMessage":"",
"Exception":null
}
Explanation
This service, like the UpdateDealerPayment service, can update the Software and Description fields before the statement is created and the bank does not receive the end of the day. If the commission rates have changed, an update is made by taking the most recent commission rates. If the income share ratio has changed, the new ratios are updated and updated. The difference of this service from the UpdateDealerPayment service is that if there is more than one merchant, the sum of the payment amounts sent from the sub-merchants can be redistributed so that the sum equals the main amount. If there is only one merchant, the payment amounts already sent are equal to the main amount. Commission scenario may change and mandatory fields are sent on a scenario basis. If the merchant sends the integer and decimal fields empty or does not send them, the default values (zero) of these fields are taken.