Get Payment list
List by Master Payment Record Transaction Date
Service Address
/PaymentDealer/GetPaymentList
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 | Parameter |
---|---|
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 |
Sample Request (JSON)
{
"PaymentDealerAuthentication":{
"DealerCode":"xxx",
"Username":" xxx ",
"Password":" xxx ",
"CheckKey":"91e9aa3978e33a8e5867f6ed8fbe2a8a6117db0a2d1f17164801348e68306c07"
},
"PaymentDealerRequest":{
"PaymentStartDate":"2016-09-06 14:00",
"PaymentEndDate":"2016-09-06 15:00",
"PaymentStatus":2,
"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 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" field writes the payment amount, and the "RefAmount" field writes the total amount of the refunds related to this payment.
Successful Result Example
{
"Data": {
"IsSuccessful": true,
"ResultCode": "00",
"ResultMessage": "",
"ListItemCount": 1,
"PaymentList": [
{
"DealerPaymentId": 1422,
"OtherTrxCode": "123456",
"CardHolderFullName": "AHMET YILMAZ",
"CardNumberFirstSix": "554960",
"CardNumberLastFour": "5523",
"PaymentDate": "2016-09-06T14:29:36.68",
"Amount": 2.62,
"CurrencyCode": "TL",
"InstallmentNumber": 2,
"DealerCommissionAmount": 0.12,
"IsThreeD": true,
"PaymentStatus": 3,
"TrxStatus": 1
}
]
},
"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.GetPaymentList.InvalidDateTimeFormat | The date format should be "yyyy-MM-dd HH:mm". |
PaymentDealer.GetPaymentList.ListItemCountLimitExceeded | A request with more than 500 records will fail. |
PaymentDealer.GetPaymentList.InvalidPaymentStatus | Invalid PaymentStatus value entered. |
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
}