Get Payment list

List by Master Payment Record Transaction Date

Service Address

What Is It Used For?

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

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

ResultCodeExplanation
PaymentDealer.CheckPaymentDealerAuthentication.InvalidRequestThe CheckKey may be bad, or the object may be bad, or the JSON may be corrupt.
PaymentDealer.CheckPaymentDealerAuthentication.InvalidAccountNo such dealer was found.
PaymentDealer.GetPaymentList.InvalidDateTimeFormatThe date format should be "yyyy-MM-dd HH:mm".
PaymentDealer.GetPaymentList.ListItemCountLimitExceededA request with more than 500 records will fail.
PaymentDealer.GetPaymentList.InvalidPaymentStatusInvalid PaymentStatus value entered.
PaymentDealer.GetPaymentList.InvalidTrxStatusInvalid TrxStatus value entered.
EXAn unexpected error has occurred

Example of Failed Result


{
	"Data": null,
	"ResultCode": "PaymentDealer.CheckPaymentDealerAuthentication.InvalidAccount ",
	"ResultMessage": "",
	"Exception": null
}