Payment Update
Service Address
/PaymentDealer/UpdateDealerPayment
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 | ||||||||
---|---|---|---|---|---|---|---|---|---|
DealerPaymentId (integer) (optional) | It is the Payment ID generated as a result of the withdrawal attempt. | ||||||||
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. | ||||||||
VirtualPosOrderId (string) | It is the transaction number information returned as a result of the payment transaction. It is the number returned with the name trxCode in 3D payments. Key: trxCode     Value : ORDER-17131QQFG04026575 |
||||||||
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.) | ||||||||
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.
|
Sample Request (JSON)
{
"PaymentDealerAuthentication":{
"DealerCode":"xxx",
"Username":"xxx",
"Password":"xxx",
"CheckKey":"28ba1f316e661ee7a0477a13aa30613da548c94a8098829af9255b04d7e916e3"
},
"PaymentDealerRequest":{
"DealerPaymentId":"64227",
"Software":"Possimulation",
"Description":"",
"BuyerInformation":{
"BuyerFullName":"",
"BuyerGsmNumber":"",
"BuyerEmail":"",
"BuyerAddress":"Tasdelen / Çekmeköy"
}
}
}
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":64227,
"OtherTrxCode":"20201216153336",
"VirtualPosOrderId":"Test-b0cbed8c-4c59-4c2c-a8d3-01b8edddf8da"
},
"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.UpdateDealerPayment.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.UpdateDealerPayment.ChannelPermissionNotAvailable | The reseller is not authorized to send a payment request. |
PaymentDealer.UpdateDealerPayment.IpAddressNotAllowed | The IPs that the dealer can access are restricted. |
PaymentDealer.UpdateDealerPayment.MustNeedDealerPaymentIdOrOtherTrxCodeOrVirtualPosOrderId | DealerPaymentId or OtherTrxCode or VirtualPosOrderId must be defined for the dealer. |
PaymentDealer.UpdateDealerPayment.CannotFoundPayment | No such payment was found. |
PaymentDealer.UpdateDealerPayment.DealerCommissionRateNotFound | The dealer commission rate determined for the dealer could not be found. |
PaymentDealer.UpdateDealerPayment.DealerGroupCommissionRateNotFound | The dealer group commission rate determined for the dealer could not be found. |
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 |
EX | An unexpected error has occurred |
Example of Failed Result
{
"Data":null,
"ResultCode":"PaymentDealer.UpdateDealerPayment.DealerGroupCommissionRateNotFound ",
"ResultMessage":"",
"Exception":null
}
Explanation
This 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.