Get Payment Transaction List
List by Transaction Execution Date
Service Address
/PaymentDealer/GetPaymentTrxList
What Is It Used For?
This service ensures that the Transactions of the main payment record are listed according to the execution date. It also 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 21.05.2021 to this service, you will only list the transaction record for the partial refund.
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 |
---|---|
TrxStartDate | Date and time the transaction started (yyyy-MM-dd HH:mm) |
TrxEndDate | The date and time the transaction ended (yyyy-MM-dd HH:mm) |
TrxType (integer) | Indicates what type of transaction the transaction is. The status of the main payment record depends on the type of transaction and whether it was successful or not. 0 : Payment Request 1 : Pre-Provision 2 : Payment 3 : Cancellation 4 : Full Refund Optional field, all TrxTypes 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. |
Sample Request (JSON)
{
"PaymentDealerAuthentication":{
"DealerCode":"xxx",
"Username":"xxx",
"Password":"xxx",
"CheckKey":"28ba1f316e661ee7a0477a13aa30613da548c94a8098829af9255b04d7e916e3"
},
"PaymentDealerRequest":{
"TrxStartDate":"2020-07-12 09:00",
"TrxEndDate":"2020-08-12 09:00",
"TrxType":"",
"TrxStatus":"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 . 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 transactions is written in the "ListItemCount" field and "PaymentTrxList"In the object, both the main payment record information and the information of the transaction in that entered date range are returned. Please also review our GetDealerPaymentTrxDetailList service below to learn more about the relationship between the main payment record and the Transaction records of this payment
The Payment master record statuses returned in the PaymentTrxList Array are as follows;
PaymentStatus | PaymentTrxStatus | 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 |
Again, the Payment transaction statuses returned in the same PaymentTrxList Array are as follows;
TrxType | TrxStatus | Explanation |
---|---|---|
1 | 1 | Pre-Provision successful |
1 | 2 | Pre-Provision failed |
2 | 1 | Payment successful |
2 | 2 | Payment failed |
3 | 1 | Cancellation successful |
3 | 2 | Cancel failed |
4 | 1 | Return successful |
4 | 2 | Return failed |
The meanings of the Master Payment registration information returned with this service are explained in our (GetPaymentList) service above.
Transaction registration information returned with this service is information starting with DealerPaymentTrxId .
The meanings of this information are explained in detail in our (GetDealerPaymentTrxDetailList) service below.
Successful Result Example
{
"Data":{
"IsSuccessful":true,
"ResultCode":"00",
"ResultMessage":"",
"ListItemCount":1,
"PaymentTrxList":[
{
"DealerPaymentId":59821,
"OtherTrxCode":"20200727130744",
"CardHolderFullName":"Zeynep",
"CardNumberFirstSix":"552196",
"CardNumberLastFour":"5877",
"PaymentDate":"2020-07-27T13:07:44.757",
"Amount":1.00,
"RefAmount":0.00,
"CurrencyCode":"TL",
"InstallmentNumber":0,
"IsThreeD":true,
"Description":"",
"PaymentStatus":3,
"PaymentTrxStatus":1,
"DealerPaymentTrxId":41755,
"TrxCode":"58c83b1f-a12c-4b67-a0a6-874f9fbb13a2",
"TrxDate":"2020-07-27T14:45:48.56",
"TrxAmount":1.00,
"TrxType":3,
"TrxStatus":1,
"PaymentReason":0,
"VoidRefundReason":3,
"VirtualPosOrderId":"ORDER-20209NIVF05016880",
"ResultMessage":"",
"Software":"Possimulation",
"DealerStatementId":0,
"DealerCommissionAmount":0.02
}
]
},
"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.GetPaymentTrxList.InvalidDateTimeFormat | The date format should be "yyyy-MM-dd HH:mm". |
PaymentDealer.GetPaymentTrxList.ListItemCountLimitExceeded | A request with more than 500 records will fail. |
PaymentDealer.GetPaymentTrxList.InvalidTrxType | Invalid TrxType value entered. |
PaymentDealer.GetPaymentTrxList.InvalidTrxStatus | Invalid TrxStatus value entered. |
EX | An unexpected error has occurred |
Example of Failed Result
{
"Data": null,
"ResultCode": "PaymentDealer.CheckPaymentDealerAuthentication.InvalidAccount ",
"ResultMessage": "",
"Exception": null
}