Get Payment List
List by Master Payment Record Transaction Date
Service Address
/PaymentDealer/GetPaymentListMarketPlace
What Is It Used For?
This service allows the main payment record to be listed by first transaction date. It just returns the main payment record information. For example, if a successful Payment was made on 15.01.2021 and a successful partial Refund was made on 21.01.2021, If you give the date 15.01.2021 to this service, you can list the main payment record.
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 |
---|---|
PaymentStartDate | Date and time payments start (yyyy-MM-dd HH:mm) |
PaymentEndDate | The date and time the payments are due (yyyy-MM-dd HH:mm) |
PaymentStatus (integer) | It is the latest status of the payment record. 0 : Payment Request 1 : Pre-Provision 2 : Payment 3 : Cancellation 4 : Full Refund Optional field, all PaymetStatus will be listed if sent blank or not sent at all. |
TrxStatus (integer) | Shows the result of the operation performed. 0 : Pending transaction 1 : Successful operation 2 : Failed operation It is optional field, all TrxStatus will be listed if sent blank or not sent at all. |
SubDealerId (integer) (optional) | It is the sub-dealer's number. If this field is not sent, all payments belonging to the parent dealer are listed. |
Sample Request (JSON)
{
"PaymentDealerAuthentication":{
"DealerCode":"xxx",
"Username":"xxx",
"Password":"xxx",
"CheckKey":"7c662eb7d85e9ec954ba3265d2fff6204e05d878de828ed2cdb3f0627acf4cc8"
},
"PaymentDealerRequest":{
"PaymentStartDate":"2016-09-06 14:00",
"PaymentEndDate":"2016-09-06 15:00",
"PaymentStatus":2,
"TrxStatus":1,
"SubDealerId":"1772"
}
}
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 operation returned from Moka is found. The status of the operation is checked by checking the "IsSuccessful" (true/false) field in "Data" . If this field returns false, the ResultCode and ResultMessage fields in the same object can be checked to see why the operation failed. "IsSuccessful" : If true, the number of payments is written in the "ListItemCount" field and payment information is returned in the "PaymentList" object.
The Payment master record statuses returned in the PaymentList Array are as follows;
PaymentStatus | TrxStatus | Explanation |
---|---|---|
0 - Standby | 0 - Standby | Awaiting payment confirmation |
1 - Pre-Provision | 1 - Successful | Pre-Provision successful |
1 - Pre-Provision | 2 - Failed | Pre-Provision failed |
2 - Payment | 1 - Successful | Payment successful |
2 - Payment | 2 - Failed | Payment failed |
3 - Cancel | 1 - Successful | Cancellation successful |
4 - Full Refund | 1 - Successful | Return successful |
If full payment is refunded, it changes to PaymentStatus = 4. If a partial refund is made, the status of the payment remains PaymentStatus = 2.
In the payment list response, the amount of the payment is written in the Amount field, and the total amount of the refunds related to this payment is written in the RefAmount field.
Successful Result Example
{
"Data":{
"IsSuccessful":true,
"ResultCode":"00",
"ResultMessage":"",
"ListItemCount":1,
"PaymentList":[
{
"DealerPaymentId":41732,
"OtherTrxCode":"20181204171832",
"CardHolderFullName":"elif yetimoğlu",
"CardNumberFirstSix":"526955",
"CardNumberLastFour":"4444",
"PaymentDate":"2018-12-04T17:18:33.043",
"Amount":3.00,
"RefAmount":0.00,
"CurrencyCode":"TL",
"InstallmentNumber":0,
"DealerCommissionAmount":0.15,
"DealerGroupCommissionAmount":0.09,
"IsThreeD":false,
"Description":"",
"PaymentStatus":2,
"TrxStatus":1,
"SubPaymentList":[
{
"DealerPaymentDealerId":14732,
"DealerId":1772,
"Amount":2.00,
"RefAmount":0.00,
"DealerCommissionAmount":0.07,
"DealerGroupCommissionAmount":0.06
}
]
}
]
},
"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.CheckPaymentDealerAuthentication.InvalidRequest | The CheckKey may be bad, or the object may be bad, or the JSON may be corrupt. |
PaymentDealer.CheckPaymentDealerAuthentication.InvalidAccount | No such dealer was found. |
PaymentDealer.GetPaymentListMarketPlace.InvalidDateTimeFormat | The date format should be "yyyy-MM-dd HH:mm".. |
PaymentDealer.GetPaymentListMarketPlace.ListItemCountLimitExceeded | Requests with more than 1000 records will fail. |
PaymentDealer.GetPaymentListMarketPlace.InvalidPaymentStatus | Invalid PaymentStatus value entered. |
PaymentDealer.GetPaymentListMarketPlace.DealerNotAuthorized | The dealer is not allowed. |
PaymentDealer.GetPaymentList.InvalidTrxStatus | Invalid TrxStatus value entered. |
EX | An unexpected error has occurred |
Example of Failed Result
{
"Data":null,
"ResultCode":"PaymentDealer.CheckPaymentDealerAuthentication.InvalidAccount ",
"ResultMessage":"",
"Exception":null
}