Service Address
/DealerSale/UpdatePaymentPlan
Request Parameters
DealerSaleAuthentication
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. |
DealerSaleRequest
Parameter |
Explanation |
DealerPaymentPlanId (integer) |
It is the Unique Id of the payment step on the Moka side. This payment step will be updated. The payment date has not yet come.. |
PaymentDate (string) |
What date to shoot (in "YYYYMMDD" format) |
Amount (decimal) |
Amount to be withdrawn. ( eg: 25.45 ) |
Currency (string) |
It is not a required field. If nothing is sent or an empty string is sent, the default currency is TL. (other values: "USD", "EUR") |
InstallmentNumber (integer) |
Installment amount (1: Single payment, 2: 2 Installments ...) |
Sample Request (JSON)
{
"DealerSaleAuthentication": {
"DealerCode": "xxx",
"Username": "xxx",
"Password": "xxx",
"CheckKey": "aabbccddeeff"
},
"DealerSaleRequest": {
"DealerPaymentPlanId": "1003",
"PaymentDate": "20170825",
"Amount": "1",
"Currency": "TL",
"InstallmentNumber": "1"
}
}
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 . The "Data" field contains the result of the returned operation. You can continue your flows by checking the information in "Data" .
Parameter |
Explanation |
DealerPaymentPlanId (integer) |
This is the Unique Id given by Moka for this payment step. |
DealerSaleId (integer) |
On the Moka side, it is the Id of the sale to which this payment step is added.. |
SaleCode (integer) |
It is the code of the sale to which this payment step is added on the dealer side.. |
PaymentDate (string) |
Date of shooting |
Amount (decimal) |
Amount to be withdrawn |
Currency (string) |
Currency unit |
InstallmentNumber (integer) |
Installment information |
HistoryDate (datetime) |
It returns blank because the payment date has not yet arrived. |
CardToken (guid) |
It returns blank because the payment date has not yet arrived. |
DealerCustomerTypeId (integer) |
If payment is made by sending a payment request, it will be filled. |
UserPosPaymentId (integer) |
By sending a payment request - Returns blank because the payment date has not yet arrived |
DealerPaymentId (integer) |
It returns blank because the payment date has not yet arrived |
IsManualPlan (boolean) |
It returns "true" because it is a manually entered payment step. |
PlanStatus (integer) |
0 : The plan is formed, it is not time to shoot yet. |
Successful Result Example
{
"Data": {
"DealerPaymentPlanId": 1003,
"DealerSaleId": 1003,
"SaleCode": "satis",
"PaymentDate": "20170825",
"Amount": 1,
"Currency": "TL",
"InstallmentNumber": 1,
"HistoryDate": "",
"CardToken": "",
"DealerCustomerTypeId": 0,
"UserPosPaymentId": 0,
"DealerPaymentId": 0,
"IsManualPlan": true,
"PlanStatus": 0
},
"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 |
DealerSale.UpdatePaymentPlan.InvalidRequest | The CheckKey may be bad, or the object may be bad, or the JSON may be corrupt. |
DealerSale.UpdatePaymentPlan.DealerPaymentPlanIdIsRequired | Reseller payment plan id information is required. |
DealerSale.UpdatePaymentPlan.AmountMustBeGreaterThanZero | The amount must be greater than zero. |
DealerSale.UpdatePaymentPlan.PaymentPlanNotFound | Payment plan not found. |
DealerSale.UpdatePaymentPlan.DealerSaleNotFound | No dealers found. |
DealerSale.UpdatePaymentPlan.DealerSaleIsNotManualPlan | Dealer sale is not a manual plan. |
DealerSale.UpdatePaymentPlan.PaymentDatePassed | The shooting date has passed. |
DealerSale.UpdatePaymentPlan.InvalidDateFormatPaymentDate | The format of the shooting date information is invalid. |
DealerSale.UpdatePaymentPlan.SaleEndDatePassed | The deadline to shoot for the sale has passed. |
DealerSale.UpdatePaymentPlan.PaymentDateCannotUpdatedToPassedDate | The payment date cannot be updated with the past date. |
DealerSale.UpdatePaymentPlan.PaymentDateMustBeAfterSaleBeginDate | The payment date must be after the start date of the sale. |
DealerSale.UpdatePaymentPlan.PaymentDateMustBeBeforeSaleEndDate | The payment date must be before the sale end date. |
DealerSale.UpdatePaymentPlan.InvalidCurrencyCode | The currency code is invalid. |
EX | An unexpected error has occurred |
Example of Failed Result
{
"Data": null,
"ResultCode": "DealerSale.UpdatePaymentPlan.PaymentPlanNotFound",
"ResultMessage": "",
"Exception": null
}